Skip to contentSkip to conversation

Add UEFI to fvp-baser-aemv8r64 using U-Boot

PATCH Applied Peter Hoyes 2 participants 10 messages Feb 24, 2022 – Feb 25, 2022 Arm/versatile express platform

lore
Share & tools
lore
#0 lore raw

cover Add UEFI to fvp-baser-aemv8r64 using U-Boot

From: Peter Hoyes <[email protected]>

These patches backport the following updates for the fvp-baser-aemv8r64 BSP:

* Add board support patches for U-Boot v2021.07, and bundle U-Boot in the boot-wrapper-aarch64 binary to provide UEFI support.
* Update boot-wrapper to more recent version and include patches to boot U-Boot at S-EL2.
* Align FVP RAM size with upstream kernel device tree.
* Enable the use_real_time FVP flag so that the counter increments using the wall clock.
* Update documentation, including a section on the new boot architecture.
* Fix the PL011 and SP805 register sizes in the device tree

Peter Hoyes (8):
arm-bsp/fvp-baser-aemv8r64: Fix PL011 and SP805 register sizes arm/boot-wrapper-aarch64: Upgrade to newer revision arm-bsp/boot-wrapper-aarch64: Update patches for fvp-baser-aemv8r64 arm-bsp/u-boot: Add U-Boot for fvp-baser-aemv8r64 arm-bsp/kernel: Use 4 Gb of RAM in fvp-baser-aemv8r64 arm-bsp/conf: Use real-time clock for fvp-baser-aemv8r64 arm-bsp/docs: Update fvp-baser-aemv8r64 docs arm-bsp/docs: Minor fvp-baser-aemv8r64 updates

 .../conf/machine/fvp-baser-aemv8r64.conf      |   10 +-
 .../documentation/fvp-baser-aemv8r64.md       |   78 +-
 ...oot-wrapper-aarch64-fvp-baser-aemv8r64.inc |   24 +-
 ...M_SYS-config-by-auto-detect-dtb-node.patch |   67 -
 ...abels-and-prepare-for-lower-EL-booti.patch |  135 +
 ...0002-aarch64-Prepare-for-EL1-booting.patch |   48 +
 ...4-Introduce-EL2-boot-code-for-v8-r64.patch |  314 -
 ...aarch64-Prepare-for-lower-EL-booting.patch |   55 +
 ...04-gic-v3-Prepare-for-gicv3-with-EL2.patch |  105 +
 ...aarch64-Prepare-for-booting-with-EL2.patch |   63 +
 ...ce-EL2-boot-code-for-Armv8-R-AArch64.patch |  182 +
 ...-psci-to-choose-between-smc-and-hvc.patch} |   42 +-
 ...4-Disable-CNTPCT_EL0-trap-for-v8-R64.patch |   48 +
 .../0009-lds-Mark-the-mem-range.patch         |   38 +
 .../0010-common-Introduce-the-libfdt.patch    | 6044 +++++++++++++++++
 ...-common-Add-essential-libc-functions.patch |  101 +
 ...dd-the-libfdt-to-the-Makefile-system.patch |   61 +
 .../0013-platform-Add-print_hex-func.patch    |   67 +
 ...4-common-Add-mem-usage-to-memreserve.patch |   96 +
 ...dd-the-enable-keep-el-compile-option.patch |  102 +
 ...efile-Change-COUNTER_FREQ-to-100-MHz.patch |   34 +
 ...pointer-authentication-traps-for-EL1.patch |  126 +
 ...ation-for-the-Arm-VExpress64-board-c.patch |  109 +
 ...tor-header-file-to-make-it-easier-to.patch |  173 +
 ...Clean-up-BASE_FVP-boot-configuration.patch |   99 +
 ...e-OF_CONTROL-and-OF_BOARD-for-VExpre.patch |  106 +
 ...s64-Enable-VIRTIO_NET-network-driver.patch |   62 +
 ...v8-Add-ARMv8-MPU-configuration-logic.patch |  259 +
 ...bling-exception-vectors-on-non-SPL-b.patch |   98 +
 ...mv8-ARMV8_SWITCH_TO_EL1-improvements.patch |  163 +
 ...ling-HVC-configurable-when-switching.patch |   73 +
 ...press64-Do-not-set-COUNTER_FREQUENCY.patch |   37 +
 ...Add-BASER_FVP-vexpress-board-variant.patch |  275 +
 .../recipes-bsp/u-boot/u-boot_%.bbappend      |   18 +
 .../fvp-baser-aemv8r64/fvp-baser-aemv8r64.dts |   12 +-
 .../boot-wrapper-aarch64_git.bb               |    2 +-
 .../boot-wrapper-aarch64_%.bbappend           |    3 +
 37 files changed, 8908 insertions(+), 421 deletions(-)
 delete mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0001-Decouple-V2M_SYS-config-by-auto-detect-dtb-node.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0001-aarch64-Rename-labels-and-prepare-for-lower-EL-booti.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0002-aarch64-Prepare-for-EL1-booting.patch
 delete mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0002-arch64-Introduce-EL2-boot-code-for-v8-r64.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0003-aarch64-Prepare-for-lower-EL-booting.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0004-gic-v3-Prepare-for-gicv3-with-EL2.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0005-aarch64-Prepare-for-booting-with-EL2.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0006-aarch64-Introduce-EL2-boot-code-for-Armv8-R-AArch64.patch
 rename meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/{0003-Allow-enable-psci-to-choose-between-smc-and-hvc.patch => 0007-Allow-enable-psci-to-choose-between-smc-and-hvc.patch} (71%)
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0008-aarch64-Disable-CNTPCT_EL0-trap-for-v8-R64.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0009-lds-Mark-the-mem-range.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0010-common-Introduce-the-libfdt.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0011-common-Add-essential-libc-functions.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0012-Makefile-Add-the-libfdt-to-the-Makefile-system.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0013-platform-Add-print_hex-func.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0014-common-Add-mem-usage-to-memreserve.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0015-boot-Add-the-enable-keep-el-compile-option.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0016-Makefile-Change-COUNTER_FREQ-to-100-MHz.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0001-armv8-Disable-pointer-authentication-traps-for-EL1.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0002-doc-Add-documentation-for-the-Arm-VExpress64-board-c.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0003-vexpress64-Refactor-header-file-to-make-it-easier-to.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0004-vexpress64-Clean-up-BASE_FVP-boot-configuration.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0005-vexpress64-Enable-OF_CONTROL-and-OF_BOARD-for-VExpre.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0006-vexpress64-Enable-VIRTIO_NET-network-driver.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0007-armv8-Add-ARMv8-MPU-configuration-logic.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0008-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0009-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0010-armv8-Make-disabling-HVC-configurable-when-switching.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0011-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0012-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/8 arm-bsp/fvp-baser-aemv8r64: Fix PL011 and SP805 register sizes

From: Peter Hoyes <[email protected]>

The Linux kernel expects the peripheral ID register to be just below the end of the address range, which for the PL011 and SP805 is at 0xFE0 not 0xFFE0, so set the size to 0x1000.

Issue-Id: SCM-3881

Change-Id Iada28e8192d72b1647822c33d13deffe507043b5
---
 .../files/fvp-baser-aemv8r64/fvp-baser-aemv8r64.dts    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta-arm-bsp/recipes-kernel/linux/files/fvp-baser-aemv8r64/fvp-baser-aemv8r64.dts +5 -5
index dfc6f7e..4d6640a 100644
@@ -111,7 +111,7 @@
 
         uart@9c090000 {
                 compatible = "arm,pl011", "arm,primecell";
-                reg = <0x0 0x9c090000 0x0 0x10000>;
+                reg = <0x0 0x9c090000 0x0 0x1000>;
                 interrupts = <0x0 5 0x4>;
                 clocks = <&refclk24mhz>, <&refclk100mhz>;
                 clock-names = "uartclk", "apb_pclk";
@@ -119,7 +119,7 @@
 
         uart@9c0a0000 {
                 compatible = "arm,pl011", "arm,primecell";
-                reg = <0x0 0x9c0a0000 0x0 0x10000>;
+                reg = <0x0 0x9c0a0000 0x0 0x1000>;
                 interrupts = <0x0 6 0x4>;
                 clocks = <&refclk24mhz>, <&refclk100mhz>;
                 clock-names = "uartclk", "apb_pclk";
@@ -127,7 +127,7 @@
 
         uart@9c0b0000 {
                 compatible = "arm,pl011", "arm,primecell";
-                reg = <0x0 0x9c0b0000 0x0 0x10000>;
+                reg = <0x0 0x9c0b0000 0x0 0x1000>;
                 interrupts = <0x0 7 0x4>;
                 clocks = <&refclk24mhz>, <&refclk100mhz>;
                 clock-names = "uartclk", "apb_pclk";
@@ -135,7 +135,7 @@
 
         uart@9c0c0000 {
                 compatible = "arm,pl011", "arm,primecell";
-                reg = <0x0 0x9c0c0000 0x0 0x10000>;
+                reg = <0x0 0x9c0c0000 0x0 0x1000>;
                 interrupts = <0x0 8 0x4>;
                 clocks = <&refclk24mhz>, <&refclk100mhz>;
                 clock-names = "uartclk", "apb_pclk";
@@ -143,7 +143,7 @@
 
         wdt@9c0f0000 {
                 compatible = "arm,sp805", "arm,primecell";
-                reg = <0x0 0x9c0f0000 0x0 0x10000>;
+                reg = <0x0 0x9c0f0000 0x0 0x1000>;
                 interrupts = <0x0 0 0x4>;
                 clocks = <&refclk24mhz>, <&refclk100mhz>;
                 clock-names = "wdog_clk", "apb_pclk";
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/8 arm/boot-wrapper-aarch64: Upgrade to newer revision

In reply to Peter Hoyes

From: Peter Hoyes <[email protected]>

Upgrade boot-wrapper-aarch64 to 1044c77062573985f7c994c3b6cef5695f57e955

Hold back gem5 at 8d5a765251d9113c3c0f9fa14de42a9e7486fe8a in bbappend.

Issue-Id: SCM-3871

Change-Id Ia5ccca2234dd117d530970f9f90469dacbb778e3
---
 .../boot-wrapper-aarch64/boot-wrapper-aarch64_git.bb           | 2 +-
 .../boot-wrapper-aarch64/boot-wrapper-aarch64_%.bbappend       | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
meta-arm/recipes-bsp/boot-wrapper-aarch64/boot-wrapper-aarch64_git.bb +1 -1
index c723517..2f375a4 100644
@@ -4,7 +4,7 @@ LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=bb63326febfb5fb909226c8e7ebcef5c"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/mark/boot-wrapper-aarch64.git"
-SRCREV = "8d5a765251d9113c3c0f9fa14de42a9e7486fe8a"
+SRCREV = "1044c77062573985f7c994c3b6cef5695f57e955"
 
 PV = "git${SRCPV}"
 
meta-gem5/recipes-bsp/boot-wrapper-aarch64/boot-wrapper-aarch64_%.bbappend +3 -0
index 57e6b53..3dd2cba 100644
@@ -11,3 +11,6 @@ BOOT_WRAPPER_AARCH64_DEVICETREE:gem5-arm64 = "gem5-aarch64.dtb"
 DEPLOY_DEPEND_LIST ?= ""
 DEPLOY_DEPEND_LIST:gem5-arm64 = " gem5-aarch64-dtb:do_deploy"
 do_deploy[depends] += "${DEPLOY_DEPEND_LIST}"
+
+# The base recipe has been upgraded, so hold back at known working revision
+SRCREV = "8d5a765251d9113c3c0f9fa14de42a9e7486fe8a"
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/8 arm-bsp/boot-wrapper-aarch64: Update patches for fvp-baser-aemv8r64

In reply to Peter Hoyes

From: Peter Hoyes <[email protected]>

Update the SRCREV to a more recent revision for the fvp-baser-aemv8r64.

Update the machine-specific patches, which makes the following changes:
* Add PSCI services to /memreserve/ in the device tree using libfdt.
* Add --enable-keep-el option, which allows boot-wrapper-aarch64 to boot the next stage at the same exception level.
* Update the counter frequency to 100 MHz.

Issue-Id: SCM-3871

Change-Id I41843e958cf629d69de644bb57b660fb542fc8b7
---
 ...oot-wrapper-aarch64-fvp-baser-aemv8r64.inc |   19 +-
 ...M_SYS-config-by-auto-detect-dtb-node.patch |   67 -
 ...abels-and-prepare-for-lower-EL-booti.patch |  135 +
 ...0002-aarch64-Prepare-for-EL1-booting.patch |   48 +
 ...4-Introduce-EL2-boot-code-for-v8-r64.patch |  314 -
 ...aarch64-Prepare-for-lower-EL-booting.patch |   55 +
 ...04-gic-v3-Prepare-for-gicv3-with-EL2.patch |  105 +
 ...aarch64-Prepare-for-booting-with-EL2.patch |   63 +
 ...ce-EL2-boot-code-for-Armv8-R-AArch64.patch |  182 +
 ...-psci-to-choose-between-smc-and-hvc.patch} |   42 +-
 ...4-Disable-CNTPCT_EL0-trap-for-v8-R64.patch |   48 +
 .../0009-lds-Mark-the-mem-range.patch         |   38 +
 .../0010-common-Introduce-the-libfdt.patch    | 6044 +++++++++++++++++
 ...-common-Add-essential-libc-functions.patch |  101 +
 ...dd-the-libfdt-to-the-Makefile-system.patch |   61 +
 .../0013-platform-Add-print_hex-func.patch    |   67 +
 ...4-common-Add-mem-usage-to-memreserve.patch |   96 +
 ...dd-the-enable-keep-el-compile-option.patch |  102 +
 ...efile-Change-COUNTER_FREQ-to-100-MHz.patch |   34 +
 19 files changed, 7219 insertions(+), 402 deletions(-)
 delete mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0001-Decouple-V2M_SYS-config-by-auto-detect-dtb-node.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0001-aarch64-Rename-labels-and-prepare-for-lower-EL-booti.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0002-aarch64-Prepare-for-EL1-booting.patch
 delete mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0002-arch64-Introduce-EL2-boot-code-for-v8-r64.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0003-aarch64-Prepare-for-lower-EL-booting.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0004-gic-v3-Prepare-for-gicv3-with-EL2.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0005-aarch64-Prepare-for-booting-with-EL2.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0006-aarch64-Introduce-EL2-boot-code-for-Armv8-R-AArch64.patch
 rename meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/{0003-Allow-enable-psci-to-choose-between-smc-and-hvc.patch => 0007-Allow-enable-psci-to-choose-between-smc-and-hvc.patch} (71%)
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0008-aarch64-Disable-CNTPCT_EL0-trap-for-v8-R64.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0009-lds-Mark-the-mem-range.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0010-common-Introduce-the-libfdt.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0011-common-Add-essential-libc-functions.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0012-Makefile-Add-the-libfdt-to-the-Makefile-system.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0013-platform-Add-print_hex-func.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0014-common-Add-mem-usage-to-memreserve.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0015-boot-Add-the-enable-keep-el-compile-option.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0016-Makefile-Change-COUNTER_FREQ-to-100-MHz.patch
meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/boot-wrapper-aarch64-fvp-baser-aemv8r64.inc +16 -3
index f1bf614..628571f 100644
@@ -2,9 +2,22 @@ COMPATIBLE_MACHINE = "fvp-baser-aemv8r64"
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/files/${MACHINE}:"
 SRC_URI:append = " \
-    file://0001-Decouple-V2M_SYS-config-by-auto-detect-dtb-node.patch \
-    file://0002-arch64-Introduce-EL2-boot-code-for-v8-r64.patch \
-    file://0003-Allow-enable-psci-to-choose-between-smc-and-hvc.patch \
+    file://0001-aarch64-Rename-labels-and-prepare-for-lower-EL-booti.patch \
+    file://0002-aarch64-Prepare-for-EL1-booting.patch \
+    file://0003-aarch64-Prepare-for-lower-EL-booting.patch \
+    file://0004-gic-v3-Prepare-for-gicv3-with-EL2.patch \
+    file://0005-aarch64-Prepare-for-booting-with-EL2.patch \
+    file://0006-aarch64-Introduce-EL2-boot-code-for-Armv8-R-AArch64.patch \
+    file://0007-Allow-enable-psci-to-choose-between-smc-and-hvc.patch \
+    file://0008-aarch64-Disable-CNTPCT_EL0-trap-for-v8-R64.patch \
+    file://0009-lds-Mark-the-mem-range.patch \
+    file://0010-common-Introduce-the-libfdt.patch \
+    file://0011-common-Add-essential-libc-functions.patch \
+    file://0012-Makefile-Add-the-libfdt-to-the-Makefile-system.patch \
+    file://0013-platform-Add-print_hex-func.patch \
+    file://0014-common-Add-mem-usage-to-memreserve.patch \
+    file://0015-boot-Add-the-enable-keep-el-compile-option.patch \
+    file://0016-Makefile-Change-COUNTER_FREQ-to-100-MHz.patch \
     "
 
 BOOT_WRAPPER_AARCH64_CMDLINE = "\
meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0001-Decouple-V2M_SYS-config-by-auto-detect-dtb-node.patch deleted +0 -67

67 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0001-aarch64-Rename-labels-and-prepare-for-lower-EL-booti.patch new file +135 -0

135 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0002-aarch64-Prepare-for-EL1-booting.patch new file +48 -0

48 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0002-arch64-Introduce-EL2-boot-code-for-v8-r64.patch deleted +0 -314

314 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0003-aarch64-Prepare-for-lower-EL-booting.patch new file +55 -0

55 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0004-gic-v3-Prepare-for-gicv3-with-EL2.patch new file +105 -0

105 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0005-aarch64-Prepare-for-booting-with-EL2.patch new file +63 -0

63 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0006-aarch64-Introduce-EL2-boot-code-for-Armv8-R-AArch64.patch new file +182 -0

182 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0007-Allow-enable-psci-to-choose-between-smc-and-hvc.patch renamed from meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0003-Allow-enable-psci-to-choose-between-smc-and-hvc.patch +24 -18

79 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0008-aarch64-Disable-CNTPCT_EL0-trap-for-v8-R64.patch new file +48 -0

48 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0009-lds-Mark-the-mem-range.patch new file +38 -0
new file mode 100644
index 0000000..3d4fec8
@@ -0,0 +1,38 @@
+From 2851f0e6c1216894b9498d7b91256bb1ef49e544 Mon Sep 17 00:00:00 2001
+From: Jaxson Han <[email protected]>
+Date: Tue, 2 Nov 2021 15:10:28 +0800
+Subject: [PATCH] lds: Mark the mem range
+
+Add firmware_start and firmware_end, so that we can use them to
+calculate the mem range of boot-wrapper and then set the range to
+/memreserve/ of dtb.
+
+Issue-ID: SCM-3815
+Upstream-Status: Inappropriate [other]
+  Temporary patch
+Signed-off-by: Jaxson Han <[email protected]>
+Change-Id: Idc5a2894e193c75381049a0f359b4b2a51c567ee
+---
+ model.lds.S | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/model.lds.S b/model.lds.S
+index d4e7e13..ab98ddf 100644
+--- a/model.lds.S
++++ b/model.lds.S
+@@ -64,6 +64,7 @@ SECTIONS
+ #endif
+ 
+ 	.boot PHYS_OFFSET: {
++		PROVIDE(firmware_start = .);
+ 		*(.init)
+ 		*(.text*)
+ 		*(.data* .rodata* .bss* COMMON)
+@@ -76,6 +77,7 @@ SECTIONS
+ 		mbox = .;
+ 		QUAD(0x0)
+ 	}
++	PROVIDE(firmware_end = .);
+ 
+ 	ASSERT(etext <= (PHYS_OFFSET + TEXT_LIMIT), ".text overflow!")
+ }
meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0010-common-Introduce-the-libfdt.patch new file +6044 -0

1,841 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0011-common-Add-essential-libc-functions.patch new file +101 -0

101 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0012-Makefile-Add-the-libfdt-to-the-Makefile-system.patch new file +61 -0

61 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0013-platform-Add-print_hex-func.patch new file +67 -0

67 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0014-common-Add-mem-usage-to-memreserve.patch new file +96 -0

96 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0015-boot-Add-the-enable-keep-el-compile-option.patch new file +102 -0

102 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/files/fvp-baser-aemv8r64/0016-Makefile-Change-COUNTER_FREQ-to-100-MHz.patch new file +34 -0
new file mode 100644
index 0000000..a6b16e4

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.25.1

Part of the diff is not shown here. View the raw message.

#4 lore raw

PATCH 4/8 arm-bsp/u-boot: Add U-Boot for fvp-baser-aemv8r64

In reply to Peter Hoyes

From: Peter Hoyes <[email protected]>

This patch introduces U-Boot into the fvp-baser-aemv8r64 boot flow, providing EFI services.

The fvp-baser-aemv8r64 does not have an EL3, so the system starts at S-EL2. For now, U-Boot is running at S-EL2, alongside boot-wrapper. Enable the --enable-keep-el option in boot-wrapper-aarch64 so that it boots the next stage (U-Boot) at S-EL2. Additionally, tell boot-wrapper-aarch64 to bundle U-Boot instead of the kernel.

Linux only supports booting from S-EL1 on the fvp-baser-aemv8r64, so U-Boot is configured with CONFIG_SWITCH_TO_EL1, so that booti or bootefi switch to S-EL1 before booting the EFI payload (unless an enviornment variable - armv8_switch_to_el1 - is set to 'n').

Add patches to U-Boot, which:
* Backports 53b40e8d54fcdb834e10e6538084517524b8401b, to disable pointer authentication traps.
* Add board support for the fvp-baser-aemv8r64 (with a memory map which is inverted from the fvp-base).
* Enable the configuration of U-Boot using the device tree passed from boot-wrapper-aarch64.
* Enable virtio-net.
* Disable setting the exception vectors at S-EL2 so that the PSCI vectors pass through to Linux.
* Set up system registers at S-EL2 for Linux.
* Configure the S-EL2 MPU for the EFI services.
* Allows bootefi to switch to EL1 before booting Linux.

Issue-Id: SCM-3871

Change-Id I229d14b0717df412c1fe33772230ca779f79b32d
---
 .../conf/machine/fvp-baser-aemv8r64.conf      |   6 +-
 ...oot-wrapper-aarch64-fvp-baser-aemv8r64.inc |   5 +-
 ...pointer-authentication-traps-for-EL1.patch | 126 ++++++++
 ...ation-for-the-Arm-VExpress64-board-c.patch | 109 +++++++
 ...tor-header-file-to-make-it-easier-to.patch | 173 +++++++++++
 ...Clean-up-BASE_FVP-boot-configuration.patch |  99 +++++++
 ...e-OF_CONTROL-and-OF_BOARD-for-VExpre.patch | 106 +++++++
 ...s64-Enable-VIRTIO_NET-network-driver.patch |  62 ++++
 ...v8-Add-ARMv8-MPU-configuration-logic.patch | 259 +++++++++++++++++
 ...bling-exception-vectors-on-non-SPL-b.patch |  98 +++++++
 ...mv8-ARMV8_SWITCH_TO_EL1-improvements.patch | 163 +++++++++++
 ...ling-HVC-configurable-when-switching.patch |  73 +++++
 ...press64-Do-not-set-COUNTER_FREQUENCY.patch |  37 +++
 ...Add-BASER_FVP-vexpress-board-variant.patch | 275 ++++++++++++++++++
 .../recipes-bsp/u-boot/u-boot_%.bbappend      |  18 ++
 15 files changed, 1607 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0001-armv8-Disable-pointer-authentication-traps-for-EL1.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0002-doc-Add-documentation-for-the-Arm-VExpress64-board-c.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0003-vexpress64-Refactor-header-file-to-make-it-easier-to.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0004-vexpress64-Clean-up-BASE_FVP-boot-configuration.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0005-vexpress64-Enable-OF_CONTROL-and-OF_BOARD-for-VExpre.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0006-vexpress64-Enable-VIRTIO_NET-network-driver.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0007-armv8-Add-ARMv8-MPU-configuration-logic.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0008-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0009-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0010-armv8-Make-disabling-HVC-configurable-when-switching.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0011-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0012-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch
meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf +5 -1
index 2d63be5..c190e4c 100644
@@ -15,10 +15,14 @@ PREFERRED_VERSION_linux-yocto-rt ?= "5.14%"
 KERNEL_IMAGETYPE = "Image"
 KERNEL_DEVICETREE = "arm/fvp-baser-aemv8r64.dtb"
 
+UBOOT_MACHINE ?= "vexpress_aemv8r_defconfig"
+
 SERIAL_CONSOLES = "115200;ttyAMA0"
 
 IMAGE_FSTYPES += "wic"
-WKS_FILE ?= "fvp-base.wks"
+WKS_FILE ?= "efi-disk.wks.in"
+EFI_PROVIDER ?= "grub-efi"
+MACHINE_FEATURES:append = " efi"
 
 # As this is a virtual target that will not be used in the real world there is
 # no need for real SSH keys.  Disable rng-tools (which takes too long to
meta-arm-bsp/recipes-bsp/boot-wrapper-aarch64/boot-wrapper-aarch64-fvp-baser-aemv8r64.inc +4 -1
index 628571f..6bc7385 100644
@@ -23,6 +23,9 @@ SRC_URI:append = " \
 BOOT_WRAPPER_AARCH64_CMDLINE = "\
 earlycon console=ttyAMA0 loglevel=8 rootfstype=ext4 root=/dev/vda1 rw"
 
-EXTRA_OECONF += "--enable-psci=hvc"
+EXTRA_OECONF += "--enable-psci=hvc --enable-keep-el"
 
 TUNE_CCARGS = ""
+
+BOOT_WRAPPER_AARCH64_KERNEL = "u-boot.bin"
+do_deploy[depends] += "u-boot:do_deploy"
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0001-armv8-Disable-pointer-authentication-traps-for-EL1.patch new file +126 -0

126 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0002-doc-Add-documentation-for-the-Arm-VExpress64-board-c.patch new file +109 -0

109 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0003-vexpress64-Refactor-header-file-to-make-it-easier-to.patch new file +173 -0

173 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0004-vexpress64-Clean-up-BASE_FVP-boot-configuration.patch new file +99 -0

99 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0005-vexpress64-Enable-OF_CONTROL-and-OF_BOARD-for-VExpre.patch new file +106 -0

106 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0006-vexpress64-Enable-VIRTIO_NET-network-driver.patch new file +62 -0

62 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0007-armv8-Add-ARMv8-MPU-configuration-logic.patch new file +259 -0

259 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0008-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch new file +98 -0

98 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0009-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch new file +163 -0

163 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0010-armv8-Make-disabling-HVC-configurable-when-switching.patch new file +73 -0

73 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0011-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch new file +37 -0
new file mode 100644
index 0000000..0f4f0a4
@@ -0,0 +1,37 @@
+From 3362e6910fe3f4d431b4034299f1b8d79a45e693 Mon Sep 17 00:00:00 2001
+From: Peter Hoyes <[email protected]>
+Date: Fri, 10 Dec 2021 15:09:09 +0000
+Subject: [PATCH 11/12] 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
+running at EL2, but shouldn't because it might be different from the
+value being used by the first-stage bootloader (which might be
+providing PSCI services).
+
+Issue-Id: SCM-3728
+Upstream-Status: Inappropriate [other]
+  Temporary patch
+Signed-off-by: Peter Hoyes <[email protected]>
+Change-Id: I137473d721e58e4c348b9641f5b9778178d3bb65
+---
+ include/configs/vexpress_aemv8.h | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/include/configs/vexpress_aemv8.h b/include/configs/vexpress_aemv8.h
+index 68422237dd..567a6dbf36 100644
+--- a/include/configs/vexpress_aemv8.h
++++ b/include/configs/vexpress_aemv8.h
+@@ -70,9 +70,6 @@
+ #define V2M_SYS_CFGCTRL			(V2M_SYSREGS + 0x0a4)
+ #define V2M_SYS_CFGSTAT			(V2M_SYSREGS + 0x0a8)
+ 
+-/* Generic Timer Definitions */
+-#define COUNTER_FREQUENCY		24000000	/* 24MHz */
+-
+ /* Generic Interrupt Controller Definitions */
+ #ifdef CONFIG_GICV3
+ #define GICD_BASE			(V2M_PA_BASE + 0x2f000000)
+-- 
+2.25.1
+
meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0012-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch new file +275 -0

275 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend +18 -0
index 88cf595..2eef58c 100644
@@ -75,3 +75,21 @@ SRC_URI:append:fvp-base = " file://bootargs.cfg"
 # FVP BASE ARM32
 #
 SRC_URI:append:fvp-base-arm32 = " file://0001-Add-vexpress_aemv8a_aarch32-variant.patch"
+
+#
+# FVP BASER
+#
+SRC_URI:append:fvp-baser-aemv8r64 = " \
+    file://0001-armv8-Disable-pointer-authentication-traps-for-EL1.patch \
+    file://0002-doc-Add-documentation-for-the-Arm-VExpress64-board-c.patch \
+    file://0003-vexpress64-Refactor-header-file-to-make-it-easier-to.patch \
+    file://0004-vexpress64-Clean-up-BASE_FVP-boot-configuration.patch \
+    file://0005-vexpress64-Enable-OF_CONTROL-and-OF_BOARD-for-VExpre.patch \
+    file://0006-vexpress64-Enable-VIRTIO_NET-network-driver.patch \
+    file://0007-armv8-Add-ARMv8-MPU-configuration-logic.patch \
+    file://0008-armv8-Allow-disabling-exception-vectors-on-non-SPL-b.patch \
+    file://0009-armv8-ARMV8_SWITCH_TO_EL1-improvements.patch \
+    file://0010-armv8-Make-disabling-HVC-configurable-when-switching.patch \
+    file://0011-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch \
+    file://0012-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch \
+    "
Signature · 1 line
2.25.1
#5 lore raw

PATCH 5/8 arm-bsp/kernel: Use 4 Gb of RAM in fvp-baser-aemv8r64

In reply to Peter Hoyes

From: Peter Hoyes <[email protected]>

The FVP default configuration has bp.dram_size=4, which is sufficient for development and testing purposes, so remove the FVP_CONFIG override and set to 4 Gb in the device tree.

Issue-Id: SCM-3871

Change-Id I4a96062c9e94d36f5459f33c86aab4d4885bab43
---
 meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf               | 1 -
 .../linux/files/fvp-baser-aemv8r64/fvp-baser-aemv8r64.dts       | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf +0 -1
index c190e4c..cfbc73d 100644
@@ -39,7 +39,6 @@ FVP_CONSOLE ?= "terminal_0"
 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.dram_size] ?= "8"
 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"
meta-arm-bsp/recipes-kernel/linux/files/fvp-baser-aemv8r64/fvp-baser-aemv8r64.dts +1 -1
index 4d6640a..a5078f2 100644
@@ -13,7 +13,7 @@
                 #size-cells = <0x2>;
                 device_type = "memory";
                 reg = <0x0        0x0        0x0 0x80000000>,
-                      <0x00000008 0x80000000 0x1 0x80000000>;
+                      <0x00000008 0x80000000 0x0 0x80000000>;
         };
 
         cpus {
Signature · 1 line
2.25.1
#6 lore raw

PATCH 6/8 arm-bsp/conf: Use real-time clock for fvp-baser-aemv8r64

In reply to Peter Hoyes

From: Peter Hoyes <[email protected]>

Enable the bp.refcounter.use_real_time option, so that the CNTPCT_EL0 increments in real-time instead of simulator time.

Issue-Id: SCM-3871

Change-Id I197d6de4a7316e5299aee34e64e149cbd3d515a9
---
 meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-arm-bsp/conf/machine/fvp-baser-aemv8r64.conf +2 -1
index cfbc73d..444f83f 100644
@@ -61,4 +61,5 @@ 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.vis.rate_limit-enable] ?= "0"
\ No newline at end of file
+FVP_CONFIG[bp.vis.rate_limit-enable] ?= "0"
+FVP_CONFIG[bp.refcounter.use_real_time] ?= "1"
Signature · 1 line
2.25.1
#7 lore raw

PATCH 7/8 arm-bsp/docs: Update fvp-baser-aemv8r64 docs

In reply to Peter Hoyes

From: Peter Hoyes <[email protected]>

Document U-Boot addition, add new architecture section and update the change log.

Issue-Id: SCM-3871

Change-Id Ie0e1ff35ade634f2b523c14bb058c9d775802632
---
 .../documentation/fvp-baser-aemv8r64.md       | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)
meta-arm-bsp/documentation/fvp-baser-aemv8r64.md +59 -0
index fdf5038..70256e0 100644
@@ -28,12 +28,65 @@ where either a standard or Real-Time Linux kernel (PREEMPT\_RT) can be built
 and run:
 
  - boot-wrapper-aarch64: provides PSCI support
+ - U-Boot: v2021.07 - provides UEFI services
  - Linux kernel: linux-yocto-5.14
  - Linux kernel with PREEMPT\_RT support: linux-yocto-rt-5.14
 
 Note that the Real-Time Linux kernel (PREEMPT\_RT) does not use the real-time
 architectural extensions of the Armv8-R feature set.
 
+High-Level Architecture
+-----------------------
+
+The diagram below shows the current boot flow:
+
+    +---------------------------------------------------------------+
+    |                         Linux kernel                          |
+    +---------------------------------------------------------------+
+               /|\                                     /|\
+                |                                       |
+                | UEFI services                         |
+                |                         PSCI services |
+               \|/                                      |
+        +----------------+                              |     S-EL1
+    ----|     U-Boot     |------------------------------|-----------
+        +----------------+                              |     S-EL2
+               /|\                                      |
+                |                                       |
+                |                                       |
+                |                                       |
+    +--------------------------------------------------\|/----------+
+    |                        +----------------+ +----------------+  |
+    |  boot-wrapper-aarch64  |  Device tree   | |  PSCI handler  |  |
+    |                        +----------------+ +----------------+  |
+    +---------------------------------------------------------------+
+
+
+The firmware binary (generated as `linux-system.axf`) includes
+boot-wrapper-aarch64, the flattened device tree and U-Boot. U-Boot is configured
+to automatically detect a virtio block device and boot the UEFI payload at the
+path `/efi/boot/bootaa64.efi`. Using the standard build, the first partition
+contains a Grub image at this path, which boots the Linux kernel at `/Image` on
+the same partition. The second partition of the image contains the Linux root
+file system.
+
+There is no EL3 or non-secure world in the Armv8-R AArch64 architecture, so the
+reset vector starts boot-wrapper-aarch64 at S-EL2. Boot-wrapper-aarch64 is
+compiled with the `--enable-keep-el` flag, which causes it to boot U-Boot at
+S-EL2 too. U-Boot is compiled with the `CONFIG_ARMV8_SWITCH_TO_EL1` flag, which
+causes it to switch to S-EL1 before booting Linux.
+
+The bundled device tree is passed to U-Boot via register x0. U-Boot passes the
+same device tree to Linux via the UEFI system table.
+
+Power state management is provided by PSCI services in boot-wrapper-aarch64.
+Linux accesses the PSCI handler via HVC calls to S-EL2. U-Boot has been patched
+to prevent it from overriding the exception vector at S-EL2. The PSCI handler
+memory region is added to a `/memreserve/` node in the device tree.
+
+Please note that the final firmware architecture for the fvp-baser-aemv8r64 is
+not yet stabilized. The patches in this layer are provided for development and
+evaluation purposes only, and should not be used in production firmware.
 
 Quick start: Howto Build and Run
 --------------------------------
@@ -167,6 +220,12 @@ Known Issues and Limitations
 Change Log
 ----------
 
+- Added U-Boot v2021.07 for UEFI support.
+- Updated boot-wrapper-aarch64 revision and added support for booting U-Boot.
+- Included boot-wrapper-aarch64 PSCI services in /memreserve/ region.
+- Fixed the counter frequency initialization in boot-wrapper-aarch64.
+- Configured the FVP to use the default RAM size of 4 Gb
+- Fixed PL011 and SP805 register sizes in the device tree.
 - Added virtio_net User Networking mode by default and removed instructions
   about tap networking setup.
 - Updated Linux kernel version from 5.10 to 5.14 for both standard and
Signature · 1 line
2.25.1
#8 lore raw

PATCH 8/8 arm-bsp/docs: Minor fvp-baser-aemv8r64 updates

In reply to Peter Hoyes

From: Peter Hoyes <[email protected]>

* Add clarification on how to mount p9 device
* Remove instruction to use ctrl + c to stop FVP
* Add cache_state_modelled to Known Issues

Issue-Id: SCM-3871

Change-Id I122c5ae5b3ceee1d106205d93a006f75bdbfa2bf
---
 .../documentation/fvp-baser-aemv8r64.md       | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
meta-arm-bsp/documentation/fvp-baser-aemv8r64.md +11 -8
index 70256e0..98ede27 100644
@@ -171,18 +171,11 @@ To run an image after the build is done with the Real-Time Linux kernel
 
 **Note:** The terminal console login is `root` without password.
 
-To finish the fvp emulation, you need to close the telnet session and stop the
-runfvp script:
-
-1. To close the telnet session:
+To finish the fvp emulation, you need to close the telnet session:
 
  - Escape to telnet console with ``ctrl+]``.
  - Run ``quit`` to close the session.
 
-2. To stop the runfvp:
-
- - Type ``ctrl+c`` and wait for kas process to finish.
-
 ### File sharing between host and fvp
 It is possible to share a directory between the host machine and the fvp using
 the virtio P9 device component included in the kernel. To do so, create a
@@ -195,6 +188,14 @@ launching the model:
 
     --parameter 'bp.virtiop9device.root_path=/path/to/host-mount-dir'
 
+e.g. for the standard Linux kernel:
+
+    kas shell --keep-config-unchanged \
+       meta-arm/kas/fvp-baser-aemv8r64-bsp.yml \
+           --command "../layers/meta-arm/scripts/runfvp \
+           --console --parameter
+           'bp.virtiop9device.root_path=/path/to/host-mount-dir'"
+
 Once you are logged into the fvp, the host directory can be mounted in a
 directory on the model using the following command:
 
@@ -216,6 +217,8 @@ Known Issues and Limitations
 - Only PSCI CPU\_ON and CPU\_OFF functions are supported
 - Linux kernel does not support booting from secure EL2 on Armv8-R AArch64
 - Linux KVM does not support Armv8-R AArch64
+- Enabling the FVP parameter `cache_state_modelled` is incompatible with virtio
+  devices
 
 Change Log
 ----------
Signature · 1 line
2.25.1
Applied
#9 lore raw
In reply to Peter Hoyes
Quoted 12 lines · Peter Hoyes

These patches backport the following updates for the fvp-baser-aemv8r64 BSP:

* Add board support patches for U-Boot v2021.07, and bundle U-Boot in the boot-wrapper-aarch64 binary to provide UEFI support.
* Update boot-wrapper to more recent version and include patches to boot U-Boot at S-EL2.
* Align FVP RAM size with upstream kernel device tree.
* Enable the use_real_time FVP flag so that the counter increments using the wall clock.
* Update documentation, including a section on the new boot architecture.
* Fix the PL011 and SP805 register sizes in the device tree

Quoted 1 line

[...]

Applied, thanks!

[1/8] arm-bsp/fvp-baser-aemv8r64: Fix PL011 and SP805 register sizes
(no commit info)
[2/8] arm/boot-wrapper-aarch64: Upgrade to newer revision
(no commit info)
[3/8] arm-bsp/boot-wrapper-aarch64: Update patches for fvp-baser-aemv8r64
(no commit info)
[4/8] arm-bsp/u-boot: Add U-Boot for fvp-baser-aemv8r64
(no commit info)
[5/8] arm-bsp/kernel: Use 4 Gb of RAM in fvp-baser-aemv8r64
(no commit info)
[6/8] arm-bsp/conf: Use real-time clock for fvp-baser-aemv8r64
(no commit info)
[7/8] arm-bsp/docs: Update fvp-baser-aemv8r64 docs
(no commit info)
[8/8] arm-bsp/docs: Minor fvp-baser-aemv8r64 updates

      commit: 94682c6d1d1a8e719f2aef52e9c835315bbfa73d

Best regards,

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