[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/18] efi: create efi_tables()
From: |
Daniel Kiper |
Subject: |
[PATCH 13/18] efi: create efi_tables() |
Date: |
Fri, 30 Jan 2015 18:54:17 +0100 |
..which collects system tables data. We need this to support
multiboot2 protocol on EFI platforms.
Signed-off-by: Daniel Kiper <address@hidden>
---
xen/common/efi/boot.c | 51 ++++++++++++++++++++++++++++---------------------
1 file changed, 29 insertions(+), 22 deletions(-)
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 114019e..cf0fbc2 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -707,6 +707,34 @@ static UINTN __init
efi_find_gop_mode(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,
return gop_mode;
}
+static void __init efi_tables(void)
+{
+ unsigned int i;
+
+ /* Obtain basic table pointers. */
+ for ( i = 0; i < efi_num_ct; ++i )
+ {
+ static EFI_GUID __initdata acpi2_guid = ACPI_20_TABLE_GUID;
+ static EFI_GUID __initdata acpi_guid = ACPI_TABLE_GUID;
+ static EFI_GUID __initdata mps_guid = MPS_TABLE_GUID;
+ static EFI_GUID __initdata smbios_guid = SMBIOS_TABLE_GUID;
+
+ if ( match_guid(&acpi2_guid, &efi_ct[i].VendorGuid) )
+ efi.acpi20 = (long)efi_ct[i].VendorTable;
+ if ( match_guid(&acpi_guid, &efi_ct[i].VendorGuid) )
+ efi.acpi = (long)efi_ct[i].VendorTable;
+ if ( match_guid(&mps_guid, &efi_ct[i].VendorGuid) )
+ efi.mps = (long)efi_ct[i].VendorTable;
+ if ( match_guid(&smbios_guid, &efi_ct[i].VendorGuid) )
+ efi.smbios = (long)efi_ct[i].VendorTable;
+ }
+
+#ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */
+ if (efi.smbios != EFI_INVALID_TABLE_ADDR)
+ dmi_efi_get_table((void *)(long)efi.smbios);
+#endif
+}
+
static void __init setup_efi_pci(void)
{
EFI_STATUS status;
@@ -1027,28 +1055,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE
*SystemTable)
/* XXX Collect EDID info. */
efi_arch_cpu();
- /* Obtain basic table pointers. */
- for ( i = 0; i < efi_num_ct; ++i )
- {
- static EFI_GUID __initdata acpi2_guid = ACPI_20_TABLE_GUID;
- static EFI_GUID __initdata acpi_guid = ACPI_TABLE_GUID;
- static EFI_GUID __initdata mps_guid = MPS_TABLE_GUID;
- static EFI_GUID __initdata smbios_guid = SMBIOS_TABLE_GUID;
-
- if ( match_guid(&acpi2_guid, &efi_ct[i].VendorGuid) )
- efi.acpi20 = (long)efi_ct[i].VendorTable;
- if ( match_guid(&acpi_guid, &efi_ct[i].VendorGuid) )
- efi.acpi = (long)efi_ct[i].VendorTable;
- if ( match_guid(&mps_guid, &efi_ct[i].VendorGuid) )
- efi.mps = (long)efi_ct[i].VendorTable;
- if ( match_guid(&smbios_guid, &efi_ct[i].VendorGuid) )
- efi.smbios = (long)efi_ct[i].VendorTable;
- }
-
-#ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */
- if (efi.smbios != EFI_INVALID_TABLE_ADDR)
- dmi_efi_get_table((void *)(long)efi.smbios);
-#endif
+ efi_tables();
/* Collect PCI ROM contents. */
setup_efi_pci();
--
1.7.10.4
- [PATCH 04/18] xen/x86: add multiboot2 protocol support, (continued)
- [PATCH 04/18] xen/x86: add multiboot2 protocol support, Daniel Kiper, 2015/01/30
- [PATCH 05/18] efi: split efi_enabled to efi_platform and efi_loader, Daniel Kiper, 2015/01/30
- [PATCH 06/18] x86: remove commented out stale references to efi_enabled, Daniel Kiper, 2015/01/30
- [PATCH 08/18] efi: build xen.gz with EFI code, Daniel Kiper, 2015/01/30
- [PATCH 07/18] efi: run EFI specific code on EFI platform only, Daniel Kiper, 2015/01/30
- [PATCH 12/18] efi: create efi_find_gop_mode(), Daniel Kiper, 2015/01/30
- [PATCH 09/18] efi: create efi_init(), Daniel Kiper, 2015/01/30
- [PATCH 10/18] efi: create efi_console_set_mode(), Daniel Kiper, 2015/01/30
- [PATCH 11/18] efi: create efi_get_gop(), Daniel Kiper, 2015/01/30
- [PATCH 13/18] efi: create efi_tables(),
Daniel Kiper <=
- [PATCH 14/18] efi: create efi_variables(), Daniel Kiper, 2015/01/30
- [PATCH 16/18] efi: create efi_exit_boot(), Daniel Kiper, 2015/01/30
- [PATCH 15/18] efi: create efi_set_gop_mode(), Daniel Kiper, 2015/01/30
- [PATCH 17/18] x86/efi: create new early memory allocator, Daniel Kiper, 2015/01/30
- [PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms, Daniel Kiper, 2015/01/30
- Re: [PATCH 00/18] x86: multiboot2 protocol support, Daniel Kiper, 2015/01/30
- Re: [PATCH 00/18] x86: multiboot2 protocol support, João Jerónimo, 2015/01/31