diff options
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/amd64/efi/main.c | 14 | ||||
-rw-r--r-- | sys/boot/efi/include/efiapi.h | 54 |
2 files changed, 47 insertions, 21 deletions
diff --git a/sys/boot/amd64/efi/main.c b/sys/boot/amd64/efi/main.c index eb6e69a..ea4c3e7 100644 --- a/sys/boot/amd64/efi/main.c +++ b/sys/boot/amd64/efi/main.c @@ -54,6 +54,10 @@ EFI_GUID imgid = LOADED_IMAGE_PROTOCOL; EFI_GUID mps = MPS_TABLE_GUID; EFI_GUID netid = EFI_SIMPLE_NETWORK_PROTOCOL; EFI_GUID smbios = SMBIOS_TABLE_GUID; +EFI_GUID dxe = DXE_SERVICES_TABLE_GUID; +EFI_GUID hoblist = HOB_LIST_TABLE_GUID; +EFI_GUID memtype = MEMORY_TYPE_INFORMATION_TABLE_GUID; +EFI_GUID debugimg = DEBUG_IMAGE_INFO_TABLE_GUID; EFI_STATUS main(int argc, CHAR16 *argv[]) @@ -274,6 +278,14 @@ command_configuration(int argc, char *argv[]) printf("ACPI 2.0 Table"); else if (!memcmp(guid, &smbios, sizeof(EFI_GUID))) printf("SMBIOS Table"); + else if (!memcmp(guid, &dxe, sizeof(EFI_GUID))) + printf("DXE Table"); + else if (!memcmp(guid, &hoblist, sizeof(EFI_GUID))) + printf("HOB List Table"); + else if (!memcmp(guid, &memtype, sizeof(EFI_GUID))) + printf("Memory Type Information Table"); + else if (!memcmp(guid, &debugimg, sizeof(EFI_GUID))) + printf("Debug Image Info Table"); else printf("Unknown Table (%s)", guid_to_string(guid)); printf(" at %p\n", ST->ConfigurationTable[i].VendorTable); @@ -329,7 +341,7 @@ command_mode(int argc, char *argv[]) } if (i != 0) - printf("Choose the mode with \"col <mode number>\"\n"); + printf("Choose the mode with \"col <mode number>\"\n"); return (CMD_OK); } diff --git a/sys/boot/efi/include/efiapi.h b/sys/boot/efi/include/efiapi.h index 187fe29..c8dbf9e 100644 --- a/sys/boot/efi/include/efiapi.h +++ b/sys/boot/efi/include/efiapi.h @@ -88,7 +88,7 @@ EFI_STATUS IN VOID *Buffer ); -typedef +typedef EFI_STATUS (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) ( IN UINTN MemoryMapSize, @@ -103,7 +103,7 @@ EFI_STATUS #define EFI_INTERNAL_PTR 0x00000004 // Pointer to internal runtime data -typedef +typedef EFI_STATUS (EFIAPI *EFI_CONVERT_POINTER) ( IN UINTN DebugDisposition, @@ -168,7 +168,7 @@ EFI_STATUS IN EFI_EVENT Event ); -typedef +typedef EFI_STATUS (EFIAPI *EFI_WAIT_FOR_EVENT) ( IN UINTN NumberOfEvents, @@ -194,8 +194,8 @@ EFI_STATUS #define TPL_APPLICATION 4 #define TPL_CALLBACK 8 -#define TPL_NOTIFY 16 -#define TPL_HIGH_LEVEL 31 +#define TPL_NOTIFY 16 +#define TPL_HIGH_LEVEL 31 typedef EFI_TPL @@ -324,14 +324,14 @@ EFI_STATUS // Image Entry prototype -typedef +typedef EFI_STATUS (EFIAPI *EFI_IMAGE_ENTRY_POINT) ( IN EFI_HANDLE ImageHandle, IN struct _EFI_SYSTEM_TABLE *SystemTable ); -typedef +typedef EFI_STATUS (EFIAPI *EFI_IMAGE_LOAD) ( IN BOOLEAN BootPolicy, @@ -342,7 +342,7 @@ EFI_STATUS OUT EFI_HANDLE *ImageHandle ); -typedef +typedef EFI_STATUS (EFIAPI *EFI_IMAGE_START) ( IN EFI_HANDLE ImageHandle, @@ -359,7 +359,7 @@ EFI_STATUS IN CHAR16 *ExitData OPTIONAL ); -typedef +typedef EFI_STATUS (EFIAPI *EFI_IMAGE_UNLOAD) ( IN EFI_HANDLE ImageHandle @@ -495,7 +495,7 @@ EFI_STATUS ); typedef -EFI_STATUS +EFI_STATUS (EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) ( IN EFI_GUID *Protocol, IN EFI_EVENT Event, @@ -539,7 +539,7 @@ EFI_STATUS ); typedef -EFI_STATUS +EFI_STATUS (EFIAPI *EFI_CONNECT_CONTROLLER) ( IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE *DriverImageHandle OPTIONAL, @@ -548,19 +548,19 @@ EFI_STATUS ); typedef -EFI_STATUS +EFI_STATUS (EFIAPI *EFI_DISCONNECT_CONTROLLER)( IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE DriverImageHandle, OPTIONAL IN EFI_HANDLE ChildHandle OPTIONAL - ); + ); -#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 -#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002 -#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004 -#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008 -#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010 -#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020 +#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 +#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002 +#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004 +#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008 +#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010 +#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020 typedef EFI_STATUS @@ -808,7 +808,7 @@ typedef struct { // EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle; EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer; - EFI_LOCATE_PROTOCOL LocateProtocol; + EFI_LOCATE_PROTOCOL LocateProtocol; EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces; EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces; @@ -846,6 +846,20 @@ typedef struct { #define SAL_SYSTEM_TABLE_GUID \ { 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } +#define FDT_TABLE_GUID \ + { 0xb1b621d5, 0xf19c, 0x41a5, 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } + +#define DXE_SERVICES_TABLE_GUID \ + { 0x5ad34ba, 0x6f02, 0x4214, 0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9 } + +#define HOB_LIST_TABLE_GUID \ + { 0x7739f24c, 0x93d7, 0x11d4, 0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } + +#define MEMORY_TYPE_INFORMATION_TABLE_GUID \ + { 0x4c19049f, 0x4137, 0x4dd3, 0x9c, 0x10, 0x8b, 0x97, 0xa8, 0x3f, 0xfd, 0xfa } + +#define DEBUG_IMAGE_INFO_TABLE_GUID \ + { 0x49152e77, 0x1ada, 0x4764, 0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b } typedef struct _EFI_CONFIGURATION_TABLE { EFI_GUID VendorGuid; |