summaryrefslogtreecommitdiff
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-05-18 08:17:29 -0400
committerTom Rini <trini@konsulko.com>2020-05-18 08:17:29 -0400
commited9a3aa6452f57af65eb74f73bd2a54c3a2f4b03 (patch)
tree360fcb8e12955e02f8454e5f901d7891cf4168b6 /arch/arm/cpu
parent515f613253cf0a892c3a321770ab927fa3d925cf (diff)
parent7f44c7e281ef228d60625f5acdcbe68a847256bd (diff)
Merge tag 'efi-2020-07-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-07-rc3 A series of patches introduces the possibility to manage UEFI variables via an OP-TEE module. CONFIG_EFI_MM_COMM_TEE enables this. If this option is not specified the U-Boot behavior remains unchanged. A defconfig is provided for compile testing (lx2160ardb_tfa_stmm_defconfig). An incorrect UEFI memory allocation for fsl-layerscape is fixed
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/cpu.c10
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/fdt.c5
2 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index b3f5c2f641..2cf3f4bb98 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -1529,9 +1529,8 @@ int dram_init_banksize(void)
void efi_add_known_memory(void)
{
int i;
- phys_addr_t ram_start, start;
+ phys_addr_t ram_start;
phys_size_t ram_size;
- u64 pages;
/* Add RAM */
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
@@ -1549,11 +1548,8 @@ void efi_add_known_memory(void)
gd->arch.resv_ram < ram_start + ram_size)
ram_size = gd->arch.resv_ram - ram_start;
#endif
- start = (ram_start + EFI_PAGE_MASK) & ~EFI_PAGE_MASK;
- pages = (ram_size + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT;
-
- efi_add_memory_map(start, pages, EFI_CONVENTIONAL_MEMORY,
- false);
+ efi_add_memory_map(ram_start, ram_size,
+ EFI_CONVENTIONAL_MEMORY);
}
}
#endif
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 3bbad827cb..0696ea6d35 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -146,9 +146,8 @@ remove_psci_node:
fdt_add_mem_rsv(blob, (uintptr_t)&secondary_boot_code,
*boot_code_size);
#if CONFIG_IS_ENABLED(EFI_LOADER)
- efi_add_memory_map((uintptr_t)&secondary_boot_code,
- ALIGN(*boot_code_size, EFI_PAGE_SIZE) >> EFI_PAGE_SHIFT,
- EFI_RESERVED_MEMORY_TYPE, false);
+ efi_add_memory_map((uintptr_t)&secondary_boot_code, *boot_code_size,
+ EFI_RESERVED_MEMORY_TYPE);
#endif
}
#endif