[PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again
Pali Rohar
pali at kernel.org
Thu Jan 5 20:25:41 CET 2023
Ok, so it is working...
On Thursday 05 January 2023 19:31:19 Patrick DELAUNAY wrote:
> I tested on STM32MP157C-EV1 on my side...
>
> with 1GiB mermory size
>
> U-Boot is booting on next TOP (for trusted boot with TF-A and OP-TEE)
>
>
>
> U-Boot 2023.01-rc4-00386-gb429e78942de (Jan 05 2023 - 17:44:04 +0100)
>
> stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -1)
> stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -1)
> CPU: STM32MP157C?? Rev.Z
> Model: STMicroelectronics STM32MP157C eval daughter on eval mother
> Board: stm32mp1 in trusted mode (st,stm32mp157c-ev1)
> stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -1)
> DRAM: 1 GiB
> ....
>
>
> STM32MP> bdinfo
> boot_params = 0x00000000
> DRAM bank = 0x00000000
> -> start = 0xc0000000
> -> size = 0x3ffff000 <<<<<< the patch is applied - 4kiB here !!!
But this is wrong. DRAM bank size should not be changed. I think that in
U-Boot is another issue which propagates mapped U-Boot RAM size/range to
the places where should be real DDR size.
> flashstart = 0x00000000
> flashsize = 0x00000000
> flashoffset = 0x00000000
> baudrate = 115200 bps
> relocaddr = 0xfdb1d000
> reloc off = 0x3da1d000
> Build = 32-bit
> current eth = ethernet at 5800a000
> ethaddr = 00:80:e1:01:60:da
> IP addr = <NULL>
> fdt_blob = 0xfbb040a0
> new_fdt = 0xfbb040a0
> fdt_size = 0x00016de0
> Video = display-controller at 5a001000 inactive
> lmb_dump_all:
> memory.cnt = 0x1
> memory[0] [0xc0000000-0xffffefff], 0x3ffff000 bytes flags: 0 <<<<
> reserved.cnt = 0x6
> reserved[0] [0x10000000-0x10045fff], 0x00046000 bytes flags: 4
> reserved[1] [0x30000000-0x3003ffff], 0x00040000 bytes flags: 4
> reserved[2] [0x38000000-0x3800ffff], 0x00010000 bytes flags: 4
> reserved[3] [0xe8000000-0xefffffff], 0x08000000 bytes flags: 4
> reserved[4] [0xfbaffbb8-0xfdffffff], 0x02500448 bytes flags: 0
> reserved[5] [0xfe000000-0xffffffff], 0x02000000 bytes flags: 4 <<<<
> devicetree = board
> arch_number = 0x00000000
> TLB addr = 0xfdff0000
> irq_sp = 0xfbb03e10
> sp start = 0xfbb03e00
> Early malloc usage: 2924 / 20000
> STM32MP>
>
>
> But we have strange LMB reserved memory [0xfe000000-0xffffffff] from DT
>
> => it is outside of memory[0] [0xc0000000-0xffffefff]
>
>
> I think the -4 kiB should be removed at least....
>
>
>
> I test also with basic boot = SPL and U-Boot, no issue on my side
>
>
>
> Patrick
>
More information about the U-Boot
mailing list