Commit graph

13157 commits

Author SHA1 Message Date
Olivier Deprez
80c2c3742b Merge "fix(spmd): perform G0 interrupt acknowledge and deactivation" into integration 2023-07-19 12:50:06 +02:00
Sandrine Bailleux
799f42b515 Merge "refactor(tc): move all plat tests in test makefile" into integration 2023-07-19 07:55:59 +02:00
Sandrine Bailleux
80569faa84 Merge changes from topics "rotpk_rss_interface", "rss_interfaces" into integration
* changes:
  refactor(tc): print RSS interface test PSA status
  test(tc): test for AP/RSS interface for ROTPK
  feat(psa): interface with RSS for retrieving ROTPK
2023-07-18 18:09:15 +02:00
laurenw-arm
1ca5c887ba refactor(cpus): reorder Neoverse-N1 .S file
Moving neoverse_n1_disable_speculative_loads function before reset
function to maintain git blame with refactor to new framework.

Change-Id: I79a4de9955a6f37e289456a743b946c0c4c8c27f
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-07-18 10:49:23 -05:00
laurenw-arm
291bb2f4d0 refactor(cpus): convert Neoverse-E1 to framework
For E1, this involves replacing:
  - The reset_func with the standard cpu_reset_func_{start,end}
    to apply errata automatically
  - The <cpu>_errata_report with the errata_report_shim to
    report errata automatically
And for the E1 DSU erratum, creating symbolic names to the already
existing errata workaround functions to get them registered under
the Errata Framework.

Testing was conducted by:
  - Manual comparison of disassembly of converted functions with non-
    converted functions:

    aarch64-none-elf-objdump -D
    <trusted-firmware-a with conversion>/build/fvp/release/bl31/bl31.elf
      vs
    aarch64-none-elf-objdump -D
    <trusted-firmware-a clean repo>/build/fvp/release/bl31/bl31.elf

  - Build for debug with all errata enabled and step through ArmDS
    to ensure all functions are entered and the path remains the same
    as before conversion to the new framework.

Change-Id: I0a059574948badbd108333344286c76aeb142e71
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-07-18 10:47:57 -05:00
laurenw-arm
c5ce48f5a2 refactor(tc): move all plat tests in test makefile
Moving all PLATFORM_TESTS into platform test makefile

Change-Id: I31821e9e69d916d12ae4c804df26f07fb523c835
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-07-18 10:25:50 -05:00
Madhukar Pappireddy
6c91fc4458 fix(spmd): perform G0 interrupt acknowledge and deactivation
Prior to delegating handling of Group0 secure interrupt to platform
handler, SPMD framework must acknowledge the highest pending interrupt.
Moreover, once the platform has handled the interrupt successfully,
SPMD must deactivate the interrupt.

The rationale behind this decision is SPMD framework is well suited to
perform interrupt management at GIC boundary while the platform handler
is well equipped to deal with the device interface related to the
interrupt.

This patch also fixes a bug in the error code returned upon invocation
of FFA_EL3_INTR_HANDLE from normal world.

Change-Id: If8fef51899e25f966038cc01ec58c84ee25e88eb
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-07-17 13:35:43 -05:00
Manish Pandey
a2d4363791 Merge changes from topic "bk/context_refactor" into integration
* changes:
  refactor(amu): separate the EL2 and EL3 enablement code
  refactor(cpufeat): separate the EL2 and EL3 enablement code
2023-07-17 18:55:52 +02:00
laurenw-arm
cb6b750505 refactor(tc): print RSS interface test PSA status
Adding PSA status to print statement upon failing communication
initialization, non-volatile counter, and rotpk read interface calls in
platform_tests.

Change-Id: Ia949cc2d18e93efb68f663d0c4e5500ca9021a94
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-07-17 11:53:44 -05:00
laurenw-arm
00b7e0bfaf test(tc): test for AP/RSS interface for ROTPK
Adding new test for AP/RSS interface for reading ROTPK for
each 3 types of ROTPKs for: CCA, secure, and non-secure firmware.

Enabled by PLATFORM_TEST=rss-rotpk.

Update to print output when AP/RSS interface platform tests
pass to be able to reuse expect script functionality in CI.

Change-Id: Icc50b090e18a272378751fda104d209738b5b70c
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-07-17 11:51:48 -05:00
Manish Pandey
5dbb812ebd Merge "docs: move common build option from Arm-specific to common file" into integration 2023-07-17 15:48:20 +02:00
laurenw-arm
50316e226f feat(psa): interface with RSS for retrieving ROTPK
Adding the AP/RSS interface for reading the ROTPK.

The read interface implements the psa_call:
psa_call(RSS_CRYPTO_HANDLE, PSA_IPC_CALL,
         in_vec, IOVEC_LEN(in_vec),
         out_vec,  IOVEC_LEN(out_vec));

where the in_vec indicates which of the 3 ROTPKs we want,
and the out_vec stores the ROTPK value we get back from RSS.

Through this service, we will be able to read any of the 3
ROTPKs used on a CCA platform:
- ROTPK for CCA firmware (BL2, BL31, RMM).
- ROTPK for secure firmware.
- ROTPK for non-secure firmware.

Change-Id: I44c615588235cc797fdf38870b74b4c422be0a72
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-07-14 14:04:31 -05:00
Manish Pandey
94e27bc1ae Merge "feat(libc): add %X to printf/snprintf" into integration 2023-07-14 17:30:13 +02:00
Manish Pandey
71d4aa6144 Merge "feat(mt8188): modify APU DAPC permission" into integration 2023-07-14 17:29:08 +02:00
Manish Pandey
b8b1c1f551 Merge changes from topic "xlnx_dtb_modification" into integration
* changes:
  feat(versal-net): ddr address reservation in dtb at runtime
  feat(versal): ddr address reservation in dtb at runtime
2023-07-14 17:27:42 +02:00
Rob Hughes
e3795354d6 chore(ethos-n): update npu firmware version
A newer version of the Arm(R) Ethos(TM)-N NPU firmware is now available,
and so the constants in the SiP service need updating.

Change-Id: I8eee7d543bac0a726c6161a16b3df90609f6b443
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
2023-07-14 15:24:18 +01:00
Manish V Badarkhe
abd11ce7a2 Merge "fix(xlat): fix defects on the xlat library reported by coverity scan" into integration 2023-07-14 11:49:56 +02:00
Chungying Lu
d06edabfd1 feat(mt8188): modify APU DAPC permission
We limited the r/w permission of some register groups for security
concerns. These regitser groups should not be accessed by domain 3 or
domain 5.

Change-Id: I2188da88d9e10a931d87bda14dc7dca46633dcd8
Signed-off-by: Chungying Lu <chungying.lu@mediatek.corp-partner.google.com>
2023-07-14 13:54:52 +08:00
Matt Schulte
483edc207a feat(libc): add %X to printf/snprintf
Enables printing captial hex chars as well as lowercase

Change-Id: I4dc48c3db97b908f0bb344d7765807967de8cf02
Signed-off-by: Matt Schulte <matsch@google.com>
2023-07-13 13:37:38 -07:00
Javier Almansa Sobrino
2974ad87b8 fix(xlat): fix defects on the xlat library reported by coverity scan
The coverity defects fixed by this patch is

** CID 394601:  Integer handling issues  (NO_EFFECT)
/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c: 30 in
xlat_arch_is_granule_size_supported()

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: Ibc8e20bd7318a52702fbd7aa86e22cd2ded42610
2023-07-13 16:36:33 +01:00
Bipin Ravi
2503c8f320 Merge "build(fpga): remove a710 from fpga build" into integration 2023-07-13 16:45:54 +02:00
Sandrine Bailleux
9b81d117ba Merge changes from topic "master" into integration
* changes:
  fix(tc): rename macro to match PSA spec
  fix(tc): Correct return type
2023-07-13 10:15:51 +02:00
Amit Nagal
46a08aab4c feat(versal-net): ddr address reservation in dtb at runtime
When the TF-A is placed in DDR memory range, the DDR memory range
needs to be explicitly reserved in the default device tree.

A new build time parameter, XILINX_OF_BOARD_DTB_ADDR, is introduced.
The TF-A will reserve the DDR memory only when a valid DTB address
is provided to XILINX_OF_BOARD_DTB_ADDR during build.

Now the user has options, either manually reserve the desired DDR
address range for TF-A in device tree or let TF-A access and modify
the device tree, to reserve the DDR address range, in runtime using
the build parameter.

Change-Id: I45a5d9a8343ea8a19ea014a70023731de94d061a
Signed-off-by: Amit Nagal <amit.nagal@amd.com>
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-07-13 09:20:43 +05:30
Amit Nagal
56d1857efc feat(versal): ddr address reservation in dtb at runtime
When the TF-A is placed in DDR memory range, the DDR memory range
needs to be explicitly reserved in the default device tree.

A new build time parameter, XILINX_OF_BOARD_DTB_ADDR, is introduced.
The TF-A will reserve the DDR memory only when a valid DTB address
is provided to XILINX_OF_BOARD_DTB_ADDR during build.

Now the user has options, either manually reserve the desired DDR
address range for TF-A in device tree or let TF-A access and modify
the device tree, to reserve the DDR address range, in runtime using
the build parameter.

Change-Id: I4442a90e1cab5a3a115f4eeb8a7e09e247189ff0
Signed-off-by: Amit Nagal <amit.nagal@amd.com>
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-07-13 09:20:32 +05:30
Manish V Badarkhe
6e26ffc02a Merge "docs(morello): update the boot sequence according to the TBBR boot flow" into integration 2023-07-11 18:12:18 +02:00
Sandrine Bailleux
cd1838ccdc Merge "fix(intel): resolved coverity checking" into integration 2023-07-11 09:27:56 +02:00
Deepthi Peter
13fc020d1b docs(morello): update the boot sequence according to the TBBR boot flow
The boot sequence mentioned in the documentation referred to an older
boot flow. This patch updates the boot sequence to the TBBR boot flow
that is currently being followed.

Signed-off-by: Deepthi Peter <deepthi.peter@arm.com>
Change-Id: I183458cea6d43dcf8acba2e0422920ab5541fdfc
2023-07-11 10:44:46 +05:30
Madhukar Pappireddy
21fcd9f43c Merge changes from topic "psci-osi" into integration
* changes:
  fix(sc7280): update system suspend in OS-initiated mode
  fix(fvp): update system suspend in OS-initiated mode
2023-07-11 00:17:17 +02:00
Wing Li
0a9270abe8 fix(sc7280): update system suspend in OS-initiated mode
This patch fixes system suspend in OS-initiated mode by setting the
value of `last_at_pwrlvl` in the `psci_power_state_t` object to
`PLAT_MAX_PWR_LVL`, which otherwise would result in undefined behavior.

This is conditionally compiled into the build depending on the value of
the `PSCI_OS_INIT_MODE` build option.

Change-Id: Ib9ff606b7eebd8a8224891a0d239a4e13311fe2a
Signed-off-by: Wing Li <wingers@google.com>
2023-07-10 14:13:24 -07:00
Wing Li
e0ef05bb2c fix(fvp): update system suspend in OS-initiated mode
This patch fixes system suspend in OS-initiated mode by setting the
value of `last_at_pwrlvl` in the `psci_power_state_t` object to
`PLAT_MAX_PWR_LVL`, which otherwise would result in undefined behavior.

This is conditionally compiled into the build depending on the value of
the `PSCI_OS_INIT_MODE` build option.

Change-Id: Ia0fb1e68af9320370325642b17c4569e9580aa3a
Signed-off-by: Wing Li <wingers@google.com>
2023-07-10 14:13:24 -07:00
Lauren Wehrmeister
e2ca9af171 Merge changes from topic "kc/errata_refactor" into integration
* changes:
  refactor(cpus): convert the Cortex-A75 to use cpu helpers
  refactor(cpus): convert the Cortex-A75 to use the errata framework
2023-07-10 23:10:33 +02:00
Sieu Mun Tang
1af7bf71c0 fix(intel): resolved coverity checking
Coverity checking fix. Resolved unused value, deadcode and uninit.

	1. CID: 395326
	2. CID: 395327
	3. CID: 395328
	4. CID: 395329
	5. CID: 395330

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I86b8af28dc345542b142ce53e1935bb855888238
2023-07-11 00:06:19 +08:00
Sandrine Bailleux
1eb5e90341 Merge "fix(rcar): add mandatory fields in 'reserved-memory' node" into integration 2023-07-10 17:15:23 +02:00
Manish Pandey
49c7a26419 Merge changes from topic "mb/mb-design" into integration
* changes:
  docs: remove redundant Measured Boot interface info
  docs: add Measured Boot design
2023-07-10 14:03:12 +02:00
Govindraj Raja
bd596a1018 build(fpga): remove a710 from fpga build
Currently we have a large series of errata_refactor patches pending
and they are all failing on arm_fpga build when we add errata_framework.

Errata framework can cause the size to grow and thus causing build
failure on bl31 size. This as of today is blocking us from
merging most of our changes as it will introduce a CI failure.

As an workaround we try to just reduce the arm_fpga build by a710
platform, we have a715 and a720 which should be ok I think.

Once everyone are available for further discussion we could revert this
change back and discuss further whats the right approach.

Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Change-Id: I96a821e10aaecf04db7407fb2df38012839bfb94
2023-07-07 15:30:43 -05:00
Olivier Deprez
e318411f02 Merge "docs: add guidelines for abandoning patches" into integration 2023-07-07 12:10:48 +02:00
Manish Pandey
3393060cfd Merge changes from topic "agilex5" into integration
* changes:
  feat(intel): platform enablement for Agilex5 SoC FPGA
  feat(intel): ccu driver for Agilex5 SoC FPGA
  feat(intel): vab support for Agilex5 SoC FPGA
  feat(intel): sdmmc/nand/combo-phy/qspi driver for Agilex5 SoC FPGA
  feat(intel): ddr driver for Agilex5 SoC FPGA
  feat(intel): power manager for Agilex5 SoC FPGA
  feat(intel): cold/warm reset and smp support for Agilex5 SoC FPGA
  feat(intel): reset manager support for Agilex5 SoC FPGA
  feat(intel): mailbox and SMC support for Agilex5 SoC FPGA
  feat(intel): system manager support for Agilex5 SoC FPGA
  feat(intel): memory controller support for Agilex5 SoC FPGA
  feat(intel): clock manager support for Agilex5 SoC FPGA
  feat(intel): mmc support for Agilex5 SoC FPGA
  feat(intel): uart support for Agilex5 SoC FPGA
  feat(intel): pinmux, peripheral and Handoff support for Agilex5 SoC FPGA
2023-07-06 20:44:43 +02:00
Manish Pandey
0e74b661ad Merge changes from topic "imx93_basic_support" into integration
* changes:
  docs(imx9): add imx93 platform
  feat(imx93): add OPTEE support
  feat(imx93): protect OPTEE memory to secure access only
  feat(imx93): add cpuidle and basic suspend support
  feat(imx93): add reset & poweroff support
  feat(imx93): allow SoC masters access to system TCM
  feat(imx93): update the ocram trdc config for did10
  feat(imx93): add the basic support
  feat(imx93): add the trdc driver
  build(changelog): add new scopes for nxp imx platform
2023-07-06 15:52:21 +02:00
Manish Pandey
7459932168 Merge "feat(qemu): add "neoverse-v1" cpu support" into integration 2023-07-06 15:39:24 +02:00
Manish V Badarkhe
a1c93550bc docs: remove redundant Measured Boot interface info
A separate design document for Measured Boot covers the porting
guidelines for the Measured Boot interfaces. As a result,
the Measured Boot interfaces have been removed from the porting
guide and a link to the Measured Boot design document has been
provided.

Change-Id: Ia6bd2620d830aea6aececab4af7e10a6d737f025
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-06 12:14:38 +01:00
Manish V Badarkhe
5038f1f90e docs: add Measured Boot design
Added design document for Measured Boot implementation in
TF-A.

Change-Id: I25b57ec555b289eb6bbf0a6aae014d7bf6d152fd
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-06 12:14:30 +01:00
Manish V Badarkhe
8671000ff7 docs: add guidelines for abandoning patches
The code review guidelines have been updated to explain when
patches that do not receive a response to the review comments
will be abandoned.

Change-Id: I60539e16ca41245cf1b352f24557be1b3c67c367
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-06 11:20:28 +01:00
Manish V Badarkhe
2f3780e359 Merge "feat(build): march option selection" into integration 2023-07-06 11:14:13 +02:00
Sandrine Bailleux
da36a23270 Merge changes from topic "mb/mb-rss-refactor" into integration
* changes:
  refactor(tc): update RSS driver inteface calls
  refactor(fvp): update RSS driver inteface calls
  refactor(rss): make RSS driver standalone for Measured Boot
2023-07-06 08:41:43 +02:00
Jimmy Brisson
1fc20d7f52 fix(tc): rename macro to match PSA spec
Update 'PSA_INITIAL_ATTEST_TOKEN_MAX_SIZE' to
'PSA_INITIAL_ATTEST_MAX_TOKEN_SIZE' which is defined
in the PSA Certified Attestation API spec.

Change-Id: I5837fea552e6fe18a203412eb90d41e2f90ad6f1
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
2023-07-05 10:37:13 -05:00
Jimmy Brisson
b0542b58ca fix(tc): Correct return type
The fact that this was void instead of int, as required, caused
the test-running code to assume that the tests always failed.

Fixing the return type fixes the always-tests-failing bug.

Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
Change-Id: Ief55fe15c437c87dac1d03419a8e148f5d864b8d
2023-07-05 10:37:13 -05:00
Olivier Deprez
0e04a20170 Merge "build(tools): avoid unnecessary link" into integration 2023-07-05 14:50:04 +02:00
Vincent Stehlé
aa57ce632c build(tools): avoid unnecessary link
In their respective makefiles, cert_create, encrypt_fw and fiptool
depend on the --openssl phony target as a prerequisite. This forces
those tools to be re-linked each time.

Move the dependencies on the --openssl target from the tools to their
makefiles all targets, to avoid unnecessary linking while preserving the
OpenSSL version printing done in the --openssl targets when in debug.

Fixes: cf2dd17ddd ("refactor(security): add OpenSSL 1.x compatibility")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Change-Id: I98a3ab30f36dffc253cecaaf3a57d2712522135d
2023-07-05 13:00:18 +02:00
Manish V Badarkhe
e69400cfa6 Merge "feat(morello): fdts: add CoreSight DeviceTree bindings" into integration 2023-07-05 12:02:27 +02:00
Manish V Badarkhe
3c283af56d Merge "fix(n1sdp): configure platform specific secure SPIs" into integration 2023-07-05 12:00:33 +02:00