Commit Graph

9005 Commits

Author SHA1 Message Date
Yann Gautier 3d201787e8 feat(plat/st): implement platform functions for SMCCC_ARCH_SOC_ID
The JEDEC information for STMicroelectronics is:
JEDEC_ST_MFID U(0x20)
JEDEC_ST_BKID U(0x0)
And rely on platform functions to get chip IP and revision.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I4fa4ac8bb5583b1871b768decc9fe08e8966ff54
2021-05-27 09:54:59 +02:00
Yann Gautier 92661e01cf refactor(plat/st): export functions to get SoC information
Three functions are exported to get SoC version, SoC device ID, and SoC
name. Those functions are based on reworked existing static functions.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I1f3949062bb488286a9e7a38ffcd1457953dac56
2021-05-27 09:54:59 +02:00
Yann Gautier 96b0596ea2 feat(smccc): add bit definition for SMCCC_ARCH_SOC_ID
The definitions of SMCCC_ARCH_SOC_ID SoC version return bits are defined
in SMC Calling Convention [1]. Add the masks and shifts for JEP-106 bank
index, JEP-106 identification code, and Implementation defined SoC ID.
Add a macro to easily set JEP-106 fields.

 [1] https://developer.arm.com/documentation/den0028/latest/

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Iecbd09f6de6728de89dc746d2d1981a5a97a8ab7
2021-05-27 09:54:59 +02:00
Manish Pandey e55d12b7eb Merge changes from topic "Arm_PCI_Config_Space_Interface" into integration
* changes:
  TF-A: Document SMC_PCI_SUPPORT option
  SMCCC/PCI: Handle std svc boilerplate
  SMCCC/PCI: Add initial PCI conduit definitions
  SMCCC: Hoist SMC_32 sanitization
2021-05-27 09:49:10 +02:00
Pranav Madhu 7bd64c70e9 feat(plat/sgi): enable use of PSCI extended state ID format
The SGI/RD platforms have been using PSCI state ID format as defined in
PSCI version prior to 1.0. This is being changed and the PSCI extended
state ID format as defined in PSCI version 1.1 is being adapted. In
addition to this, the use of Arm recommended PSCI state ID encoding is
enabled as well.

Change-Id: I2be8a9820987a96b23f4281563b6fa22db48fa5f
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
2021-05-27 10:29:17 +05:30
Hsin-Hsiung Wang 9ed4e6fb66 fix(plat/mediatek/pmic_wrap): update idle flow
Update idle flow in case of last read command timeout.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Change-Id: Idb0552d70d59b23822c38269d0fa9fe9ac0d6975
2021-05-27 02:13:37 +01:00
Madhukar Pappireddy b941145973 Merge "fix(services): drop warning on unimplemented calls" into integration 2021-05-27 00:45:41 +02:00
Mark Dykes fa4718031a Merge "fix(docs): fix typos in v2.5 release documentation" into integration 2021-05-26 20:02:36 +02:00
Madhukar Pappireddy 8d4aa7d95b Merge changes from topic "mt8192-apu" into integration
* changes:
  feat(plat/mediatek/apu): add mt8192 APU device apc driver
  feat(plat/mediatek/apu): add mt8192 APU SiP call support
  feat(plat/mediatek/apu): add mt8192 APU iommap regions
  feat(plat/mediatek/apu): setup mt8192 APU_S_S_4 and APU_S_S_5 permission
2021-05-26 16:36:21 +02:00
Madhukar Pappireddy 3bb3157ab3 Merge "feat(plat/sgi): enable AMU for RD-V1-MC" into integration 2021-05-26 15:54:28 +02:00
Madhukar Pappireddy 99b5dd65bb Merge "fix(plat/xilinx/versal/include): correct IPI buffer offset" into integration 2021-05-26 15:26:58 +02:00
Flora Fu f46e1f1853 feat(plat/mediatek/apu): add mt8192 APU device apc driver
Add APU device apc driver and setup permission.

Signed-off-by: Flora Fu <flora.fu@mediatek.com>
Change-Id: I2bbdb69d11267e4252b2138b5c5ac8faf752740f
2021-05-26 12:40:02 +08:00
Flora Fu ca4c0c2e78 feat(plat/mediatek/apu): add mt8192 APU SiP call support
Add APU SiP call support for start/stop mcu.

Signed-off-by: Flora Fu <flora.fu@mediatek.com>
Change-Id: Ibf93d8ccf22c414de3093cee9e13f7668588f69e
Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@mediatek.com>
2021-05-26 12:29:32 +08:00
Rex-BC Chen 7eb4223757 feat(plat/mdeiatek/mt8195): add display port control in SiP service
MTK display port mute/unmute control registers need to be
set in secure world.

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: Iec73650e937bd20e25c18fa28d55ae29e68b10d3
2021-05-26 02:13:56 +01:00
Madhukar Pappireddy 481c7b6b91 fix(docs): fix typos in v2.5 release documentation
Two issues in documentation were identified after the release.
This patch fixes these typos.

1. Matternhorn ELP CPU was made available through v2.5 release, not
   Matternhorn CPU
2. We had upgraded TF-A to use GCC 10.2 toolchain family and used this
   toolchain for release testing

Change-Id: I33e59bb5a6d13f4d40dbb3352004d5b133431d65
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2021-05-25 17:18:11 -05:00
Rajan Vaja e1e5b1339b fix(plat/xilinx/versal/include): correct IPI buffer offset
Use proper offset for IPI data based on offset for IPI0
channel.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: I3070517944dd353c3733aa595df0da030127751a
2021-05-25 07:02:49 -07:00
Jeremy Linton 2973dc5df8 rpi4: update the iobase constant
The PCIe root port is outside of the current RPi
MMIO regions, so we need to adjust the address map.
Given much of the code depends on the legacy IOBASE
lets separate that from the actual MMIO begin/end.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Change-Id: Id65460ae58556bd8826dba08bbad79953e2a7c0b
2021-05-25 14:49:19 +02:00
Jeremy Linton 2d31cb079b TF-A: Document SMC_PCI_SUPPORT option
Add some basic documentation and pointers for the SMCCC PCI
build options.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Change-Id: Ia35f31d15066ea74135367cde2dce2f26e6ab31e
2021-05-25 14:49:15 +02:00
Jeremy Linton 1cdf1eb875 SMCCC/PCI: Handle std svc boilerplate
Add SMC wrappers for handshaking the existence
and basic parameter validation for the SMCCC/PCI
API. The actual read/write/segment validation is
implemented by a given platform which will enable
the API by defining SMC_PCI_SUPPORT.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Change-Id: I4485ad0fe6003cec6f5eedef688914d100513c21
2021-05-25 14:49:08 +02:00
Jeremy Linton c7a28aa798 SMCCC/PCI: Add initial PCI conduit definitions
Add constants, structures and build definition for the
new standard SMCCC PCI conduit. These are documented
in DEN0115A.

https://developer.arm.com/documentation/den0115/latest

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Change-Id: If667800a26b9ae88626e8d895674c9c2e8c09658
2021-05-25 14:49:01 +02:00
Jeremy Linton 475333c8a9 SMCCC: Hoist SMC_32 sanitization
The SMCCC, part 3 indicates that only the bottom
32-bits of a 32-bit SMC call are valid. The upper
bits must be zero. Lets enforce that so standard
service code can assume its been called that way.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Change-Id: I1bac50fbdc3b6ddca5fe2d1d1f96166a65ac4eb4
2021-05-25 14:48:56 +02:00
Flora Fu 2671f31872 feat(plat/mediatek/apu): add mt8192 APU iommap regions
Add APU iommap settings for reviser, apu_ao and
devapc control wrapper.

Signed-off-by: Flora Fu <flora.fu@mediatek.com>
Change-Id: Ie8e6a197c0f440f9e4ee8101202283a2dbf501a6
2021-05-25 14:49:30 +08:00
Flora Fu 77b6801966 feat(plat/mediatek/apu): setup mt8192 APU_S_S_4 and APU_S_S_5 permission
Setup APU_S_S_4/APU_S_S_5 permission as SEC_RW_ONLY.

Signed-off-by: Flora Fu <flora.fu@mediatek.com>
Change-Id: I6c50b2913bf34270a1b0ffaf0e0c435fee192a4c
2021-05-25 14:48:58 +08:00
Rex-BC Chen 1cf6340da8 docs: change owner for MediaTek platforms
Change owner for MediaTek platforms.

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I60848a2c1b236cef61c2c22d8278197ad257b1c2
2021-05-25 02:20:38 +01:00
Mark Dykes 09e153a9a8 Merge "feat(hw_crc): add support for HW computed CRC" into integration 2021-05-24 17:47:18 +02:00
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
Mark Dykes 0fd12b9e11 Merge "refactor(juno): disable non-invasive debug of secure state" into integration 2021-05-20 17:06:23 +02:00
Manish V Badarkhe a1cedadf73 feat(hw_crc): add support for HW computed CRC
Added support for HW computed CRC using Arm ACLE intrinsics.
These are built-in intrinsics available for ARMv8.1-A, and
onwards.
These intrinsics are enabled via '-march=armv8-a+crc' compile
switch for ARMv8-A (supports CRC instructions optionally).

HW CRC support is enabled unconditionally in BL2 for all Arm
platforms.

HW CRC calculation is verified offline to ensure a similar
result as its respective ZLib utility function.

HW CRC calculation support will be used in the upcoming
firmware update patches.

Change-Id: Ia2ae801f62d2003e89a9c3e6d77469b5312614b3
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-05-19 19:34:34 +01:00
Zelalem 63ca6bbad8 refactor(juno): disable non-invasive debug of secure state
Disable non-invasive debug of secure state for Juno
in release builds. This makes sure that PMU counts
only Non-secure events.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I0d1c3f96f3b4e48360a7211ae55851d65d291025
2021-05-17 10:19:26 -05:00
Madhukar Pappireddy c158878249 Merge changes I10b5cc17,I382d599f into integration
* changes:
  docs(prerequisites): add `--no-save` to `npm install`
  fix(hooks): downgrade `package-lock.json` version
2021-05-17 16:41:24 +02:00
Chris Kay a4371d1c4b docs(prerequisites): add `--no-save` to `npm install`
To avoid the mistake fixed by the previous commit, ensure users install
the Node.js dependencies without polluting the lock file by passing
`--no-save` to the `npm install` line.

Change-Id: I10b5cc17b9001fc2e26deee02bf99ce033a949c1
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-05-17 11:21:42 +01:00
Chris Kay 7434b65208 fix(hooks): downgrade `package-lock.json` version
The NPM lock file was accidentally updated using a later version of
Node.js than required by the prerequisites. This upgraded the lock file
to the v2 format, which causes a warning on Node.js 14 (the
prerequisites version). This moves the lock file back to v1 by
installing the dependencies with Node.js 14.

Change-Id: I382d599fd2b67b07eb9234d14e7b631db6b11453
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-05-17 11:17:06 +01:00
Madhukar Pappireddy 1e13c500a0 Merge "feat(makefile): incrementing minor version to reflect v2.5 release" into integration 2021-05-14 17:56:37 +02:00
bipin.ravi c72b2c7a11 Merge "docs(juno): update TF-A build instructions" into integration 2021-05-14 16:30:55 +02:00
Olivier Deprez 304c962074 Merge "docs: spm design document refresh" into integration 2021-05-14 15:49:25 +02:00
Alexei Fedorov 12f6c06497 fix(security): Set MDCR_EL3.MCCD bit
This patch adds setting MDCR_EL3.MCCD in 'el3_arch_init_common'
macro to disable cycle counting by PMCCNTR_EL0 in EL3 when
FEAT_PMUv3p7 is implemented. This fixes failing test
'Leak PMU CYCLE counter values from EL3 on PSCI suspend SMC'
on FVP models with 'has_v8_7_pmu_extension' parameter set to
1 or 2.

Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Change-Id: I2ad3ef501b31ee11306f76cb5a61032ecfd0fbda
2021-05-14 12:19:54 +01:00
Joanna Farley 96404aa27e Merge "build(hooks): update Commitizen to ^4.2.4" into integration 2021-05-13 18:27:27 +02:00
Madhukar Pappireddy d506b558c0 Merge "docs(release): add change log for v2.5 release" into integration 2021-05-13 15:15:17 +02:00
Daniel Boulby 70c121a258 feat(spmd): add support for FFA_SPM_ID_GET
Handle calls to the FFA_SPM_ID_GET interface. If FFA_SPM_ID_GET is
invoked from the non-secure physical FF-A instance, return the SPMC id
(defined in the SPMC manifest). If FFA_SPM_ID_GET is invoked from
the secure physical FF-A instance (e.g. the SPMC), return the SPMD id.

Change-Id: Id6d4e96b1da2510386d344e09c4553dba01227ec
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2021-05-13 10:43:49 +01:00
Zelalem 92473b3be0 docs(juno): update TF-A build instructions
Clean up instructions for building/running TF-A on the
Juno platform and add correct link to SCP binaries.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I536f98082e167edbf45f29ca23cc0db44687bb3b
2021-05-12 20:53:30 -05:00
Madhukar Pappireddy ff2da9e331 feat(makefile): incrementing minor version to reflect v2.5 release
Updated the minor version in the makefile

Change-Id: Ie2b3ce5b36a105a0e2fff52c3740cc9702ca3108
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2021-05-12 16:52:33 -05:00
Chris Kay 7fff6c70ed build(hooks): update Commitizen to ^4.2.4
An indirect dependency of Commitizen (`merge`) is currently failing the
NPM.js auditor due to vulnerability CVE-2020-28499. This commit moves
the minimum version of Commitizen to 4.2.4, which has resolved this
vulnerability.

Change-Id: Ia9455bdbe02f7406c1a106f173c4095943a201ed
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-05-12 15:43:56 +01:00
Olivier Deprez b5dd2422a0 docs: spm design document refresh
General refresh of the SPM document.

Change-Id: I2f8e37c3f34bc8511b115f00b9a53b6a6ff41bea
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
2021-05-12 15:45:27 +02:00
Davidson K ca9324819e feat(tc0): add support for trusted services
This patch adds support for the crypto and secure storage secure
partitions for the Total Compute platform.  These secure partitions
have to be managed by Hafnium executing at S-EL2

Change-Id: I2df690e3a99bf6bf50e2710994a905914a07026e
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
2021-05-10 18:39:37 +05:30
Madhukar Pappireddy b9a5706c07 docs(release): add change log for v2.5 release
Change log for trusted-firmware-a v2.5 release

Change-Id: I6ffc8a40d2cc3a18145b87f895acdc1400db485a
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2021-05-07 10:35:36 -05:00
Mark Dykes 57dde21207 Merge "fix(plat/arm_fpga): increase initrd size" into integration 2021-05-07 17:03:01 +02:00
Zelalem 0de60d31b8 docs: add threat model code owners
Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I97b2c5c5cfbf4ddb055d0f7a5ab04386460db060
2021-05-05 14:00:25 -05:00
Mark Dykes c51afaff0d Merge "docs: removing "upcoming" change log" into integration 2021-05-05 20:49:33 +02:00
laurenw-arm e3bb8666a3 docs: removing "upcoming" change log
Removing the "Upcoming" change log due to the change in change log
processing.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I6d2cc095dca3e654bd7e6fec2077c58bfbc48bb5
2021-05-05 12:08:45 -05:00
Andre Przywara c3ce73be0b fix(plat/arm_fpga): increase initrd size
In the comment in the ARM FPGA DT we promise a generous 100 MB initrd,
but actually describe only a size of 20 MB.

As initrds are the most common and easy userland option for the boards,
let's increase the maximum size to the advertised 100 MB, to avoid
unpacking errors when an initrd exceeds the current limit of 20 MB.

Change-Id: If08ba3fabdad27b2c2aff93b18c3f664728b4348
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-05-05 13:23:01 +01:00