mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 18:19:23 +00:00
Create Open firmware pseudo driver.
Change ofnet.c to disknet.c and remove almost all ieee1275 specific code. Create grub_net_malloc to handle iee1275 memory issues in a temporary solution.
This commit is contained in:
1 parent
9a9cee4e43
commit
87fdc7e8d2
15 files changed
+272
-190
No files matched your search
@@ -24,7 +24,6 @@
|
||||
#include <grub/types.h>
|
||||
#include <grub/machine/ieee1275.h>
|
||||
|
||||
/* Maps a device alias to a pathname. */
|
||||
struct grub_ieee1275_devalias
|
||||
{
|
||||
char *name;
|
||||
@@ -65,6 +64,13 @@ struct grub_ieee1275_common_hdr
|
||||
typedef grub_uint32_t grub_ieee1275_ihandle_t;
|
||||
typedef grub_uint32_t grub_ieee1275_phandle_t;
|
||||
|
||||
struct grub_ofnetcard_data
|
||||
{
|
||||
char *path;
|
||||
grub_ieee1275_ihandle_t handle;
|
||||
};
|
||||
|
||||
/* Maps a device alias to a pathname. */
|
||||
extern grub_ieee1275_phandle_t EXPORT_VAR(grub_ieee1275_chosen);
|
||||
extern grub_ieee1275_ihandle_t EXPORT_VAR(grub_ieee1275_mmu);
|
||||
extern int (* EXPORT_VAR(grub_ieee1275_entry_fn)) (void *);
|
||||
@@ -186,4 +192,6 @@ int EXPORT_FUNC(grub_ieee1275_devices_iterate) (int (*hook)
|
||||
(struct grub_ieee1275_devalias *
|
||||
alias));
|
||||
char *EXPORT_FUNC(grub_ieee1275_get_aliasdevname) (const char *path);
|
||||
void EXPORT_FUNC(grub_ofnet_findcards) (void);
|
||||
void EXPORT_FUNC(grub_ofnet_probecards) (void);
|
||||
#endif /* ! GRUB_IEEE1275_HEADER */
|
||||
@@ -23,32 +23,9 @@
|
||||
#include <grub/err.h>
|
||||
#include <grub/types.h>
|
||||
|
||||
extern void grub_ofnet_init(void);
|
||||
extern void grub_ofnet_fini(void);
|
||||
void grub_ofnet_init(void);
|
||||
void grub_ofnet_fini(void);
|
||||
|
||||
/*
|
||||
struct grub_net;
|
||||
|
||||
struct grub_net_dev
|
||||
{
|
||||
/ The device name. /
|
||||
const char *name;
|
||||
|
||||
/ FIXME: Just a template. /
|
||||
int (*probe) (struct grub_net *net, const void *addr);
|
||||
void (*reset) (struct grub_net *net);
|
||||
int (*poll) (struct grub_net *net);
|
||||
void (*transmit) (struct grub_net *net, const void *destip,
|
||||
unsigned srcsock, unsigned destsock, const void *packet);
|
||||
void (*disable) (struct grub_net *net);
|
||||
|
||||
/ The next net device. /
|
||||
struct grub_net_dev *next;
|
||||
};
|
||||
typedef struct grub_net_dev *grub_net_dev_t;
|
||||
|
||||
struct grub_fs;
|
||||
*/
|
||||
struct grub_ofnet
|
||||
{
|
||||
/* The net name. */
|
||||
@@ -85,7 +62,7 @@ struct grub_bootp {
|
||||
char file [128]; /* Boot filename */
|
||||
// grub_uint32_t filesize ; /*File size (testing)*/
|
||||
unsigned char vend [64];
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct grub_bootp* grub_bootp_t;
|
||||
|
||||
|
||||
Reference in new issue
Block a user