Memory node of device tree in /proc doesn't match dtb
2
votes
1
answer
1280
views
I'm trying to modify the memory node in a device tree for a zynqmp zcu102 board. However, something seems to be overriding this node somehow.
I'm booting using a FIT image and u-boot. I've confirmed the FIT image has the correct DTB by its shasum and that the kernel is using the right DTB by adding a fake node which shows up in /proc/device-tree. However, for some reason the memory node as shown in /proc/device-tree doesn't match the DTB.
Here's the relevant section of my device tree:
memory {
device_type = "memory";
reg = ;
};
fakenode{
foo = "bar";
};
Here is what I see in those nodes in /proc/device-tree:
root@zynqmp:/proc/device-tree# hexdump memory/reg
0000000 0000 0000 0000 0000 0000 0000 0080 0000
0000010 0000 0800 0000 0000 0000 0000 0080 0000
0000020
root@zynqmp:/proc/device-tree# hexdump memory/name -C
00000000 6d 65 6d 6f 72 79 00 |memory.|
00000007
root@zynqmp:/proc/device-tree# hexdump fakenode/name -C
00000000 66 61 6b 65 6e 6f 64 65 00 |fakenode.|
00000009
root@zynqmp:/proc/device-tree# hexdump fakenode/foo -C
00000000 62 61 72 00 |bar.|
00000004
Is there some way that u-boot or the linux config can override the memory node during boot? I'm at a loss right now what to do next.
UPDATE:
I've found that linux is inheriting the /memory node in u-boot's own device tree. I'm not sure if this is documented anywhere, I discovered it experimentally. Is there a way to decouple these?
Asked by rocky
(154 rep)
Jul 7, 2020, 06:11 PM
Last activity: Jun 5, 2024, 12:09 PM
Last activity: Jun 5, 2024, 12:09 PM