On 09/20/2012 03:00 PM, Rob Herring wrote:
On 09/20/2012 03:25 PM, Stephen Warren wrote:
Rob, in git commit 49a3fb455890dd9d53a18573d0998edb8332fc4a (from git://git.linaro.org/boot/u-boot-linaro-stable.git), there is:
+fdt_addr=0x1000 +pxefile_addr_r=0x700000 +kernel_addr_r=0x800000 +ramdisk_addr_r=0x01000000
Why is that first line fdt_addr not fdt_addr_r; the latter appears more often in mainline U-Boot and is what's mentioned in README too.
fdt_addr is the flash address as the README mentions. 0x1000 is not really flash, but it is the firmware provided dtb location. If we did a user loaded dtb, I would expect to use fdt_addr_r.
Ah, so you have firmware that runs before U-Boot, I take it.
That is also the env var that pxe boot command uses.
Indeed. I wonder if that behaviour is correct.
I guess the pxe code doesn't support downloading the DTB along with the kernel and initrd; if it did, it should definitely use fdt_addr_r for the downloaded copy.
That was my rational, but I could be persuaded that's wrong.
If someone is trying to write a standard boot.scr that's independent of any SoC-specific issues, how would they know whether to use kernel_addr_r or kernel_addr? A similar question applies in the pxe case if no FDT is downloaded over PXE.
Should both boot.scr and pxe be doing:
if fdt_addr_r defined: use fdt_addr_r else: use fdt_addr
It seems painful to duplicate that everywhere; it'd be nicer to just use fdt_addr_r everywhere if possible.
Either way, since on Tegra all FDTs are loaded from somewhere into RAM explicitly, rather than being in ROM or magically pre-existing, then defining fdt_addr_r seems appropriate, so I'll go with that.