2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
Add support for pre-loaded modules into the EFI port. * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten completely. Accept one more argument DIR. The caller has changed. * kern/i386/efi/init.c (grub_arch_modules_addr): Removed. * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h. (grub_efi_loaded_image_guid): New variable. (grub_efi_get_loaded_image): New function. (grub_arch_modules_addr): Likewise. * include/grub/efi/efi.h (grub_efi_get_loaded_image): New prototype. * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro. (struct grub_efi_loaded_image): New structure. (grub_efi_loaded_image_t): New type.
This commit is contained in:
parent
c352d8dd0b
commit
2eab1c0dad
6 changed files with 180 additions and 14 deletions
|
@ -69,6 +69,9 @@
|
|||
|
||||
#define GRUB_EFI_OPTIONAL_PTR 0x00000001
|
||||
|
||||
#define GRUB_EFI_LOADED_IMAGE_GUID \
|
||||
{ 0x5b1b31a1, 0x9562, 0x11d2, 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
|
||||
|
||||
/* Enumerations. */
|
||||
enum grub_efi_timer_delay
|
||||
{
|
||||
|
@ -343,7 +346,6 @@ struct grub_efi_boot_services
|
|||
grub_efi_event_t *event);
|
||||
|
||||
grub_efi_status_t
|
||||
|
||||
(*set_timer) (grub_efi_event_t event,
|
||||
grub_efi_timer_delay_t type,
|
||||
grub_efi_uint64_t trigger_time);
|
||||
|
@ -682,4 +684,26 @@ struct grub_efi_system_table
|
|||
};
|
||||
typedef struct grub_efi_system_table grub_efi_system_table_t;
|
||||
|
||||
struct grub_efi_loaded_image
|
||||
{
|
||||
grub_efi_uint32_t revision;
|
||||
grub_efi_handle_t parent_handle;
|
||||
grub_efi_system_table_t *system_table;
|
||||
|
||||
grub_efi_handle_t device_handle;
|
||||
grub_efi_device_path_t *file_path;
|
||||
void *reserved;
|
||||
|
||||
grub_efi_uint32_t load_options_size;
|
||||
void *load_options;
|
||||
|
||||
void *image_base;
|
||||
grub_efi_uint64_t image_size;
|
||||
grub_efi_memory_type_t image_code_type;
|
||||
grub_efi_memory_type_t image_data_type;
|
||||
|
||||
grub_efi_status_t (*unload) (grub_efi_handle_t image_handle);
|
||||
};
|
||||
typedef struct grub_efi_loaded_image grub_efi_loaded_image_t;
|
||||
|
||||
#endif /* ! GRUB_EFI_API_HEADER */
|
||||
|
|
|
@ -40,6 +40,7 @@ int EXPORT_FUNC(grub_efi_get_memory_map) (grub_efi_uintn_t *memory_map_size,
|
|||
grub_efi_uintn_t *map_key,
|
||||
grub_efi_uintn_t *descriptor_size,
|
||||
grub_efi_uint32_t *descriptor_version);
|
||||
grub_efi_loaded_image_t *EXPORT_FUNC(grub_efi_get_loaded_image) (void);
|
||||
|
||||
void grub_efi_mm_init (void);
|
||||
void grub_efi_mm_fini (void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue