[PATCH 0/4] arm: mach-k3: Add DM firmware memory fixup
Paresh Bhagat
p-bhagat at ti.com
Thu Jun 11 20:14:48 CEST 2026
Hi Markus,
Btw Had a quick look at series
https://lore.kernel.org/all/20260609-topic-am62a-ioddr-dt-v6-19-v6-0-16afba97fbe0@baylibre.com/
I did not know this problem was for other devices too.
On 10/06/26 13:42, Markus Schneider-Pargmann wrote:
> Hi Paresh,
>
> On Tue Jun 9, 2026 at 8:10 PM CEST, Paresh Bhagat wrote:
>> This patch series addresses DM firmware reserved memory fixup for AM62a
>> and AM62d:
>>
>> 1. AM62D is missing OF_SYSTEM_SETUP config, required for FDT fixups to
>> be applied before passing dtb to kernel.
>>
>> 2. DM firmware reserved memory region is insufficient to accommodate the
>> binary. Analysis of the DM firmware binary using objdump reveals that
>> the resource_table section and .stack section occupies memory from
>> 0x9c900000 to 0x9e608000. So increase the reserved region size from
>> 0xf00000 to 0x1f00000 via fdt fixup. Add new configs in Kconfig.
> I am wondering why you chose 0x1f00000 and not 0x1d08000?
>
> Also for am62a the firmware linker file says it is shorter:
> /* DDR for DM R5F code/data [ size 27 MiB + 364 KB ] */
> DDR : ORIGIN = 0x9CAA5000 LENGTH = 0x1B5B000
>
> https://github.com/TexasInstruments/mcupsdk-core-k3/blob/k3_main/examples/drivers/ipc/ipc_rpmsg_echo_linux/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/linker.cmd#L175
>
> I am wondering what is correct, the linker file or the objdump you did?
Yes apart from the objdump output I noticed a gap between end of
wkup_r5fss0_core0_memory_region and start of secure_ddr. So intention to
fix the bug and use all of the available space.
>
>> 3. The existing fdt_fixup_reserved_memory() used a delete/recreate
>> approach which corrupted phandle references to DM node, causing DM
>> initialization failures. Fixed it by updating nodes in-place using
>> fdt_setprop() to preserve original phandles.
> I haven't looked at the code yet, why do you use a fixup instead of
> fixing the devicetree?
>
> Best
> Markus
I had a discussion with bryan regarding the device tree fix approach. He
pointed out that firmware and kernel versions can be updated
independently which can lead to unused reserved memory. So bootloaders
should dynamically update the reserved memory based on firmware
requirements before handing off to kernel.
I will let Bryan and Andrew share more on device tree vs using fdt fixup
approach.
Thanks,
Paresh
>
>> This patch will need the dts to be updated for both AM62a and AM62d i.e.
>> rename wkup_r5fss0_core0_memory_region node from "memory at 9c900000" to
>> "dm at 9c900000".
>>
>> Boot logs
>> https://gist.github.com/paresh-bhagat/e64523fe5134a02754fdbdaff864fcd1
>> https://gist.github.com/paresh-bhagat/b578d602010db09d62d2be3b2709fc5a
>>
>> Paresh Bhagat (4):
>> arm: mach-k3: Fix phandle corruption in fdt fixup
>> arm: mach-k3: am62ax: Enable OF_SYSTEM_SETUP for AM62D2
>> arm: mack-k3: Kconfig: Add DM firmware reserved memory configs
>> arm: mach-k3: Add DM reserved memory fixup
>>
>> arch/arm/mach-k3/Kconfig | 16 ++++++++++++++++
>> arch/arm/mach-k3/am62ax/Kconfig | 1 +
>> arch/arm/mach-k3/common_fdt.c | 34 +++++++++++++++++++++++----------
>> 3 files changed, 41 insertions(+), 10 deletions(-)
More information about the U-Boot
mailing list