#ifndef EFI_SYSTEM_TABLE_H #define EFI_SYSTEM_TABLE_H #include "efi_types.h" #include "efi_bs.h" #include "protocols/console_support.h" #include "efi_rs.h" #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249 #define EFI_2_100_SYSTEM_TABLE_REVISION ((2<<16) | (100)) #define EFI_2_90_SYSTEM_TABLE_REVISION ((2<<16) | (90)) #define EFI_2_80_SYSTEM_TABLE_REVISION ((2<<16) | (80)) #define EFI_2_70_SYSTEM_TABLE_REVISION ((2<<16) | (70)) #define EFI_2_60_SYSTEM_TABLE_REVISION ((2<<16) | (60)) #define EFI_2_50_SYSTEM_TABLE_REVISION ((2<<16) | (50)) #define EFI_2_40_SYSTEM_TABLE_REVISION ((2<<16) | (40)) #define EFI_2_31_SYSTEM_TABLE_REVISION ((2<<16) | (31)) #define EFI_2_30_SYSTEM_TABLE_REVISION ((2<<16) | (30)) #define EFI_2_20_SYSTEM_TABLE_REVISION ((2<<16) | (20)) #define EFI_2_10_SYSTEM_TABLE_REVISION ((2<<16) | (10)) #define EFI_2_00_SYSTEM_TABLE_REVISION ((2<<16) | (00)) #define EFI_1_10_SYSTEM_TABLE_REVISION ((1<<16) | (10)) #define EFI_1_02_SYSTEM_TABLE_REVISION ((1<<16) | (02)) #define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION #define EFI_SYSTEM_TABLE_REVISION EFI_2_100_SYSTEM_TABLE_REVISION #define EFI_ACPI_10_TABLE_GUID {0xeb9d2d30,0x2d88,0x11d3, {0x9a,0x16,0x00,0x90,0x27,0x3f,0xc1,0x4d}} #define EFI_ACPI_20_TABLE_GUID {0x8868e871,0xe4f1,0x11d3, {0xbc,0x22,0x00,0x80,0xc7,0x3c,0x88,0x81}} #define SAL_SYSTEM_TABLE_GUID {0xeb9d2d32,0x2d88,0x11d3, {0x9a,0x16,0x00,0x90,0x27,0x3f,0xc1,0x4d}} #define SMBIOS_TABLE_GUID {0xeb9d2d31,0x2d88,0x11d3, {0x9a,0x16,0x00,0x90,0x27,0x3f,0xc1,0x4d}} #define SMBIOS3_TABLE_GUID {0xf2fd1544, 0x9794, 0x4a2c, {0x99,0x2e,0xe5,0xbb,0xcf,0x20,0xe3,0x94}} #define MPS_TABLE_GUID {0xeb9d2d2f,0x2d88,0x11d3, {0x9a,0x16,0x00,0x90,0x27,0x3f,0xc1,0x4d}} #define EFI_JSON_CONFIG_DATA_TABLE_GUID {0x87367f87,0x1119,0x41ce, {0xaa,0xec,0x8b,0xe0,0x11,0x1f,0x55,0x8a}} #define EFI_JSON_CAPSULE_DATA_TABLE_GUID {0x35e7a725,0x8dd2,0x4cac, {0x80,0x11,0x33,0xcd,0xa8,0x10,0x90,0x56}} #define EFI_JSON_CAPSULE_RESULT_TABLE_GUID {0xdbc461c3,0xb3de,0x422a, {0xb9,0xb4,0x98,0x86,0xfd,0x49,0xa1,0xe5}} #define EFI_DTB_TABLE_GUID {0xb1b621d5,0xf19c,0x41a5, {0x83,0x0b,0xd9,0x15,0x2c,0x69,0xaa,0xe0}} #define EFI_RT_PROPERTIES_TABLE_GUID {0xeb66918a,0x7eef,0x402a, {0x84,0x2e,0x93,0x1d,0x21,0xc3,0x8a,0xe9}} #define EFI_RT_PROPERTIES_TABLE_VERSION 0x1 #define EFI_RT_SUPPORTED_GET_TIME 0x0001 #define EFI_RT_SUPPORTED_SET_TIME 0x0002 #define EFI_RT_SUPPORTED_GET_WAKEUP_TIME 0x0004 #define EFI_RT_SUPPORTED_SET_WAKEUP_TIME 0x0008 #define EFI_RT_SUPPORTED_GET_VARIABLE 0x0010 #define EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME 0x0020 #define EFI_RT_SUPPORTED_SET_VARIABLE 0x0040 #define EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP 0x0080 #define EFI_RT_SUPPORTED_CONVERT_POINTER 0x0100 #define EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT 0x0200 #define EFI_RT_SUPPORTED_RESET_SYSTEM 0x0400 #define EFI_RT_SUPPORTED_UPDATE_CAPSULE 0x0800 #define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES 0x1000 #define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO 0x2000 #define EFI_MEMORY_ATTRIBUTES_TABLE_GUID {0xdcfa911d,0x26eb,0x469f, {0xa2,0x20,0x38,0xb7,0xdc,0x46,0x12,0x20}} #define EFI_MEMORY_ATTRIBUTES_FLAGS_RT_FORWARD_CONTROL_FLOW_GUARD 0x1 #define EFI_CONFORMANCE_PROFILES_TABLE_GUID {0x36122546,0xf7e7,0x4c8f, {0xbd,0x9b,0xeb,0x85,0x25,0xb5,0x0c,0x0b}} #define EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID {0x523c91af,0xa195,0x4382, {0x81,0x8d,0x29,0x5f,0xe4,0x00,0x64,0x65}} #define EFI_CONFORMANCE_PROFILES_TABLE_VERSION 0x1 typedef struct _EFI_SYSTEM_TABLE EFI_SYSTEM_TABLE; typedef EFI_STATUS (EFIAPI *EFI_IMAGE_ENTRY_POINT)( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ); typedef struct _EFI_CONFIGURATION_TABLE { EFI_GUID VendorGuid; VOID *VendorTable; } EFI_CONFIGURATION_TABLE; typedef struct _EFI_RT_PROPERTIES_TABLE { EFI_UINT16 Version; EFI_UINT16 Length; EFI_UINT32 RuntimeServicesSupported; } EFI_RT_PROPERTIES_TABLE; typedef struct _EFI_MEMORY_ATTRIBUTES_TABLE { EFI_UINT32 Version; EFI_UINT32 NumberOfEntries; EFI_UINT32 DescriptorSize; EFI_UINT32 Flags; //EFI_MEMORY_DESCRIPTOR Entry[1]; } EFI_MEMORY_ATTRIBUTES_TABLE; typedef struct _EFI_CONFORMANCE_PROFILES_TABLE { EFI_UINT16 Version; EFI_UINT16 NumberOfProfiles; //EFI_GUID ConformanceProfiles[]; } EFI_CONFORMANCE_PROFILES_TABLE; typedef struct _EFI_SYSTEM_TABLE { EFI_TABLE_HEADER Hdr; CHAR16 *FirmwareVendor; EFI_UINT32 FirmwareRevision; EFI_HANDLE ConsoleInHandle; EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn; EFI_HANDLE ConsoleOutHandle; EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut; EFI_HANDLE StandardErrorHandle; EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr; EFI_RUNTIME_SERVICES *RuntimeServices; EFI_BOOT_SERVICES *BootServices; EFI_UINTN NumberOfTableEntries; EFI_CONFIGURATION_TABLE *ConfigurationTable; } EFI_SYSTEM_TABLE; typedef struct _EFI_SYSTEM_TABLE_POINTER { EFI_UINT64 Signature; EFI_PHYSICAL_ADDRESS EfiSystemTableBase; EFI_UINT32 Crc32; } EFI_SYSTEM_TABLE_POINTER; #endif /* EFI_SYSTEM_TABLE_H */