[honister,7/8] arm-bsp/docs: Update fvp-baser-aemv8r64 docs

Message ID 20220224112244.1521611-8-peter.hoyes@arm.com
State New
Headers show
Series Add UEFI to fvp-baser-aemv8r64 using U-Boot | expand

Commit Message

Peter Hoyes Feb. 24, 2022, 11:22 a.m. UTC
From: Peter Hoyes <Peter.Hoyes@arm.com>

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

Issue-Id: SCM-3871
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ie0e1ff35ade634f2b523c14bb058c9d775802632
---
 .../documentation/fvp-baser-aemv8r64.md       | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)

Patch

diff --git a/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md b/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md
index fdf5038..70256e0 100644
--- a/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md
+++ b/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md
@@ -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