Skip to contentSkip to conversation

arm-bsp/u-boot: Update fvp-baser-aemv8r64 patches for v2022.04

PATCH Applied Peter Hoyes 2 participants 4 messages Jun 7, 2022 – Jun 8, 2022 Arm/versatile express platform

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm-bsp/u-boot: Update fvp-baser-aemv8r64 patches for v2022.04

From: Peter Hoyes <[email protected]>

The backports are now merged, so remove patches 1 through 5 and renumber.

Upstream now requires CONFIG_DEFAULT_DEVICE_TREE to be defined, even if unused, so backport relevant portions of upstream BASER_FVP patch into the board suppport patch.

Issue-Id: SCM-4304

Change-Id I327e8aba3463f088bba40e83893c6f15beabb250
---
 .../conf/machine/fvp-baser-aemv8r64.conf      |   2 +-
 ...ation-for-the-Arm-VExpress64-board-c.patch | 109 -----------
 ...dd-BASER_FVP-vexpress-board-variant.patch} |  99 +++++++---
 ...8-Add-ARMv8-MPU-configuration-logic.patch} |   4 +-
 ...tor-header-file-to-make-it-easier-to.patch | 172 ------------------
 ...ling-exception-vectors-on-non-SPL-b.patch} |  28 ++-
 ...Clean-up-BASE_FVP-boot-configuration.patch |  99 ----------
 ...v8-ARMV8_SWITCH_TO_EL1-improvements.patch} |  24 ++-
 ...e-OF_CONTROL-and-OF_BOARD-for-VExpre.patch | 110 -----------
 ...ing-HVC-configurable-when-switching.patch} |  24 ++-
 ...s64-Enable-VIRTIO_NET-network-driver.patch |  62 -------
 ...ress64-Do-not-set-COUNTER_FREQUENCY.patch} |   8 +-
 ...-Configure-memory-using-device-tree.patch} |  10 +-
 ...-LIBFDT_OVERLAY-in-the-vexpress_aem.patch} |  12 +-
 .../recipes-bsp/u-boot/u-boot_%.bbappend      |  21 +--
 15 files changed, 148 insertions(+), 636 deletions(-)
 delete mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0001-doc-Add-documentation-for-the-Arm-VExpress64-board-c.patch
 rename meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/{0011-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch => 0001-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch} (72%)
 rename meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/{0006-armv8-Add-ARMv8-MPU-configuration-logic.patch => 0002-armv8-Add-ARMv8-MPU-configuration-logic.patch} (98%)
 delete mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0002-vexpress64-Refactor-header-file-to-make-it-easier-to.patch
 rename meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/{0007-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch => 0003-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch} (80%)
 delete mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0003-vexpress64-Clean-up-BASE_FVP-boot-configuration.patch
 rename meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/{0008-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch => 0004-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch} (87%)
 delete mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0004-vexpress64-Enable-OF_CONTROL-and-OF_BOARD-for-VExpre.patch
 rename meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/{0009-armv8-Make-disabling-HVC-configurable-when-switching.patch => 0005-armv8-Make-disabling-HVC-configurable-when-switching.patch} (74%)
 delete mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0005-vexpress64-Enable-VIRTIO_NET-network-driver.patch
 rename meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/{0010-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch => 0006-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch} (86%)
 rename meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/{0012-vexpress64-Configure-memory-using-device-tree.patch => 0007-vexpress64-Configure-memory-using-device-tree.patch} (91%)
 rename meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/{0013-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch => 0008-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch} (73%)
meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf +1 -1
index d5e4685..c976d11 100644
@@ -11,7 +11,7 @@ EXTRA_IMAGEDEPENDS += "boot-wrapper-aarch64"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
 PREFERRED_VERSION_linux-yocto ?= "5.15%"
 PREFERRED_VERSION_linux-yocto-rt ?= "5.15%"
-PREFERRED_VERSION_u-boot ?= "2022.01"
+PREFERRED_VERSION_u-boot ?= "2022.04"
 
 KERNEL_IMAGETYPE = "Image"
 KERNEL_DEVICETREE = "arm/fvp-baser-aemv8r64.dtb"
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0001-doc-Add-documentation-for-the-Arm-VExpress64-board-c.patch deleted +0 -109

109 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0001-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0011-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch +69 -30

179 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0002-armv8-Add-ARMv8-MPU-configuration-logic.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0006-armv8-Add-ARMv8-MPU-configuration-logic.patch +2 -2
similarity index 98%
rename from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0006-armv8-Add-ARMv8-MPU-configuration-logic.patch
rename to meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0002-armv8-Add-ARMv8-MPU-configuration-logic.patch
index 08cfa26..fbb9259 100644
@@ -1,7 +1,7 @@
-From 313710181095d032921d9e4111bc4a575bf88147 Mon Sep 17 00:00:00 2001
+From 4d22ed70639c2d0c9c537efd549e563d4856305b Mon Sep 17 00:00:00 2001
 From: Peter Hoyes <[email protected]>
 Date: Wed, 26 May 2021 17:41:10 +0100
-Subject: [PATCH 06/11] armv8: Add ARMv8 MPU configuration logic
+Subject: [PATCH 2/8] armv8: Add ARMv8 MPU configuration logic
 
 Detect whether an MMU is present at the current exception level. If
 not, initialize the MPU instead of the MMU during init, and clear the
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0002-vexpress64-Refactor-header-file-to-make-it-easier-to.patch deleted +0 -172

172 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0003-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0007-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch +19 -9
similarity index 80%
rename from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0007-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch
rename to meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0003-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch
index 4c567dc..0dbaaa8 100644
@@ -1,7 +1,7 @@
-From c4e6818cca29af0ca7faa87a4f5f1e9f06c5e482 Mon Sep 17 00:00:00 2001
+From 2edfe3f7c44028fccdc8f8c71461e8c5a0b0b14e Mon Sep 17 00:00:00 2001
 From: Peter Hoyes <[email protected]>
 Date: Fri, 10 Dec 2021 11:41:19 +0000
-Subject: [PATCH 07/11] armv8: Allow disabling exception vectors on non-SPL
+Subject: [PATCH 3/8] armv8: Allow disabling exception vectors on non-SPL
  builds
 
 On the BASER_FVP, U-Boot shares EL2 with another bootloader, so we do
@@ -24,10 +24,11 @@ Change-Id: I0cf0fc6d7ef4d45791411cf1f67c65e198cc8b2b
  arch/arm/cpu/armv8/Makefile       |  6 ++----
  arch/arm/cpu/armv8/start.S        |  4 ++--
  arch/arm/mach-imx/imx8ulp/Kconfig |  2 +-
- 4 files changed, 13 insertions(+), 9 deletions(-)
+ configs/vexpress_aemv8r_defconfig |  1 +
+ 5 files changed, 14 insertions(+), 9 deletions(-)
 
 diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
-index 0a3fdfa471..7c4a56f707 100644
+index 9967376eca..6f9d0610e8 100644
 --- a/arch/arm/cpu/armv8/Kconfig
 +++ b/arch/arm/cpu/armv8/Kconfig
 @@ -1,8 +1,8 @@
@@ -55,7 +56,7 @@ index 0a3fdfa471..7c4a56f707 100644
          bool "Enable multiple CPUs to enter into U-Boot"
  
 diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
-index d85ddde430..be2a4b126c 100644
+index 85fe0475c8..8b3f695835 100644
 --- a/arch/arm/cpu/armv8/Makefile
 +++ b/arch/arm/cpu/armv8/Makefile
 @@ -13,10 +13,8 @@ ifndef CONFIG_$(SPL_)SYS_DCACHE_OFF
@@ -72,11 +73,11 @@ index d85ddde430..be2a4b126c 100644
  endif
  obj-y	+= tlb.o
 diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
-index b3eef705a5..af70d0f6e7 100644
+index 91b00a46cc..d2fcae1e94 100644
 --- a/arch/arm/cpu/armv8/start.S
 +++ b/arch/arm/cpu/armv8/start.S
-@@ -108,7 +108,7 @@ pie_fixup_done:
- 	bl reset_sctrl
+@@ -104,7 +104,7 @@ pie_skip_reloc:
+ pie_fixup_done:
  #endif
  
 -#if defined(CONFIG_ARMV8_SPL_EXCEPTION_VECTORS) || !defined(CONFIG_SPL_BUILD)
@@ -84,7 +85,7 @@ index b3eef705a5..af70d0f6e7 100644
  .macro	set_vbar, regname, reg
  	msr	\regname, \reg
  .endm
-@@ -387,7 +387,7 @@ ENDPROC(smp_kick_all_cpus)
+@@ -350,7 +350,7 @@ ENDPROC(smp_kick_all_cpus)
  /*-----------------------------------------------------------------------*/
  
  ENTRY(c_runtime_cpu_setup)
@@ -106,6 +107,15 @@ index 963fc93d34..6255711f12 100644
  
  config SYS_SOC
  	default "imx8ulp"
+diff --git a/configs/vexpress_aemv8r_defconfig b/configs/vexpress_aemv8r_defconfig
+index 6fa7c979f6..402062cecf 100644
+--- a/configs/vexpress_aemv8r_defconfig
++++ b/configs/vexpress_aemv8r_defconfig
+@@ -22,3 +22,4 @@ CONFIG_VIRTIO_MMIO=y
+ CONFIG_VIRTIO_BLK=y
+ CONFIG_VIRTIO_NET=y
+ CONFIG_ARCH_FIXUP_FDT_MEMORY=n
++CONFIG_ARMV8_EXCEPTION_VECTORS=n
 -- 
 2.25.1
 
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0003-vexpress64-Clean-up-BASE_FVP-boot-configuration.patch deleted +0 -99

99 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0004-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0008-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch +17 -7
similarity index 87%
rename from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0008-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch
rename to meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0004-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch
index 8cbd1f8..6df655c 100644
@@ -1,7 +1,7 @@
-From 754c5109286e31741952309cb4e8438192511a3b Mon Sep 17 00:00:00 2001
+From 02054cf03be7a8b657543cc7a0e2f4abadacbee1 Mon Sep 17 00:00:00 2001
 From: Peter Hoyes <[email protected]>
 Date: Wed, 14 Jul 2021 12:44:27 +0100
-Subject: [PATCH 08/11] armv8: ARMV8_SWITCH_TO_EL1 improvements
+Subject: [PATCH 4/8] armv8: ARMV8_SWITCH_TO_EL1 improvements
 
 Convert CONFIG_ARMV8_SWITCH_TO_EL1 to a Kconfig variable.
 
@@ -20,11 +20,12 @@ Change-Id: If98478148d6d8d1f732acac5439276700614815f
  arch/arm/cpu/armv8/Kconfig           |  8 +++++++
  arch/arm/cpu/armv8/exception_level.c | 21 ++++++++++++++--
  arch/arm/lib/bootm.c                 | 36 ++++++++++++++++------------
+ configs/vexpress_aemv8r_defconfig    |  1 +
  scripts/config_whitelist.txt         |  1 -
- 4 files changed, 48 insertions(+), 18 deletions(-)
+ 5 files changed, 49 insertions(+), 18 deletions(-)
 
 diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
-index bd595095ab..d7de36acfe 100644
+index 6f9d0610e8..b50ce60097 100644
 --- a/arch/arm/cpu/armv8/Kconfig
 +++ b/arch/arm/cpu/armv8/Kconfig
 @@ -177,4 +177,12 @@ config ARMV8_SECURE_BASE
@@ -146,18 +147,27 @@ index a59a5e6c0e..e2cf2e6ec4 100644
  	}
  #else
  	unsigned long machid = gd->bd->bi_arch_number;
+diff --git a/configs/vexpress_aemv8r_defconfig b/configs/vexpress_aemv8r_defconfig
+index 402062cecf..dff1836da2 100644
+--- a/configs/vexpress_aemv8r_defconfig
++++ b/configs/vexpress_aemv8r_defconfig
+@@ -23,3 +23,4 @@ CONFIG_VIRTIO_BLK=y
+ CONFIG_VIRTIO_NET=y
+ CONFIG_ARCH_FIXUP_FDT_MEMORY=n
+ CONFIG_ARMV8_EXCEPTION_VECTORS=n
++CONFIG_ARMV8_SWITCH_TO_EL1=y
 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
-index b9c1c61e13..e6b5627447 100644
+index a6bc234f51..a0dd5074aa 100644
 --- a/scripts/config_whitelist.txt
 +++ b/scripts/config_whitelist.txt
-@@ -21,7 +21,6 @@ CONFIG_ARC_MMU_VER
+@@ -7,7 +7,6 @@ CONFIG_AM335X_USB1_MODE
  CONFIG_ARMV7_SECURE_BASE
  CONFIG_ARMV7_SECURE_MAX_SIZE
  CONFIG_ARMV7_SECURE_RESERVE_SIZE
 -CONFIG_ARMV8_SWITCH_TO_EL1
  CONFIG_ARM_GIC_BASE_ADDRESS
  CONFIG_ARP_TIMEOUT
- CONFIG_AT91C_PQFP_UHPBUG
+ CONFIG_AT91SAM9260EK
 -- 
 2.25.1
 
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0004-vexpress64-Enable-OF_CONTROL-and-OF_BOARD-for-VExpre.patch deleted +0 -110

110 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0005-armv8-Make-disabling-HVC-configurable-when-switching.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0009-armv8-Make-disabling-HVC-configurable-when-switching.patch +17 -7
similarity index 74%
rename from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0009-armv8-Make-disabling-HVC-configurable-when-switching.patch
rename to meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0005-armv8-Make-disabling-HVC-configurable-when-switching.patch
index f1d35d5..bf88cba 100644
@@ -1,8 +1,8 @@
-From 6d8d8b3018bacc5b578ff567b2e20e6ec4abcd6c Mon Sep 17 00:00:00 2001
+From 995a9daf6fd1e6375d2492cb821d24481141731b Mon Sep 17 00:00:00 2001
 From: Peter Hoyes <[email protected]>
 Date: Fri, 10 Dec 2021 16:37:26 +0000
-Subject: [PATCH 09/11] armv8: Make disabling HVC configurable when switching
- to EL1
+Subject: [PATCH 5/8] armv8: Make disabling HVC configurable when switching to
+ EL1
 
 On the BASER_FVP there is no EL3, so HVC is used to provide PSCI
 services. Therefore we cannot disable hypercalls.
@@ -16,12 +16,13 @@ Upstream-Status: Inappropriate [other]
 Signed-off-by: Peter Hoyes <[email protected]>
 Change-Id: I463d82f1db8a3cafcab40a9c0c208753569cc300
 ---
- arch/arm/cpu/armv8/Kconfig   |  9 +++++++++
- arch/arm/include/asm/macro.h | 10 ++++++++--
- 2 files changed, 17 insertions(+), 2 deletions(-)
+ arch/arm/cpu/armv8/Kconfig        |  9 +++++++++
+ arch/arm/include/asm/macro.h      | 10 ++++++++--
+ configs/vexpress_aemv8r_defconfig |  1 +
+ 3 files changed, 18 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
-index d7de36acfe..704ed2b3d3 100644
+index b50ce60097..90e28f4e36 100644
 --- a/arch/arm/cpu/armv8/Kconfig
 +++ b/arch/arm/cpu/armv8/Kconfig
 @@ -185,4 +185,13 @@ config ARMV8_SWITCH_TO_EL1
@@ -68,6 +69,15 @@ index ec0171e0e6..6d267cbae2 100644
  	msr	hcr_el2, \tmp
  
  	/* Return to AArch32 Supervisor mode from EL2 */
+diff --git a/configs/vexpress_aemv8r_defconfig b/configs/vexpress_aemv8r_defconfig
+index dff1836da2..a1522c48b5 100644
+--- a/configs/vexpress_aemv8r_defconfig
++++ b/configs/vexpress_aemv8r_defconfig
+@@ -24,3 +24,4 @@ CONFIG_VIRTIO_NET=y
+ CONFIG_ARCH_FIXUP_FDT_MEMORY=n
+ CONFIG_ARMV8_EXCEPTION_VECTORS=n
+ CONFIG_ARMV8_SWITCH_TO_EL1=y
++CONFIG_ARMV8_DISABLE_HVC=n
 -- 
 2.25.1
 
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0005-vexpress64-Enable-VIRTIO_NET-network-driver.patch deleted +0 -62

62 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0006-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0010-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch +4 -4
similarity index 86%
rename from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0010-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch
rename to meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0006-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch
index e63b28d..639d389 100644
@@ -1,7 +1,7 @@
-From 511f1b1a8534da8f4947561a70d0fbe9cea5b84c Mon Sep 17 00:00:00 2001
+From d7c03f8d297faa641e267c69e83e3582a524af50 Mon Sep 17 00:00:00 2001
 From: Peter Hoyes <[email protected]>
 Date: Fri, 10 Dec 2021 15:09:09 +0000
-Subject: [PATCH 10/11] vexpress64: Do not set COUNTER_FREQUENCY
+Subject: [PATCH 6/8] vexpress64: Do not set COUNTER_FREQUENCY
 
 VExpress boards normally run as a second-stage bootloader so should not
 need to modify CNTFRQ_EL0. On the BASER_FVP, U-Boot can modify it if
@@ -19,10 +19,10 @@ Change-Id: I137473d721e58e4c348b9641f5b9778178d3bb65
  1 file changed, 3 deletions(-)
 
 diff --git a/include/configs/vexpress_aemv8.h b/include/configs/vexpress_aemv8.h
-index ef271ea89b..76935f3173 100644
+index 8050f42f8b..dbf6f04230 100644
 --- a/include/configs/vexpress_aemv8.h
 +++ b/include/configs/vexpress_aemv8.h
-@@ -70,9 +70,6 @@
+@@ -73,9 +73,6 @@
  #define V2M_SYS_CFGCTRL			(V2M_SYSREGS + 0x0a4)
  #define V2M_SYS_CFGSTAT			(V2M_SYSREGS + 0x0a8)
  
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0007-vexpress64-Configure-memory-using-device-tree.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0012-vexpress64-Configure-memory-using-device-tree.patch +5 -5
similarity index 91%
rename from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0012-vexpress64-Configure-memory-using-device-tree.patch
rename to meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0007-vexpress64-Configure-memory-using-device-tree.patch
index f9b422a..5fb6fb1 100644
@@ -1,7 +1,7 @@
-From 90db3d923adcade13d9a8aa50305e5c9c32737af Mon Sep 17 00:00:00 2001
+From 11a86f5a8c63b4b42dd976ab66c9abfaa4dce1cc Mon Sep 17 00:00:00 2001
 From: Peter Hoyes <[email protected]>
 Date: Thu, 17 Feb 2022 17:02:34 +0000
-Subject: [PATCH 1/2] vexpress64: Configure memory using device tree
+Subject: [PATCH 7/8] vexpress64: Configure memory using device tree
 
 The memory size and memory banks were previously configured statically,
 using #defines in the vexpress header file, which could conflict with
@@ -20,7 +20,7 @@ Change-Id: I4add8258cb99dac87f078435272410b562b6fdc7
  2 files changed, 2 insertions(+), 29 deletions(-)
 
 diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
-index 270618a0ff..3f1ac04bac 100644
+index aebf1d9466..84a7810775 100644
 --- a/board/armltd/vexpress64/vexpress64.c
 +++ b/board/armltd/vexpress64/vexpress64.c
 @@ -24,8 +24,6 @@
@@ -56,10 +56,10 @@ index 270618a0ff..3f1ac04bac 100644
  
  /* Assigned in lowlevel_init.S
 diff --git a/include/configs/vexpress_aemv8.h b/include/configs/vexpress_aemv8.h
-index a9086879c9..15a1ae60bf 100644
+index dbf6f04230..85a9fcc198 100644
 --- a/include/configs/vexpress_aemv8.h
 +++ b/include/configs/vexpress_aemv8.h
-@@ -106,23 +106,6 @@
+@@ -104,23 +104,6 @@
  /* BOOTP options */
  #define CONFIG_BOOTP_BOOTFILESIZE
  
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0008-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0013-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch +6 -6
similarity index 73%
rename from meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0013-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch
rename to meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0008-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch
index 2824acc..dbc3332 100644
@@ -1,7 +1,7 @@
-From 0ca75ef2a29f8b37f356af005dac3c83c9b50e2a Mon Sep 17 00:00:00 2001
+From 6a97b1bcb49f87c9495311e657b90ef6b73ce6c5 Mon Sep 17 00:00:00 2001
 From: Peter Hoyes <[email protected]>
 Date: Tue, 22 Feb 2022 15:32:51 +0000
-Subject: [PATCH 2/2] vexpress64: Enable LIBFDT_OVERLAY in the vexpress_aemv8r
+Subject: [PATCH 8/8] vexpress64: Enable LIBFDT_OVERLAY in the vexpress_aemv8r
  defconfig
 
 Issue-Id: SCM-3874
@@ -14,13 +14,13 @@ Change-Id: Ide0532cf2de89f1bca9c8d4bd2ed0c1a1c57599f
  1 file changed, 1 insertion(+)
 
 diff --git a/configs/vexpress_aemv8r_defconfig b/configs/vexpress_aemv8r_defconfig
-index 37c393b66f..aff34e86b0 100644
+index a1522c48b5..98b0f5ad53 100644
 --- a/configs/vexpress_aemv8r_defconfig
 +++ b/configs/vexpress_aemv8r_defconfig
-@@ -25,3 +25,4 @@ CONFIG_ARMV8_SWITCH_TO_EL1=y
- CONFIG_ARMV8_DISABLE_HVC=n
+@@ -25,3 +25,4 @@ CONFIG_ARCH_FIXUP_FDT_MEMORY=n
  CONFIG_ARMV8_EXCEPTION_VECTORS=n
- CONFIG_ARCH_FIXUP_FDT_MEMORY=n
+ CONFIG_ARMV8_SWITCH_TO_EL1=y
+ CONFIG_ARMV8_DISABLE_HVC=n
 +CONFIG_OF_LIBFDT_OVERLAY=y
 -- 
 2.25.1
meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend +8 -13
index 7155226..91f794c 100644
@@ -60,19 +60,14 @@ SRC_URI:append:fvp-base-arm32 = " file://0001-Add-vexpress_aemv8a_aarch32-varian
 # FVP BASER
 #
 SRC_URI:append:fvp-baser-aemv8r64 = " \
-    file://0001-doc-Add-documentation-for-the-Arm-VExpress64-board-c.patch \
-    file://0002-vexpress64-Refactor-header-file-to-make-it-easier-to.patch \
-    file://0003-vexpress64-Clean-up-BASE_FVP-boot-configuration.patch \
-    file://0004-vexpress64-Enable-OF_CONTROL-and-OF_BOARD-for-VExpre.patch \
-    file://0005-vexpress64-Enable-VIRTIO_NET-network-driver.patch \
-    file://0006-armv8-Add-ARMv8-MPU-configuration-logic.patch \
-    file://0007-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch \
-    file://0008-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch \
-    file://0009-armv8-Make-disabling-HVC-configurable-when-switching.patch \
-    file://0010-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch \
-    file://0011-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch \
-    file://0012-vexpress64-Configure-memory-using-device-tree.patch \
-    file://0013-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch \
+    file://0001-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch \
+    file://0002-armv8-Add-ARMv8-MPU-configuration-logic.patch \
+    file://0003-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch \
+    file://0004-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch \
+    file://0005-armv8-Make-disabling-HVC-configurable-when-switching.patch \
+    file://0006-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch \
+    file://0007-vexpress64-Configure-memory-using-device-tree.patch \
+    file://0008-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch \
     "
 
 #
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 arm-bsp/u-boot: fvp-baser-aemv8r64 cache_state_modelled fixes

From: Peter Hoyes <[email protected]>

Running the FVP_Base_AEMv8R model with the cache_state_modelled parameter enabled exposed some defects in the U-Boot BSP patches for the fvp-baser-aemv8r64:
* The MPU memory attributes are inconsistent with the existing MMU attributes, causing a model hang when sending packets using virtio-net in U-Boot.
* The instruction cache was left disabled after booting an EFI payload at S-EL1, causing some EFI apps (e.g. Grub) to hang when attempting to use dynamically loaded modules.

The cache_state_modelled FVP parameter is enabled by default in the model (for simulation accuracy) but is disabled by default in the machine conf (for simulation speed).

Add two additional machine-specific U-Boot patches to fix the above issues.

Issue-Id: SCM-4641

Change-Id I5ab13c9fdadd82456ac3f3e3703df36590d52fb7
---
 ...RBAR-MPU-attributes-to-be-configured.patch | 105 ++++++++++++++++++
 ...che-when-switching-exception-levels-.patch |  63 +++++++++++
 .../recipes-bsp/u-boot/u-boot_%.bbappend      |   2 +
 3 files changed, 170 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0009-armv8-Allow-PRBAR-MPU-attributes-to-be-configured.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0010-armv8-Enable-icache-when-switching-exception-levels-.patch
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0009-armv8-Allow-PRBAR-MPU-attributes-to-be-configured.patch new file +105 -0
new file mode 100644
index 0000000..94ac806
@@ -0,0 +1,105 @@
+From c4abb74e62817c5adf32c011db93f6bfc2deabaf Mon Sep 17 00:00:00 2001
+From: Peter Hoyes <[email protected]>
+Date: Wed, 18 May 2022 15:24:19 +0100
+Subject: [PATCH 1/2] armv8: Allow PRBAR MPU attributes to be configured
+
+In a previous patch, support was added to initialize an S-EL2 MPU on
+armv8r64 machines. This implementation allowed the PRLAR attribute
+index to be configured, but not the shareability and access permission
+attributes in PRBAR. These attributes were hard-coded as "outer
+shareable" and "read/write at EL1 and EL0".
+
+Add separate prlar_attrs and prbar_attrs to the MPU region struct so
+that these attributes can be configured on a per-region basis.
+
+For the BASER_FVP, ensure the MPU memory attributes match those in the
+existing vexpress64 board MMU configuration ("non shareable" for device
+memory and "inner shareable" for normal memory).
+
+Issue-Id: SCM-4641
+Signed-off-by: Peter Hoyes <[email protected]>
+Upstream-Status: Inappropriate [other]
+  Implementation pending further discussion
+Change-Id: I6b72aead91ad12412262aa32c61a53e12eab3984
+---
+ arch/arm/cpu/armv8/cache_v8.c        | 12 ++++++++----
+ arch/arm/include/asm/armv8/mpu.h     |  3 ++-
+ board/armltd/vexpress64/vexpress64.c |  9 ++++++---
+ 3 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
+index f6e0ad0075..981aca4a0f 100644
+--- a/arch/arm/cpu/armv8/cache_v8.c
++++ b/arch/arm/cpu/armv8/cache_v8.c
+@@ -370,7 +370,9 @@ static void mpu_clear_regions(void)
+ {
+ 	int i;
+ 
+-	for (i = 0; mpu_mem_map[i].end || mpu_mem_map[i].attrs; i++) {
++	for (i = 0; mpu_mem_map[i].end ||
++	     mpu_mem_map[i].prbar_attrs ||
++	     mpu_mem_map[i].prlar_attrs; i++) {
+ 		setup_el2_mpu_region(i, 0, 0);
+ 	}
+ }
+@@ -390,12 +392,14 @@ static void mpu_setup(void)
+ 
+ 	asm volatile("msr MAIR_EL2, %0" : : "r" MEMORY_ATTRIBUTES);
+ 
+-	for (i = 0; mpu_mem_map[i].end || mpu_mem_map[i].attrs; i++) {
++	for (i = 0; mpu_mem_map[i].end ||
++	     mpu_mem_map[i].prbar_attrs ||
++	     mpu_mem_map[i].prlar_attrs; i++) {
+ 		setup_el2_mpu_region(i,
+ 			PRBAR_ADDRESS(mpu_mem_map[i].start)
+-				| PRBAR_OUTER_SH | PRBAR_AP_RW_ANY,
++				| mpu_mem_map[i].prbar_attrs,
+ 			PRLAR_ADDRESS(mpu_mem_map[i].end)
+-				| mpu_mem_map[i].attrs | PRLAR_EN_BIT
++				| mpu_mem_map[i].prlar_attrs | PRLAR_EN_BIT
+ 			);
+ 	}
+ 
+diff --git a/arch/arm/include/asm/armv8/mpu.h b/arch/arm/include/asm/armv8/mpu.h
+index 8de627cafd..dd4c689ea6 100644
+--- a/arch/arm/include/asm/armv8/mpu.h
++++ b/arch/arm/include/asm/armv8/mpu.h
+@@ -51,7 +51,8 @@ static inline void setup_el2_mpu_region(uint8_t region, uint64_t base, uint64_t
+ struct mpu_region {
+ 	u64 start;
+ 	u64 end;
+-	u64 attrs;
++	u64 prbar_attrs;
++	u64 prlar_attrs;
+ };
+ 
+ extern struct mpu_region *mpu_mem_map;
+diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
+index 3f1ac04bac..31ff2f7b2d 100644
+--- a/board/armltd/vexpress64/vexpress64.c
++++ b/board/armltd/vexpress64/vexpress64.c
+@@ -41,15 +41,18 @@ static struct mpu_region vexpress64_aemv8r_mem_map[] = {
+        {
+                .start = 0x0UL,
+                .end = 0x7fffffffUL,
+-               .attrs = PRLAR_ATTRIDX(MT_NORMAL)
++	       .prbar_attrs = PRBAR_INNER_SH | PRBAR_AP_RW_ANY,
++	       .prlar_attrs = PRLAR_ATTRIDX(MT_NORMAL)
+        }, {
+                .start = 0x80000000UL,
+                .end = 0xffffffffUL,
+-               .attrs = PRLAR_ATTRIDX(MT_DEVICE_NGNRNE)
++	       .prbar_attrs = PRBAR_OUTER_SH | PRBAR_AP_RW_ANY,
++	       .prlar_attrs = PRLAR_ATTRIDX(MT_DEVICE_NGNRNE)
+        }, {
+                .start = 0x100000000UL,
+                .end = 0xffffffffffUL,
+-               .attrs = PRLAR_ATTRIDX(MT_NORMAL)
++	       .prbar_attrs = PRBAR_INNER_SH | PRBAR_AP_RW_ANY,
++	       .prlar_attrs = PRLAR_ATTRIDX(MT_NORMAL)
+        }, {
+                /* List terminator */
+                0,
+-- 
+2.25.1
+
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0010-armv8-Enable-icache-when-switching-exception-levels-.patch new file +63 -0

63 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend +2 -0
index 91f794c..3de0d7c 100644
@@ -68,6 +68,8 @@ SRC_URI:append:fvp-baser-aemv8r64 = " \
     file://0006-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch \
     file://0007-vexpress64-Configure-memory-using-device-tree.patch \
     file://0008-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch \
+    file://0009-armv8-Allow-PRBAR-MPU-attributes-to-be-configured.patch \
+    file://0010-armv8-Enable-icache-when-switching-exception-levels-.patch \
     "
 
 #
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/3 arm-bsp/conf: fvp-baser-aemv8r64 model parameter update

In reply to Peter Hoyes

From: Peter Hoyes <[email protected]>

Add parameters required to boot with cache_state_modelled enabled:
* bp.virtio_net.secure_accesses=1
* bp.virtio_rng.secure_accesses=1
* bp.virtioblockdevice.secure_accesses=1
* cci400.force_on_from_start=1

Add bp.ve_sysregs.exit_on_shutdown=1 to match fvp-base.

Remove parameters that are not required to boot or are setting the default value.

Alphabetize list.

Issue-Id: SCM-4304

Change-Id I0a696eff5bb83206e5501f651c487f16f695aa4c
---
 .../conf/machine/fvp-baser-aemv8r64.conf      | 36 ++++++++-----------
 1 file changed, 14 insertions(+), 22 deletions(-)
meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf +14 -22
index c976d11..ee85cc6 100644
@@ -44,32 +44,24 @@ FVP_EXE ?= "FVP_BaseR_AEMv8R"
 FVP_CONSOLE ?= "terminal_0"
 
 # FVP parameters
-FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic"
-FVP_CONFIG[bp.dram_metadata.init_value] ?= "0"
-FVP_CONFIG[bp.dram_metadata.is_enabled] ?= "true"
-FVP_CONFIG[bp.exclusive_monitor.monitor_access_level] ?= "1"
-FVP_CONFIG[bp.pl011_uart0.unbuffered_output] ?= "1"
-FVP_CONFIG[bp.pl011_uart0.untimed_fifos] ?= "true"
+FVP_CONFIG[bp.exclusive_monitor.monitor_access_level] ?= "2"
 FVP_CONFIG[bp.refcounter.non_arch_start_at_default] ?= "1"
-FVP_CONFIG[bp.smsc_91c111.enabled] ?= "0"
-FVP_CONFIG[bp.ve_sysregs.mmbSiteDefault] ?= "0"
+FVP_CONFIG[bp.refcounter.use_real_time] ?= "1"
+FVP_CONFIG[bp.ve_sysregs.exit_on_shutdown] ?= "1"
+FVP_CONFIG[bp.virtio_net.enabled] ?= "1"
+FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] ?= "8022=22"
+FVP_CONFIG[bp.virtio_net.hostbridge.userNetworking] ?= "1"
+FVP_CONFIG[bp.virtio_net.secure_accesses] = "1"
+FVP_CONFIG[bp.virtio_rng.enabled] ?= "1"
+FVP_CONFIG[bp.virtio_rng.secure_accesses] = "1"
+FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic"
+FVP_CONFIG[bp.virtioblockdevice.secure_accesses] = "1"
 FVP_CONFIG[cache_state_modelled] ?= "0"
+FVP_CONFIG[cci400.force_on_from_start] = "1"
 FVP_CONFIG[cluster0.gicv3.cpuintf-mmap-access-level] ?= "2"
-FVP_CONFIG[cluster0.gicv3.SRE-enable-action-on-mmap] ?= "2"
-FVP_CONFIG[cluster0.gicv3.SRE-EL2-enable-RAO] ?= "1"
 FVP_CONFIG[cluster0.gicv3.extended-interrupt-range-support] ?= "1"
+FVP_CONFIG[cluster0.gicv3.SRE-EL2-enable-RAO] ?= "1"
+FVP_CONFIG[cluster0.gicv3.SRE-enable-action-on-mmap] ?= "2"
 FVP_CONFIG[cluster0.has_aarch64] ?= "1"
-FVP_CONFIG[cluster0.NUM_CORES] ?= "4"
-FVP_CONFIG[cluster0.stage12_tlb_size] ?= "512"
 FVP_CONFIG[gic_distributor.GICD_CTLR-DS-1-means-secure-only] ?= "1"
-FVP_CONFIG[gic_distributor.GITS_BASER0-type] ?= "1"
-FVP_CONFIG[gic_distributor.ITS-count] ?= "1"
-FVP_CONFIG[gic_distributor.ITS-hardware-collection-count] ?= "1"
 FVP_CONFIG[gic_distributor.has-two-security-states] ?= "0"
-FVP_CONFIG[pctl.startup] ?= "0.0.0.*"
-FVP_CONFIG[bp.virtio_net.enabled] ?= "1"
-FVP_CONFIG[bp.virtio_net.hostbridge.userNetworking] ?= "1"
-FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] ?= "8022=22"
-FVP_CONFIG[bp.virtio_rng.enabled] ?= "1"
-FVP_CONFIG[bp.vis.rate_limit-enable] ?= "0"
-FVP_CONFIG[bp.refcounter.use_real_time] ?= "1"
Signature · 1 line
2.25.1
Applied
#3 lore raw
In reply to Peter Hoyes
Quoted 6 lines · Peter Hoyes

The backports are now merged, so remove patches 1 through 5 and renumber.

Upstream now requires CONFIG_DEFAULT_DEVICE_TREE to be defined, even if unused, so backport relevant portions of upstream BASER_FVP patch into the board suppport patch.

Applied, thanks!

[1/3] arm-bsp/u-boot: Update fvp-baser-aemv8r64 patches for v2022.04
(no commit info)
[2/3] arm-bsp/u-boot: fvp-baser-aemv8r64 cache_state_modelled fixes

      commit: dd8b6c1dbe02666a2d4e372dabf832dbfc2977c8
[3/3] arm-bsp/conf: fvp-baser-aemv8r64 model parameter update
      commit: a8cb33d5139e30b4a643da9a277487299c0e658f

Best regards,

Signature · 1 line
Jon Mason <[email protected]>