summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-02-07 11:42:26 -0500
committerTom Rini <[email protected]>2023-02-07 11:42:26 -0500
commitb69026c91f2e98b247120e217a986f5056724baf (patch)
treef1533069fcdbcf265deb0ea6b3b940e81902d9b3 /lib
parentf8f47e6ff214a3ba7a61025bcc4dc058f507c279 (diff)
parent41a29f284cef48a86c86d038c0cd8cc1c851417e (diff)
Merge branch '2023-02-07-assorted-updates'
- Default to dynamic LMB allocation, and fix an issue with the EFI one, assorted TI platform updates, socrates platform updates, switch qemu-arm to using bootstd, imagetool fixes, macOS host build fixes, keymile platform upates, spl FPGA load fix, MMC env bugfix, add seama command, usb bootdev test bugfix.
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig1
-rw-r--r--lib/lmb.c13
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 549bd357785..59e4304afd1 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -1028,7 +1028,6 @@ config LMB
config LMB_USE_MAX_REGIONS
bool "Use a common number of memory and reserved regions in lmb lib"
depends on LMB
- default y
help
Define the number of supported memory regions in the library logical
memory blocks.
diff --git a/lib/lmb.c b/lib/lmb.c
index ec790760db6..f447c639a60 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -175,11 +175,14 @@ static __maybe_unused int efi_lmb_reserve(struct lmb *lmb)
return 1;
for (i = 0, map = memmap; i < map_size / sizeof(*map); ++map, ++i) {
- if (map->type != EFI_CONVENTIONAL_MEMORY)
- lmb_reserve(lmb,
- map_to_sysmem((void *)(uintptr_t)
- map->physical_start),
- map->num_pages * EFI_PAGE_SIZE);
+ if (map->type != EFI_CONVENTIONAL_MEMORY) {
+ lmb_reserve_flags(lmb,
+ map_to_sysmem((void *)(uintptr_t)
+ map->physical_start),
+ map->num_pages * EFI_PAGE_SIZE,
+ map->type == EFI_RESERVED_MEMORY_TYPE
+ ? LMB_NOMAP : LMB_NONE);
+ }
}
efi_free_pool(memmap);