1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-12 03:10:15 +00:00
Commit Graph

2702 Commits

Author SHA1 Message Date
Jon Mason
feb539589c ci/selftest: remove rm_work
oe-selftest is now logging having rm_work enabled as an error, which is
causing the test to fail.  Remove this from the selftest.yml file, and
everything works as before.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-11 09:00:04 -04:00
Harsimran Singh Tungal
a059fc317f arm-bsp: corstone1000: Upgrade Trusted-Firmware-M v2.2.1
The move to Trusted-Firmware-M v2.2.1 makes the BL1 code larger,
while the provisioning bundle can be trimmed.  At the same time BL2 and
TF-M binary addresses now need to begin on a 0x100-byte boundary for
Cortex-M0+ based platforms.

Key changes
--------------------------------
- Upgrade Trusted-Firmware-M v2.2.1 for Corstone-1000
- New crypto driver supports ECC instead of RSA.
- Rebase patches
- Add new patches to address the following changes for v2.2.1
   - Increase `BL1_1_CODE_SIZE` to 58KB to accommodate the v2.2.1 binaries.
   - Reduce `PROVISIONING_DATA_SIZE` to 6KB.
   - `BL2_CODE_START` and `S_CODE_START` are aligned to 0x100 byte boundary
      so both start addresses are an exact multiple of 0x100.
   - Adapt ADAC enabled build to the new BL2 build restructure.

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-10 09:00:06 -04:00
Harsimran Singh Tungal
c7581dfab2 arm/trusted-firmware-m: Add alignment checks for Cortex-M0+ based platform binaries
Include patch to add relevant checks in GCC linker scripts to validate if the
BL2 and Trusted-Firmware-M binary addresses are aligned to 0x100 byte boundary
for Cortex-M0+ based platforms.

This is required because:
For Cortex-M0+ VTOR: 256-byte vector table is at the offset 0x00 of the image.
To keep that table in one block, the image base must be a multiple of 0x100.
For reference: https://developer.arm.com/documentation/ddi0419/latest/

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-10 09:00:06 -04:00
Harsimran Singh Tungal
5a34655c1c arm/trusted-firmware-m: Add new recipe for Trusted-Firmware-M v2.2.1
Key Changes:
- Add new recipe for Trusted-Firmware-M v2.2.1

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-10 09:00:06 -04:00
Ross Burton
b6997921b4 arm-bsp/juno: add coresight MACHINE_FEATURE
The Juno board supports Arm CoreSight, so add it to MACHINE_FEATURES.

This is useful because oe-core's perf recipe will now enable coresight
support automatically if this feature is present[1].

[1] oe-core c455bd03910 ("perf: enable coresight if enabled in MACHINE_FEATURES")

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-10 06:00:06 -04:00
Ross Burton
177ccfdcd3 arm-bsp/corstone1000: add coresight MACHINE_FEATURE
The Corstone1000 supports Arm CoreSight, so add it to MACHINE_FEATURES.
Note that currently the FVP model doesn't support this[1] so we only
enable it for MPS3.

This is useful because oe-core's perf recipe will now enable coresight
support automatically if this feature is present[1].

[1] https://developer.arm.com/documentation/100966/1128/Arm--Corstone-1000-FVP/Corstone-1000-FVP-modeled-components
[2] oe-core c455bd03910 ("perf: enable coresight if enabled in MACHINE_FEATURES")

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-10 06:00:06 -04:00
Ross Burton
56f84d176c CI: no need to configure coresight explicitly
The oe-core perf recipe will now enable coresight support automatically
if the coresight MACHINE_FEATURE is set[1], so we can remove the manual
configuration in our CI and let the machines enable it where appropriate.

[1] oe-core c455bd03910 ("perf: enable coresight if enabled in MACHINE_FEATURES")

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-10 06:00:06 -04:00
Ross Burton
7e193e9813 arm-bsp/corstone1000: update for wic renaming --extra-space
wic in oe-core has renamed --extra-space to --extra-filesystem-space[1],
so update the workaround here.

[1] oe-core 39d10137b86 ("wic: rename wks flag --extra-space to --extra-filesystem-space")

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-09 10:00:03 -04:00
Jon Mason
90b2ef142b arm/oeqa/optee.py: only run regression tests on qemu machines
The OP-TEE default tests are taking over 30 minutes, which is causing CI
to overall take several hours.  For QEMU machines, reduce the tests to
just be the regression tests, which reduces the CI time by over 30%.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-08 10:00:03 -04:00
Ross Burton
7d60c67ad7 CI: align with Poky
Originally we customised the CI build for speed, by switching to ipkg
instead of rpm for the packages and disabling graphical output support
in qemu-system-native.

These are admirable goals, but more admirable is sharing sstate and
people may wish to use the output of this CI without having to make the
same alterations.

Drop these two changes so that our configuration matches poky. I've
verified that with this change, a build of core-image-sato for qemuarm64
can be built almost entirely from the autobuilder's sstate[1].

[1] gator-daemon, opencsd, and perf are built as these are not built on
    the AB in this configuration.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-04 13:20:49 -04:00
Ross Burton
5fae879140 CI: move network test skips to fvp.yml
testimage.yml was skipping the opkg tests, but we also need to skip the
dnf tests for when PACKAGE_CLASSES="package_rpm".

These skips are FVP-specific as they are due to the wrong IP being used
by the test suite. This should be fixed in the FVP test harness, but
for now move the exclusions into fvp.yml so they're isolated.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-04 13:20:49 -04:00
Clement Faure
1f78fab70a arm-bsp/u-boot: corstone1000: enable OF_UPSTREAM device tree support
Enable OF_UPSTREAM support for the corstone1000 platforms in U-Boot.

This patchset enables OF_UPSTREAM device tree support in U-Boot for the
corstone1000 platforms. This allows U-Boot to build using upstream
Linux kernel device tree sources instead of downstream copies.

The following changes are introduced:
- Enable OF_UPSTREAM to support upstream device tree.
- Update DEVICE_TREE naming with "arm/" prefix.
- Add device tree overlay to retain U-Boot specific device tree
nodes.
- Remove legacy device trees for corstone1000.

Signed-off-by: Clement Faure <clement.faure@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-09-01 13:00:04 -04:00
Andrey Zhizhikin
84b96041d3 arm/arm-bsp: optee: upgrade to 4.7.0
OP-TEE version 4.7.0 has been released on 2025-07-11 [1], and includes fixes
that are currently collected as separate patches in the layer collection.

Upgrade OP-TEE recipes to point to version 4.7.0, and drop patches from layers
as they are already present in upstream.

Clang patch in `optee-os` package was completely removed. Upstream logic was
changed in PR #7382 [2], making this patch obsolete.

CVE-2025-46733 in `optee-ftpm` package is now properly tagged and included in
4.7.0 version as well.

One patch that is still kept in the layer is
optee-client/0001-tee-supplicant-update-udev-systemd-install-code.patch, as it
has been merged after 4.7.0 tag was applied, but already present in upstream as
commit 59b90488e93e ("tee-supplicant: update udev & systemd install code").
Further updates shall consider to drop this as well.

In addition, point corestone1000 machine to a new version, as 4.6.0 is dropped
from the layer. TZDRAM patch is also dropped as it is now present in upstream.

Link: [1]: https://github.com/OP-TEE/optee_os/blob/master/CHANGELOG.md#op-tee---version-470-2025-07-11
Link: [2]: https://github.com/OP-TEE/optee_os/pull/7382
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-26 12:00:06 -04:00
Jon Mason
c68907c4f5 arm/optee-os: remove CFG_CORE_BTI from EXTRA_OEMAKE
commit a3a2c49b21 corrected a typo that
was preventing arm-branch-protection flags from being enabled.  However,
since making this change, fvp-base with trusted services enabled no
longer boots.  However, the flag that seems to be the problem on fvp
base is CFG_TA_BTI.  Since this is the only use case for
arm-branch-protection machine feature, remove it from the common file
until this issue can be properly sorted.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-22 09:23:26 -04:00
Jon Mason
1be16ea62c arm-bsp/fvp-base: remove console workaround
Remove the KERNEL_CONSOLE workaround, as that has now been upstreamed
should should no longer be needed.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-22 09:23:26 -04:00
Jon Mason
4a46844fe2 arm/arch-armv9*: Fix PACKAGE_EXTRA_ARCHS reference
PACKAGE_EXTRA_ARCHS references armv8 instead of armv9

Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-22 09:23:26 -04:00
Jon Mason
6ec4a039a3 arm/gn: update to the latest SHA
Update gn to the latest SHA (commit from 08 Aug 2025).  There are 66
commits between the previous SHA and the new one.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-20 13:00:10 -04:00
Jon Mason
d8f0ab517b arm/gn: disable uninitialized variable warning
An uninitialized variable warning is occurring when compiling gn.
However, since Wall is being used in gn, this is being logged as an
error.  Pass the no-error flag for this case to workaround this issue.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-20 13:00:10 -04:00
Norbert Kocsis
9e6671a222 arm/trusted-services: Fix trusted-service license file paths
Use UNPACKDIR instead of relative paths.

Signed-off-by: Norbert Kocsis <norbert.kocsis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-19 10:00:03 -04:00
Michael Safwat
8d38f57623 arm-bsp/trusted-firmware-m: corstone1000: Update the patches upstream status
These patches upstream status changed to Backport:
0006-platform-CS1000-Add-multicore-support-for-FVP.patch
0009-CC312-ADAC-Add-PSA_WANT_ALG_SHA_256-definition.patch
0010-Platform-CS1000-Add-crypto-configs-for-ADAC.patch
0012-Platform-CS1000-Remove-unused-BL1-files.patch
0013-Platform-CS1000-Fix-compiler-switch-in-BL1.patch
0017-Platform-CS1000-Enable-FWU-partition.patch
0018-Platform-Corstone1000-Implement-Bootloader-Abstracti.patch
0019-Platform-Corstone1000-Increase-buffer-sizes.patch
0023-Platform-CS1000-Remove-duplicate-configuration-parameters.patch

And from the PSA-ADAC,
This patch upstream status changed to Backport:
0002-ADAC-Link-psa_interface-instead-of-tfm_sprt.patch

This patch upstream status changed to Inappropriate:
0003-Fix-psa_key_handle_t-initialization.patch
Reason: mbedcrypto configs have to be fixed to build secure-debug mps3
without this patch

Signed-off-by: Michael Safwat <michael.safwat@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-13 06:00:04 -04:00
Peter Hoyes
60c7910b41 arm/classes: Fix IMAGE_POSTPROCESS_COMMAND in fvpboot
Since OE-core 6fd8af0d, the semicolon delimeter in bb.build_exec_func
variables is not needed. The commit silently removes any stray ';' but
failed to handle ';' when assigning to vardeps.

In meta-arm, this has the effect of changes to FVP_* variables not being
picked up when rebuilding the image recipe since mickledore.

This is ancient history now, so just remove the semicolon to fix the
variable dependency issue when using fvpboot in meta-arm.

Signed-off-by: Peter Hoyes <peter.hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-13 05:00:07 -04:00
Ross Burton
a3a2c49b21 arm/optee-so: fix typo in EXTRA_OEMAKE
This recipe was using EXTREA_OEMAKE to enable BTI, fix the typo.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-05 13:21:30 -04:00
Ross Burton
90ab7aee89 arm/optee: the build uses lld if using clang
The OP-TEE suite of packages use lld if the compiler is clang, so now
that the lld recipe has been split out of the clang recipe we need to
depend on both.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-05 13:21:30 -04:00
Ross Burton
7b198c3ab7 arm/hafnium: don't exclude from world builds
Clang is large but this recipe builds on all hosts now, so we don't need
to exclude it.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-05 13:21:30 -04:00
Ross Burton
d1237205a0 arm/hafnium: clean up inherits
This doesn't use pkgconfig, or python3native, or need to inherit clang.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-05 13:21:30 -04:00
Ross Burton
37b49e7588 arm/hafnium: depend on lld-native
The build explicitly uses lld, so now that it has been split out of the
clang recipe we need to also depend on that.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-05 13:21:30 -04:00
Ross Burton
d5bdaf37c0 arm/hafnium: mark compatible with just qemuarm64-secureboot
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-05 13:21:30 -04:00
Christophe Thiblot
4c0b54632a arm-bsp/trusted-firmware-a: exclude boot requirement test for Corstone-1000
A test compares the value of the Generic Timer register CNTFRQ visible in
two frames CNTBaseN and CNTCTLBase that are linked in Armv8-A and reflect
the same value.

An issue in Corstone-1000 (errata 2142118) makes the CNTFRQ views
inconsistents and the then test fails. There is no workaround and
the test is skipped.

Errata: https://developer.arm.com/documentation/sden2142076/0002/?lang=en
Signed-off-by: Christophe Thiblot <christophe.thiblot@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-05 13:20:54 -04:00
Ross Burton
0eb59c7caf arm-bsp/u-boot: add a U-Boot 2025.04 recipe for Corstone1000
Until Corstone1000 can be updated to use 2025.07, keep an older release
of u-boot in meta-arm-bsp for it to use.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-05 13:20:27 -04:00
Ross Burton
7cf518c036 arm-bsp/u-boot: remove version 2023.07.02
The use of 2023.07.02 was removed in meta-arm e29c0ee70a
("arm-bsp/u-boot: corstone1000: Add PSA Firmware Update support (DEN0118
v1.0A)").

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-08-05 13:20:27 -04:00
Jon Mason
358b52f03b arm-bsp/u-boot: update patches for v2025.07
Update the FVP base u-boot patches to apply cleanly to u-boot v2025.07.
Also, use a config fragment to change the default boot command to boot
virtio image.  This works around some changes in
include/configs/vexpress_aemv8.h that change the boot behavior, which is
not something we're using anyway.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-31 15:00:04 -04:00
Hugues KAMBA MPIANA
5c5afac7b9 arm-bsp/documentation: corstone1000: Revamp user guide Capsule Update test section
- Rename "negative capsule update test" to "rollback capsule update test"
- Replace U-Boot mkeficapsule with EDK II GenerateCapsule workflow
- Add JSON-driven helper script example (generate_capsule_json_multiple.py)
- Document multi-payload support (BL2, TFM_S, FIP, INITRAMFS)

Signed-off-by: Hugues KAMBA MPIANA <hugues.kambampiana@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-31 13:00:06 -04:00
Harsimran Singh Tungal
cb314932a1 arm-bsp/doc: corstone1000: Update architecture document with new PSA FWU implementation details
Update the architecture documentation for Corstone-1000 to include
details about the new PSA Firmware Update (FWU) implementation.

The new section describes the bootloader abstraction layer (BAL),
UEFI capsule update flow, FWU metadata handling, and the integration
between TF-M and U-Boot for managing trial and accepted images.

This documentation helps align the platform with PSA FWU requirements

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Ali Can Ozaslan
e2575355d9 arm/edk2-basetools-native: WORKDIR fix
Upstream has removed the need to explicitly set S = "${WORKDIR}/git",
and now defaults to S = "${UNPACKDIR}". As a result, directly referencing
${WORKDIR}/git will fail when the source is unpacked elsewhere.

Update do_install() to use ${S}/BaseTools instead of the hardcoded path.

This issue was previously unnoticed as EDK2 tools (e.g. GenerateCapsule)
were not being used in the build path at the time of the earlier refactor
(commit eea74860).

Signed-off-by: Ali Can Ozaslan <ali.oezaslan@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Abdellatif El Khlifi
926ebd3b77 arm-bsp/u-boot: corstone1000: Add rebased features patches
Add rebased patches on U-Boot v2025.04

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Abdellatif El Khlifi
e29c0ee70a arm-bsp/u-boot: corstone1000: Add PSA Firmware Update support (DEN0118 v1.0A)
Add PSA FWU support on U-Boot v2025.04

Introduce Platform Security Architecture (PSA) Firmware Update (FWU) support to
U-Boot v2025.04 on the Corstone-1000 reference design. This implements the
Arm DEN0118 v1.0A specification and provides a generic, upstreamable FWU
framework for reuse across other Arm platforms.

Design overview:

Client/Runner: U-Boot parses the capsule and  executes the FWU state machine.

Update agent: Secure world handles flash writes and metadata updates.

Key features:

- Capsule-based firmware updates with support for multiple payloads
- On-disk capsule handling (ESP-based update)
- Optional image acceptance at ExitBootServices()
- ESRT (EFI System Resource Table) support
- FFA_MEM_SHARE and FFA_MEM_RECLAIM ABI support
- FWU enabled for the Corstone-1000 platform

[1]: Platform Security Firmware Update for the A-profile Arm Architecture,
    https://developer.arm.com/documentation/den0118/latest/

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Harsimran Singh Tungal
1cd5433f62 arm-bsp/trusted-firmware-m: corstone1000: Remove patches for old capsule update implementation
This commit removes the outdated patches of capsule update implementation for the Corstone-1000
platform targeting Trusted-Firmware-M (TF-M). The changes include the removal of
obsolete out-of-tree patches and the rebase of retained patches to align with the
latest upstream TF-M integration.

Key changes:
- Dropped legacy TF-M patches related to old capsule update flow
- Rebasing of remaining TF-M patches for compatibility with current TF-M baseline

This cleanup streamlines the TF-M integration for Corstone-1000 in preparation for
the updated PSA Firmware Update (FWU) aligned capsule update support.

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Harsimran Singh Tungal
b7e0e4c566 arm-bsp/trusted-services: corstone-1000: Remove old capsule update implementation
This change removes the obsolete out-of-tree patches and legacy support related
to the old capsule update mechanism for the Corstone-1000 platform.
The Trusted-Services components are now aligned with the upstream implementation,
and outdated patches have been dropped or rebased as necessary.

- Removed deprecated patches targeting old capsule update logic
- Rebasing of remaining patches to ensure compatibility with updated TS interface

This prepares the platform for the new PSA FWU-based capsule update path and
reduces technical debt in Trusted-Services integration.

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Ali Can Ozaslan
0112cd479b arm-bsp/corstone1000: Support multi-payload capsule generation
- Add 'CAPSULE_SELECTED_COMPONENTS' to enable filtering of firmware
  components during capsule generation. Only components listed in
  'CAPSULE_SELECTED_COMPONENTS' will be included in the final capsule
  image.

- Introduce CAPSULE_EXTRA_ARGS to allow passing additional arguments.
  '--capflag PersistAcrossReset' to retain capsule across reboots.

- Payload selection is now controlled via the KAS YAML configuration
  (corstone1000-image-configuration.yml), allowing per-image control
  over which firmware components are included.

- With the introduction of multiple payload support, 'CAPSULE_VERSION'
  no longer represents the firmware version itself but is instead
  used for naming the capsule and assigning a common version to all
  payloads to simplify testing.

- Use EDK2 tool to switch from single FMP capsule generation to multiple
  FMP capsules using a JSON-based configuration. This removes the need
  for manually combining firmware images into a .nopt image.

- Remove legacy nopt image creation logic, as each firmware binary is
  now handled individually. Components no longer need to be merged.
  Deploy task was removed with nopt logic.

- Generate dummy.bin for EDK2 tool compatibility. EDK2 requires
  at least one input file for each payload.

- Added dependency on  to  to ensure images are signed before capsule
  generation.

- Add CAPSULE_LOWEST_SUPPORTED_VERSION to
  corstone1000-image-configuration.yml.It in the same file where
  the firmware version (FW_VERSION) is defined, ensuring a unified
  location for version-related metadata. This value was chosen to
  be equal to the firmware version to represent a downgrade
  scenario (from version 6 to version 5) during testing.

- CAPSULE_HARDWARE_INSTANCE is set to "1" by default (instead of 0),
  indicating the first hardware.

Signed-off-by: Ali Can Ozaslan <ali.oezaslan@arm.com>
Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Ali Can Ozaslan
c68fedfbea arm/uefi_capsule: Switch Capsule generation tool from U-Boot to EDK2
This commit updates the uefi_capsule.bbclass to use the EDK2
GenerateCapsule tool instead of the mkeficapsule utility from U-Boot.

The switch was necessary because the mkeficapsule utility from U-Boot
does not support generating capsules with multiple payloads, whereas
the EDK2 GenerateCapsule tool provides native support for multi-image
capsule creation.

These changes allow building UEFI capsules with multiple firmware
binaries in one step, making the firmware update process
more flexible.

- Switching dependency from u-boot-tools-native to
  edk2-basetools-native
- Updating the actual capsule creation command to GenerateCapsule
  with the appropriate flags (including hardware instance, lowest
  supported version, and monotonic count)
    * CAPSULE_HARDWARE_INSTANCE defines which hardware instance
      the capsule update is intended for. This can be set
          to "1" or "0" indicating the first hardware module or SoC.
          For systems with multiple modules, subsequent instances
          could be numbered 2, 3, etc.
    * CAPSULE_LOWEST_SUPPORTED_VERSION enables roll-back protection
      by specifying the minimum firmware version that the platform
      accepts. Any firmware update below this version will be
      rejected.It should be set 0, 1, 2, etc according to your
      firmware security and versioning requirements.
- Combining certificates into the private key file as required
  by GenerateCapsule

- Add support for multiple firmware payloads
  This update refactors the capsule generation process to support
  multiple firmware binaries instead of a single payload.
  Key changes include:

- Integration of a JSON generator script to define multiple payloads
- Add default path for JSON config generator and prepare
  test infrastructure.
- Introduction of new variables
    * CAPSULE_ALL_COMPONENTS:  of all available components
    to be included in the capsule generation process.
    * CAPSULE_SELECTED_COMPONENTS: Subset of components from
    CAPSULE_ALL_COMPONENTS that should actually be included
    in the final capsule image.
- Replacement of direct GenerateCapsule arguments with JSON input
- Allow passing custom arguments to GenerateCapsule via
  `CAPSULE_EXTRA_ARGS` variable
- Cleanup of temporary files used in the capsule generation process

These changes align with EDK2's flexible capsule format and enable
component level filtering for more advanced firmware update scenarios.

Signed-off-by: Ali Can Ozaslan <ali.oezaslan@arm.com>
Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Harsimran Singh Tungal
5d481fd065 arm-bsp/trusted-services: corstone1000: PSA FWU implementation
This commit implement the required changes in Trusted-Services in order
to incorporate PSA FWU implementation. It involves the following changes:

1. Integrate IPC framework for PSA FWU calls between Cortex-A and Cortex-M subsystems.
IPC framework is required to bridge the PSA FWU calls for the platforms which have
both Cortex-A and Cortex-M subsystems. Corstone-1000 falls under this category of
platforms. In these platforms, the PSA FWU client and PSA FWU provider exist on
Cortex-A and all the PSA FWU services are implemented on Cortex-M side. This IPC
framework forwards the PSA FWU calls from Cortex-A to Cortex-M subsystem.

2. Load initial image state in PSA FWU M update agent
Set initial image state based on the image state returned by
psa_fwu_query. This way the update agent has the correct view of images
after reboot and it can accept or reject them.

3. Define PSA FWU image mapping structure.
Define PSA FWU image mapping structure for Corstone-1000.
This structure is responsible to map specific image guid with
component number.
To enable platform-specific handling, service_proxy_factory.c now
conditionally selects the appropriate image mapping
based on PLATFORM_IS_FVP. This ensures that both FVP and MPS3
platforms use the correct GUID and firmware update configuration.

4. Fix PSA FWU IPC psa_fwu_install() return value check
This change adds support to validate if the return type in psa_fwu_install()
is either PSA_SUCCESS or PSA_SUCCESS_REBOOT. Both the return values are expected.
Earlier, only PSA_SUCCESS is validated.

5. Add ESRT support
Add ESRT support for PSA FWU M agent.
ESRT functionality is implemented using unique image dedicated
for ESRT data having its own UUID. In PSA FWU M agent's context,
this image has read only attributes. The ESRT data can be read
using image_read_directory by using ESRT image UUID handle. The
ESRT data is queried from Secure Enclave using psa_fwu_query()
and ESRT data can be read from psa_fwu_impl_info_t structure
object defined in psa_fwu_component_info_t.

This commit includes the following changes:
1. Declare ESRT data structures.
2. Modify image_directory_read() to include ESRT data read support
3. Modify psa_fwu_m_update_agent_init to initialize ESRT image
attributes

6. Enable ESRT support
Enable ESRT support for Corstone-1000.
Introduce ESRT image UUID and its component number and
set TFM_FWU_MAX_DIGEST_SIZE to ESRT data size.

7. Add event provider proxy
Normal world needs to send boot confirmation event
to Secure Enclave and Trusted-Services is responsible
to transfer the event to Secure Enclave.
This commit implements the event handling framework in
SE-proxy-SP and develops event provider proxy which
forwards the event to Secure Enclave via psa calls.
This change is introduced for Corstone-1000

8. Define GUID for each payloads
Define GUID's for all the 4 payloads for FVP and
MPS3.

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Ali Can Ozaslan <ali.oezaslan@arm.com>
Signed-off-by: Imre Kis <imre.kis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Harsimran Singh Tungal
ce3ae66a06 arm-bsp: corstone1000: Add PLATFORM_IS_FVP toggle for FVP/FPGA builds
Introduces PLATFORM_IS_FVP to differentiate between FVP and FPGA builds.
Adds platform-specific CMake files for corstone1000-fvp and corstone1000-mps3,
and updates platform.cmake to use this toggle.

This commit also adds the TS_PLATFORM variable to corstone1000-fvp.conf
and corstone1000-mps3.conf, explicitly defining platform identifiers
for Trusted Services. This ensures a consistent and clear distinction
between the FVP and MPS3 builds within the build system.

These changes improve maintainability and platform-specific handling
by making it easier to reference the correct target platform
in configurations and scripts.

Signed-off-by: Ali Can Ozaslan <ali.oezaslan@arm.com>
Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Harsimran Singh Tungal
0f8a99a337 arm-bsp/trusted-firmware-m: corstone-1000: Increase PS_MAX_ASSET_SIZE and CRYPTO_IOVEC_BUFFER_SIZE for EFI variable support
Increase `PS_MAX_ASSET_SIZE` and `CRYPTO_IOVEC_BUFFER_SIZE` for the
Corstone-1000 platform to support large EFI variable storage required
by the UEFI firmware update flow and to pass Arm Architecture Compliance
Suite (ACS) tests.

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Ali Can Ozaslan
c486835b98 arm-bsp/trusted-firmware-m: corstone1000: Add Bootloader Abstraction Layer (BAL) support
Introduce Bootloader Abstraction Layer (BAL) support for Corstone-1000 to
enable flexible integration of firmware update including partial capsule
update.
This change includes:
- Enable the firmware update partition for Corstone-1000 and create
  placeholder bootloader abstraction layer for Corstone-1000.
- Change the insertion logic of TFM_FWU_BOOTLOADER_LIB to select a new
  platform-specific bootloader abstraction layer.
- Use the necessary flags to use the service and resolve any linker
  issues that may arise.
- Migration of capsule update logic to a new BAL module under
  `platform/ext/target/corstone1000/bootloader/mcuboot/`.
- Implementation of BAL APIs in `tfm_mcuboot_fwu.c` as per the PSA FWU
  state machine.
- Removal of `uefi_capsule_parser.c` and `uefi_capsule_parser.h` as capsule
  parsing is done in U-Boot.
- Enhancement of `uefi_fmp.c` to handle FMP metadata for multiple images.
- Update of `provisioning.c` and `security_cnt_bl2.c` to handle new BAL
  return values.
- Addition of `fwu_config.h.in` with default FWU configuration.
- Metadata layout changes to include size and image GUIDs for U-Boot
  compatibility during FWU Accept flow.

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Ali Can Ozaslan <ali.oezaslan@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Harsimran Singh Tungal
3a2cc58deb arm-bsp/trusted-firmware-m: corstone1000: Permit FWU calls in RSE-COMMS
Add support to permit FWU calls in RSE-COMMS Trusted-Firmware-M for Corstone-1000
This change is required to allow the transmission of PSA FWU related
calls between Cortex A and Cortex M side on Corstone-1000.
For every PSA call from A side, the RSE-COMMS at M side validates, if the
call is allowed or not.

Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 08:00:05 -04:00
Csaba Szilágyi
1e37608374 arm/hafnium: add hafnium to qemuarm64-secureboot target
Signed-off-by: Csaba Szilágyi <csaba.szilagyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 04:00:05 -04:00
Csaba Szilágyi
ed99303a7c arm/hafnium: Restore patch on gn visibility
This patch has been dropped in the following commit:
f1fc5c53 - arm/hafnium: update to v2.12.0

Unfortunately the original issue is still present and the
patch is required for the successful build. Patch is
restored in this commit.

Signed-off-by: Csaba Szilágyi <csaba.szilagyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 04:00:05 -04:00
Csaba Szilágyi
1a27790238 arm/hafnium: Remove deprecated patch for third_party/linux submodule
third_party/linux submodule has been removed from hafnium in the
following commit:
ddeedafa - chore: drop the third_party/linux submodule

Relevant patch can not be applied anymore. Patch is removed
from the recipe.

Signed-off-by: Csaba Szilágyi <csaba.szilagyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 04:00:05 -04:00
Csaba Szilágyi
6e934fbbcb arm/hafnium: Select valid platform for hafnium and properly pass to make
'qemu_aarch64' is not a valid hafnium platform. Supported platforms are:
* 'secure_rd_v3'
* 'secure_rd_v3_cfg1'
* 'secure_aem_v8a_fvp_vhe'
* 'aem_v8a_fvp_vhe'
* 'aem_v8a_fvp_vhe_ffa_v1_1'
* 'qemu_aarch64_vhe'
* 'secure_qemu_aarch64'
* 'rpi4'
* 'secure_tc'

Previusly selected 'qemu_aarch64' did not cause error because
it was NOT passed to make. It had no effect.

Within this commit, platform 'secure_qemu_aarch64' is selected
and passed to make.

Signed-off-by: Csaba Szilágyi <csaba.szilagyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 04:00:05 -04:00
Csaba Szilágyi
2e562a39d9 arm/hafnium: Depend on clang-native
hafnium is built by clang. Dependency is required for successful
build.

Signed-off-by: Csaba Szilágyi <csaba.szilagyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2025-07-30 04:00:05 -04:00