mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-18 02:44:37 +00:00
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>
This commit is contained in:
parent
695dbd5fae
commit
497da0c5ce
3 changed files with 23 additions and 0 deletions
|
@ -168,6 +168,8 @@ long lmb_free(phys_addr_t base, phys_size_t size);
|
||||||
void lmb_dump_all(void);
|
void lmb_dump_all(void);
|
||||||
void lmb_dump_all_force(void);
|
void lmb_dump_all_force(void);
|
||||||
|
|
||||||
|
void lmb_arch_add_memory(void);
|
||||||
|
|
||||||
struct lmb *lmb_get(void);
|
struct lmb *lmb_get(void);
|
||||||
int lmb_push(struct lmb *store);
|
int lmb_push(struct lmb *store);
|
||||||
void lmb_pop(struct lmb *store);
|
void lmb_pop(struct lmb *store);
|
||||||
|
|
18
lib/Kconfig
18
lib/Kconfig
|
@ -1119,6 +1119,24 @@ config SPL_LMB
|
||||||
SPL. This will require a malloc() implementation for defining
|
SPL. This will require a malloc() implementation for defining
|
||||||
the data structures needed for maintaining the LMB memory map.
|
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
|
config PHANDLE_CHECK_SEQ
|
||||||
bool "Enable phandle check while getting sequence number"
|
bool "Enable phandle check while getting sequence number"
|
||||||
help
|
help
|
||||||
|
|
|
@ -326,6 +326,9 @@ void lmb_add_memory(void)
|
||||||
u64 ram_top = gd->ram_top;
|
u64 ram_top = gd->ram_top;
|
||||||
struct bd_info *bd = gd->bd;
|
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 */
|
/* Assume a 4GB ram_top if not defined */
|
||||||
if (!ram_top)
|
if (!ram_top)
|
||||||
ram_top = 0x100000000ULL;
|
ram_top = 0x100000000ULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue