rpi5.rst 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. Raspberry Pi 5
  2. ==============
  3. The `Raspberry Pi 5`_ is a single-board computer that contains four
  4. Arm Cortex-A76 cores.
  5. This port is a minimal BL31 implementation capable of booting 64-bit EL2
  6. payloads such as Linux and EDK2.
  7. **IMPORTANT NOTE**: This port isn't secure. All of the memory used is DRAM,
  8. which is available from both the Non-secure and Secure worlds. The SoC does
  9. not seem to feature a secure memory controller of any kind, so portions of
  10. DRAM can't be protected properly from the Non-secure world.
  11. Build
  12. ------------------
  13. To build this platform, run:
  14. .. code:: shell
  15. CROSS_COMPILE=aarch64-linux-gnu- make PLAT=rpi5 DEBUG=1
  16. The firmware will be generated at ``build/rpi5/debug/bl31.bin``.
  17. The following build options are supported:
  18. - ``RPI3_DIRECT_LINUX_BOOT``: Enabled by default. Allows direct boot of the Linux
  19. kernel from the firmware.
  20. - ``PRELOADED_BL33_BASE``: Used to specify the fixed address of a BL33 binary
  21. that has been preloaded by earlier boot stages (VPU). Useful for bundling
  22. BL31 and BL33 in the same ``armstub`` image (e.g. TF-A + EDK2).
  23. - ``RPI3_PRELOADED_DTB_BASE``: This option allows to specify the fixed address of
  24. a DTB in memory. Can only be used if ``device_tree_address=`` is present in
  25. config.txt.
  26. - ``RPI3_RUNTIME_UART``: Indicates whether TF-A should use the debug UART for
  27. runtime messages or not. ``-1`` (default) disables the option, any other value
  28. enables it.
  29. Usage
  30. ------------------
  31. Copy the firmware binary to the first FAT32 partition of a supported boot media
  32. (SD, USB) and append ``armstub=bl31.bin`` to config.txt, or just rename the
  33. file to ``armstub8-2712.bin``.
  34. No other config options or files are required by the firmware alone, this will
  35. depend on the payload you intend to run.
  36. For Linux, you must also place an appropriate DTB and kernel in the boot
  37. partition. This has been validated with a copy of Raspberry Pi OS.
  38. The VPU will preload a BL33 AArch64 image named either ``kernel_2712.img`` or
  39. ``kernel8.img``, which can be overridden by adding a ``kernel=filename`` option
  40. to config.txt.
  41. Kernel and DTB load addresses are also chosen by the VPU and can be changed with
  42. ``kernel_address=`` and ``device_tree_address=`` in config.txt. If TF-A was built
  43. with ``PRELOADED_BL33_BASE`` or ``RPI3_PRELOADED_DTB_BASE``, setting those config
  44. options may be necessary.
  45. By default, all boot stages print messages to the dedicated UART debug port.
  46. Configuration is ``115200 8n1``.
  47. Design
  48. ------------------
  49. This port is largely based on the RPi 4 one.
  50. The boot process is essentially the same, the only notable difference being that
  51. all VPU blobs have been moved into EEPROM (former start4.elf & fixup4.dat). There's
  52. also a custom BL31 TF-A armstub included for PSCI, which can be replaced with this
  53. port.
  54. .. _Raspberry Pi 5: https://www.raspberrypi.com/products/raspberry-pi-5/