Hi Jonas,

On 10/4/26 9:58 PM, Jonas Karlman wrote:
The PX30/RK3326 has 16 KiB SYSTEM SRAM at [0xff0e0000, 0xff0e4000) and
8 KiB PMU SRAM at [0xff020000, 0xff022000). With 4 KiB of the initial
SYSTEM SRAM typically reserved for BootROM during early boot.

BootROM will load init code of up to 12 KiB (0x3000 bytes) to address
0xff0e1000 in SYSTEM SRAM, before jumping to it.

BootROM of RK3326 typically jumps to init code with following registers:

   x0: 00000000 00000000
   x1: 00000000 a000414c
   x2: 00000000 00000000
   x3: 00000000 00000000

   sp: 00000000 ff0e0f50

mkimage is enforcing a 10 KiB init code size limit for PX30/RK3326.
However, the BootRAM can load up to 12 KiB of init code.
> Change the init code size limit to 12 KiB using the <size> - <reserved>
pattern to closer match the actual limit of BootROM on PX30/RK3326.


This matches the current value in Rockchip's downstream fork, c.f. https://github.com/rockchip-linux/u-boot/blob/next-dev/tools/rkcommon.c and specifically https://github.com/rockchip-linux/u-boot/commit/3bbe0d2f9129303e9f36d3ddfa3485653e188ecd. I will add this to the commit log when merging.

Fixes: c6e66b12e4cd ("rockchip: mkimage: add support for px30")
Reviewed-by: Quentin Schulz <[email protected]>

Thanks!
Quentin

Reply via email to