Upstream fork of ATF with a couple of rk3399 patches to remove HDCP blob and increase BAUD_RATE.
Go to file
Igor Opaniuk 9ce232fe98 feat(plat/imx8m): add SiP call for secondary boot
In iMX8MM it is possible to have two copies of bootloader in
SD/eMMC and switch between them. The switch is triggered either
by the BootROM in case the bootloader image is faulty OR can be
enforced by the user. To trigger that switch the
PERSIST_SECONDARY_BOOT bit should be set in GPR10 SRC register.
As the bit is retained after WARM reset, that permits to control
BootROM behavior regarding what boot image it will boot after
reset: primary or secondary.

This is useful for reliable bootloader A/B updates, as it permits
switching between two copies of bootloader at different offsets of
the same storage.

If the PERSIST_SECONDARY_BOOT is 0, the boot ROM uses address
0x8400 for the primary image. If the PERSIST_SECONDARY_BOOT is 1,
the boot ROM reads that secondary image table from address 0x8200
on the boot media and uses the address specified in the table for
the secondary image.

Secondary Image Table contains the sector of secondary bootloader
image, exluding the offset to that image (explained below in the
note). To generate the Secondary Image Table, use e.g.:
$ printf '\x0\x0\x0\x0\x0\x0\x0\x0\x33\x22\x11'
         '\x00\x00\x10\x0\x0\x00\x0\x0\x0'
  > /tmp/sit.bin
$ hexdump  -vC /tmp/sit.bin
  00000000  00 00 00 00
  00000004  00 00 00 00
  00000008  33 22 11 00 <--- This is the "tag"
  0000000c  00 10 00 00 <--- This is the "firstSectorNumber"
  00000010  00 00 00 00

You can also use NXP script from [1][2] imx-mkimage tool for
SIT generation. Note that the firstSectorNumber is NOT the offset
of the IVT, but an offset of the IVT decremented by Image Vector
Table offset (Table 6-25. Image Vector Table Offset and Initial
Load Region Size for iMX8MM/MQ), so for secondary SPL copy at
offset 0x1042 sectors, firstSectorNumber must be 0x1000
(0x42 sectors * 512 = 0x8400 bytes offset).

In order to test redundant boot board should be closed and
SD/MMC manufacture mode disabled, as secondary boot is not
supported in the SD/MMC manufacture mode, which can be disabled
by blowing DISABLE_SDMMC_MFG (example for iMX8MM):
> fuse prog -y 2 1 0x00800000

For additional details check i.MX 8M Mini Apllication Processor
Reference Manual, 6.1.5.4.5 Redundant boot support for
expansion device chapter.

[1] https://source.codeaurora.org/external/imx/imx-mkimage/
[2] scripts/gen_sit.sh
Change-Id: I0a5cea7295a4197f6c89183d74b4011cada52d4c
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2021-05-21 15:01:38 +03:00
.husky build(hooks): add commitlint hook 2021-04-19 14:06:25 +01:00
bl1 Add support for FEAT_MTPMU for Armv8.6 2020-12-11 12:49:20 +00:00
bl2 Add support for FEAT_MTPMU for Armv8.6 2020-12-11 12:49:20 +00:00
bl2u linker_script: move .data section to bl_common.ld.h 2020-04-25 20:09:08 +09:00
bl31 Add TRNG Firmware Interface service 2021-02-05 11:49:18 +00:00
bl32 bl32: Enable TRNG service build 2021-02-11 10:43:25 +00:00
common fdt: Use proper #address-cells and #size-cells for reserved-memory 2021-03-23 18:08:45 +01:00
docs Merge changes from topic "my-topic-name" into integration 2021-04-22 10:49:16 +02:00
drivers Merge changes Id7bdbc9b,Ia813e051,I2c437380,I736724cc,I454fb40a, ... into integration 2021-04-21 17:08:46 +02:00
fdts Plat FVP: Fix Generic Timer interrupt types 2021-04-21 14:38:15 +02:00
include Merge "Plat FVP: Fix Generic Timer interrupt types" into integration 2021-04-22 22:45:51 +02:00
lib Add "_arm" suffix to Makalu ELP CPU lib 2021-04-20 17:14:31 -05:00
make_helpers tbbr-tools: enable override TRUSTED_KEY_CERT 2021-03-24 09:49:31 +05:30
plat feat(plat/imx8m): add SiP call for secondary boot 2021-05-21 15:01:38 +03:00
services Merge changes from topic "od/ns-interrupts" into integration 2021-04-21 07:19:00 +02:00
tools fiptool: Do not call 'make clean' in 'all' target 2021-04-07 19:36:20 +02:00
.checkpatch.conf Re-apply GIT_COMMIT_ID check for checkpatch 2019-07-12 11:06:24 +01:00
.cz.json build(hooks): add Commitizen hook 2021-04-19 14:06:25 +01:00
.editorconfig .editorconfig: set max line length to 100 2020-12-03 15:39:23 +00:00
.gitignore build(hooks): add Husky configuration 2021-04-19 14:06:25 +01:00
.gitreview Specify integration as the default branch for git-review 2020-04-02 07:57:17 +00:00
Makefile Merge "fiptool: Do not print duplicate verbose lines about building fiptool" into integration 2021-04-13 01:07:52 +02:00
commitlint.config.js build(hooks): add commitlint hook 2021-04-19 14:06:25 +01:00
dco.txt Drop requirement for CLA in contribution.md 2016-09-27 21:52:03 +01:00
license.rst doc: De-duplicate readme and license files 2019-10-08 16:36:15 +00:00
package-lock.json build(hooks): add commitlint hook 2021-04-19 14:06:25 +01:00
package.json build(hooks): add commitlint hook 2021-04-19 14:06:25 +01:00
readme.rst doc: Formatting fixes for readme.rst 2019-10-09 15:37:59 +00:00

readme.rst

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> </head>

Trusted Firmware-A

Trusted Firmware-A (TF-A) is a reference implementation of secure world software for Arm A-Profile architectures (Armv8-A and Armv7-A), including an Exception Level 3 (EL3) Secure Monitor. It provides a suitable starting point for productization of secure world boot and runtime firmware, in either the AArch32 or AArch64 execution states.

TF-A implements Arm interface standards, including:

The code is designed to be portable and reusable across hardware platforms and software models that are based on the Armv8-A and Armv7-A architectures.

In collaboration with interested parties, we will continue to enhance TF-A with reference implementations of Arm standards to benefit developers working with Armv7-A and Armv8-A TrustZone technology.

Users are encouraged to do their own security validation, including penetration testing, on any secure world code derived from TF-A.

More Info and Documentation

To find out more about Trusted Firmware-A, please view the full documentation that is available through trustedfirmware.org.


Copyright (c) 2013-2019, Arm Limited and Contributors. All rights reserved.

</html>