This is a port of 64-bit Tiano Core UEFI firmware for the Raspberry Pi 4 platforms.
This is intended to be useful 64-bit TF-A + UEFI implementation for the Raspberry Pi 4 which should be good enough for most kind of UEFI development, as well as for running consummer Operating Systems such as Linux or Windows.
Raspberry Pi is a trademark of the Raspberry Pi Foundation.
This firmware is still in early stage of development, meaning that it comes with the following major limitations:
The only features that are expected to work with this first iteration of the firmware are HDMI and serial I/O.
start4.elf
that was
released after 2019.11.18. This is a TF-A issue that will be fixed in a
later version.Build instructions from the top level edk2-platforms Readme.md apply.
RPI_EFI.fd
firmware onto the partitionbcm2711-rpi-4-b.dtb
fixup4.dat
start4.elf
Create a config.txt
with the following content:
arm_64bit=1
enable_uart=1
core_freq=250
enable_gic=1
armstub=RPI_EFI.fd
Insert the uSD card and power up the Pi.
The TF-A binaries were compiled from a TF-A source over which 2 serial-output related
patches were applied, the first one to fix the miniUART baud rate not being properly
set to 115200 bauds with recent versions of start4.elf
and the second one to allow
swicthing between miniUART and PL011 at build time.
No other alterations to the official source have been applied.
For more details on the TF-A compilation, see the Readme
in the TrustedFirmware/
directory.
You can pass a custom Device Tree and overlays using the following:
(...)
disable_commandline_tags=2
device_tree_address=0x20000
device_tree_end=0x30000
device_tree=bcm2711-rpi-4-b.dtb
Note: the address range must be [0x20000:0x30000]
.
dtoverlay
and dtparam
parameters are also supported when providing a Device Tree`.
bootargs
This firmware will honor the command line passed by the GPU via cmdline.txt
.
Note, that the ultimate contents of /chosen/bootargs
are a combination of several pieces:
/chosen/bootargs
if using the internal DTB. Seems to be completely discarded by GPU when booting with a custom device tree.cmdline.txt
.The Raspberry Pi has no NVRAM.
NVRAM is emulated, with the non-volatile store backed by the UEFI image itself. This means that any changes made in UEFI proper are persisted, but changes made from within an Operating System aren’t.
The Rasberry Pi has no RTC.
An RtcEpochSeconds
NVRAM variable is used to store the boot time.
This should allow you to set whatever date/time you want using the Shell date and
time commands. While in UEFI or HLOS, the time will tick forward.
RtcEpochSeconds
is not updated on reboots.