Part Number: AM6442
Tool/software:
hello,
I've recently run into a strange issue with kernel boot on am6442. I am using Yocto to build an image for the AM6442; the build utilizes the phytec-linux fork for kernel source.
My issue is that the kernel does not seem to be consuming the correct device tree blob. I am not certain that this is in fact the root cause, but I will outline the issue and maybe someone has a better inclination as to what is going on.
The main device tree source that I am consuming is /arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts. I made a few edits to this device tree for my specific needs via patches in Yocto. The core edits are two additional reserved memory regions:
From 7058d3dc228615c43bd81bf9f737ada18a93a75b Mon Sep 17 00:00:00 2001
From: jweyer <jweyer@aecontrols.com>
Date: Thu, 12 Jun 2025 13:58:18 -0700
Subject: [PATCH] apc reserved buff
---
.../boot/dts/ti/k3-am64-phycore-som.dtsi | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi b/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi
index e8d1b88651e7..0e1447b382ee 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi
@@ -105,8 +105,37 @@ rtos_ipc_memory_region: ipc-memories@a5000000 {
alignment = <0x1000>;
no-map;
};
+
+ /*
+ * apc reserved memory
+ * desc: contigous buffer for apc buffers.
+ * region: 0xa58000000 - 0xb5800000
+ * size: 100 MiB
+ */
+ apc_memory_region: apc-memory@a5800000 {
+ reg = <0x00 0xa5800000 0x00 0x10000000>;
+ alignment = <0x1000>;
+ no-map;
+ };
+
+ /*
+ * jailhouse reserved memory
+ * desc: memory hypervisor and inmate
+ * region: 0xdfa00000 - 0xeae00000
+ * size: 180 MiB
+ */
+ jailhouse_mem: jailhouse@dfa00000 {
+ reg = <0x0 0xdfa00000 0x0 0x00b400000>;
+ alignment = <0x1000>;
+ no-map;
+ };
};
+ apc {
+ compatible = "apc-memory";
+ memory-region = <&apc_memory_region>;
+ };
+
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
--
2.25.1
This all works correctly; I have verified that my patches have been applied to the device tree by decompiling the device tree blob in Yocto image deploy directory. I then install the image on AM6442 and the memory reservations were not made. I checked for any errors via `dmesg`, but there does not seem to be any attempt to create the regions. My initial thought was that U-boot and/or the kernel was consuming the wrong device tree blob; however, I checked /boot/ and everything seems correct:root@aec-am6442:boot# ls
EFI
Image
'System Volume Information'
k3-am642-phyboard-electra-gpio-fan.dtbo
k3-am642-phyboard-electra-pcie-usb2.dtbo
k3-am642-phyboard-electra-rdk.dtb
k3-am642-phyboard-electra-x27-gpio1-spi1-uart3.dtbo
oftree
tiboot3.bin
tispl.bin
u-boot.img
I decompiled oftree and k3-am642-phyboard-electra-rdk.dtb and they both have my reserved memory nodes. I also stopped U-boot during boot and determined that fdtfile=oftree. After boot I check /proc/device-tree/reserved-memory and my reserved memory nodes are not shown:root@aec-am6442:reserved-memory# ls
'#address-cells' phandle r5f-memory@a1100000
'#size-cells' r5f-dma-memory@a0000000 r5f-memory@a2100000
m4f-dma-memory@a4000000 r5f-dma-memory@a1000000 r5f-memory@a3100000
m4f-memory@a4100000 r5f-dma-memory@a2000000 ranges
name r5f-dma-memory@a3000000
optee@9e800000 r5f-memory@a0100000
To double check these results I used `dtc -I fs` to create a dts file and inspection of this file verified that my reserved memory nodes did not exist. I've also checked /proc/device-tree/compatible which seems normal:phytec,am642-phyboard-electra-rdkphytec,am64-phycore-somti,am642
So, it does seem like the kernel and u-boot are consuming the correct device tree; however, my memory nodes do not exist. Is it possible that the memory reservations are failing silently? Here is my relevant `dmesg` output:[ 0.000000] OF: reserved mem: 0x000000009e800000..0x000000009fffffff (24576 KiB) nomap non-reusable optee@9e800000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a0000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a0000000..0x00000000a00fffff (1024 KiB) nomap non-reusable r5f-dma-memory@a0000000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a0100000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a0100000..0x00000000a0ffffff (15360 KiB) nomap non-reusable r5f-memory@a0100000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a1000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a1000000..0x00000000a10fffff (1024 KiB) nomap non-reusable r5f-dma-memory@a1000000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a1100000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a1100000..0x00000000a1ffffff (15360 KiB) nomap non-reusable r5f-memory@a1100000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a2000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a2000000..0x00000000a20fffff (1024 KiB) nomap non-reusable r5f-dma-memory@a2000000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a2100000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a2100000..0x00000000a2ffffff (15360 KiB) nomap non-reusable r5f-memory@a2100000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a3000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a3000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a3000000..0x00000000a30fffff (1024 KiB) nomap non-reusable r5f-dma-memory@a3000000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a3100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a3100000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a3100000..0x00000000a3ffffff (15360 KiB) nomap non-reusable r5f-memory@a3100000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node m4f-dma-memory@a4000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a4000000..0x00000000a40fffff (1024 KiB) nomap non-reusable m4f-dma-memory@a4000000
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node m4f-memory@a4100000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x00000000a4100000..0x00000000a4ffffff (15360 KiB) nomap non-reusable m4f-memory@a4100000
I've had memory reservations fail before and usually `dmesg` indicates this failure, so it seems like the kernel isn't even trying. I've used this exact process before, and everything has worked as expected.
Any thoughts on what I could be doing wrong here? Also, any ideas as to how to debug this further would be very much appreciated!
Thanks for your help,
- Jared