Skip to content

Commit

Permalink
Platform/RaspberryPi: Update TF-A to v2.6 to enable the PCI SMCCC int…
Browse files Browse the repository at this point in the history
…erface

The RPi4 has a single nonstandard PCI config region. It is broken into two
pieces, the root port config registers and a window to a single device's
config space which can move between devices. However there isn't (yet) an
authoritative public document on this since the available BCM2711 reference
notes that there is a PCIe root port in the memory map but doesn't describe
it.

Considering that it's not ECAM compliant, yet relatively simple, it is
however possible to make use of the newly introduced PCI SMCCC interface
that was added for the RPi4 platform as part of the TF-A 2.6 release.

As a result, we update the RPi4 TF-A to the 2.6 release version, and, for
good measure, the RPi3 also, using binaries that were built in an open and
verifiable manner through the GitHub Actions build script located at
https://github.com/pftf/pitf.

For more details on the SMCCC interface, see DEN0115 available from:
https://developer.arm.com/documentation/den0115/latest

Tested for regression on Pi 3 Model B and Pi 4 Model B.

Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
  • Loading branch information
pbatard authored and ardbiesheuvel committed Jan 10, 2022
1 parent d02501a commit c1075e9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ ARM Trusted Firmware for Raspberry Pi 3
=======================================

The `bl1.bin` and `fip.bin` TF-A binaries found in this directory were built from the
[official TF-A 2.5 release](https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tag/?h=v2.5)
[official TF-A 2.6 release](https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tag/?h=v2.6)
through a [GitHub build script](https://github.com/pftf/pitf/blob/master/.github/workflows/build.yml)
that is designed to provide evidence that these binaries match the vanilla TF-A source.

Per the [GitHub Actions log](https://github.com/pftf/pitf/runs/2822874196),
Per the [GitHub Actions log](https://github.com/pftf/pitf/runs/1668471269),
the SHA-256 sums for the blobs can be validated to be as follows:
- `bl1.bin`: `5ba701a7e977d308a19928e19937107387677d52a1a4d628a5c2bb4e795aae8b`
- `fip.bin`: `0c3f8a3e8192e5dcb3bdc5867976e4277e9d948159a92ee71a54e92cb8dce9a3`
- `bl1.bin`: `787acb2ca1c99678dcdec70a64b9602f8f8f658a4abb0b3f7edfa5f5efb22f73`
- `fip.bin`: `fd85f9a230aad88f6a59cf0c5d88e6067f23fb8080c6b8bdc61f1a5f6cbbf9ec`

For Raspberry Pi 3 usage, TF-A was built using the command:
```
Expand Down
Binary file modified Platform/RaspberryPi/RPi3/TrustedFirmware/bl1.bin
Binary file not shown.
Binary file modified Platform/RaspberryPi/RPi3/TrustedFirmware/fip.bin
Binary file not shown.
8 changes: 4 additions & 4 deletions Platform/RaspberryPi/RPi4/TrustedFirmware/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ ARM Trusted Firmware for Raspberry Pi 4
=======================================

The `bl31.bin` TF-A binary found in this directory was built from the
[official TF-A 2.5 release](https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tag/?h=v2.5)
[official TF-A 2.6 release](https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tag/?h=v2.6)
through a [GitHub build script](https://github.com/pftf/pitf/blob/master/.github/workflows/build.yml)
that is designed to provide evidence that these binaries match the vanilla TF-A source.

Per the [GitHub Actions log](https://github.com/pftf/pitf/runs/2822874196),
Per the [GitHub Actions log](https://github.com/pftf/pitf/runs/1668471269),
the SHA-256 sum for the bin can be validated to be as follows:
- `bl31.bin`: `59c4486a0a257c8d630d8ea39d6a13d038cd50be4fc9a81985bf2c32a7c3fca6`
- `bl31.bin`: `48f129b3064fd44992c9903e8207eeee09f67edb6d06b14eba8e10614ac5c5b7`

For Raspberry Pi 4 usage, TF-A was built using the command:
```
make PLAT=rpi4 RPI3_PRELOADED_DTB_BASE=0x1F0000 PRELOADED_BL33_BASE=0x20000 SUPPORT_VFP=1 DEBUG=0 all
make PLAT=rpi4 RPI3_PRELOADED_DTB_BASE=0x1F0000 PRELOADED_BL33_BASE=0x20000 SUPPORT_VFP=1 SMC_PCI_SUPPORT=1 DEBUG=0 all
```
Binary file modified Platform/RaspberryPi/RPi4/TrustedFirmware/bl31.bin
Binary file not shown.

0 comments on commit c1075e9

Please sign in to comment.