@@ -7,7 +7,6 @@
#include <xen/libfdt/libfdt.h>
#include <asm/setup.h>
#include <asm/smp.h>
-#include "efi-dom0.h"
void noreturn efi_xen_start(void *fdt_ptr, uint32_t fdt_size);
void __flush_dcache_area(const void *vaddr, unsigned long size);
@@ -164,7 +163,7 @@ static EFI_STATUS __init efi_process_memory_map_bootinfo(EFI_MEMORY_DESCRIPTOR *
#ifdef CONFIG_ACPI
else if ( desc_ptr->Type == EfiACPIReclaimMemory )
{
- if ( !meminfo_add_bank(&acpi_mem, desc_ptr) )
+ if ( !meminfo_add_bank(&bootinfo.acpi, desc_ptr) )
{
PrintStr(L"Error: All " __stringify(NR_MEM_BANKS)
" acpi meminfo mem banks exhausted.\r\n");
@@ -22,7 +22,6 @@
*/
#include "efi.h"
-#include "efi-dom0.h"
#include <xen/sched.h>
#include <xen/pfn.h>
#include <xen/libfdt/libfdt.h>
@@ -32,7 +31,6 @@
#define XZ_EXTERN STATIC
#include "../../../common/xz/crc32.c"
-struct meminfo __initdata acpi_mem;
/* Constant to indicate "Xen" in unicode u16 format */
static const CHAR16 xen_efi_fw_vendor[] = {0x0058, 0x0065, 0x006E, 0x0000};
@@ -46,7 +44,7 @@ size_t __init estimate_efi_size(int mem_nr_banks)
int acpi_mem_nr_banks = 0;
if ( !acpi_disabled )
- acpi_mem_nr_banks = acpi_mem.nr_banks;
+ acpi_mem_nr_banks = bootinfo.acpi.nr_banks;
size = ROUNDUP(est_size + ect_size + fw_vendor_size, 8);
/* plus 1 for new created tables */
@@ -124,10 +122,10 @@ void __init acpi_create_efi_mmap_table(struct domain *d,
fill_efi_memory_descriptor(desc, EfiConventionalMemory,
mem->bank[i].start, mem->bank[i].size);
- for ( i = 0; i < acpi_mem.nr_banks; i++, desc++ )
+ for ( i = 0; i < bootinfo.acpi.nr_banks; i++, desc++ )
fill_efi_memory_descriptor(desc, EfiACPIReclaimMemory,
- acpi_mem.bank[i].start,
- acpi_mem.bank[i].size);
+ bootinfo.acpi.bank[i].start,
+ bootinfo.acpi.bank[i].size);
fill_efi_memory_descriptor(desc, EfiACPIReclaimMemory,
d->arch.efi_acpi_gpa, d->arch.efi_acpi_len);
@@ -135,7 +133,7 @@ void __init acpi_create_efi_mmap_table(struct domain *d,
tbl_add[TBL_MMAP].start = d->arch.efi_acpi_gpa
+ acpi_get_table_offset(tbl_add, TBL_MMAP);
tbl_add[TBL_MMAP].size = sizeof(EFI_MEMORY_DESCRIPTOR)
- * (mem->nr_banks + acpi_mem.nr_banks + 1);
+ * (mem->nr_banks + bootinfo.acpi.nr_banks + 1);
}
/* Create /hypervisor/uefi node for efi properties. */
deleted file mode 100644
@@ -1,8 +0,0 @@
-#ifndef __ARM_EFI_DOM0_H__
-#define __ARM_EFI_DOM0_H__
-
-#include <asm/setup.h>
-
-extern struct meminfo acpi_mem;
-
-#endif
@@ -43,6 +43,9 @@ struct bootmodules {
struct bootinfo {
struct meminfo mem;
struct bootmodules modules;
+#ifdef CONFIG_ACPI
+ struct meminfo acpi;
+#endif
};
extern struct bootinfo bootinfo;
Currently the acpi banks are stored in a separate variable and have an header just for them. This variable can be moved in the structure bootinfo removing an header and a global variable. Signed-off-by: Julien Grall <julien.grall@arm.com> --- xen/arch/arm/efi/efi-boot.h | 3 +-- xen/arch/arm/efi/efi-dom0.c | 12 +++++------- xen/arch/arm/efi/efi-dom0.h | 8 -------- xen/include/asm-arm/setup.h | 3 +++ 4 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 xen/arch/arm/efi/efi-dom0.h