Warning when DTB memory nodes are noped
Hi all,
If I understand correctly, all memory nodes contained in a DTB passed via the -dtb option are noped in hw/arm/boot.c:556-568.
I did not expect this to happen and only figured it out by debugging the kernel.
Do you think a warning should be issued if a DTB contains memory regions that are noped?
Best regards,
Lukas
Quoted 9 lines · Lukas
Hi all,
If I understand correctly, all memory nodes contained in a DTB passed via the -dtb option are noped in hw/arm/boot.c:556-568.
I did not expect this to happen and only figured it out by debugging the kernel.
Do you think a warning should be issued if a DTB contains memory regions that are noped?
No, because generally we expect that to happen: the DTB will have a memory node for whatever the stock amount of RAM on the target board is, but we want to delete that so we can replace it with a memory node saying that the system has however much RAM the user asked for on the command line.
Was the deletion of the memory node actually wrong in your case? If so we should look at fixing the wrong behaviour, rather than just being noisier about what we're doing...
thanks
-- PMM
Quoted 20 lines · Peter Maydell
Quoted 11 lines · Lukas
Hi all,
If I understand correctly, all memory nodes contained in a DTB passed
via the -dtb option are noped in hw/arm/boot.c:556-568. I did not expect this to happen and only figured it out by debugging
the kernel.
Do you think a warning should be issued if a DTB contains memory regions that are noped?No, because generally we expect that to happen: the DTB will have a memory node for whatever the stock amount of RAM on the target board is, but we want to delete that so we can replace it with a memory node saying that the system has however much RAM the user asked for on the command line.
Quoted 6 lines
Was the deletion of the memory node actually wrong in your case? If so we should look at fixing the wrong behaviour, rather than just being noisier about what we're doing...
thanks
-- PMM
I see. In my case I wanted to specify the memory using the DTB that I passed using the -dtb option. I had two memory ranges in the dtb and they didn't show up in the kernel later on because they were noped by QEMU. I found it confusing that QEMU makes changes to the DTB that I passed via -dtb.
Thanks,
Lukas
Quoted 11 lines · Lukas
Quoted 3 lines · Peter Maydell
Was the deletion of the memory node actually wrong in your case? If so we should look at fixing the wrong behaviour, rather than just being noisier about what we're doing...
I see. In my case I wanted to specify the memory using the DTB that I passed using the -dtb option. I had two memory ranges in the dtb and they didn't show up in the kernel later on because they were noped by QEMU. I found it confusing that QEMU makes changes to the DTB that I passed via -dtb.
Yeah, we don't edit the DTB much but we do fix it up to indicate the memory, number of CPUs, kernel command line, etc passed on the QEMU command line.
thanks
-- PMM