Page MenuHomeFreeBSD

loader: fdt: Try to load every possible DTB from u-boot
ClosedPublic

Authored by manu on Jul 2 2018, 5:57 PM.
Tags
None
Referenced Files
F166726159: D16101.id44770.diff
Sat, Aug 15, 9:28 PM
F166719805: D16101.id44767.diff
Sat, Aug 15, 8:53 PM
Unknown Object (File)
Fri, Aug 14, 6:30 PM
Unknown Object (File)
Thu, Aug 13, 7:27 PM
Unknown Object (File)
Wed, Aug 12, 6:05 PM
Unknown Object (File)
Wed, Aug 12, 2:06 PM
Unknown Object (File)
Tue, Aug 11, 11:01 PM
Unknown Object (File)
Tue, Aug 11, 10:59 PM
Subscribers

Details

Summary

U-Boot setup a few variables :

  • fdt_addr which is the board static dtb (most of the time loaded before u-boot or coming from some hardware like a ROM)
  • fdt_addr_r which is a location in RAM that holds the DTB loaded by u-boot or before u-boot

In the case of u-boot + rpi firmware the DTB is loaded in RAM but the location
still end up in the fdt_addr variable and the fdt_addr_r variable exist.

Change the behavior so we test that a DTB exists for every possible variable :

  • fdt_addr_r is checked first as if u-boot needed to modify it the correct DTB will live there.
  • fdt_addr is checked second as if we run on a hardware with DTB in ROM it means that we what/need to run that
  • fdtaddr looks like a FreeBSD-ism but since I'm not sure leave it.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17795
Build 17573: arc lint + arc unit

Event Timeline

stand/uboot/fdt/uboot_fdt.c
84

Now comment contradicts the code, it tries fdt_addr first no fdt_addr_r. Also fdt_addr used twise. Is first instance supposed to be fdtaddr?

manu edited the summary of this revision. (Show Details)

Change fdt_addr/fdt_addr_r order

manu marked an inline comment as done.Jul 2 2018, 7:02 PM
This revision is now accepted and ready to land.Jul 2 2018, 7:03 PM
This revision was automatically updated to reflect the committed changes.