summaryrefslogtreecommitdiff
path: root/board/armltd
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2022-03-04 19:30:11 +0300
committerTom Rini <trini@konsulko.com>2022-04-01 21:55:38 +0300
commitc0fce929564f996f6f21418827c48519eb79d1b6 (patch)
tree6170d97b72a1e2d7b37144f1ec98d1dc4854c0a6 /board/armltd
parent71fa41ebfc3f247f5f2654045713242830fde471 (diff)
downloadu-boot-c0fce929564f996f6f21418827c48519eb79d1b6.tar.xz
vexpress64: fvp: enable OF_CONTROL
The FVP base model is relying on a DT for Linux operation, so there is no reason we would need to rely on hardcoded information for U-Boot. Letting U-Boot use a DT will open up the usage of actual peripherals, beyond the support for semihosting only. Enable OF_CONTROL in the Kconfig, and use the latest dts files from Linux. Depending on whether we use the boot-wrapper or TF-A, there is already a DTB provided or not, respectively. To cover the boot-wrapper, we add an arm64 Linux kernel header, which allows the boot-wrapper to treat U-Boot like a Linux kernel. U-Boot will find the pointer to the DTB in x0, and will use it. Even though TF-A carries a DT, at the moment this is not made available to non-secure world, so to not break users, we use the U-Boot provided DTB copy in that case. For some reason TF-A puts some DT like structure at the address x0 is pointing at, but that is very small and doesn't carry any hardware information. Make the code to ignore those small DTBs. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'board/armltd')
-rw-r--r--board/armltd/vexpress64/Kconfig8
-rw-r--r--board/armltd/vexpress64/vexpress64.c8
2 files changed, 13 insertions, 3 deletions
diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig
index 55fe0118e1..34126446a7 100644
--- a/board/armltd/vexpress64/Kconfig
+++ b/board/armltd/vexpress64/Kconfig
@@ -15,13 +15,14 @@ choice
config TARGET_VEXPRESS64_BASE_FVP
bool "Support Versatile Express ARMv8a FVP BASE model"
select SEMIHOSTING
+ select LINUX_KERNEL_IMAGE_HEADER
+ select POSITION_INDEPENDENT
+ select OF_BOARD
config TARGET_VEXPRESS64_JUNO
bool "Support Versatile Express Juno Development Platform"
select DM_ETH
select USB
- select OF_CONTROL
- select CLK
select BLK
imply OF_HAS_PRIOR_STAGE
@@ -34,4 +35,7 @@ config JUNO_DTB_PART
The ARM partition name in the NOR flash memory holding the
device tree blob to configure U-Boot.
+config LNX_KRNL_IMG_TEXT_OFFSET_BASE
+ default SYS_TEXT_BASE
+
endif
diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
index 5e22e89824..7d5e5516f9 100644
--- a/board/armltd/vexpress64/vexpress64.c
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -168,11 +168,17 @@ void *board_fdt_blob_setup(int *err)
}
#endif
- if (fdt_magic(prior_stage_fdt_address) == FDT_MAGIC) {
+ if (fdt_magic(prior_stage_fdt_address) == FDT_MAGIC &&
+ fdt_totalsize(prior_stage_fdt_address) > 0x100) {
*err = 0;
return (void *)prior_stage_fdt_address;
}
+ if (fdt_magic(gd->fdt_blob) == FDT_MAGIC) {
+ *err = 0;
+ return (void *)gd->fdt_blob;
+ }
+
*err = -ENXIO;
return NULL;
}