Skip to contentSkip to conversation

vexpress64: Use OF_HAS_PRIOR_STAGE for BASE_FVP variant

PATCH In review Peter Hoyes 3 participants 7 messages Mar 31, 2023 – Apr 26, 2023 Arm/versatile express platform

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 vexpress64: Use OF_HAS_PRIOR_STAGE for BASE_FVP variant

From: Peter Hoyes <[email protected]>

BASE_FVP now typically uses a devicetree provided by a prior boot stage (typically Arm TF-A), so imply this option by default when TARGET_VEXPRESS64_BASE_FVP is selected.

OF_HAS_PRIOR_STAGE selects OF_BOARD so this change is minor, but aligns TARGET_VEXPRESS64_BASE_FVP with TARGET_VEXPRESS64_BASER_FVP.

---
 board/armltd/vexpress64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/armltd/vexpress64/Kconfig +1 -1
index 5616e223a9..bd15cbeb7e 100644
@@ -23,7 +23,7 @@ choice
 config TARGET_VEXPRESS64_BASE_FVP
 	bool "Support Versatile Express ARMv8a FVP BASE model"
 	select VEXPRESS64_BASE_MODEL
-	select OF_BOARD
+	imply OF_HAS_PRIOR_STAGE
 
 config TARGET_VEXPRESS64_BASER_FVP
 	bool "Support Versatile Express ARMv8r64 FVP BASE model"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/3 vexpress64: Enable VIRTIO_MMIO and RTC_PL031 in the base model

From: Peter Hoyes <[email protected]>

The Arm EBBR (Embedded Base Boot Requirements) require that the time and basic networking EFI interfaces are available and working, so long as the hardware has an RTC and network interface.

Arm FVPs typically have a memory-mapped PL031 RTC and a VIRTIO_NET device defined in the device tree, so "imply" these in the Kconfig for the FVP base model to simplify creating EBBR-compliant firmware.

---
 board/armltd/vexpress64/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)
board/armltd/vexpress64/Kconfig +5 -0
index bd15cbeb7e..cf998096e4 100644
@@ -12,8 +12,13 @@ config SYS_CONFIG_NAME
 config VEXPRESS64_BASE_MODEL
 	bool
 	select SEMIHOSTING
+	imply VIRTIO_MMIO
 	select VIRTIO_BLK if VIRTIO_MMIO
 	select VIRTIO_NET if VIRTIO_MMIO
+	select DM_ETH if VIRTIO_NET
+	imply RTC_PL031
+	select DM_RTC if RTC_PL031
+	imply EFI_SET_TIME if DM_RTC
 	select LINUX_KERNEL_IMAGE_HEADER
 	select POSITION_INDEPENDENT
 
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 2/3] vexpress64: Enable VIRTIO_MMIO and RTC_PL031 in the base model

Quoted 11 lines · Peter Hoyes

From: Peter Hoyes <[email protected]>

The Arm EBBR (Embedded Base Boot Requirements) require that the time and basic networking EFI interfaces are available and working, so long as the hardware has an RTC and network interface.

Arm FVPs typically have a memory-mapped PL031 RTC and a VIRTIO_NET device defined in the device tree, so "imply" these in the Kconfig for the FVP base model to simplify creating EBBR-compliant firmware.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#3 lore raw

PATCH 3/3 configs: Create minimal vexpress_fvp_defconfig

In reply to Peter Hoyes

From: Peter Hoyes <[email protected]>

The vexpress64 board family now relies on OF_CONTROL and OF_HAS_PRIOR_STAGE, so platform-specific configuration requirements are minimal.

The vexpress_aemv8a_semi_defconfig file defines many flags that are not needed for a minimal boot, such as flash memory configuration.

Therefore create vexpress_fvp_defconfig which contains the minimum configuration required to boot on an Arm v8a FVP.

---
 configs/vexpress_fvp_defconfig | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 configs/vexpress_fvp_defconfig
configs/vexpress_fvp_defconfig new file +5 -0
new file mode 100644
index 0000000000..7362c1fc35
@@ -0,0 +1,5 @@
+CONFIG_ARM=y
+CONFIG_ARCH_VEXPRESS64=y
+CONFIG_DEFAULT_DEVICE_TREE="arm_fvp"
+CONFIG_IDENT_STRING=" arm_fvp"
+# CONFIG_DISPLAY_CPUINFO is not set
Signature · 1 line
2.34.1
#4 lore raw

Re: [PATCH 3/3] configs: Create minimal vexpress_fvp_defconfig

Quoted 6 lines · Peter Hoyes

From: Peter Hoyes <[email protected]>

The vexpress64 board family now relies on OF_CONTROL and OF_HAS_PRIOR_STAGE, so platform-specific configuration requirements are minimal.

Quoted 7 lines

The vexpress_aemv8a_semi_defconfig file defines many flags that are not needed for a minimal boot, such as flash memory configuration.

Therefore create vexpress_fvp_defconfig which contains the minimum configuration required to boot on an Arm v8a FVP.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
Reviewed-by on v1 1/3
#5 lore raw
In reply to Peter Hoyes
Quoted 8 lines · On Fri, 31 Mar 2023 09:58:11 +0100 Peter Hoyes <[email protected]> wrote:

From: Peter Hoyes <[email protected]>

BASE_FVP now typically uses a devicetree provided by a prior boot stage (typically Arm TF-A), so imply this option by default when TARGET_VEXPRESS64_BASE_FVP is selected.

OF_HAS_PRIOR_STAGE selects OF_BOARD so this change is minor, but aligns TARGET_VEXPRESS64_BASE_FVP with TARGET_VEXPRESS64_BASER_FVP.

Yeah, makes sense. Both secure firmware implementations commonly used (boot-wrapper and TF-A) provide a DTB.

Quoted 1 line

Cheers,
Andre

Quoted 17 lines
---
 board/armltd/vexpress64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/armltd/vexpress64/Kconfig +1 -1
index 5616e223a9..bd15cbeb7e 100644
@@ -23,7 +23,7 @@ choice
 config TARGET_VEXPRESS64_BASE_FVP
 	bool "Support Versatile Express ARMv8a FVP BASE model"
 	select VEXPRESS64_BASE_MODEL
-	select OF_BOARD
+	imply OF_HAS_PRIOR_STAGE
 
 config TARGET_VEXPRESS64_BASER_FVP
 	bool "Support Versatile Express ARMv8r64 FVP BASE model"
#6 lore raw
In reply to Peter Hoyes
Quoted 11 lines · Peter Hoyes

From: Peter Hoyes <[email protected]>

BASE_FVP now typically uses a devicetree provided by a prior boot stage (typically Arm TF-A), so imply this option by default when TARGET_VEXPRESS64_BASE_FVP is selected.

OF_HAS_PRIOR_STAGE selects OF_BOARD so this change is minor, but aligns TARGET_VEXPRESS64_BASE_FVP with TARGET_VEXPRESS64_BASER_FVP.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom