diff options
| author | Tom Rini <[email protected]> | 2026-06-08 15:28:18 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-06-08 15:28:18 -0600 |
| commit | e91911169bc737ee4a79963a1cba8db2aab7c1c0 (patch) | |
| tree | 77bdc64834398b00a211c1ceedfb87e39a1631b0 /lib | |
| parent | 5d4d6e331d3f056ecc7ab11b72098a3cf4fdb099 (diff) | |
| parent | 1296a428c67cf103eca482d4a63349661c1b799f (diff) | |
Merge tag 'v2026.07-rc4' into next
Prepare v2026.07-rc4
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig | 9 | ||||
| -rw-r--r-- | lib/lmb.c | 20 | ||||
| -rw-r--r-- | lib/smbios.c | 2 |
3 files changed, 29 insertions, 2 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 77ebc79e1db..cf13ac1bdad 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -1295,6 +1295,15 @@ config SPL_LMB_ARCH_MEM_MAP memory map. Enable this config in such scenarios which allow architectures and boards to define their own memory map. +config LMB_LIMIT_DMA_BELOW_RAM_TOP + bool + depends on LMB + default y if ARCH_BCM283X + help + Some architectures can not DMA above ram_top boundary, + which is after 4 GiB or 32-bit boundary too. Limit the + available memory to memory below ram_top boundary. + config PHANDLE_CHECK_SEQ bool "Enable phandle check while getting sequence number" help diff --git a/lib/lmb.c b/lib/lmb.c index 8f12c6ad8e5..275d105c5aa 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -611,6 +611,7 @@ static __maybe_unused void lmb_reserve_common_spl(void) static void lmb_add_memory(void) { int i; + phys_addr_t bank_end; phys_size_t size; u64 ram_top = gd->ram_top; struct bd_info *bd = gd->bd; @@ -625,8 +626,25 @@ static void lmb_add_memory(void) for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { size = bd->bi_dram[i].size; - if (size) + if (size) { lmb_add(bd->bi_dram[i].start, size); + if (!IS_ENABLED(CONFIG_LMB_LIMIT_DMA_BELOW_RAM_TOP)) + continue; + + bank_end = bd->bi_dram[i].start + size; + + /* + * Reserve memory above ram_top as + * no-overwrite so that it cannot be + * allocated + */ + if (bd->bi_dram[i].start >= ram_top) + lmb_reserve(bd->bi_dram[i].start, size, + LMB_NOOVERWRITE); + else if (bank_end > ram_top) + lmb_reserve(ram_top, bank_end - ram_top, + LMB_NOOVERWRITE); + } } } diff --git a/lib/smbios.c b/lib/smbios.c index 906d2753517..afde6401ae5 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -679,7 +679,7 @@ static int smbios_write_type3(ulong *current, int *handle, t->serial_number = smbios_add_prop_si(ctx, "serial", SYSID_SM_ENCLOSURE_SERIAL, NULL); t->asset_tag_number = smbios_add_prop_si(ctx, "asset-tag", - SYSID_SM_BASEBOARD_ASSET_TAG, + SYSID_SM_ENCLOSURE_ASSET_TAG, NULL); t->oem_defined = smbios_get_val_si(ctx, "oem-defined", SYSID_SM_ENCLOSURE_OEM, 0); |
