]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r335869, r335933: stand: uboot behavioral fixes
authorkevans <kevans@FreeBSD.org>
Wed, 20 Feb 2019 18:48:36 +0000 (18:48 +0000)
committerkevans <kevans@FreeBSD.org>
Wed, 20 Feb 2019 18:48:36 +0000 (18:48 +0000)
commite7f06b155d9b2fd63806183eb77bbb93977bc079
tree632730af18f8c74aea060965e5de7bc93bb90eda
parent2e6a9d7599eddb8ef2718d51b79946e10fe3e753
MFC r335869, r335933: stand: uboot behavioral fixes

r335869:
stand: uboot: Do not panic if we can't find a boot device

It is really anoying to panic when there is no boot device as you
cannot see the availables ones.

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

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.
stand/uboot/common/main.c
stand/uboot/fdt/uboot_fdt.c