diff options
| author | Sughosh Ganu <sughosh.ganu@linaro.org> | 2024-10-15 21:07:11 +0530 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2024-10-15 13:45:29 -0600 |
| commit | 497da0c5ce9084fed8166b18b4f1f9dbe1532034 (patch) | |
| tree | 2b516dd37f98244c72d0110ec61a8e6a75281bfe /lib | |
| parent | 695dbd5fae4fcd708a9424238818dc8de4d8148a (diff) | |
lmb: allow for boards to specify memory map
Some architectures have special or unique aspects which need
consideration when adding memory ranges to the list of available
memory map. Enable this config in such scenarios which allow
architectures and boards to define their own memory map.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig | 18 | ||||
| -rw-r--r-- | lib/lmb.c | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 67a60160dac..3d2011ad4b7 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -1119,6 +1119,24 @@ config SPL_LMB SPL. This will require a malloc() implementation for defining the data structures needed for maintaining the LMB memory map. +config LMB_ARCH_MEM_MAP + bool "Add an architecture specific memory map" + depends on LMB + help + Some architectures have special or unique aspects which need + consideration when adding memory ranges to the list of available + memory map. Enable this config in such scenarios which allow + architectures and boards to define their own memory map. + +config SPL_LMB_ARCH_MEM_MAP + bool "Add an architecture specific memory map" + depends on SPL_LMB + help + Some architectures have special or unique scenarios which need + consideration when adding memory ranges to the list of available + memory map. Enable this config in such scenarios which allow + architectures and boards to define their own memory map. + config PHANDLE_CHECK_SEQ bool "Enable phandle check while getting sequence number" help diff --git a/lib/lmb.c b/lib/lmb.c index e7167f858f0..ae69201d5b7 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -326,6 +326,9 @@ void lmb_add_memory(void) u64 ram_top = gd->ram_top; struct bd_info *bd = gd->bd; + if (CONFIG_IS_ENABLED(LMB_ARCH_MEM_MAP)) + return lmb_arch_add_memory(); + /* Assume a 4GB ram_top if not defined */ if (!ram_top) ram_top = 0x100000000ULL; |
