guid: Unify GUID types
There are 3 implementations of a GUID in GRUB. Replace them with a common one, placed in types.h. It uses the "packed" flavor of the GUID structs, the alignment attribute is dropped, since it is not required. Signed-off-by: Oliver Steffen <osteffen@redhat.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
7e4da6fb2d
commit
06edd40db7
@ -759,8 +759,8 @@ grub_cmd_acpi (struct grub_extcmd_context *ctxt, int argc, char **args)
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
{
|
||||
struct grub_efi_guid acpi = GRUB_EFI_ACPI_TABLE_GUID;
|
||||
struct grub_efi_guid acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||
static grub_guid_t acpi = GRUB_EFI_ACPI_TABLE_GUID;
|
||||
static grub_guid_t acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||
|
||||
grub_efi_system_table->boot_services->install_configuration_table (&acpi20,
|
||||
grub_acpi_get_rsdpv2 ());
|
||||
|
||||
@ -38,7 +38,7 @@ grub_cmd_fwsetup (grub_command_t cmd __attribute__ ((unused)),
|
||||
grub_efi_uint64_t os_indications = GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI;
|
||||
grub_err_t status;
|
||||
grub_size_t oi_size;
|
||||
static grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
static grub_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
|
||||
if (argc >= 1 && grub_strcmp(args[0], "--is-supported") == 0)
|
||||
return !efifwsetup_is_supported ();
|
||||
@ -72,7 +72,7 @@ efifwsetup_is_supported (void)
|
||||
{
|
||||
grub_efi_uint64_t *os_indications_supported = NULL;
|
||||
grub_size_t oi_size = 0;
|
||||
static grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
static grub_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
grub_efi_boolean_t ret = 0;
|
||||
|
||||
grub_efi_get_variable ("OsIndicationsSupported", &global, &oi_size,
|
||||
|
||||
@ -27,9 +27,9 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
|
||||
static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||
static grub_efi_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;
|
||||
static grub_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
|
||||
static grub_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||
static grub_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;
|
||||
|
||||
#define EBDA_SEG_ADDR 0x40e
|
||||
#define LOW_MEM_ADDR 0x413
|
||||
@ -105,15 +105,15 @@ fake_bios_data (int use_rom)
|
||||
smbios = 0;
|
||||
for (i = 0; i < grub_efi_system_table->num_table_entries; i++)
|
||||
{
|
||||
grub_efi_packed_guid_t *guid =
|
||||
grub_guid_t *guid =
|
||||
&grub_efi_system_table->configuration_table[i].vendor_guid;
|
||||
|
||||
if (! grub_memcmp (guid, &acpi2_guid, sizeof (grub_efi_guid_t)))
|
||||
if (! grub_memcmp (guid, &acpi2_guid, sizeof (grub_guid_t)))
|
||||
{
|
||||
acpi = grub_efi_system_table->configuration_table[i].vendor_table;
|
||||
grub_dprintf ("efi", "ACPI2: %p\n", acpi);
|
||||
}
|
||||
else if (! grub_memcmp (guid, &acpi_guid, sizeof (grub_efi_guid_t)))
|
||||
else if (! grub_memcmp (guid, &acpi_guid, sizeof (grub_guid_t)))
|
||||
{
|
||||
void *t;
|
||||
|
||||
@ -122,7 +122,7 @@ fake_bios_data (int use_rom)
|
||||
acpi = t;
|
||||
grub_dprintf ("efi", "ACPI: %p\n", t);
|
||||
}
|
||||
else if (! grub_memcmp (guid, &smbios_guid, sizeof (grub_efi_guid_t)))
|
||||
else if (! grub_memcmp (guid, &smbios_guid, sizeof (grub_guid_t)))
|
||||
{
|
||||
smbios = grub_efi_system_table->configuration_table[i].vendor_table;
|
||||
grub_dprintf ("efi", "SMBIOS: %p\n", smbios);
|
||||
|
||||
@ -31,7 +31,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
struct known_protocol
|
||||
{
|
||||
grub_efi_guid_t guid;
|
||||
grub_guid_t guid;
|
||||
const char *name;
|
||||
} known_protocols[] =
|
||||
{
|
||||
@ -96,7 +96,7 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)),
|
||||
grub_efi_handle_t handle = handles[i];
|
||||
grub_efi_status_t status;
|
||||
grub_efi_uintn_t num_protocols;
|
||||
grub_efi_packed_guid_t **protocols;
|
||||
grub_guid_t **protocols;
|
||||
grub_efi_device_path_t *dp;
|
||||
|
||||
grub_printf ("Handle %p\n", handle);
|
||||
|
||||
@ -29,7 +29,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
struct guid_mapping
|
||||
{
|
||||
grub_efi_guid_t guid;
|
||||
grub_guid_t guid;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
@ -104,7 +104,7 @@ grub_cmd_lsefisystab (struct grub_command *cmd __attribute__ ((unused)),
|
||||
|
||||
for (j = 0; j < ARRAY_SIZE (guid_mappings); j++)
|
||||
if (grub_memcmp (&guid_mappings[j].guid, &t->vendor_guid,
|
||||
sizeof (grub_efi_guid_t)) == 0)
|
||||
sizeof (grub_guid_t)) == 0)
|
||||
grub_printf (" %s", guid_mappings[j].name);
|
||||
|
||||
grub_printf ("\n");
|
||||
|
||||
@ -139,12 +139,12 @@ grub_cmd_lssal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
const grub_efi_system_table_t *st = grub_efi_system_table;
|
||||
grub_efi_configuration_table_t *t = st->configuration_table;
|
||||
unsigned int i;
|
||||
grub_efi_packed_guid_t guid = GRUB_EFI_SAL_TABLE_GUID;
|
||||
static grub_guid_t guid = GRUB_EFI_SAL_TABLE_GUID;
|
||||
|
||||
for (i = 0; i < st->num_table_entries; i++)
|
||||
{
|
||||
if (grub_memcmp (&guid, &t->vendor_guid,
|
||||
sizeof (grub_efi_packed_guid_t)) == 0)
|
||||
sizeof (grub_guid_t)) == 0)
|
||||
{
|
||||
disp_sal (t->vendor_table);
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
@ -26,14 +26,14 @@ struct grub_smbios_eps *
|
||||
grub_machine_smbios_get_eps (void)
|
||||
{
|
||||
unsigned i;
|
||||
static grub_efi_packed_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;
|
||||
static grub_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;
|
||||
|
||||
for (i = 0; i < grub_efi_system_table->num_table_entries; i++)
|
||||
{
|
||||
grub_efi_packed_guid_t *guid =
|
||||
grub_guid_t *guid =
|
||||
&grub_efi_system_table->configuration_table[i].vendor_guid;
|
||||
|
||||
if (! grub_memcmp (guid, &smbios_guid, sizeof (grub_efi_packed_guid_t)))
|
||||
if (! grub_memcmp (guid, &smbios_guid, sizeof (grub_guid_t)))
|
||||
return (struct grub_smbios_eps *)
|
||||
grub_efi_system_table->configuration_table[i].vendor_table;
|
||||
}
|
||||
@ -45,14 +45,14 @@ struct grub_smbios_eps3 *
|
||||
grub_machine_smbios_get_eps3 (void)
|
||||
{
|
||||
unsigned i;
|
||||
static grub_efi_packed_guid_t smbios3_guid = GRUB_EFI_SMBIOS3_TABLE_GUID;
|
||||
static grub_guid_t smbios3_guid = GRUB_EFI_SMBIOS3_TABLE_GUID;
|
||||
|
||||
for (i = 0; i < grub_efi_system_table->num_table_entries; i++)
|
||||
{
|
||||
grub_efi_packed_guid_t *guid =
|
||||
grub_guid_t *guid =
|
||||
&grub_efi_system_table->configuration_table[i].vendor_guid;
|
||||
|
||||
if (! grub_memcmp (guid, &smbios3_guid, sizeof (grub_efi_packed_guid_t)))
|
||||
if (! grub_memcmp (guid, &smbios3_guid, sizeof (grub_guid_t)))
|
||||
return (struct grub_smbios_eps3 *)
|
||||
grub_efi_system_table->configuration_table[i].vendor_table;
|
||||
}
|
||||
|
||||
@ -30,9 +30,9 @@
|
||||
|
||||
typedef TCG_PCR_EVENT grub_tpm_event_t;
|
||||
|
||||
static grub_efi_guid_t tpm_guid = EFI_TPM_GUID;
|
||||
static grub_efi_guid_t tpm2_guid = EFI_TPM2_GUID;
|
||||
static grub_efi_guid_t cc_measurement_guid = GRUB_EFI_CC_MEASUREMENT_PROTOCOL_GUID;
|
||||
static grub_guid_t tpm_guid = EFI_TPM_GUID;
|
||||
static grub_guid_t tpm2_guid = EFI_TPM2_GUID;
|
||||
static grub_guid_t cc_measurement_guid = GRUB_EFI_CC_MEASUREMENT_PROTOCOL_GUID;
|
||||
|
||||
static grub_efi_handle_t *grub_tpm_handle;
|
||||
static grub_uint8_t grub_tpm_version;
|
||||
|
||||
@ -119,7 +119,7 @@ grub_cmd_probe (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
if (grub_strcmp(dev->disk->partition->partmap->name, "gpt") == 0)
|
||||
{
|
||||
struct grub_gpt_partentry entry;
|
||||
grub_gpt_part_guid_t *guid;
|
||||
grub_guid_t *guid;
|
||||
|
||||
if (grub_disk_read(disk, p->offset, p->index, sizeof(entry), &entry))
|
||||
{
|
||||
|
||||
@ -37,7 +37,7 @@ struct grub_efidisk_data
|
||||
};
|
||||
|
||||
/* GUID. */
|
||||
static grub_efi_guid_t block_io_guid = GRUB_EFI_BLOCK_IO_GUID;
|
||||
static grub_guid_t block_io_guid = GRUB_EFI_BLOCK_IO_GUID;
|
||||
|
||||
static struct grub_efidisk_data *fd_devices;
|
||||
static struct grub_efidisk_data *hd_devices;
|
||||
@ -319,7 +319,7 @@ name_devices (struct grub_efidisk_data *devices)
|
||||
== GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE)
|
||||
{
|
||||
grub_efi_vendor_device_path_t *vendor = (grub_efi_vendor_device_path_t *) dp;
|
||||
const struct grub_efi_guid apple = GRUB_EFI_VENDOR_APPLE_GUID;
|
||||
static const grub_guid_t apple = GRUB_EFI_VENDOR_APPLE_GUID;
|
||||
|
||||
if (vendor->header.length == sizeof (*vendor)
|
||||
&& grub_memcmp (&vendor->vendor_guid, &apple,
|
||||
|
||||
@ -136,7 +136,7 @@ msdos_has_ldm_partition (grub_disk_t dsk)
|
||||
return has_ldm;
|
||||
}
|
||||
|
||||
static const grub_gpt_part_guid_t ldm_type = GRUB_GPT_PARTITION_TYPE_LDM;
|
||||
static const grub_guid_t ldm_type = GRUB_GPT_PARTITION_TYPE_LDM;
|
||||
|
||||
/* Helper for gpt_ldm_sector. */
|
||||
static int
|
||||
|
||||
@ -29,9 +29,9 @@ grub_machine_efiemu_init_tables (void)
|
||||
{
|
||||
void *table;
|
||||
grub_err_t err;
|
||||
static grub_efi_guid_t smbios = GRUB_EFI_SMBIOS_TABLE_GUID;
|
||||
static grub_efi_guid_t acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||
static grub_efi_guid_t acpi = GRUB_EFI_ACPI_TABLE_GUID;
|
||||
static grub_guid_t smbios = GRUB_EFI_SMBIOS_TABLE_GUID;
|
||||
static grub_guid_t acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||
static grub_guid_t acpi = GRUB_EFI_ACPI_TABLE_GUID;
|
||||
|
||||
err = grub_efiemu_unregister_configuration_table (smbios);
|
||||
if (err)
|
||||
|
||||
@ -80,7 +80,7 @@ grub_efiemu_unload (void)
|
||||
|
||||
/* Remove previously registered table from the list */
|
||||
grub_err_t
|
||||
grub_efiemu_unregister_configuration_table (grub_efi_guid_t guid)
|
||||
grub_efiemu_unregister_configuration_table (grub_guid_t guid)
|
||||
{
|
||||
struct grub_efiemu_configuration_table *cur, *prev;
|
||||
|
||||
@ -136,7 +136,7 @@ grub_efiemu_register_prepare_hook (grub_err_t (*hook) (void *data),
|
||||
or with a hook
|
||||
*/
|
||||
grub_err_t
|
||||
grub_efiemu_register_configuration_table (grub_efi_guid_t guid,
|
||||
grub_efiemu_register_configuration_table (grub_guid_t guid,
|
||||
void * (*get_table) (void *data),
|
||||
void (*unload) (void *data),
|
||||
void *data)
|
||||
|
||||
@ -66,7 +66,7 @@ efiemu_convert_pointer (grub_efi_uintn_t debug_disposition,
|
||||
|
||||
grub_efi_status_t __grub_efi_api
|
||||
efiemu_get_variable (grub_efi_char16_t *variable_name,
|
||||
const grub_efi_guid_t *vendor_guid,
|
||||
const grub_guid_t *vendor_guid,
|
||||
grub_efi_uint32_t *attributes,
|
||||
grub_efi_uintn_t *data_size,
|
||||
void *data);
|
||||
@ -74,11 +74,11 @@ efiemu_get_variable (grub_efi_char16_t *variable_name,
|
||||
grub_efi_status_t __grub_efi_api
|
||||
efiemu_get_next_variable_name (grub_efi_uintn_t *variable_name_size,
|
||||
grub_efi_char16_t *variable_name,
|
||||
grub_efi_guid_t *vendor_guid);
|
||||
grub_guid_t *vendor_guid);
|
||||
|
||||
grub_efi_status_t __grub_efi_api
|
||||
efiemu_set_variable (grub_efi_char16_t *variable_name,
|
||||
const grub_efi_guid_t *vendor_guid,
|
||||
const grub_guid_t *vendor_guid,
|
||||
grub_efi_uint32_t attributes,
|
||||
grub_efi_uintn_t data_size,
|
||||
void *data);
|
||||
@ -416,7 +416,7 @@ EFI_FUNC (efiemu_convert_pointer) (grub_efi_uintn_t debug_disposition,
|
||||
|
||||
/* Find variable by name and GUID. */
|
||||
static struct efi_variable *
|
||||
find_variable (const grub_efi_guid_t *vendor_guid,
|
||||
find_variable (const grub_guid_t *vendor_guid,
|
||||
grub_efi_char16_t *variable_name)
|
||||
{
|
||||
grub_uint8_t *ptr;
|
||||
@ -438,7 +438,7 @@ find_variable (const grub_efi_guid_t *vendor_guid,
|
||||
|
||||
grub_efi_status_t __grub_efi_api
|
||||
EFI_FUNC (efiemu_get_variable) (grub_efi_char16_t *variable_name,
|
||||
const grub_efi_guid_t *vendor_guid,
|
||||
const grub_guid_t *vendor_guid,
|
||||
grub_efi_uint32_t *attributes,
|
||||
grub_efi_uintn_t *data_size,
|
||||
void *data)
|
||||
@ -464,7 +464,7 @@ EFI_FUNC (efiemu_get_variable) (grub_efi_char16_t *variable_name,
|
||||
grub_efi_status_t __grub_efi_api EFI_FUNC
|
||||
(efiemu_get_next_variable_name) (grub_efi_uintn_t *variable_name_size,
|
||||
grub_efi_char16_t *variable_name,
|
||||
grub_efi_guid_t *vendor_guid)
|
||||
grub_guid_t *vendor_guid)
|
||||
{
|
||||
struct efi_variable *efivar;
|
||||
LOG ('l');
|
||||
@ -503,7 +503,7 @@ grub_efi_status_t __grub_efi_api EFI_FUNC
|
||||
|
||||
grub_efi_status_t __grub_efi_api
|
||||
EFI_FUNC (efiemu_set_variable) (grub_efi_char16_t *variable_name,
|
||||
const grub_efi_guid_t *vendor_guid,
|
||||
const grub_guid_t *vendor_guid,
|
||||
grub_efi_uint32_t attributes,
|
||||
grub_efi_uintn_t data_size,
|
||||
void *data)
|
||||
|
||||
@ -26,14 +26,14 @@ struct grub_acpi_rsdp_v10 *
|
||||
grub_machine_acpi_get_rsdpv1 (void)
|
||||
{
|
||||
unsigned i;
|
||||
static grub_efi_packed_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
|
||||
static grub_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
|
||||
|
||||
for (i = 0; i < grub_efi_system_table->num_table_entries; i++)
|
||||
{
|
||||
grub_efi_packed_guid_t *guid =
|
||||
grub_guid_t *guid =
|
||||
&grub_efi_system_table->configuration_table[i].vendor_guid;
|
||||
|
||||
if (! grub_memcmp (guid, &acpi_guid, sizeof (grub_efi_packed_guid_t)))
|
||||
if (! grub_memcmp (guid, &acpi_guid, sizeof (grub_guid_t)))
|
||||
return (struct grub_acpi_rsdp_v10 *)
|
||||
grub_efi_system_table->configuration_table[i].vendor_table;
|
||||
}
|
||||
@ -44,14 +44,14 @@ struct grub_acpi_rsdp_v20 *
|
||||
grub_machine_acpi_get_rsdpv2 (void)
|
||||
{
|
||||
unsigned i;
|
||||
static grub_efi_packed_guid_t acpi20_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||
static grub_guid_t acpi20_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||
|
||||
for (i = 0; i < grub_efi_system_table->num_table_entries; i++)
|
||||
{
|
||||
grub_efi_packed_guid_t *guid =
|
||||
grub_guid_t *guid =
|
||||
&grub_efi_system_table->configuration_table[i].vendor_guid;
|
||||
|
||||
if (! grub_memcmp (guid, &acpi20_guid, sizeof (grub_efi_packed_guid_t)))
|
||||
if (! grub_memcmp (guid, &acpi20_guid, sizeof (grub_guid_t)))
|
||||
return (struct grub_acpi_rsdp_v20 *)
|
||||
grub_efi_system_table->configuration_table[i].vendor_table;
|
||||
}
|
||||
|
||||
@ -35,12 +35,12 @@ grub_efi_handle_t grub_efi_image_handle;
|
||||
/* The pointer to a system table. Filled in by the startup code. */
|
||||
grub_efi_system_table_t *grub_efi_system_table;
|
||||
|
||||
static grub_efi_guid_t console_control_guid = GRUB_EFI_CONSOLE_CONTROL_GUID;
|
||||
static grub_efi_guid_t loaded_image_guid = GRUB_EFI_LOADED_IMAGE_GUID;
|
||||
static grub_efi_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
|
||||
static grub_guid_t console_control_guid = GRUB_EFI_CONSOLE_CONTROL_GUID;
|
||||
static grub_guid_t loaded_image_guid = GRUB_EFI_LOADED_IMAGE_GUID;
|
||||
static grub_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
|
||||
|
||||
void *
|
||||
grub_efi_locate_protocol (grub_efi_guid_t *protocol, void *registration)
|
||||
grub_efi_locate_protocol (grub_guid_t *protocol, void *registration)
|
||||
{
|
||||
void *interface;
|
||||
grub_efi_status_t status;
|
||||
@ -59,7 +59,7 @@ grub_efi_locate_protocol (grub_efi_guid_t *protocol, void *registration)
|
||||
from the heap. */
|
||||
grub_efi_handle_t *
|
||||
grub_efi_locate_handle (grub_efi_locate_search_type_t search_type,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
void *search_key,
|
||||
grub_efi_uintn_t *num_handles)
|
||||
{
|
||||
@ -98,7 +98,7 @@ grub_efi_locate_handle (grub_efi_locate_search_type_t search_type,
|
||||
|
||||
void *
|
||||
grub_efi_open_protocol (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
grub_efi_uint32_t attributes)
|
||||
{
|
||||
grub_efi_boot_services_t *b;
|
||||
@ -119,7 +119,7 @@ grub_efi_open_protocol (grub_efi_handle_t handle,
|
||||
}
|
||||
|
||||
grub_efi_status_t
|
||||
grub_efi_close_protocol (grub_efi_handle_t handle, grub_efi_guid_t *protocol)
|
||||
grub_efi_close_protocol (grub_efi_handle_t handle, grub_guid_t *protocol)
|
||||
{
|
||||
grub_efi_boot_services_t *b = grub_efi_system_table->boot_services;
|
||||
|
||||
@ -203,7 +203,7 @@ grub_efi_set_virtual_address_map (grub_efi_uintn_t memory_map_size,
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_efi_set_variable_with_attributes (const char *var, const grub_efi_guid_t *guid,
|
||||
grub_efi_set_variable_with_attributes (const char *var, const grub_guid_t *guid,
|
||||
void *data, grub_size_t datasize, grub_efi_uint32_t attributes)
|
||||
{
|
||||
grub_efi_status_t status;
|
||||
@ -230,7 +230,7 @@ grub_efi_set_variable_with_attributes (const char *var, const grub_efi_guid_t *g
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_efi_set_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
grub_efi_set_variable (const char *var, const grub_guid_t *guid,
|
||||
void *data, grub_size_t datasize)
|
||||
{
|
||||
return grub_efi_set_variable_with_attributes (var, guid, data, datasize,
|
||||
@ -241,7 +241,7 @@ grub_efi_set_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
|
||||
grub_efi_status_t
|
||||
grub_efi_get_variable_with_attributes (const char *var,
|
||||
const grub_efi_guid_t *guid,
|
||||
const grub_guid_t *guid,
|
||||
grub_size_t *datasize_out,
|
||||
void **data_out,
|
||||
grub_efi_uint32_t *attributes)
|
||||
@ -296,7 +296,7 @@ grub_efi_get_variable_with_attributes (const char *var,
|
||||
}
|
||||
|
||||
grub_efi_status_t
|
||||
grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
grub_efi_get_variable (const char *var, const grub_guid_t *guid,
|
||||
grub_size_t *datasize_out, void **data_out)
|
||||
{
|
||||
return grub_efi_get_variable_with_attributes (var, guid, datasize_out, data_out, NULL);
|
||||
|
||||
@ -24,7 +24,7 @@ void *
|
||||
grub_efi_get_firmware_fdt (void)
|
||||
{
|
||||
grub_efi_configuration_table_t *tables;
|
||||
static grub_efi_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID;
|
||||
static grub_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID;
|
||||
void *firmware_fdt = NULL;
|
||||
unsigned int i;
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ static grub_efi_char16_t stack_chk_fail_msg[] =
|
||||
L"* GRUB: ABORTED!!! *\r\n"
|
||||
L"* GRUB: REBOOTING IN 5 SECONDS... *\r\n";
|
||||
|
||||
static grub_efi_guid_t rng_protocol_guid = GRUB_EFI_RNG_PROTOCOL_GUID;
|
||||
static grub_guid_t rng_protocol_guid = GRUB_EFI_RNG_PROTOCOL_GUID;
|
||||
|
||||
/*
|
||||
* Don't put this on grub_efi_init()'s local stack to avoid it
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include <grub/types.h>
|
||||
#include <grub/verify.h>
|
||||
|
||||
static grub_efi_guid_t shim_lock_guid = GRUB_EFI_SHIM_LOCK_GUID;
|
||||
static grub_guid_t shim_lock_guid = GRUB_EFI_SHIM_LOCK_GUID;
|
||||
|
||||
/*
|
||||
* Determine whether we're in secure boot mode.
|
||||
@ -41,7 +41,7 @@ static grub_efi_guid_t shim_lock_guid = GRUB_EFI_SHIM_LOCK_GUID;
|
||||
grub_uint8_t
|
||||
grub_efi_get_secureboot (void)
|
||||
{
|
||||
static grub_efi_guid_t efi_variable_guid = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
static grub_guid_t efi_variable_guid = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
grub_efi_status_t status;
|
||||
grub_efi_uint32_t attr = 0;
|
||||
grub_size_t size = 0;
|
||||
|
||||
@ -86,7 +86,7 @@ grub_err_t
|
||||
grub_fdt_install (void)
|
||||
{
|
||||
grub_efi_boot_services_t *b;
|
||||
static grub_efi_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID;
|
||||
static grub_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID;
|
||||
grub_efi_status_t status;
|
||||
|
||||
if (fdt == NULL && loaded_fdt == NULL)
|
||||
|
||||
@ -51,8 +51,8 @@ static struct grub_linux_initrd_context initrd_ctx = {0, 0, 0};
|
||||
static grub_efi_handle_t initrd_lf2_handle = NULL;
|
||||
static bool initrd_use_loadfile2 = false;
|
||||
|
||||
static grub_efi_guid_t load_file2_guid = GRUB_EFI_LOAD_FILE2_PROTOCOL_GUID;
|
||||
static grub_efi_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
|
||||
static grub_guid_t load_file2_guid = GRUB_EFI_LOAD_FILE2_PROTOCOL_GUID;
|
||||
static grub_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
|
||||
|
||||
static initrd_media_device_path_t initrd_lf2_device_path = {
|
||||
{
|
||||
|
||||
@ -48,7 +48,7 @@ grub_uint32_t grub_xnu_entry_point, grub_xnu_arg1, grub_xnu_stack;
|
||||
/* Aliases set for some tables. */
|
||||
struct tbl_alias
|
||||
{
|
||||
grub_efi_guid_t guid;
|
||||
grub_guid_t guid;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
@ -694,7 +694,7 @@ grub_cpu_xnu_fill_devicetree (grub_uint64_t *fsbfreq_out)
|
||||
{
|
||||
void *ptr;
|
||||
struct grub_xnu_devtree_key *curkey;
|
||||
grub_efi_packed_guid_t guid;
|
||||
grub_guid_t guid;
|
||||
char guidbuf[64];
|
||||
|
||||
/* Retrieve current key. */
|
||||
|
||||
@ -106,7 +106,7 @@ query_fpswa (void)
|
||||
grub_efi_boot_services_t *bs;
|
||||
grub_efi_status_t status;
|
||||
grub_efi_uintn_t size;
|
||||
static const grub_efi_guid_t fpswa_protocol =
|
||||
static const grub_guid_t fpswa_protocol =
|
||||
{ 0xc41b6531, 0x97b9, 0x11d3,
|
||||
{0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} };
|
||||
|
||||
|
||||
@ -27,8 +27,8 @@
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
/* GUID. */
|
||||
static grub_efi_guid_t net_io_guid = GRUB_EFI_SIMPLE_NETWORK_GUID;
|
||||
static grub_efi_guid_t pxe_io_guid = GRUB_EFI_PXE_GUID;
|
||||
static grub_guid_t net_io_guid = GRUB_EFI_SIMPLE_NETWORK_GUID;
|
||||
static grub_guid_t pxe_io_guid = GRUB_EFI_PXE_GUID;
|
||||
|
||||
static grub_err_t
|
||||
send_card_buffer (struct grub_net_card *dev,
|
||||
|
||||
@ -36,10 +36,10 @@ static grub_uint8_t grub_gpt_magic[8] =
|
||||
0x45, 0x46, 0x49, 0x20, 0x50, 0x41, 0x52, 0x54
|
||||
};
|
||||
|
||||
static const grub_gpt_part_guid_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY;
|
||||
static const grub_guid_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY;
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
static const grub_gpt_part_guid_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
|
||||
static const grub_guid_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
|
||||
#endif
|
||||
|
||||
/* 512 << 7 = 65536 byte sectors. */
|
||||
|
||||
@ -352,7 +352,7 @@ grub_console_getkeystatus (struct grub_term_input *term)
|
||||
static grub_err_t
|
||||
grub_efi_console_input_init (struct grub_term_input *term)
|
||||
{
|
||||
static grub_efi_guid_t text_input_ex_guid =
|
||||
static grub_guid_t text_input_ex_guid =
|
||||
GRUB_EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID;
|
||||
|
||||
if (grub_efi_is_finished)
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#include <grub/i18n.h>
|
||||
|
||||
/* GUID. */
|
||||
static grub_efi_guid_t serial_io_guid = GRUB_EFI_SERIAL_IO_GUID;
|
||||
static grub_guid_t serial_io_guid = GRUB_EFI_SERIAL_IO_GUID;
|
||||
|
||||
static void
|
||||
do_real_config (struct grub_serial_port *port)
|
||||
|
||||
@ -32,10 +32,10 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
static grub_efi_guid_t graphics_output_guid = GRUB_EFI_GOP_GUID;
|
||||
static grub_efi_guid_t active_edid_guid = GRUB_EFI_EDID_ACTIVE_GUID;
|
||||
static grub_efi_guid_t discovered_edid_guid = GRUB_EFI_EDID_DISCOVERED_GUID;
|
||||
static grub_efi_guid_t efi_var_guid = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
static grub_guid_t graphics_output_guid = GRUB_EFI_GOP_GUID;
|
||||
static grub_guid_t active_edid_guid = GRUB_EFI_EDID_ACTIVE_GUID;
|
||||
static grub_guid_t discovered_edid_guid = GRUB_EFI_EDID_DISCOVERED_GUID;
|
||||
static grub_guid_t efi_var_guid = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
static struct grub_efi_gop *gop;
|
||||
static unsigned old_mode;
|
||||
static int restore_needed;
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
static grub_efi_guid_t uga_draw_guid = GRUB_EFI_UGA_DRAW_GUID;
|
||||
static grub_guid_t uga_draw_guid = GRUB_EFI_UGA_DRAW_GUID;
|
||||
static struct grub_efi_uga_draw_protocol *uga;
|
||||
static grub_uint64_t uga_fb;
|
||||
static grub_uint32_t uga_pitch;
|
||||
|
||||
@ -639,24 +639,6 @@ typedef grub_uint8_t grub_efi_ip_address_t[8] __attribute__ ((aligned(4)));
|
||||
typedef grub_efi_uint64_t grub_efi_physical_address_t;
|
||||
typedef grub_efi_uint64_t grub_efi_virtual_address_t;
|
||||
|
||||
struct grub_efi_guid
|
||||
{
|
||||
grub_uint32_t data1;
|
||||
grub_uint16_t data2;
|
||||
grub_uint16_t data3;
|
||||
grub_uint8_t data4[8];
|
||||
} __attribute__ ((aligned(8)));
|
||||
typedef struct grub_efi_guid grub_efi_guid_t;
|
||||
|
||||
struct grub_efi_packed_guid
|
||||
{
|
||||
grub_uint32_t data1;
|
||||
grub_uint16_t data2;
|
||||
grub_uint16_t data3;
|
||||
grub_uint8_t data4[8];
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_efi_packed_guid grub_efi_packed_guid_t;
|
||||
|
||||
/* XXX although the spec does not specify the padding, this actually
|
||||
must have the padding! */
|
||||
struct grub_efi_memory_descriptor
|
||||
@ -743,7 +725,7 @@ typedef struct grub_efi_memory_mapped_device_path grub_efi_memory_mapped_device_
|
||||
struct grub_efi_vendor_device_path
|
||||
{
|
||||
grub_efi_device_path_t header;
|
||||
grub_efi_packed_guid_t vendor_guid;
|
||||
grub_guid_t vendor_guid;
|
||||
grub_efi_uint8_t vendor_defined_data[0];
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_efi_vendor_device_path grub_efi_vendor_device_path_t;
|
||||
@ -987,7 +969,7 @@ typedef struct grub_efi_cdrom_device_path grub_efi_cdrom_device_path_t;
|
||||
struct grub_efi_vendor_media_device_path
|
||||
{
|
||||
grub_efi_device_path_t header;
|
||||
grub_efi_packed_guid_t vendor_guid;
|
||||
grub_guid_t vendor_guid;
|
||||
grub_efi_uint8_t vendor_defined_data[0];
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_efi_vendor_media_device_path grub_efi_vendor_media_device_path_t;
|
||||
@ -1006,7 +988,7 @@ typedef struct grub_efi_file_path_device_path grub_efi_file_path_device_path_t;
|
||||
struct grub_efi_protocol_device_path
|
||||
{
|
||||
grub_efi_device_path_t header;
|
||||
grub_efi_packed_guid_t guid;
|
||||
grub_guid_t guid;
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_efi_protocol_device_path grub_efi_protocol_device_path_t;
|
||||
|
||||
@ -1015,7 +997,7 @@ typedef struct grub_efi_protocol_device_path grub_efi_protocol_device_path_t;
|
||||
struct grub_efi_piwg_device_path
|
||||
{
|
||||
grub_efi_device_path_t header;
|
||||
grub_efi_packed_guid_t guid;
|
||||
grub_guid_t guid;
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_efi_piwg_device_path grub_efi_piwg_device_path_t;
|
||||
|
||||
@ -1186,47 +1168,47 @@ struct grub_efi_boot_services
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *install_protocol_interface) (grub_efi_handle_t *handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
grub_efi_interface_type_t protocol_interface_type,
|
||||
void *protocol_interface);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *reinstall_protocol_interface) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
void *old_interface,
|
||||
void *new_interface);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *uninstall_protocol_interface) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
void *protocol_interface);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *handle_protocol) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
void **protocol_interface);
|
||||
|
||||
void *reserved;
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *register_protocol_notify) (grub_efi_guid_t *protocol,
|
||||
(__grub_efi_api *register_protocol_notify) (grub_guid_t *protocol,
|
||||
grub_efi_event_t event,
|
||||
void **registration);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *locate_handle) (grub_efi_locate_search_type_t search_type,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
void *search_key,
|
||||
grub_efi_uintn_t *buffer_size,
|
||||
grub_efi_handle_t *buffer);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *locate_device_path) (grub_efi_guid_t *protocol,
|
||||
(__grub_efi_api *locate_device_path) (grub_guid_t *protocol,
|
||||
grub_efi_device_path_t **device_path,
|
||||
grub_efi_handle_t *device);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *install_configuration_table) (grub_efi_guid_t *guid,
|
||||
(__grub_efi_api *install_configuration_table) (grub_guid_t *guid,
|
||||
void *table);
|
||||
|
||||
grub_efi_status_t
|
||||
@ -1280,7 +1262,7 @@ struct grub_efi_boot_services
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *open_protocol) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
void **protocol_interface,
|
||||
grub_efi_handle_t agent_handle,
|
||||
grub_efi_handle_t controller_handle,
|
||||
@ -1288,30 +1270,30 @@ struct grub_efi_boot_services
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *close_protocol) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
grub_efi_handle_t agent_handle,
|
||||
grub_efi_handle_t controller_handle);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *open_protocol_information) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
grub_efi_open_protocol_information_entry_t **entry_buffer,
|
||||
grub_efi_uintn_t *entry_count);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *protocols_per_handle) (grub_efi_handle_t handle,
|
||||
grub_efi_packed_guid_t ***protocol_buffer,
|
||||
grub_guid_t ***protocol_buffer,
|
||||
grub_efi_uintn_t *protocol_buffer_count);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *locate_handle_buffer) (grub_efi_locate_search_type_t search_type,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
void *search_key,
|
||||
grub_efi_uintn_t *no_handles,
|
||||
grub_efi_handle_t **buffer);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *locate_protocol) (grub_efi_guid_t *protocol,
|
||||
(__grub_efi_api *locate_protocol) (grub_guid_t *protocol,
|
||||
void *registration,
|
||||
void **protocol_interface);
|
||||
|
||||
@ -1369,7 +1351,7 @@ struct grub_efi_runtime_services
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *get_variable) (grub_efi_char16_t *variable_name,
|
||||
const grub_efi_guid_t *vendor_guid,
|
||||
const grub_guid_t *vendor_guid,
|
||||
grub_efi_uint32_t *attributes,
|
||||
grub_efi_uintn_t *data_size,
|
||||
void *data);
|
||||
@ -1377,11 +1359,11 @@ struct grub_efi_runtime_services
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *get_next_variable_name) (grub_efi_uintn_t *variable_name_size,
|
||||
grub_efi_char16_t *variable_name,
|
||||
grub_efi_guid_t *vendor_guid);
|
||||
grub_guid_t *vendor_guid);
|
||||
|
||||
grub_efi_status_t
|
||||
(__grub_efi_api *set_variable) (grub_efi_char16_t *variable_name,
|
||||
const grub_efi_guid_t *vendor_guid,
|
||||
const grub_guid_t *vendor_guid,
|
||||
grub_efi_uint32_t attributes,
|
||||
grub_efi_uintn_t data_size,
|
||||
void *data);
|
||||
@ -1399,7 +1381,7 @@ typedef struct grub_efi_runtime_services grub_efi_runtime_services_t;
|
||||
|
||||
struct grub_efi_configuration_table
|
||||
{
|
||||
grub_efi_packed_guid_t vendor_guid;
|
||||
grub_guid_t vendor_guid;
|
||||
void *vendor_table;
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_efi_configuration_table grub_efi_configuration_table_t;
|
||||
@ -1794,7 +1776,7 @@ struct grub_efi_shim_lock_protocol
|
||||
};
|
||||
typedef struct grub_efi_shim_lock_protocol grub_efi_shim_lock_protocol_t;
|
||||
|
||||
typedef grub_efi_guid_t grub_efi_rng_algorithm_t;
|
||||
typedef grub_guid_t grub_efi_rng_algorithm_t;
|
||||
|
||||
struct grub_efi_rng_protocol
|
||||
{
|
||||
|
||||
@ -37,18 +37,18 @@ struct linux_arch_kernel_header {
|
||||
};
|
||||
|
||||
/* Functions. */
|
||||
void *EXPORT_FUNC(grub_efi_locate_protocol) (grub_efi_guid_t *protocol,
|
||||
void *EXPORT_FUNC(grub_efi_locate_protocol) (grub_guid_t *protocol,
|
||||
void *registration);
|
||||
grub_efi_handle_t *
|
||||
EXPORT_FUNC(grub_efi_locate_handle) (grub_efi_locate_search_type_t search_type,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
void *search_key,
|
||||
grub_efi_uintn_t *num_handles);
|
||||
void *EXPORT_FUNC(grub_efi_open_protocol) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
grub_efi_uint32_t attributes);
|
||||
grub_efi_status_t
|
||||
EXPORT_FUNC(grub_efi_close_protocol) (grub_efi_handle_t handle, grub_efi_guid_t *protocol);
|
||||
EXPORT_FUNC(grub_efi_close_protocol) (grub_efi_handle_t handle, grub_guid_t *protocol);
|
||||
int EXPORT_FUNC(grub_efi_set_text_mode) (int on);
|
||||
void EXPORT_FUNC(grub_efi_stall) (grub_efi_uintn_t microseconds);
|
||||
void *
|
||||
@ -89,23 +89,23 @@ 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);
|
||||
grub_efi_status_t EXPORT_FUNC (grub_efi_get_variable_with_attributes) (const char *variable,
|
||||
const grub_efi_guid_t *guid,
|
||||
const grub_guid_t *guid,
|
||||
grub_size_t *datasize_out,
|
||||
void **data_out,
|
||||
grub_efi_uint32_t *attributes);
|
||||
grub_efi_status_t EXPORT_FUNC (grub_efi_get_variable) (const char *variable,
|
||||
const grub_efi_guid_t *guid,
|
||||
const grub_guid_t *guid,
|
||||
grub_size_t *datasize_out,
|
||||
void **data_out);
|
||||
grub_err_t
|
||||
EXPORT_FUNC (grub_efi_set_variable_with_attributes) (const char *var,
|
||||
const grub_efi_guid_t *guid,
|
||||
const grub_guid_t *guid,
|
||||
void *data,
|
||||
grub_size_t datasize,
|
||||
grub_efi_uint32_t attributes);
|
||||
grub_err_t
|
||||
EXPORT_FUNC (grub_efi_set_variable) (const char *var,
|
||||
const grub_efi_guid_t *guid,
|
||||
const grub_guid_t *guid,
|
||||
void *data,
|
||||
grub_size_t datasize);
|
||||
int
|
||||
|
||||
@ -176,26 +176,26 @@ grub_err_t grub_efiemu_loadcore_load (void);
|
||||
struct grub_efiemu_configuration_table
|
||||
{
|
||||
struct grub_efiemu_configuration_table *next;
|
||||
grub_efi_guid_t guid;
|
||||
grub_guid_t guid;
|
||||
void * (*get_table) (void *data);
|
||||
void (*unload) (void *data);
|
||||
void *data;
|
||||
};
|
||||
struct grub_efiemu_configuration_table32
|
||||
{
|
||||
grub_efi_packed_guid_t vendor_guid;
|
||||
grub_guid_t vendor_guid;
|
||||
grub_efi_uint32_t vendor_table;
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_efiemu_configuration_table32 grub_efiemu_configuration_table32_t;
|
||||
struct grub_efiemu_configuration_table64
|
||||
{
|
||||
grub_efi_packed_guid_t vendor_guid;
|
||||
grub_guid_t vendor_guid;
|
||||
grub_efi_uint64_t vendor_table;
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_efiemu_configuration_table64 grub_efiemu_configuration_table64_t;
|
||||
grub_err_t grub_efiemu_unregister_configuration_table (grub_efi_guid_t guid);
|
||||
grub_err_t grub_efiemu_unregister_configuration_table (grub_guid_t guid);
|
||||
grub_err_t
|
||||
grub_efiemu_register_configuration_table (grub_efi_guid_t guid,
|
||||
grub_efiemu_register_configuration_table (grub_guid_t guid,
|
||||
void * (*get_table) (void *data),
|
||||
void (*unload) (void *data),
|
||||
void *data);
|
||||
|
||||
@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel
|
||||
|
||||
struct efi_variable
|
||||
{
|
||||
grub_efi_packed_guid_t guid;
|
||||
grub_guid_t guid;
|
||||
grub_uint32_t namelen;
|
||||
grub_uint32_t size;
|
||||
grub_efi_uint32_t attributes;
|
||||
|
||||
@ -22,15 +22,6 @@
|
||||
#include <grub/types.h>
|
||||
#include <grub/partition.h>
|
||||
|
||||
struct grub_gpt_part_guid
|
||||
{
|
||||
grub_uint32_t data1;
|
||||
grub_uint16_t data2;
|
||||
grub_uint16_t data3;
|
||||
grub_uint8_t data4[8];
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_gpt_part_guid grub_gpt_part_guid_t;
|
||||
|
||||
#define GRUB_GPT_PARTITION_TYPE_EMPTY \
|
||||
{ 0x0, 0x0, 0x0, \
|
||||
{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } \
|
||||
@ -70,8 +61,8 @@ struct grub_gpt_header
|
||||
|
||||
struct grub_gpt_partentry
|
||||
{
|
||||
grub_gpt_part_guid_t type;
|
||||
grub_gpt_part_guid_t guid;
|
||||
grub_guid_t type;
|
||||
grub_guid_t guid;
|
||||
grub_uint64_t start;
|
||||
grub_uint64_t end;
|
||||
grub_uint64_t attrib;
|
||||
|
||||
@ -365,4 +365,13 @@ static inline void grub_set_unaligned64 (void *ptr, grub_uint64_t val)
|
||||
# define grub_absolute_pointer(val) ((void *) (val))
|
||||
#endif
|
||||
|
||||
struct grub_guid
|
||||
{
|
||||
grub_uint32_t data1;
|
||||
grub_uint16_t data2;
|
||||
grub_uint16_t data3;
|
||||
grub_uint8_t data4[8];
|
||||
} GRUB_PACKED;
|
||||
typedef struct grub_guid grub_guid_t;
|
||||
|
||||
#endif /* ! GRUB_TYPES_HEADER */
|
||||
|
||||
@ -728,7 +728,7 @@ is_prep_partition (grub_device_t dev)
|
||||
if (grub_disk_read (dev->disk, p->offset, p->index,
|
||||
sizeof (gptdata), &gptdata) == 0)
|
||||
{
|
||||
const grub_gpt_part_guid_t template = {
|
||||
const grub_guid_t template = {
|
||||
grub_cpu_to_le32_compile_time (0x9e1a2d38),
|
||||
grub_cpu_to_le16_compile_time (0xc612),
|
||||
grub_cpu_to_le16_compile_time (0x4316),
|
||||
|
||||
@ -133,7 +133,7 @@ get_targets_string (void)
|
||||
}
|
||||
|
||||
static int
|
||||
print_gpt_guid (grub_gpt_part_guid_t guid)
|
||||
print_gpt_guid (grub_guid_t guid)
|
||||
{
|
||||
guid.data1 = grub_le_to_cpu32 (guid.data1);
|
||||
guid.data2 = grub_le_to_cpu16 (guid.data2);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user