@@ -1009,6 +1009,8 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
efi.smbios3 = (long)efi_ct[i].VendorTable;
}
+ efi.est = (long)SystemTable;
+
#ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */
dmi_efi_get_table(efi.smbios != EFI_INVALID_TABLE_ADDR
? (void *)(long)efi.smbios : NULL,
@@ -16,10 +16,46 @@ struct efi {
unsigned long acpi20; /* ACPI table (ACPI 2.0) */
unsigned long smbios; /* SM BIOS table */
unsigned long smbios3; /* SMBIOS v3 table */
+ unsigned long est; /* EFI system table */
};
extern struct efi efi;
+/*
+ * Generic EFI table header
+ */
+struct efi_table_hdr {
+ u64 signature;
+ u32 revision;
+ u32 headersize;
+ u32 crc32;
+ u32 reserved;
+};
+
+struct efi_guid{
+ u8 b[16];
+};
+
+#define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
+ ((struct efi_guid) \
+ {{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \
+ (b) & 0xff, ((b) >> 8) & 0xff, \
+ (c) & 0xff, ((c) >> 8) & 0xff, \
+ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }})
+
+#define ACPI_20_TBL_GUID \
+ EFI_GUID( 0x8868e871, 0xe4f1, 0x11d3, 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 )
+
+#define EFI_CONVENTIONAL_MEMORY 7
+#define EFI_ACPI_RECLAIM_MEMORY 9
+
+#define EFI_MEMORY_ATT_WB ((u64)0x0000000000000008ULL) /* write-back */
+
+struct efi_config_table {
+ struct efi_guid guid;
+ u64 table;
+};
+
struct efi_memory_desc {
u32 type;
u32 pad;
@@ -29,6 +65,24 @@ struct efi_memory_desc {
u64 attribute;
};
+struct efi_system_table {
+ struct efi_table_hdr hdr;
+ u64 fw_vendor; /* physical addr of CHAR16 vendor string */
+ u32 fw_revision;
+ u32 __pad1;
+ u64 con_in_handle;
+ u64 con_in;
+ u64 con_out_handle;
+ u64 con_out;
+ u64 stderr_handle;
+ u64 stderr;
+ u64 runtime;
+ u64 boottime;
+ u32 nr_tables;
+ u32 __pad2;
+ u64 tables;
+};
+
#ifndef __ASSEMBLY__
union xenpf_efi_info;
add efi table and memory descriptor structures to common efi header file and pass efi system table address retrieved from uefi.This is required for creating efi table and passing memory information to DOM0 Signed-off-by: Parth Dixit <parth.dixit@linaro.org> --- xen/common/efi/boot.c | 2 ++ xen/include/xen/efi.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+)