/* Block size of compressed disk image */ #define COMPRESSED_DISK_IMAGE_BLOCK_SIZE 8 /* Binary logarithm of the block size */ #define LB_BLOCK_SIZE 9 static struct efi_boot_services *boottime; static const efi_guid_t block_io_protocol_guid = BLOCK_IO_GUID; static const efi_guid_t guid_device_path = DEVICE_PATH_GUID; static const efi_guid_t guid_simple_file_system_protocol = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID; static const efi_guid_t guid_file_system_info = EFI_FILE_SYSTEM_INFO_GUID; static efi_guid_t guid_vendor = EFI_GUID(0xdbca4c98, 0x6cb0, 0x694d, 0x08, 0x72, 0x81, 0x9c, 0x65, 0x0c, 0xb7, 0xb8); static struct efi_device_path *dp; /* One 8 byte block of the compressed disk image */ struct line { size_t addr; char *line; }; /* Compressed disk image */ struct compressed_disk_image { size_t length; struct line lines[]; };
* efi_selftest_event_groups * * Copyright (c) 2018 Heinrich Schuchardt <*****@*****.**> * * This test checks the notification of group events and the * following services: * CreateEventEx, CloseEvent, SignalEvent, CheckEvent. */ #include <efi_selftest.h> #define GROUP_SIZE 16 static struct efi_boot_services *boottime; static efi_guid_t event_group = EFI_GUID(0x2335905b, 0xc3b9, 0x4221, 0xa3, 0x71, 0x0e, 0x5b, 0x45, 0xc0, 0x56, 0x91); /* * Notification function, increments the notification count if parameter * context is provided. * * @event notified event * @context pointer to the notification count */ static void EFIAPI notify(struct efi_event *event, void *context) { unsigned int *count = context; if (count) ++*count; }
efi_guid_t _gen_guid(int part_index) { efi_guid_t new_guid = EFI_GUID(0x11111111,0x2222,0x3333,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0+part_index); return new_guid; }
/* * efi_selftest_config_tables * * Copyright (c) 2018 Heinrich Schuchardt <*****@*****.**> * * This test checks the following service: * InstallConfigurationTable. */ #include <efi_selftest.h> static const struct efi_system_table *sys_table; static struct efi_boot_services *boottime; static efi_guid_t table_guid = EFI_GUID(0xff1c3f9e, 0x795b, 0x1529, 0xf1, 0x55, 0x17, 0x2e, 0x51, 0x6b, 0x49, 0x75); /* * Notification function, increments the notification count if parameter * context is provided. * * @event notified event * @context pointer to the notification count */ static void EFIAPI notify(struct efi_event *event, void *context) { unsigned int *count = context; if (count) ++*count; }