Automatically determine prefix when netbooted on EFI
This commit is contained in:
parent
574618a2e9
commit
cae730b452
8 changed files with 237 additions and 123 deletions
|
@ -89,6 +89,11 @@
|
|||
{ 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
#define GRUB_EFI_PXE_GUID \
|
||||
{ 0x03c4e603, 0xac28, 0x11d3, \
|
||||
{ 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
||||
}
|
||||
|
||||
#define GRUB_EFI_DEVICE_PATH_GUID \
|
||||
{ 0x09576e91, 0x6d3f, 0x11d2, \
|
||||
{ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
|
||||
|
@ -1118,6 +1123,36 @@ struct grub_efi_simple_text_output_interface
|
|||
};
|
||||
typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output_interface_t;
|
||||
|
||||
typedef grub_uint8_t grub_efi_pxe_packet_t[1472];
|
||||
|
||||
typedef struct grub_efi_pxe_mode
|
||||
{
|
||||
grub_uint8_t unused[52];
|
||||
grub_efi_pxe_packet_t dhcp_discover;
|
||||
grub_efi_pxe_packet_t dhcp_ack;
|
||||
grub_efi_pxe_packet_t proxy_offer;
|
||||
grub_efi_pxe_packet_t pxe_discover;
|
||||
grub_efi_pxe_packet_t pxe_reply;
|
||||
} grub_efi_pxe_mode_t;
|
||||
|
||||
typedef struct grub_efi_pxe
|
||||
{
|
||||
grub_uint64_t rev;
|
||||
void (*start) (void);
|
||||
void (*stop) (void);
|
||||
void (*dhcp) (void);
|
||||
void (*discover) (void);
|
||||
void (*mftp) (void);
|
||||
void (*udpwrite) (void);
|
||||
void (*udpread) (void);
|
||||
void (*setipfilter) (void);
|
||||
void (*arp) (void);
|
||||
void (*setparams) (void);
|
||||
void (*setstationip) (void);
|
||||
void (*setpackets) (void);
|
||||
struct grub_efi_pxe_mode *mode;
|
||||
} grub_efi_pxe_t;
|
||||
|
||||
#define GRUB_EFI_BLACK 0x00
|
||||
#define GRUB_EFI_BLUE 0x01
|
||||
#define GRUB_EFI_GREEN 0x02
|
||||
|
|
|
@ -62,6 +62,14 @@ grub_err_t EXPORT_FUNC (grub_efi_set_virtual_address_map) (grub_efi_uintn_t memo
|
|||
grub_efi_uint32_t descriptor_version,
|
||||
grub_efi_memory_descriptor_t *virtual_map);
|
||||
|
||||
int
|
||||
EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,
|
||||
const grub_efi_device_path_t *dp2);
|
||||
|
||||
extern void (*EXPORT_VAR(grub_efi_net_config)) (grub_efi_handle_t hnd,
|
||||
char **device,
|
||||
char **path);
|
||||
|
||||
void grub_efi_mm_init (void);
|
||||
void grub_efi_mm_fini (void);
|
||||
void grub_efi_init (void);
|
||||
|
|
|
@ -109,6 +109,11 @@ struct grub_net_card
|
|||
grub_net_card_flags_t flags;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct grub_efi_simple_network *efi_net;
|
||||
void *efi_handle;
|
||||
};
|
||||
void *data;
|
||||
int data_num;
|
||||
};
|
||||
|
@ -404,7 +409,8 @@ grub_net_configure_by_dhcp_ack (const char *name,
|
|||
const struct grub_net_card *card,
|
||||
grub_net_interface_flags_t flags,
|
||||
const struct grub_net_bootp_packet *bp,
|
||||
grub_size_t size);
|
||||
grub_size_t size,
|
||||
int is_def, char **device, char **path);
|
||||
|
||||
void
|
||||
grub_net_process_dhcp (struct grub_net_buff *nb,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue