diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2024-04-13 00:51:14 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2024-04-13 01:10:08 +0300 |
commit | 44b3caf2214045a1492e7aa14e808ac6312930e1 (patch) | |
tree | bde7c89dc5680df7768224f05287625cfbcc79dc /meta-arm/meta-arm-bsp | |
parent | 03514f1996efa799e50da744818ba331c2e893b6 (diff) | |
download | openbmc-44b3caf2214045a1492e7aa14e808ac6312930e1.tar.xz |
subtree updates
poky: 110ee701b3..5950c63d54:
Alexander Kanavin (19):
ovmf: update 202308 -> 202402
attr: update 2.5.1 -> 2.5.2
dpkg: update 1.22.0 -> 1.22.5
gptfdisk: update 1.0.9 -> 1.0.10
icu: update 74-1 -> 74-2
go-helloworld: update to latest revision
libpam: update 1.5.3 -> 1.6.0
libtraceevent: update 1.7.3 -> 1.8.2
mdadm: update 4.2 -> 4.3
npth: update 1.6 -> 1.7
python3-lxml: update 5.0.0 -> 5.1.0
rpm: update 4.19.1 -> 4.19.1.1
ruby: update 3.2.2 -> 3.3.0
tcl: update 8.6.13 -> 8.6.14
texinfo: update 7.0.3 -> 7.1
waffle: update 1.7.2 -> 1.8.0
shadow: update 4.14.2 -> 4.15.0
meta/lib/oe/sstatesig.py: do not error out if sstate files fail on os.stat()
scripts/oe-setup-build: write a build environment initialization one-liner into the build directory
Bruce Ashfield (1):
perf: make bpf asm include arch conditional
Chen Qi (2):
ovmf: set CVE_STATUS for CVE-2014-8271
ovmf: set CVE_STATUS for a few CVEs
Denys Dmytriyenko (3):
mtd-utils: upgrade 2.1.6 -> 2.2.0
lzip: upgrade 1.24 -> 1.24.1
wayland-protocols: upgrade 1.33 -> 1.34
Harish Sadineni (1):
rust: set CVE_STATUS for CVE-2024-24576
Joao Marcos Costa (6):
classes: document new go-vendor class
migration updates for 5.0
release-notes updates for 5.0
ref-manual/variables: add new variables for v5.0
release-notes-5.0: add updates
release-notes-5.0: mention cmake-qemu.bbclass
Joe Slater (2):
init-ifupdown: modify interfaces for busybox
packagegroup-core-boot: recommend ifupdown
Jon Mason (4):
acpica: use github for SRC_URI
acpica: update to 20240322 release
yocto-bsp/linux-yocto-dev: add genericarm64
yocto-bsp/genericarm64: add virtio-gpu
Joshua Watt (1):
bitbake: siggen: Capture SSL environment for hashserver
Julien Stephan (1):
devtool: standard: throws appropriate error if source is in detached HEAD
Jörg Sommer (1):
kernel-dev: join mkdir commands with -p
K Sanjay Nayak (1):
xorg-xserver-config: Disable screen blanking for qemu images
Khem Raj (5):
llvm: Upgrade to 18.1.3 bugfix release
sanity: Use diff instead of meld by default
libseccomp: Fix build when python packageconfig is enabled
linux-yocto: Enable nft modules for ptest images
mdadm: Fix build with new musl
Lee Chee Yang (2):
release-notes-4.0.17: reorder CVEs
migration-guides: add release notes for 4.3.4
Max Krummenacher (1):
perf: add asm include required for v6.9+
Michael Haener (1):
iproute2: add bridge package
Michael Opdenacker (19):
manuals: fix duplicate "stylecheck" target
manuals: add initial sphinx-lint support
manuals: fix trailing spaces
manuals: fix incorrect double backticks
migration-guides: add missing opening tag colon
release-notes-5.0: documentation highlights
manuals: remove tab characters
dev-manual/debugging: mention new ``taskexp_ncurses`` option
migration-guides: release-notes-5.0: update docs highlights
bitbake: prserv: simplify the PRServerClient() interface
bitbake: prserv: use double quotes by default
bitbake: bitbake-prserv: replace deprecated optparse by argparse
bitbake: prserv: use self.logger instead of logger directly
bitbake: asyncrpc: include parse_address from hashserv
bitbake: prserv: capitalization and spacing improvements
bitbake: prserv: add extra requests
bitbake: prserv: remove redundant exception handler
bitbake: prserv: correct error message
bitbake: prserv: remove unnecessary code
Mikko Rapeli (1):
linux-yocto-dev: remove duplicate DEPENDS
Ninette Adhikari (3):
oe-build-perf-report: Add apache echarts to make report interactive
oe-build-perf-report: Display more than 300 commits and date instead of commit number
oe-build-perf-report: Improve report styling and add descriptions
Oleh Matiusha (1):
nativesdk-gzip: fix reproducibility issues
Peter Hoyes (1):
u-boot-tools: Package mkeficapsule
Peter Marko (2):
bitbake.conf: remove comment about oldincludedir
systemd: make predictable name mac policy opt-out
Quentin Schulz (2):
docs: conf.py: properly escape backslashes for latex_elements
manuals: refer to new yocto-patches mailing list wherever appropriate
Richard Purdie (10):
xwayland: Upgrade 23.2.4 -> 23.2.5
curl: Upgrade 8.6.0 -> 8.7.1
nghttp2: Upgrade 1.60.1 -> 1.61.0
pseudo: Update to pull in fchmodat fix
bitbake: doc/user-manual: Add BB_LOADFACTOR_MAX
bitbake: BBHandler: Handle unclosed functions correctly
testimage: Enable runtime 'login' screenshot tests
Revert "testimage: Enable runtime 'login' screenshot tests"
python3-websockets: Import from meta-python
buildtools-tarball: Add python3-websockets
Rob Woolley (1):
bitbake: wget: Make wget --passive-ftp option conditional on ftp/ftps
Ross Burton (2):
eudev: update Upstream-Status on netifnames.patch
classes/pypi: don't expose PYPI_ARCHIVE_NAME
Simone Weiß (1):
bitbake: doc: Add section for variable context
Wang Mingyu (87):
debianutils: upgrade 5.16 -> 5.17
diffoscope: upgrade 259 -> 260
encodings: upgrade 1.0.7 -> 1.1.0
gcr: upgrade 4.2.0 -> 4.2.1
ghostscript: upgrade 10.02.1 -> 10.03.0
libassuan: upgrade 2.5.6 -> 2.5.7
libfontenc: upgrade 1.1.7 -> 1.1.8
libpng: upgrade 1.6.42 -> 1.6.43
libsdl2: upgrade 2.30.0 -> 2.30.1
libxcb: upgrade 1.16 -> 1.16.1
libxcursor: upgrade 1.2.1 -> 1.2.2
libxdmcp: upgrade 1.1.4 -> 1.1.5
mkfontscale: upgrade 1.2.2 -> 1.2.3
pango: upgrade 1.52.0 -> 1.52.1
psmisc: upgrade 23.6 -> 23.7
python3-cython: upgrade 3.0.8 -> 3.0.9
python3-hypothesis: upgrade 6.98.15 -> 6.99.4
python3-importlib-metadata: upgrade 7.0.1 -> 7.0.2
python3-libarchive-c: upgrade 5.0 -> 5.1
python3-pygobject: update 3.46.0 -> 3.48.1
python3-pyopenssl: upgrade 24.0.0 -> 24.1.0
python3-pyparsing: upgrade 3.1.1 -> 3.1.2
python3-pytest-subtests: upgrade 0.11.0 -> 0.12.1
python3-pytest: upgrade 8.0.2 -> 8.1.1
python3-trove-classifiers: upgrade 2024.2.23 -> 2024.3.3
repo: upgrade 2.42 -> 2.44
shaderc: update 2023.8 -> 2024.0
stress-ng: upgrade 0.17.05 -> 0.17.06
xauth: upgrade 1.1.2 -> 1.1.3
xev: update 1.2.5 -> 1.2.6
gnupg: upgrade 2.4.4 -> 2.4.5
adwaita-icon-theme: upgrade 45.0 -> 46.0
at-spi2-core: upgrade 2.50.1 -> 2.52.0
bind: upgrade 9.18.24 -> 9.18.25
createrepo-c: upgrade 1.0.4 -> 1.1.0
enchant2: upgrade 2.6.7 -> 2.6.8
harfbuzz: upgrade 8.3.0 -> 8.3.1
libbsd: upgrade 0.12.1 -> 0.12.2
libcomps: upgrade 0.1.20 -> 0.1.21
libpciaccess: upgrade 0.18 -> 0.18.1
libwpe: upgrade 1.14.2 -> 1.16.0
libxkbcommon: upgrade 1.6.0 -> 1.7.0
libxml2: upgrade 2.12.5 -> 2.12.6
lighttpd: upgrade 1.4.74 -> 1.4.75
openssh: upgrade 9.6p1 -> 9.7p1
python3-hatchling: upgrade 1.21.1 -> 1.22.4
python3-importlib-metadata: upgrade 7.0.2 -> 7.1.0
python3-license-expression: upgrade 30.2.0 -> 30.3.0
python3-markdown: upgrade 3.5.2 -> 3.6
python3-packaging: upgrade 23.2 -> 24.0
python3-pyelftools: upgrade 0.30 -> 0.31
python3-referencing: upgrade 0.33.0 -> 0.34.0
python3-scons: upgrade 4.6.0 -> 4.7.0
python3-setuptools: upgrade 69.1.1 -> 69.2.0
python3-wheel: upgrade 0.42.0 -> 0.43.0
python3-zipp: upgrade 3.17.0 -> 3.18.1
vala: upgrade 0.56.15 -> 0.56.16
wget: upgrade 1.21.4 -> 1.24.5
mesa: upgrade 24.0.2 -> 24.0.3
vulkan: upgrade 1.3.275.0 -> 1.3.280.0
babeltrace2: upgrade 2.0.5 -> 2.0.6
bash-completion: upgrade 2.12.0 -> 2.13.0
btrfs-tools: upgrade 6.7.1 -> 6.8
coreutils: upgrade 9.4 -> 9.5
dnf: upgrade 4.19.0 -> 4.19.2
ell: upgrade 0.63 -> 0.64
enchant2: upgrade 2.6.8 -> 2.6.9
libdnf: upgrade 0.73.0 -> 0.73.1
libical: upgrade 3.0.17 -> 3.0.18
liburi-perl: upgrade 5.27 -> 5.28
libx11: upgrade 1.8.7 -> 1.8.9
libxmlb: upgrade 0.3.15 -> 0.3.17
libxmu: upgrade 1.1.4 -> 1.2.0
lttng-tools: upgrade 2.13.11 -> 2.13.13
man-db: upgrade 2.12.0 -> 2.12.1
mpg123: upgrade 1.32.5 -> 1.32.6
mtdev: upgrade 1.1.6 -> 1.1.7
pkgconf: upgrade 2.1.1 -> 2.2.0
python3-beartype: upgrade 0.17.2 -> 0.18.2
python3-build: upgrade 1.1.1 -> 1.2.1
python3-git: upgrade 3.1.42 -> 3.1.43
python3-pyasn1: upgrade 0.5.1 -> 0.6.0
python3-typing-extensions: upgrade 4.10.0 -> 4.11.0
rsync: upgrade 3.2.7 -> 3.3.0
ttyrun: upgrade 2.31.0 -> 2.32.0
u-boot: upgrade 2024.01 -> 2024.04
xorgproto: upgrade 2023.2 -> 2024.1
Yoann Congal (2):
ref-manual: variables: document CVE_DB_INCR_UPDATE_AGE_THRES variable
release-notes-5.0: document some cve, strace and qa changes
meta-raspberrypi: d072cc8a48..1879cb831f:
Max Stepanov (1):
rpi-eeprom: Update to support raspberrypi5 machine
meta-arm: d9e18ce792..17df9c4ebc:
Anusmita Dutta Mazumder (2):
arm-bsp/u-boot:corstone1000: add unique guid for fvp and mps3
arm-bsp/tf-m:corstone1000: add unique guid for fvp and mps3
Debbie Martin (1):
arm-systemready: Change get_json_result_dir helper
Harsimran Singh Tungal (1):
corstone1000:arm-bsp/tftf: upgrade tftf version to v2.10
Jon Mason (7):
arm-bsp: remove unused recipes
arm-bsp: Remove tc1
CI: update to kas 4.3.2
arm/optee-ftpm: update to the latest SHA
arm/trusted-firmware-a: update to 2.10.3 release
arm/opencsd: update to 1.5.2
arm-bsp/corstone1000: reformat u-boot patches
meta-security: 283a773f24..d1522af21d:
Armin Kuster (1):
README.md: update to new patches mailing list
meta-openembedded: a6bcdca5b4..4958bfe013:
Alex Kiernan (1):
mdns: Upgrade 2200.80.16 -> 2200.100.94.0.2
Beniamin Sandu (5):
mbedtls: upgrade 3.5.2 -> 3.6.0
mbedtls: upgrade 2.28.7 -> 2.28.8
unbound: upgrade 1.19.1 -> 1.19.3
libtorrent: remove CVE mention
libtorrent-rasterbar: add initial recipe for 2.0.10
Changqing Li (1):
nodejs: don't always disable io_uring
Dan McGregor (2):
dash: correct licence
libfido2: new recipe
Fathi Boudra (1):
composefs: add a new recipe
Guðni Már Gilbert (1):
python3-ecdsa: upgrade 0.18.0 -> 0.19.0
Khem Raj (17):
python3-pydantic-core: Enable benchmark tests
python3-pydbus: Fix typo in ptest package name
python3-netaddr: Ignore failing tests on musl
python3-pydantic: Ignore failing testcases
python3-pydantic-core: Skip failing ptests
python3-whoosh: Fix an intermittent ptest
python3-pyzmq: Fix ptests
Revert "libqmi: upgrade 1.34.0 -> 1.35.2"
Revert "libmbim: upgrade 1.30.0 -> 1.31.2"
nftables: Fix ptest runs
python3-flexparser,python3-flexcache: Add recipes
python3-pint: Switch to using github SRC_URI
libxml++: Delete recipe for 2.42.1
jemalloc: Update to tip of dev branch
libteam: Add missing dependencies revealed by ptests
oprofile: Fix failing ptests
ptest-packagelists-meta-oe: jemalloc and oprofile are passing now
Markus Volk (1):
dav1d: update 1.4.0 -> 1.4.1
Maxim Perevozchikov (1):
nginx: Disable login for www user
Peter Kjellerstedt (1):
libnice: Update to 0.1.22
Peter Marko (1):
syslog-ng: fix build without ipv6 in distro features
Randy MacLeod (5):
ncftp: Upgrade to 3.2.7
pimd: switch SRC_URI to https
tnftp: switch the SRC_URI to https
postfix: switch SRC_URI to http
libmad: switch links/SRC_URI to https sites
Rui Costa (1):
avro: add recipe for c++
Tom Geelen (4):
python3-casttube: upgrade 0.2.0 -> 0.2.1
python3-sqlalchemy: upgrade 2.0.25 --> 2.0.27
python3-charset-normalizer: add native build option to recipe
python3-chromecast: upgrade 13.1.0 -> 14.0.0
Xiangyu Chen (1):
libgpiod: fix QA error in ptest RDEPENDS
Yi Zhao (2):
rocksdb: fix build error for DEBUG_BUILD
rocksdb: fix build error for multilib
Yongchang Qiao (1):
packagegroup-meta-filesystems: Fix utils typo
alperak (5):
python3-bleak: enable ptest and add missing runtime dependency
python3-pillow: Upgrade 10.1.0 -> 10.3.0 and fix ptest
python3-flexcache: enable ptest
python3-flexparser: enable ptest and add missing runtime dependencies
python3-flexcache: add missing runtime dependencies
Change-Id: I06aa4dd845848eec6e165878d482977f48422765
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'meta-arm/meta-arm-bsp')
83 files changed, 188 insertions, 2932 deletions
diff --git a/meta-arm/meta-arm-bsp/conf/machine/include/corstone1000.inc b/meta-arm/meta-arm-bsp/conf/machine/include/corstone1000.inc index a82d007649..7a8905d7ee 100644 --- a/meta-arm/meta-arm-bsp/conf/machine/include/corstone1000.inc +++ b/meta-arm/meta-arm-bsp/conf/machine/include/corstone1000.inc @@ -8,7 +8,7 @@ PREFERRED_VERSION_trusted-firmware-m ?= "2.0.%" # TF-A TFA_PLATFORM = "corstone1000" PREFERRED_VERSION_trusted-firmware-a ?= "2.10.%" -PREFERRED_VERSION_tf-a-tests ?= "2.8.%" +PREFERRED_VERSION_tf-a-tests ?= "2.10.%" TFA_BL2_BINARY = "bl2-corstone1000.bin" TFA_FIP_BINARY = "fip-corstone1000.bin" diff --git a/meta-arm/meta-arm-bsp/conf/machine/include/tc.inc b/meta-arm/meta-arm-bsp/conf/machine/include/tc.inc deleted file mode 100644 index 872f58cbfe..0000000000 --- a/meta-arm/meta-arm-bsp/conf/machine/include/tc.inc +++ /dev/null @@ -1,36 +0,0 @@ -TUNE_FEATURES = "aarch64" - -require conf/machine/include/arm/arch-armv8a.inc - -MACHINEOVERRIDES =. "tc:" - -# Das U-boot -UBOOT_MACHINE ?= "total_compute_defconfig" -UBOOT_RD_LOADADDRESS = "0x88000000" -UBOOT_RD_ENTRYPOINT = "0x88000000" -UBOOT_LOADADDRESS = "0x80080000" -UBOOT_ENTRYPOINT = "0x80080000" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" - -# OP-TEE -PREFERRED_VERSION_optee-os ?= "3.20%" -PREFERRED_VERSION_optee-client ?= "3.20%" -PREFERRED_VERSION_optee-test ?= "3.20%" - -# Cannot use the default zImage on arm64 -KERNEL_IMAGETYPE = "Image" -KERNEL_IMAGETYPES += "fitImage" -KERNEL_CLASSES = " kernel-fitimage " - -IMAGE_FSTYPES += "cpio.gz" -INITRAMFS_IMAGE ?= "core-image-minimal" -IMAGE_NAME_SUFFIX = "" - -SERIAL_CONSOLES = "115200;ttyAMA0" - -EXTRA_IMAGEDEPENDS += "trusted-firmware-a optee-os" -PREFERRED_VERSION_trusted-firmware-a ?= "2.8.%" -# FIXME - there is signed image dependency/race with testimage. -# This should be fixed in oe-core -TESTIMAGEDEPENDS:append = " virtual/kernel:do_deploy" diff --git a/meta-arm/meta-arm-bsp/conf/machine/tc1.conf b/meta-arm/meta-arm-bsp/conf/machine/tc1.conf deleted file mode 100644 index a0f2967bb9..0000000000 --- a/meta-arm/meta-arm-bsp/conf/machine/tc1.conf +++ /dev/null @@ -1,31 +0,0 @@ -# Configuration for TC1 - -#@TYPE: Machine -#@NAME: TC1 -#@DESCRIPTION: Machine configuration for TC1 - -require conf/machine/include/tc.inc - -TEST_TARGET = "OEFVPTarget" -TEST_SUITES = "fvp_boot" - -# FVP Config -FVP_PROVIDER ?= "fvp-tc1-native" -FVP_EXE ?= "FVP_TC1" - -# FVP Parameters -FVP_CONFIG[css.scp.ROMloader.fname] ?= "scp_romfw.bin" -FVP_CONFIG[css.trustedBootROMloader.fname] ?= "bl1-tc.bin" -FVP_CONFIG[board.flashloader0.fname] ?= "fip_gpt-tc.bin" - -#FVP_CONFIG[board.hostbridge.userNetworking] ?= "true" -#FVP_CONFIG[board.hostbridge.userNetPorts] ?= "2222=22" -#smsc ethernet takes a very long time to come up. disable now to prevent testimage timeout -#FVP_CONFIG[board.smsc_91c111.enabled] ?= "1" - -FVP_CONSOLE = "terminal_s1" -FVP_TERMINALS[soc.terminal_s0] ?= "Secure Console" -FVP_TERMINALS[soc.terminal_s1] ?= "Console" - -# Boot image -FVP_DATA ?= "board.dram=fitImage-core-image-minimal-tc1-tc1@0x20000000" diff --git a/meta-arm/meta-arm-bsp/documentation/corstone1000/user-guide.rst b/meta-arm/meta-arm-bsp/documentation/corstone1000/user-guide.rst index dc1d10233f..06353b5d3e 100644 --- a/meta-arm/meta-arm-bsp/documentation/corstone1000/user-guide.rst +++ b/meta-arm/meta-arm-bsp/documentation/corstone1000/user-guide.rst @@ -735,11 +735,11 @@ generate a UEFI capsule. cd <_workspace> ./u-boot/tools/mkeficapsule --monotonic-count 1 --private-key build/tmp/deploy/images/corstone1000-mps3/corstone1000_capsule_key.key \ - --certificate build/tmp/deploy/images/corstone1000-mps3/corstone1000_capsule_cert.crt --index 1 --guid 989f3a4e-46e0-4cd0-9877-a25c70c01329 \ + --certificate build/tmp/deploy/images/corstone1000-mps3/corstone1000_capsule_cert.crt --index 1 --guid df1865d1-90fb-4d59-9c38-c9f2c1bba8cc \ --fw-version 6 build/tmp/deploy/images/corstone1000-mps3/corstone1000_image.nopt cs1k_cap_mps3_v6 ./u-boot/tools/mkeficapsule --monotonic-count 1 --private-key build/tmp/deploy/images/corstone1000-mps3/corstone1000_capsule_key.key \ - --certificate build/tmp/deploy/images/corstone1000-mps3/corstone1000_capsule_cert.crt --index 1 --guid 989f3a4e-46e0-4cd0-9877-a25c70c01329 \ + --certificate build/tmp/deploy/images/corstone1000-mps3/corstone1000_capsule_cert.crt --index 1 --guid df1865d1-90fb-4d59-9c38-c9f2c1bba8cc \ --fw-version 5 build/tmp/deploy/images/corstone1000-mps3/corstone1000_image.nopt cs1k_cap_mps3_v5 Generating FVP Capsules diff --git a/meta-arm/meta-arm-bsp/documentation/tc1.md b/meta-arm/meta-arm-bsp/documentation/tc1.md deleted file mode 100644 index 464f77ee0a..0000000000 --- a/meta-arm/meta-arm-bsp/documentation/tc1.md +++ /dev/null @@ -1,32 +0,0 @@ -# TC1 Platform Support in meta-arm-bsp - -## Overview -The Total Compute platform provides an envelope for all of Arm's latest IP and -software solutions, optimised to work together. Further information can be -found on the Total Compute community page: -https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute - -The user guide for TC1 platform with detailed instructions for -syncing and building the source code and running on TC1 Fixed Virtual Platform -for poky and android distributions is available at: -https://git.linaro.org/landing-teams/working/arm/arm-reference-platforms.git/tree/docs/tc1/user-guide.rst - -## Building -In the local.conf file, MACHINE should be set as follows: -MACHINE = "tc1" - -To build the required binaries for tc1, run the commmand: -```bash$ bitbake tc-artifacts-image``` - -Trusted-firmware-a is the final component to be built with the rest of the -components dependent of it, therefore building tc-artifacts-image which depends -on trusted-firmware-a will build all the required binaries. - -## Running -To run the produced binaries in a TC1 Fixed Virtual Platform please get -the run scripts at: -https://git.linaro.org/landing-teams/working/arm/model-scripts.git/ - -and follow the instructions in the user-guide.rst available in: -https://git.linaro.org/landing-teams/working/arm/arm-reference-platforms.git/tree/docs/tc1/user-guide.rst - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/hafnium/hafnium-tc.inc b/meta-arm/meta-arm-bsp/recipes-bsp/hafnium/hafnium-tc.inc deleted file mode 100644 index 4e5368eb7b..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-bsp/hafnium/hafnium-tc.inc +++ /dev/null @@ -1,8 +0,0 @@ -# TC specific configuration - -COMPATIBLE_MACHINE = "(tc?)" -HAFNIUM_PLATFORM = "secure_tc" - -do_compile() { - PATH="${S}/prebuilts/linux-x64/clang/bin:$PATH" oe_runmake -C ${S} -} diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-tc.inc b/meta-arm/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-tc.inc deleted file mode 100644 index 87160598d5..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-tc.inc +++ /dev/null @@ -1,6 +0,0 @@ -# TC specific SCP configuration - -COMPATIBLE_MACHINE = "(tc1)" -SCP_PRODUCT_GROUP = "totalcompute" - -FW_TARGETS = "scp" diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/tf-a-tests_2.9.0.bb b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/tf-a-tests_2.9.0.bb deleted file mode 100644 index 72a3e7911b..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/tf-a-tests_2.9.0.bb +++ /dev/null @@ -1,54 +0,0 @@ -DESCRIPTION = "Trusted Firmware-A tests(aka TFTF)" -LICENSE = "BSD-3-Clause & NCSA" - -LIC_FILES_CHKSUM += "file://docs/license.rst;md5=6175cc0aa2e63b6d21a32aa0ee7d1b4a" - -inherit deploy - -COMPATIBLE_MACHINE ?= "invalid" - -SRC_URI_TRUSTED_FIRMWARE_A_TESTS ?= "git://git.trustedfirmware.org/TF-A/tf-a-tests.git;protocol=https" -SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A_TESTS};branch=${SRCBRANCH} \ - " -SRCBRANCH = "master" -SRCREV = "df6783437cdc98dabf4f49568312b86460f72efa" - -DEPENDS += "optee-os" - -EXTRA_OEMAKE += "USE_NVM=0" -EXTRA_OEMAKE += "SHELL_COLOR=1" -EXTRA_OEMAKE += "DEBUG=1" - -# Platform must be set for each machine -TFA_PLATFORM ?= "invalid" - -EXTRA_OEMAKE += "ARCH=aarch64" -EXTRA_OEMAKE += "LOG_LEVEL=50" - -S = "${WORKDIR}/git" -B = "${WORKDIR}/build" - -# Add platform parameter -EXTRA_OEMAKE += "BUILD_BASE=${B} PLAT=${TFA_PLATFORM}" - -# Requires CROSS_COMPILE set by hand as there is no configure script -export CROSS_COMPILE="${TARGET_PREFIX}" - -do_compile() { - oe_runmake -C ${S} tftf -} - -do_compile[cleandirs] = "${B}" - -FILES:${PN} = "/firmware/tftf.bin" -SYSROOT_DIRS += "/firmware" - -do_install() { - install -d -m 755 ${D}/firmware - install -m 0644 ${B}/${TFA_PLATFORM}/debug/tftf.bin ${D}/firmware/tftf.bin -} - -do_deploy() { - cp -rf ${D}/firmware/* ${DEPLOYDIR}/ -} -addtask deploy after do_install diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc deleted file mode 100644 index c14629fd19..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc +++ /dev/null @@ -1,134 +0,0 @@ -# TC0 specific TFA configuration - -DEPENDS += "scp-firmware util-linux-native gptfdisk-native" - -FILESEXTRAPATHS:prepend := "${THISDIR}/files/tc:" -SRC_URI:append = " \ - file://generate_metadata.py \ - " - -COMPATIBLE_MACHINE = "(tc?)" - -TFA_PLATFORM = "tc" -TFA_BUILD_TARGET = "all fip" -TFA_UBOOT = "1" -TFA_INSTALL_TARGET = "bl1 fip" -TFA_MBEDTLS = "1" -TFA_DEBUG = "1" - -TFA_SPD = "spmd" -TFA_SPMD_SPM_AT_SEL2 = "1" - -TFA_TARGET_PLATFORM:tc0 = "0" -TFA_TARGET_PLATFORM:tc1 = "1" - -EXTRA_OEMAKE += "TARGET_PLATFORM=${TFA_TARGET_PLATFORM}" - -# Set optee as SP. Set spmc manifest and sp layout file to optee -DEPENDS += "optee-os" - -TFA_SP_LAYOUT_FILE = "${RECIPE_SYSROOT}/${nonarch_base_libdir}/firmware/sp_layout.json" -TFA_ARM_SPMC_MANIFEST_DTS = "plat/arm/board/tc/fdts/tc_spmc_optee_sp_manifest.dts" - -EXTRA_OEMAKE += "SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_ramfw.bin" -EXTRA_OEMAKE += "TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 ARM_ROTPK_LOCATION=devel_rsa \ - ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem" -EXTRA_OEMAKE += "PSA_FWU_SUPPORT=1 ARM_GPT_SUPPORT=1" -EXTRA_OEMAKE += "CTX_INCLUDE_MTE_REGS=1" - -do_generate_gpt() { - gpt_image="${BUILD_DIR}/fip_gpt.bin" - fip_bin="${BUILD_DIR}/fip.bin" - # the FIP partition type is not standardized, so generate one - fip_type_uuid=`uuidgen --sha1 --namespace @dns --name "fip_type_uuid"` - # metadata partition type UUID, specified by the document: - # Platform Security Firmware Update for the A-profile Arm Architecture - # version: 1.0BET0 - metadata_type_uuid="8a7a84a0-8387-40f6-ab41-a8b9a5a60d23" - location_uuid=`uuidgen` - FIP_A_uuid=`uuidgen` - FIP_B_uuid=`uuidgen` - - # maximum FIP size 4MB. This is the current size of the FIP rounded up to an integer number of MB. - fip_max_size=4194304 - fip_bin_size=$(stat -c %s $fip_bin) - if [ $fip_max_size -lt $fip_bin_size ]; then - bberror "FIP binary ($fip_bin_size bytes) is larger than the GPT partition ($fip_max_size bytes)" - fi - - # maximum metadata size 512B. This is the current size of the metadata rounded up to an integer number of sectors. - metadata_max_size=512 - metadata_file="${BUILD_DIR}/metadata.bin" - python3 ${WORKDIR}/generate_metadata.py --metadata_file $metadata_file \ - --img_type_uuids $fip_type_uuid \ - --location_uuids $location_uuid \ - --img_uuids $FIP_A_uuid $FIP_B_uuid - - # create GPT image. The GPT contains 2 FIP partitions: FIP_A and FIP_B, and 2 metadata partitions: FWU-Metadata and Bkup-FWU-Metadata. - # the GPT layout is the following: - # ----------------------- - # Protective MBR - # ----------------------- - # Primary GPT Header - # ----------------------- - # FIP_A - # ----------------------- - # FIP_B - # ----------------------- - # FWU-Metadata - # ----------------------- - # Bkup-FWU-Metadata - # ----------------------- - # Secondary GPT Header - # ----------------------- - - sector_size=512 - gpt_header_size=33 # valid only for 512-byte sectors - num_sectors_fip=`expr $fip_max_size / $sector_size` - num_sectors_metadata=`expr $metadata_max_size / $sector_size` - start_sector_1=`expr 1 + $gpt_header_size` # size of MBR is 1 sector - start_sector_2=`expr $start_sector_1 + $num_sectors_fip` - start_sector_3=`expr $start_sector_2 + $num_sectors_fip` - start_sector_4=`expr $start_sector_3 + $num_sectors_metadata` - num_sectors_gpt=`expr $start_sector_4 + $num_sectors_metadata + $gpt_header_size` - gpt_size=`expr $num_sectors_gpt \* $sector_size` - - # create raw image - dd if=/dev/zero of=$gpt_image bs=$gpt_size count=1 - - # create the GPT layout - sgdisk $gpt_image \ - --set-alignment 1 \ - --disk-guid $location_uuid \ - \ - --new 1:$start_sector_1:+$num_sectors_fip \ - --change-name 1:FIP_A \ - --typecode 1:$fip_type_uuid \ - --partition-guid 1:$FIP_A_uuid \ - \ - --new 2:$start_sector_2:+$num_sectors_fip \ - --change-name 2:FIP_B \ - --typecode 2:$fip_type_uuid \ - --partition-guid 2:$FIP_B_uuid \ - \ - --new 3:$start_sector_3:+$num_sectors_metadata \ - --change-name 3:FWU-Metadata \ - --typecode 3:$metadata_type_uuid \ - \ - --new 4:$start_sector_4:+$num_sectors_metadata \ - --change-name 4:Bkup-FWU-Metadata \ - --typecode 4:$metadata_type_uuid - - # populate the GPT partitions - dd if=$fip_bin of=$gpt_image bs=$sector_size seek=$start_sector_1 count=$num_sectors_fip conv=notrunc - dd if=$fip_bin of=$gpt_image bs=$sector_size seek=$start_sector_2 count=$num_sectors_fip conv=notrunc - dd if=$metadata_file of=$gpt_image bs=$sector_size seek=$start_sector_3 count=$num_sectors_metadata conv=notrunc - dd if=$metadata_file of=$gpt_image bs=$sector_size seek=$start_sector_4 count=$num_sectors_metadata conv=notrunc -} - -addtask do_generate_gpt after do_compile before do_install - -do_install:append() { - install -m 0644 ${BUILD_DIR}/fip_gpt.bin ${D}/firmware/fip_gpt-tc.bin - ln -sf fip_gpt-tc.bin ${D}/firmware/fip_gpt.bin -} diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.8.6.bb b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.8.6.bb deleted file mode 100644 index ef7ea5981b..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.8.6.bb +++ /dev/null @@ -1,19 +0,0 @@ -require recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc - -# TF-A v2.8.6 -SRCREV_tfa = "ff0bd5f9bb2ba2f31fb9cec96df917747af9e92d" -SRCBRANCH = "lts-v2.8" - -SRC_URI += "file://rwx-segments.patch" - -LIC_FILES_CHKSUM += "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde" - -# mbed TLS v2.28.2 -SRC_URI_MBEDTLS = "git://github.com/ARMmbed/mbedtls.git;name=mbedtls;protocol=https;destsuffix=git/mbedtls;branch=mbedtls-2.28" -SRCREV_mbedtls = "89f040a5c938985c5f30728baed21e49d0846a53" - -LIC_FILES_CHKSUM_MBEDTLS = "file://mbedtls/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -do_compile:prepend() { - sed -i '/^LDLIBS/ s,$, \$\{BUILD_LDFLAGS},' ${S}/tools/fiptool/Makefile -} diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0007-platform-corstone1000-add-unique-guid-for-mps3.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0007-platform-corstone1000-add-unique-guid-for-mps3.patch new file mode 100644 index 0000000000..3711b8ce36 --- /dev/null +++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0007-platform-corstone1000-add-unique-guid-for-mps3.patch @@ -0,0 +1,41 @@ +From 3d35eb08fe0cea5c4b882c448f44530bb45c05f0 Mon Sep 17 00:00:00 2001 +From: Anusmita Dutta Mazumder <anusmita.duttamazumder@arm.com> +Date: Tue, 2 Apr 2024 13:04:56 +0000 +Subject: [PATCH] platform: corstone1000: add unique guid for mps3 + +This patch sets unique GUID for Corstone1000 FVP and MPS3 + +Upstream-Status: Inappropriate [Redesign of Capsule update interface is required] +Signed-off-by: Anusmita Dutta Mazumder <anusmita.duttamazumder@arm.com> +--- + .../target/arm/corstone1000/fw_update_agent/fwu_agent.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/platform/ext/target/arm/corstone1000/fw_update_agent/fwu_agent.c b/platform/ext/target/arm/corstone1000/fw_update_agent/fwu_agent.c +index 2e6cf80470..be04e0e5df 100644 +--- a/platform/ext/target/arm/corstone1000/fw_update_agent/fwu_agent.c ++++ b/platform/ext/target/arm/corstone1000/fw_update_agent/fwu_agent.c +@@ -113,13 +113,19 @@ enum fwu_agent_state_t { + }; + + struct efi_guid full_capsule_image_guid = { ++#if PLATFORM_IS_FVP + .time_low = 0x989f3a4e, + .time_mid = 0x46e0, + .time_hi_and_version = 0x4cd0, + .clock_seq_and_node = {0x98, 0x77, 0xa2, 0x5c, 0x70, 0xc0, 0x13, 0x29} ++#else ++ .time_low = 0xdf1865d1, ++ .time_mid = 0x90fb, ++ .time_hi_and_version = 0x4d59, ++ .clock_seq_and_node = {0x9c, 0x38, 0xc9, 0xf2, 0xc1, 0xbb, 0xa8, 0xcc} ++#endif + }; + +- + #define IMAGE_ACCEPTED (1) + #define IMAGE_NOT_ACCEPTED (0) + #define BANK_0 (0) +-- +2.38.1 + diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc index 716d3f1c77..e098da721c 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc @@ -39,6 +39,7 @@ SRC_URI:append:corstone1000 = " \ file://0004-platform-corstone1000-align-capsule-update-structs.patch \ file://0005-platform-corstone1000-fix-synchronization-issue-on-o.patch \ file://0006-Platform-Corstone1000-skip-the-first-nv-counter.patch \ + file://0007-platform-corstone1000-add-unique-guid-for-mps3.patch \ " # TF-M ships patches for external dependencies that needs to be applied diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc index c7172d6f87..c0a029e9da 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc @@ -59,6 +59,7 @@ SRC_URI:append = " \ file://0041-scatter-gather-flag-workaround.patch \ file://0042-corstone1000-enable-virtio-net-support.patch \ file://0043-firmware-psci-Fix-bind_smccc_features-psci-check.patch \ + file://0044-corstone1000-set-unique-GUID-for-fvp-and-mps3.patch \ " do_configure:append() { diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-tc.inc b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-tc.inc deleted file mode 100644 index ca182c557c..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-tc.inc +++ /dev/null @@ -1,5 +0,0 @@ -# TC0 and TC1 specific U-boot support - -SRC_URI:append = " \ - file://bootargs.cfg \ - " diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0001-FF-A-v15-arm64-smccc-add-support-for-SMCCCv1.2-x0-x1.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0001-FF-A-v15-arm64-smccc-add-support-for-SMCCCv1.2-x0-x1.patch index 485ed4ba5d..0e467a85c3 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0001-FF-A-v15-arm64-smccc-add-support-for-SMCCCv1.2-x0-x1.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0001-FF-A-v15-arm64-smccc-add-support-for-SMCCCv1.2-x0-x1.patch @@ -1,8 +1,8 @@ -From 6b7a5bff8d68b191569557b6444e2c5061af8074 Mon Sep 17 00:00:00 2001 +From cc651db9a1370e697fd2525ce58b81ff7e112474 Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Fri, 29 Jul 2022 13:06:19 +0100 -Subject: [PATCH 01/38] FF-A v15: arm64: smccc: add support for SMCCCv1.2 - x0-x17 registers +Subject: [PATCH] FF-A v15: arm64: smccc: add support for SMCCCv1.2 x0-x17 + registers add support for x0-x17 registers used by the SMC calls @@ -196,6 +196,3 @@ index e1d09884a1..f44e9e8f93 100644 /** * struct arm_smccc_quirk - Contains quirk information * @id: quirk identification --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0002-FF-A-v15-lib-uuid-introduce-uuid_str_to_le_bin-funct.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0002-FF-A-v15-lib-uuid-introduce-uuid_str_to_le_bin-funct.patch index ebb2b55663..2fc5caaf55 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0002-FF-A-v15-lib-uuid-introduce-uuid_str_to_le_bin-funct.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0002-FF-A-v15-lib-uuid-introduce-uuid_str_to_le_bin-funct.patch @@ -1,8 +1,7 @@ -From faa2a74ce8cc9497c551b1bee6beed5c2c2f2dee Mon Sep 17 00:00:00 2001 +From 4c1eaa36a882f9f921c3bc3b1352bbb04a939c4f Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Thu, 4 Aug 2022 16:46:47 +0100 -Subject: [PATCH 02/38] FF-A v15: lib: uuid: introduce uuid_str_to_le_bin - function +Subject: [PATCH] FF-A v15: lib: uuid: introduce uuid_str_to_le_bin function convert UUID string to little endian binary data @@ -114,6 +113,3 @@ index 96e1af3c8b..45f325d964 100644 /* * uuid_bin_to_str() - convert big endian binary data to string UUID or GUID. * --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0003-FF-A-v15-lib-uuid-introduce-testcase-for-uuid_str_to.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0003-FF-A-v15-lib-uuid-introduce-testcase-for-uuid_str_to.patch index dbdf296240..bec856e16c 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0003-FF-A-v15-lib-uuid-introduce-testcase-for-uuid_str_to.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0003-FF-A-v15-lib-uuid-introduce-testcase-for-uuid_str_to.patch @@ -1,7 +1,7 @@ -From fa4a5b45d0254e347ba15992d997529f5056fe8f Mon Sep 17 00:00:00 2001 +From fe51e27e4f0033e9737a1099d0dd06f976a60705 Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Mon, 27 Mar 2023 16:24:29 +0100 -Subject: [PATCH 03/38] FF-A v15: lib: uuid: introduce testcase for +Subject: [PATCH] FF-A v15: lib: uuid: introduce testcase for uuid_str_to_le_bin provide a test case @@ -89,6 +89,3 @@ index 0000000000..e24331a136 +} + +LIB_TEST(lib_test_uuid_to_le, 0); --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0004-FF-A-v15-arm_ffa-introduce-Arm-FF-A-support.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0004-FF-A-v15-arm_ffa-introduce-Arm-FF-A-support.patch index e2c9d86e81..dcbc574485 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0004-FF-A-v15-arm_ffa-introduce-Arm-FF-A-support.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0004-FF-A-v15-arm_ffa-introduce-Arm-FF-A-support.patch @@ -1,7 +1,7 @@ -From 6a50d03467b70220b615dbe87b4b49d7f86fcb2f Mon Sep 17 00:00:00 2001 +From d1f0d01f1d863c2b98cc181dfc752f6c71faefaf Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Mon, 17 Jul 2023 15:11:43 +0100 -Subject: [PATCH 04/38] FF-A v15: arm_ffa: introduce Arm FF-A support +Subject: [PATCH] FF-A v15: arm_ffa: introduce Arm FF-A support Add Arm FF-A support implementing Arm Firmware Framework for Armv8-A v1.0 @@ -2127,6 +2127,3 @@ index 307ad6931c..3c6af2e3d2 100644 UCLASS_FIRMWARE, /* Firmware */ UCLASS_FPGA, /* FPGA device */ UCLASS_FUZZING_ENGINE, /* Fuzzing engine */ --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0005-FF-A-v15-arm_ffa-introduce-armffa-command.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0005-FF-A-v15-arm_ffa-introduce-armffa-command.patch index 0a4f4c9dbd..8672652b2b 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0005-FF-A-v15-arm_ffa-introduce-armffa-command.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0005-FF-A-v15-arm_ffa-introduce-armffa-command.patch @@ -1,7 +1,7 @@ -From 2d225908fde28c9759fae7a9fdce6bb8c39ec579 Mon Sep 17 00:00:00 2001 +From 57e4d6e9c5fc174a96366268150bc85de75baa79 Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Wed, 10 May 2023 17:27:01 +0100 -Subject: [PATCH 05/38] FF-A v15: arm_ffa: introduce armffa command +Subject: [PATCH] FF-A v15: arm_ffa: introduce armffa command Provide armffa command showcasing the use of the U-Boot FF-A support @@ -431,6 +431,3 @@ index 9200c8028b..a7d5392859 100644 select LIB_UUID select DEVRES help --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0006-FF-A-v15-arm_ffa-introduce-sandbox-FF-A-support.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0006-FF-A-v15-arm_ffa-introduce-sandbox-FF-A-support.patch index 13ea227544..c0078b8027 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0006-FF-A-v15-arm_ffa-introduce-sandbox-FF-A-support.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0006-FF-A-v15-arm_ffa-introduce-sandbox-FF-A-support.patch @@ -1,7 +1,7 @@ -From 8b24115d3b41af53602bfc80bea7e134dc0edefb Mon Sep 17 00:00:00 2001 +From b05ab0973850069d819872e26fae2aecbbf75f0e Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Mon, 17 Jul 2023 15:18:58 +0100 -Subject: [PATCH 06/38] FF-A v15: arm_ffa: introduce sandbox FF-A support +Subject: [PATCH] FF-A v15: arm_ffa: introduce sandbox FF-A support Emulate Secure World's FF-A ABIs and allow testing U-Boot FF-A support @@ -1309,6 +1309,3 @@ index 3c6af2e3d2..0432c95c9e 100644 UCLASS_FIRMWARE, /* Firmware */ UCLASS_FPGA, /* FPGA device */ UCLASS_FUZZING_ENGINE, /* Fuzzing engine */ --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0007-FF-A-v15-arm_ffa-introduce-sandbox-test-cases-for-UC.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0007-FF-A-v15-arm_ffa-introduce-sandbox-test-cases-for-UC.patch index 7233079397..c61002d82f 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0007-FF-A-v15-arm_ffa-introduce-sandbox-test-cases-for-UC.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0007-FF-A-v15-arm_ffa-introduce-sandbox-test-cases-for-UC.patch @@ -1,7 +1,7 @@ -From 9c789dbc70d58f55c84cc02ac35783af0aae85d5 Mon Sep 17 00:00:00 2001 +From effa8444b74e456f724146c2593991281f95762d Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Wed, 10 May 2023 17:34:55 +0100 -Subject: [PATCH 07/38] FF-A v15: arm_ffa: introduce sandbox test cases for +Subject: [PATCH] FF-A v15: arm_ffa: introduce sandbox test cases for UCLASS_FFA Add functional test cases for the FF-A support @@ -336,6 +336,3 @@ index 0000000000..6912666bb4 +} + +DM_TEST(dm_test_ffa_nack, UT_TESTF_SCAN_FDT | UT_TESTF_CONSOLE_REC); --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch index 5d70db68cb..a1dc18edaa 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch @@ -1,8 +1,7 @@ -From 95589fd6c92d41aa22d30a34193006216c6ee827 Mon Sep 17 00:00:00 2001 +From c95d1bd311b251e5dd6c6e53c2dc7977bdca7870 Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Fri, 23 Jun 2023 13:44:10 +0100 -Subject: [PATCH 08/38] FF-A v15: arm_ffa: introduce armffa command Sandbox - test +Subject: [PATCH] FF-A v15: arm_ffa: introduce armffa command Sandbox test Add Sandbox test for the armffa command @@ -90,6 +89,3 @@ index 0000000000..9a44a397e8 +} + +DM_TEST(dm_test_armffa_cmd, UT_TESTF_SCAN_FDT | UT_TESTF_CONSOLE_REC); --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0009-FF-A-v15-arm_ffa-efi-introduce-FF-A-MM-communication.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0009-FF-A-v15-arm_ffa-efi-introduce-FF-A-MM-communication.patch index 6f663fab12..4934a903f7 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0009-FF-A-v15-arm_ffa-efi-introduce-FF-A-MM-communication.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0009-FF-A-v15-arm_ffa-efi-introduce-FF-A-MM-communication.patch @@ -1,7 +1,7 @@ -From 02e38e24676d48d8a792ab6631a903ae1faa6271 Mon Sep 17 00:00:00 2001 +From c40964dc6ba6baea0adf8f384e1e57fcd5ca18b0 Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Mon, 15 Aug 2022 15:12:49 +0100 -Subject: [PATCH 09/38] FF-A v15: arm_ffa: efi: introduce FF-A MM communication +Subject: [PATCH] FF-A v15: arm_ffa: efi: introduce FF-A MM communication Add MM communication support using FF-A transport @@ -444,6 +444,3 @@ index dfef18435d..5137b871ea 100644 free(comm_buf); /* --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0010-FF-A-v15-arm_ffa-efi-corstone1000-enable-MM-communic.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0010-FF-A-v15-arm_ffa-efi-corstone1000-enable-MM-communic.patch index bc71b9462e..b01d669eac 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0010-FF-A-v15-arm_ffa-efi-corstone1000-enable-MM-communic.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0010-FF-A-v15-arm_ffa-efi-corstone1000-enable-MM-communic.patch @@ -1,8 +1,7 @@ -From c726c9ff098e4b271d60856b462f3dc532763a03 Mon Sep 17 00:00:00 2001 +From c27f5fe90433f8e1b6eaa84857171ea7fc26593a Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Mon, 17 Jul 2023 15:23:33 +0100 -Subject: [PATCH 10/38] FF-A v15: arm_ffa: efi: corstone1000: enable MM - communication +Subject: [PATCH] FF-A v15: arm_ffa: efi: corstone1000: enable MM communication turn on EFI MM communication @@ -28,6 +27,3 @@ index 2d391048cd..ee5481b63c 100644 +CONFIG_FFA_SHARED_MM_BUF_SIZE=4096 +CONFIG_FFA_SHARED_MM_BUF_OFFSET=0 +CONFIG_FFA_SHARED_MM_BUF_ADDR=0x02000000 --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0011-efi-corstone1000-fwu-introduce-EFI-capsule-update.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0011-efi-corstone1000-fwu-introduce-EFI-capsule-update.patch index 00d6ea7276..62fd6d5a51 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0011-efi-corstone1000-fwu-introduce-EFI-capsule-update.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0011-efi-corstone1000-fwu-introduce-EFI-capsule-update.patch @@ -1,7 +1,7 @@ -From 4483f276e70afdd961449ac45d4d8121c2a9080c Mon Sep 17 00:00:00 2001 +From 2a054e537037bb4f4f9e144ca69438abd9bb38ed Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Mon, 17 Jul 2023 15:56:18 +0100 -Subject: [PATCH 11/38] efi: corstone1000: fwu: introduce EFI capsule update +Subject: [PATCH] efi: corstone1000: fwu: introduce EFI capsule update This commit provides capsule update feature for Corstone1000. @@ -404,6 +404,3 @@ index 58d4e13402..bf90a98b5a 100644 if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) { u16 var_name16[12]; --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0012-arm-corstone1000-fix-unrecognized-filesystem-type.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0012-arm-corstone1000-fix-unrecognized-filesystem-type.patch index 023d53c2fa..8055d88cc6 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0012-arm-corstone1000-fix-unrecognized-filesystem-type.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0012-arm-corstone1000-fix-unrecognized-filesystem-type.patch @@ -1,7 +1,7 @@ -From 7844378788f308f3540c5eb10956c84113005fcc Mon Sep 17 00:00:00 2001 +From 2351cdc3787cd8b06579dcb1986fe80a57dd2d6e Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Fri, 4 Mar 2022 15:56:09 +0000 -Subject: [PATCH 12/38] arm: corstone1000: fix unrecognized filesystem type +Subject: [PATCH] arm: corstone1000: fix unrecognized filesystem type Some usb sticks are not recognized by usb, just add a delay before checking status. @@ -26,6 +26,3 @@ index ac64275773..1d2680c3cd 100644 debug("STATUS phase\n"); result = usb_bulk_msg(us->pusb_dev, pipein, csw, UMASS_BBB_CSW_SIZE, &actlen, USB_CNTL_TIMEOUT*5); --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0013-efi_loader-corstone1000-remove-guid-check-from-corst.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0013-efi_loader-corstone1000-remove-guid-check-from-corst.patch index 71cdf6ac95..fed13c6a75 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0013-efi_loader-corstone1000-remove-guid-check-from-corst.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0013-efi_loader-corstone1000-remove-guid-check-from-corst.patch @@ -1,8 +1,8 @@ -From 94e6c1dee044b3573991e48449de9144cfe3c0f3 Mon Sep 17 00:00:00 2001 +From 42d0694494fdc549a989ca5a3924fdc82a4647c1 Mon Sep 17 00:00:00 2001 From: Vishnu Banavath <vishnu.banavath@arm.com> Date: Sat, 11 Dec 2021 13:23:55 +0000 -Subject: [PATCH 13/38] efi_loader: corstone1000: remove guid check from - corstone1000 config option +Subject: [PATCH] efi_loader: corstone1000: remove guid check from corstone1000 + config option Use generic fmp guid and no separte check is required for CORSTONE1000 target. @@ -48,6 +48,3 @@ index ea084e4ed2..5314f529b4 100644 if (ret != EFI_SUCCESS) goto out; } --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0014-efi_loader-populate-ESRT-table-if-EFI_ESRT-config-op.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0014-efi_loader-populate-ESRT-table-if-EFI_ESRT-config-op.patch index 9d3cb666a3..31c19e1417 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0014-efi_loader-populate-ESRT-table-if-EFI_ESRT-config-op.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0014-efi_loader-populate-ESRT-table-if-EFI_ESRT-config-op.patch @@ -1,8 +1,8 @@ -From 9be08ccf3f7b30b2c57ff2eb593c5b17c967fc4a Mon Sep 17 00:00:00 2001 +From a368e6a94382bb88f3603107d14ff3af0fb4eaa2 Mon Sep 17 00:00:00 2001 From: Vishnu Banavath <vishnu.banavath@arm.com> Date: Fri, 17 Dec 2021 19:49:02 +0000 -Subject: [PATCH 14/38] efi_loader: populate ESRT table if EFI_ESRT config - option is set +Subject: [PATCH] efi_loader: populate ESRT table if EFI_ESRT config option is + set This change is to call efi_esrt_populate function if CONFIG_EFI_ESRT is set. This will populte esrt table with firmware image info @@ -32,6 +32,3 @@ index 5314f529b4..6a06605ad9 100644 goto out; #endif --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0015-efi_firmware-add-get_image_info-for-corstone1000.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0015-efi_firmware-add-get_image_info-for-corstone1000.patch index c74c7c03e8..c7ecfe8986 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0015-efi_firmware-add-get_image_info-for-corstone1000.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0015-efi_firmware-add-get_image_info-for-corstone1000.patch @@ -1,7 +1,7 @@ -From 03fe979677509f974b8d56097fbbd6c7e4cbe20b Mon Sep 17 00:00:00 2001 +From 972ed0e27cce6d2822055f31e336213043bcb1f3 Mon Sep 17 00:00:00 2001 From: Vishnu Banavath <vishnu.banavath@arm.com> Date: Fri, 17 Dec 2021 19:50:25 +0000 -Subject: [PATCH 15/38] efi_firmware: add get_image_info for corstone1000 +Subject: [PATCH] efi_firmware: add get_image_info for corstone1000 This change is to populate get_image_info which eventually will be populated in ESRT table @@ -118,6 +118,3 @@ index 93e2b01c07..0a38a96351 100644 if (dfu_write_by_alt(image_index - 1, (void *)image, image_size, NULL, NULL)) return EFI_EXIT(EFI_DEVICE_ERROR); --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0016-efi_loader-fix-null-pointer-exception-with-get_image.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0016-efi_loader-fix-null-pointer-exception-with-get_image.patch index 655e014224..694d853451 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0016-efi_loader-fix-null-pointer-exception-with-get_image.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0016-efi_loader-fix-null-pointer-exception-with-get_image.patch @@ -1,8 +1,7 @@ -From 13bf700129e902ba7ae556babcfb9c7956f32571 Mon Sep 17 00:00:00 2001 +From 75ace03c24d92a206957a1a2392eab3c892cf960 Mon Sep 17 00:00:00 2001 From: Vishnu Banavath <vishnu.banavath@arm.com> Date: Fri, 14 Jan 2022 15:24:18 +0000 -Subject: [PATCH 16/38] efi_loader: fix null pointer exception with - get_image_info +Subject: [PATCH] efi_loader: fix null pointer exception with get_image_info get_img_info API implemented for corstone1000 target does not check the input attributes and as a result uboot crash's with @@ -58,6 +57,3 @@ index 0a38a96351..c883e2ff0a 100644 image_info[i].attributes_supported = IMAGE_ATTRIBUTE_IMAGE_UPDATABLE | IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED; image_info[i].attributes_setting = IMAGE_ATTRIBUTE_IMAGE_UPDATABLE; --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0017-arm-corstone1000-add-mmc-for-fvp.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0017-arm-corstone1000-add-mmc-for-fvp.patch index dd746d9116..1326e7c98e 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0017-arm-corstone1000-add-mmc-for-fvp.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0017-arm-corstone1000-add-mmc-for-fvp.patch @@ -1,7 +1,7 @@ -From e07a03678e72afa7a5d2ab66ce2e1a21e0a73cfc Mon Sep 17 00:00:00 2001 +From 7dec0707573062aba859e4cd3be073c24b112efa Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Mon, 17 Jul 2023 16:50:53 +0100 -Subject: [PATCH 17/38] arm:corstone1000: add mmc for fvp +Subject: [PATCH] arm:corstone1000: add mmc for fvp Enable support mmc/sdcard for the corstone1000 FVP. @@ -95,6 +95,3 @@ index 8927b09499..1466507f80 100644 #include <config_distro_bootcmd.h> --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0018-corstone1000-add-compressed-kernel-support.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0018-corstone1000-add-compressed-kernel-support.patch index 97cf4d0e35..af87a4a508 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0018-corstone1000-add-compressed-kernel-support.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0018-corstone1000-add-compressed-kernel-support.patch @@ -1,7 +1,7 @@ -From b5cfd8ab77e7f305b170a8cd25575e8cc08babc5 Mon Sep 17 00:00:00 2001 +From 67f9f4dbb58a9213232523a433cd6d7c50eeadc7 Mon Sep 17 00:00:00 2001 From: Jon Mason <jon.mason@arm.com> Date: Wed, 30 Nov 2022 18:59:59 +0000 -Subject: [PATCH 18/38] corstone1000: add compressed kernel support +Subject: [PATCH] corstone1000: add compressed kernel support The corstone1000 kernel has become too large to fit in the available storage. Swtiching to a compressed kernel avoids the problem, but @@ -29,6 +29,3 @@ index 76158fc37d..a92668389a 100644 CONFIG_CONSOLE_RECORD=y CONFIG_LOGLEVEL=7 # CONFIG_DISPLAY_CPUINFO is not set --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0019-arm-corstone1000-esrt-support.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0019-arm-corstone1000-esrt-support.patch index 11e5124a30..f8d4be8623 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0019-arm-corstone1000-esrt-support.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0019-arm-corstone1000-esrt-support.patch @@ -1,7 +1,7 @@ -From d7682e9f7c45fffe5be0bc67ee9e31fdca1b94c5 Mon Sep 17 00:00:00 2001 +From 47479f96cb3b3646d298c39216b2c960940476bd Mon Sep 17 00:00:00 2001 From: Satish Kumar <satish.kumar01@arm.com> Date: Wed, 30 Nov 2022 19:11:43 +0000 -Subject: [PATCH 19/38] arm/corstone1000: esrt support +Subject: [PATCH] arm/corstone1000: esrt support The implementation is platform specific and would require change in future. @@ -220,6 +220,3 @@ index bf90a98b5a..d20568c1c8 100644 /* Initialize variable services */ ret = efi_init_variables(); if (ret != EFI_SUCCESS) --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0020-corstone1000-enable-distro-booting-command.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0020-corstone1000-enable-distro-booting-command.patch index ba9aeeb7ba..8ee8343a15 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0020-corstone1000-enable-distro-booting-command.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0020-corstone1000-enable-distro-booting-command.patch @@ -1,7 +1,7 @@ -From 0094eb1e6ca78988f105fefb69dd5cc9046c89fe Mon Sep 17 00:00:00 2001 +From c95dbed049801401ac98afc8ef53e917b69f9a62 Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Mon, 5 Dec 2022 17:02:32 +0000 -Subject: [PATCH 20/38] corstone1000: enable distro booting command +Subject: [PATCH] corstone1000: enable distro booting command enable distro_bootcmd @@ -23,6 +23,3 @@ index 1466507f80..8622565a87 100644 +#define CFG_EXTRA_ENV_SETTINGS BOOTENV #endif --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0021-corstone1000-add-fwu-metadata-store-info.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0021-corstone1000-add-fwu-metadata-store-info.patch index e524d832fa..c58f7b5786 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0021-corstone1000-add-fwu-metadata-store-info.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0021-corstone1000-add-fwu-metadata-store-info.patch @@ -1,7 +1,7 @@ -From 7f0ab0707b476d141bcf16de78d09c793b3b7387 Mon Sep 17 00:00:00 2001 +From c250b6b896facee9ef42f88f5c76f055dbcfc708 Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Wed, 1 Feb 2023 15:58:07 +0000 -Subject: [PATCH 21/38] corstone1000: add fwu-metadata store info +Subject: [PATCH] corstone1000: add fwu-metadata store info Add fwu-mdata node and handle for the reference nvmxip-qspi. @@ -37,6 +37,3 @@ index 533dfdf8e1..1e0ec075e4 100644 soc { compatible = "simple-bus"; #address-cells = <1>; --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0022-fwu_metadata-make-sure-structures-are-packed.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0022-fwu_metadata-make-sure-structures-are-packed.patch index addd1df2a8..e556cabef5 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0022-fwu_metadata-make-sure-structures-are-packed.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0022-fwu_metadata-make-sure-structures-are-packed.patch @@ -1,7 +1,7 @@ -From b2e413049dcf3dcbe3891a8a70bdd36f30b2e6c8 Mon Sep 17 00:00:00 2001 +From b1445e50c1f260e3454bc4946ea1009ff3e0dda6 Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Wed, 1 Feb 2023 16:13:24 +0000 -Subject: [PATCH 22/38] fwu_metadata: make sure structures are packed +Subject: [PATCH] fwu_metadata: make sure structures are packed The fwu metadata in the metadata partitions should/are packed to guarantee that the info is @@ -45,6 +45,3 @@ index 8fda4f4ac2..c61221a917 100644 +} __packed; #endif /* _FWU_MDATA_H_ */ --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0023-corstone1000-add-boot-index.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0023-corstone1000-add-boot-index.patch index b4be24f4f1..4fc5de73d4 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0023-corstone1000-add-boot-index.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0023-corstone1000-add-boot-index.patch @@ -1,7 +1,7 @@ -From 62eaf5720bfe49feedf486c57ce9b9968360460c Mon Sep 17 00:00:00 2001 +From 7a71000da87c4b48c6c42043924863c2933d8bdf Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Mon, 17 Jul 2023 17:04:10 +0100 -Subject: [PATCH 23/38] corstone1000: add boot index +Subject: [PATCH] corstone1000: add boot index it is expected that the firmware that runs before u-boot somehow provide the information of the bank @@ -37,6 +37,3 @@ index ecfd8366df..ba6d024b80 100644 { + *boot_idx = 0; } --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0024-corstone1000-adjust-boot-bank-and-kernel-location.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0024-corstone1000-adjust-boot-bank-and-kernel-location.patch index ddf80f3e73..66c6c665b4 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0024-corstone1000-adjust-boot-bank-and-kernel-location.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0024-corstone1000-adjust-boot-bank-and-kernel-location.patch @@ -1,7 +1,7 @@ -From 147f98fbefc7e13d1b9a3ae4b5fd3adc30dbed6b Mon Sep 17 00:00:00 2001 +From b15518faa5eba9ffb9da4d6e17d8ab4bb8e69f27 Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Wed, 1 Feb 2023 16:17:21 +0000 -Subject: [PATCH 24/38] corstone1000: adjust boot bank and kernel location +Subject: [PATCH] corstone1000: adjust boot bank and kernel location Adjust in the env boot script the address of the bootbank with the new gpt layout, and also the @@ -31,6 +31,3 @@ index b24ff07fc6..a6ee496221 100644 kernel_addr_bank_1=0x0936E000 retrieve_kernel_load_addr= if itest.l *${boot_bank_flag} == 0; then --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0025-corstone1000-add-nvmxip-fwu-mdata-and-gpt-options.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0025-corstone1000-add-nvmxip-fwu-mdata-and-gpt-options.patch index 78334059e3..c9e050a403 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0025-corstone1000-add-nvmxip-fwu-mdata-and-gpt-options.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0025-corstone1000-add-nvmxip-fwu-mdata-and-gpt-options.patch @@ -1,7 +1,7 @@ -From ff2e0fe577c5a564a10bcc730392dd5397f6cb34 Mon Sep 17 00:00:00 2001 +From 085b51e1545e905b4ba87c529954f31067032eaa Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Mon, 17 Jul 2023 17:33:52 +0100 -Subject: [PATCH 25/38] corstone1000: add nvmxip, fwu-mdata and gpt options +Subject: [PATCH] corstone1000: add nvmxip, fwu-mdata and gpt options Enable the newest features: nvmxip, fwu-metadata and gpt. Commands to print the partition info, gpt info @@ -70,6 +70,3 @@ index a92668389a..4c75a01818 100644 +# CONFIG_TOOLS_MKEFICAPSULE is not set +CONFIG_DM_GPIO=y \ No newline at end of file --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0026-nvmxip-move-header-to-include.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0026-nvmxip-move-header-to-include.patch index ec38a519f8..46734385eb 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0026-nvmxip-move-header-to-include.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0026-nvmxip-move-header-to-include.patch @@ -1,7 +1,7 @@ -From 2214be0f540121767d7b6ec4910a7389a1edd13c Mon Sep 17 00:00:00 2001 +From e7db287eb8bda80465d0c11cbb41acc798bb9fc6 Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Fri, 9 Jun 2023 13:31:53 +0100 -Subject: [PATCH 26/38] nvmxip: move header to include +Subject: [PATCH] nvmxip: move header to include Move header to include to allow external code to get the internal bdev structures to access @@ -37,6 +37,3 @@ diff --git a/drivers/mtd/nvmxip/nvmxip.h b/include/nvmxip.h similarity index 100% rename from drivers/mtd/nvmxip/nvmxip.h rename to include/nvmxip.h --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0027-corstone1000-set-kernel_addr-based-on-boot_idx.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0027-corstone1000-set-kernel_addr-based-on-boot_idx.patch index a95a8c6729..352873f9d5 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0027-corstone1000-set-kernel_addr-based-on-boot_idx.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0027-corstone1000-set-kernel_addr-based-on-boot_idx.patch @@ -1,7 +1,7 @@ -From c615b2e0fe9440b27b83f32c62fdc7f996237b56 Mon Sep 17 00:00:00 2001 +From ae098fd5c47f6d805b356c892558a85d571bed67 Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Tue, 18 Jul 2023 12:14:47 +0100 -Subject: [PATCH 27/38] corstone1000: set kernel_addr based on boot_idx +Subject: [PATCH] corstone1000: set kernel_addr based on boot_idx We need to distinguish between boot banks and from which partition to load the kernel+initramfs to memory. @@ -130,6 +130,3 @@ index 4c75a01818..0232131a11 100644 CONFIG_SYS_MAXARGS=64 CONFIG_SYS_CBSIZE=512 # CONFIG_CMD_CONSOLE is not set --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0028-corstone1000-boot-index-from-active.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0028-corstone1000-boot-index-from-active.patch index 5b68e12a64..fee77974d8 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0028-corstone1000-boot-index-from-active.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0028-corstone1000-boot-index-from-active.patch @@ -1,7 +1,7 @@ -From 747da6c0d1f2558ebeaf01ba9f762efa58a08a72 Mon Sep 17 00:00:00 2001 +From 67c439b974da80208962c1c7f0a1291908e23a30 Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva <rui.silva@linaro.org> Date: Mon, 27 Feb 2023 14:40:13 +0000 -Subject: [PATCH 28/38] corstone1000: boot index from active +Subject: [PATCH] corstone1000: boot index from active In our platform, the Secure Enclave is the one who control all the boot tries and status, so, every time we get here @@ -36,6 +36,3 @@ index a045262ebb..53c65506d5 100644 } int board_late_init(void) --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0029-corstone1000-enable-PSCI-reset.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0029-corstone1000-enable-PSCI-reset.patch index 828661cd90..f722f81c58 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0029-corstone1000-enable-PSCI-reset.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0029-corstone1000-enable-PSCI-reset.patch @@ -1,7 +1,7 @@ -From af7054ffdb1f84875a652c6b968dacf9a29cdc9c Mon Sep 17 00:00:00 2001 +From 8b7260db2b0c560b430657f801dd102fb2b141de Mon Sep 17 00:00:00 2001 From: Emekcan Aras <emekcan.aras@arm.com> Date: Tue, 18 Jul 2023 12:19:17 +0100 -Subject: [PATCH 29/38] corstone1000: enable PSCI reset +Subject: [PATCH] corstone1000: enable PSCI reset Even though corstone1000 does not implement entire PSCI APIs,it relies on PSCI reset interface for the system reset. U-boot change the config name, so we @@ -26,6 +26,3 @@ index 0232131a11..ccd558cfce 100644 +CONFIG_DM_GPIO=y +CONFIG_SYSRESET_PSCI=y \ No newline at end of file --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0030-Enable-EFI-set-get-time-services.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0030-Enable-EFI-set-get-time-services.patch index 437ee88505..015ed43901 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0030-Enable-EFI-set-get-time-services.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0030-Enable-EFI-set-get-time-services.patch @@ -1,7 +1,7 @@ -From 8ee7a9c05eb1abe10be139f439f2adf638614290 Mon Sep 17 00:00:00 2001 +From 03f53356a5b8b30b981ab7a16c6f48ca7fffe489 Mon Sep 17 00:00:00 2001 From: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com> Date: Tue, 18 Jul 2023 12:21:39 +0100 -Subject: [PATCH 30/38] Enable EFI set/get time services +Subject: [PATCH] Enable EFI set/get time services SetTime_Conf and SetTime_Func tests in UEFI SCT test suite of ACS fails with unsupported return value. CONFIG_EFI_SET_TIME and @@ -28,6 +28,3 @@ index ccd558cfce..a0af413de8 100644 +CONFIG_SYSRESET_PSCI=y +CONFIG_EFI_SET_TIME=y +CONFIG_EFI_GET_TIME=y --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0031-corstone1000-detect-inflated-kernel-size.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0031-corstone1000-detect-inflated-kernel-size.patch index 0a61fd4be1..8ee20aaa36 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0031-corstone1000-detect-inflated-kernel-size.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0031-corstone1000-detect-inflated-kernel-size.patch @@ -1,7 +1,7 @@ -From b65511da443c07b45151b30ea2dc280219f4252b Mon Sep 17 00:00:00 2001 +From affde70e4ba728b0ce855f53501bdb5caa8afa6d Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Fri, 11 Aug 2023 10:41:19 +0100 -Subject: [PATCH 31/38] corstone1000: detect inflated kernel size +Subject: [PATCH] corstone1000: detect inflated kernel size use filesize variable set by unzip command @@ -24,6 +24,3 @@ index a0af413de8..5b0b2ac3bf 100644 CONFIG_CONSOLE_RECORD=y CONFIG_LOGLEVEL=7 # CONFIG_DISPLAY_CPUINFO is not set --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0032-corstone1000-ESRT-add-unique-firmware-GUID.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0032-corstone1000-ESRT-add-unique-firmware-GUID.patch index 34e45450a6..1c34f33803 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0032-corstone1000-ESRT-add-unique-firmware-GUID.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0032-corstone1000-ESRT-add-unique-firmware-GUID.patch @@ -1,7 +1,7 @@ -From 7e63d4982fd4436d9d0d9abebd9e0ed1473f5237 Mon Sep 17 00:00:00 2001 +From 1f1e0c35c9a11e956a8dc10002d17a497de947e3 Mon Sep 17 00:00:00 2001 From: Anusmita Dutta Mazumder <anusmita.duttamazumder@arm.com> Date: Tue, 8 Aug 2023 10:24:39 +0000 -Subject: [PATCH 32/38] corstone1000: ESRT: add unique firmware GUID +Subject: [PATCH] corstone1000: ESRT: add unique firmware GUID Add unique Corstone-1000 firmware GUID @@ -42,6 +42,3 @@ index c6ab6e2182..7792a6aa83 100644 #else ret = efi_fill_image_desc_array(image_info_size, image_info, descriptor_version, descriptor_count, --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0033-dt-Provide-a-way-to-remove-non-compliant-nodes-and-p.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0033-dt-Provide-a-way-to-remove-non-compliant-nodes-and-p.patch index ea5e0ef8c0..ecc356757b 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0033-dt-Provide-a-way-to-remove-non-compliant-nodes-and-p.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0033-dt-Provide-a-way-to-remove-non-compliant-nodes-and-p.patch @@ -1,7 +1,7 @@ -From a8ecc3ce0fcabb2414a000b7c8bfe3ce46d4392c Mon Sep 17 00:00:00 2001 +From f098724d2a59bf5c265a81c5b8767563c6c2d8de Mon Sep 17 00:00:00 2001 From: Sughosh Ganu <sughosh.ganu@linaro.org> Date: Thu, 21 Sep 2023 14:13:42 +0100 -Subject: [PATCH 33/38] dt: Provide a way to remove non-compliant nodes and +Subject: [PATCH] dt: Provide a way to remove non-compliant nodes and properties Add a function which is registered to spy for a EVT_FT_FIXUP event, @@ -132,6 +132,3 @@ index 0000000000..f893ba9796 + return err; +} +EVENT_SPY(EVT_FT_FIXUP, dt_non_compliant_purge); --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0034-bootefi-Call-the-EVT_FT_FIXUP-event-handler.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0034-bootefi-Call-the-EVT_FT_FIXUP-event-handler.patch index c44b6e33c4..54363e9907 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0034-bootefi-Call-the-EVT_FT_FIXUP-event-handler.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0034-bootefi-Call-the-EVT_FT_FIXUP-event-handler.patch @@ -1,7 +1,7 @@ -From 829e5d3a505452fbdb420432dc885903332a8cdc Mon Sep 17 00:00:00 2001 +From ff83070da7d1f547fc640e8446251f8e1e4ffc33 Mon Sep 17 00:00:00 2001 From: Sughosh Ganu <sughosh.ganu@linaro.org> Date: Thu, 21 Sep 2023 14:15:13 +0100 -Subject: [PATCH 34/38] bootefi: Call the EVT_FT_FIXUP event handler +Subject: [PATCH] bootefi: Call the EVT_FT_FIXUP event handler The bootefi command passes the devicetree to the kernel through the EFI config table. Call the event handlers for fixing the devicetree @@ -51,6 +51,3 @@ index 5c0afec154..f9588b66c7 100644 if (CONFIG_IS_ENABLED(EFI_TCG2_PROTOCOL_MEASURE_DTB)) { ret = efi_tcg2_measure_dtb(fdt); --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0035-corstone1000-purge-U-Boot-specific-DT-nodes.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0035-corstone1000-purge-U-Boot-specific-DT-nodes.patch index 230ebe6ebc..090f32c543 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0035-corstone1000-purge-U-Boot-specific-DT-nodes.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0035-corstone1000-purge-U-Boot-specific-DT-nodes.patch @@ -1,7 +1,7 @@ -From 3654cebe9449584aa94563b2252c267b926219c9 Mon Sep 17 00:00:00 2001 +From 49e3463a397b61e859df5e1a383f82d64c1e4f3f Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Date: Thu, 21 Sep 2023 15:24:34 +0100 -Subject: [PATCH 35/38] corstone1000: purge U-Boot specific DT nodes +Subject: [PATCH] corstone1000: purge U-Boot specific DT nodes Remove U-Boot specific DT nodes before passing the DT to Linux @@ -46,6 +46,3 @@ index 53c65506d5..e3c0e5bf50 100644 #define CORSTONE1000_KERNEL_PARTS 2 #define CORSTONE1000_KERNEL_PRIMARY "kernel_primary" #define CORSTONE1000_KERNEL_SECONDARY "kernel_secondary" --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0036-corstone1000-add-signature-device-tree-overlay.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0036-corstone1000-add-signature-device-tree-overlay.patch index 04193a8f0c..62713abf44 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0036-corstone1000-add-signature-device-tree-overlay.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0036-corstone1000-add-signature-device-tree-overlay.patch @@ -1,7 +1,7 @@ -From b6e69bd68c1e0171aa2acb78bec54da02defe129 Mon Sep 17 00:00:00 2001 +From 57e2230470c32bf2c6206813bcdfc9ce30b70c1d Mon Sep 17 00:00:00 2001 From: Emekcan Aras <emekcan.aras@arm.com> Date: Wed, 13 Sep 2023 13:20:15 +0100 -Subject: [PATCH 36/38] corstone1000: add signature device tree overlay +Subject: [PATCH] corstone1000: add signature device tree overlay Adds signature device tree overlay. @@ -26,6 +26,3 @@ index 1e0ec075e4..077673dd44 100644 soc { compatible = "simple-bus"; #address-cells = <1>; --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0037-corstone1000-enable-authenticated-capsule-config.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0037-corstone1000-enable-authenticated-capsule-config.patch index fe48ab16da..65d5e15132 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0037-corstone1000-enable-authenticated-capsule-config.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0037-corstone1000-enable-authenticated-capsule-config.patch @@ -1,7 +1,7 @@ -From 6a4d38a82755a8946ff8b79440550cae8032abed Mon Sep 17 00:00:00 2001 +From 509645079f3dbb6b14e920102bea75c2f408d195 Mon Sep 17 00:00:00 2001 From: Emekcan Aras <emekcan.aras@arm.com> Date: Wed, 13 Sep 2023 13:52:02 +0100 -Subject: [PATCH 37/38] corstone1000: enable authenticated capsule config +Subject: [PATCH] corstone1000: enable authenticated capsule config Enables authenticated capsule update config for corstone1000. @@ -23,6 +23,3 @@ index 5b0b2ac3bf..2de3f5d7b3 100644 CONFIG_EFI_IGNORE_OSINDICATIONS=y CONFIG_FWU_MULTI_BANK_UPDATE=y # CONFIG_TOOLS_MKEFICAPSULE is not set --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0038-corstone1000-introduce-EFI-authenticated-capsule-upd.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0038-corstone1000-introduce-EFI-authenticated-capsule-upd.patch index 6e268d436b..ae40932163 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0038-corstone1000-introduce-EFI-authenticated-capsule-upd.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0038-corstone1000-introduce-EFI-authenticated-capsule-upd.patch @@ -1,8 +1,7 @@ -From 0d1975369f3c483b540818cec8a088ed35116bbb Mon Sep 17 00:00:00 2001 +From 3f06f148656fbe238ed8bd93f9631a95668f9406 Mon Sep 17 00:00:00 2001 From: Emekcan Aras <emekcan.aras@arm.com> Date: Wed, 13 Sep 2023 13:55:08 +0100 -Subject: [PATCH 38/38] corstone1000: introduce EFI authenticated capsule - update +Subject: [PATCH] corstone1000: introduce EFI authenticated capsule update Introduces EFI authenticated capsule update for corstone1000. Corstone1000 implements platform-specific capsule update mechanism in u-bootdue to the SoC @@ -72,6 +71,3 @@ index 6a06605ad9..e1c78d8c1c 100644 /* copy the data to the contiguous buffer */ efi_memcpy_runtime(corstone1000_capsule_buf, capsule, capsule->capsule_image_size); --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0042-corstone1000-enable-virtio-net-support.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0042-corstone1000-enable-virtio-net-support.patch index d94e26a57e..58b21a9cc3 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0042-corstone1000-enable-virtio-net-support.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0042-corstone1000-enable-virtio-net-support.patch @@ -1,4 +1,4 @@ -From 2ddd34b6838e836cf94a9da2f65cd01a21252846 Mon Sep 17 00:00:00 2001 +From 46a1faf3687764ddf1567455de39482b72e50725 Mon Sep 17 00:00:00 2001 From: Emekcan Aras <emekcan.aras@arm.com> Date: Wed, 15 Nov 2023 16:04:06 +0000 Subject: [PATCH] corstone1000: enable virtio-net support @@ -92,6 +92,3 @@ index 2de3f5d7b3..8770b474e2 100644 CONFIG_EFI_GET_TIME=y +CONFIG_VIRTIO_NET=y +CONFIG_VIRTIO_MMIO=y --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0043-firmware-psci-Fix-bind_smccc_features-psci-check.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0043-firmware-psci-Fix-bind_smccc_features-psci-check.patch index 70d684b563..946caa248e 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0043-firmware-psci-Fix-bind_smccc_features-psci-check.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0043-firmware-psci-Fix-bind_smccc_features-psci-check.patch @@ -1,5 +1,8 @@ -Subject: [PATCH v4 1/3] firmware: psci: Fix bind_smccc_features psci check -Date: Mon, 4 Mar 2024 14:42:40 +0000 [thread overview] +From fda3d08d17050a8b338ef4288d20389788b5b7e6 Mon Sep 17 00:00:00 2001 +From: Weizhao Ouyang <o451686892@gmail.com> +Date: Mon, 4 Mar 2024 14:42:40 +0000 +Subject: [PATCH] firmware: psci: Fix bind_smccc_features psci check + Message-ID: <20240304144242.11666-2-o451686892@gmail.com> (raw) In-Reply-To: <20240304144242.11666-1-o451686892@gmail.com> @@ -10,9 +13,6 @@ Signed-off-by: Weizhao Ouyang <o451686892@gmail.com> Signed-off-by: Bence Balogh <bence.balogh@arm.com> Upstream-Status: Submitted [https://lore.kernel.org/all/20240304144242.11666-2-o451686892@gmail.com/] --- -v3: remove fallback smc call -v2: check SMCCC_ARCH_FEATURES ---- drivers/firmware/psci.c | 5 ++++- include/linux/arm-smccc.h | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) @@ -55,6 +55,3 @@ index f44e9e8f93..da3d29aabe 100644 #define ARM_SMCCC_RET_NOT_SUPPORTED ((unsigned long)-1) #ifndef __ASSEMBLY__ --- -2.40.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0044-corstone1000-set-unique-GUID-for-fvp-and-mps3.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0044-corstone1000-set-unique-GUID-for-fvp-and-mps3.patch new file mode 100644 index 0000000000..86b1071c55 --- /dev/null +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0044-corstone1000-set-unique-GUID-for-fvp-and-mps3.patch @@ -0,0 +1,57 @@ +From 6dc17c01df592f685636e34ad8bb0a6ecb994e15 Mon Sep 17 00:00:00 2001 +From: Anusmita Dutta Mazumder <anusmita.duttamazumder@arm.com> +Date: Thu, 21 Mar 2024 20:34:46 +0000 +Subject: [PATCH] corstone1000: set unique GUID for fvp and mps3 + +This patch sets unique GUID for Corstone1000 FVP and MPS3 + +Upstream-Status: Inappropriate [Redesign of Capsule update interface is required] +Signed-off-by: Anusmita Dutta Mazumder <anusmita.duttamazumder@arm.com> +--- + lib/efi_loader/efi_firmware.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c +index 7792a6aa83..1e49f79864 100644 +--- a/lib/efi_loader/efi_firmware.c ++++ b/lib/efi_loader/efi_firmware.c +@@ -16,16 +16,19 @@ + + #include <linux/list.h> + #include <efi_variable.h> ++#include <generated/dt.h> + + #define FMP_PAYLOAD_HDR_SIGNATURE SIGNATURE_32('M', 'S', 'S', '1') + + #if CONFIG_IS_ENABLED(TARGET_CORSTONE1000) + /* Firmware GUID */ +-#define EFI_CORSTONE1000_FIRMWARE_GUID \ ++#define EFI_CORSTONE1000_FIRMWARE_GUID_FVP \ + EFI_GUID(0x989f3a4e, 0x46e0, 0x4cd0, 0x98, 0x77, \ + 0xa2, 0x5c, 0x70, 0xc0, 0x13, 0x29) + +-efi_guid_t corstone1000_firmware_guid = EFI_CORSTONE1000_FIRMWARE_GUID; ++#define EFI_CORSTONE1000_FIRMWARE_GUID_MPS3 \ ++ EFI_GUID(0xdf1865d1, 0x90fb, 0x4d59, 0x9c, 0x38, \ ++ 0xc9, 0xf2, 0xc1, 0xbb, 0xa8, 0xcc) + + static efi_status_t efi_corstone1000_img_info_get ( + efi_uintn_t *image_info_size, +@@ -334,6 +337,14 @@ efi_status_t EFIAPI efi_firmware_get_image_info( + u16 **package_version_name) + { + efi_status_t ret; ++ efi_guid_t corstone1000_firmware_guid; ++ const char *cmp_dtb = DEVICE_TREE; ++ ++ if (!strcmp(cmp_dtb, "corstone1000-fvp")) { ++ corstone1000_firmware_guid = (efi_guid_t)EFI_CORSTONE1000_FIRMWARE_GUID_FVP; ++ } else { ++ corstone1000_firmware_guid = (efi_guid_t)EFI_CORSTONE1000_FIRMWARE_GUID_MPS3; ++ } + + EFI_ENTRY("%p %p %p %p %p %p %p %p\n", this, + image_info_size, image_info, +-- +2.38.1 + diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/files/optee-os/tc/0001-WIP-Enable-managed-exit.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/files/optee-os/tc/0001-WIP-Enable-managed-exit.patch deleted file mode 100644 index 4571409bc6..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/files/optee-os/tc/0001-WIP-Enable-managed-exit.patch +++ /dev/null @@ -1,120 +0,0 @@ -From f449f6fdcbd987e18a26f0daeccfa447fe76821a Mon Sep 17 00:00:00 2001 -From: Olivier Deprez <olivier.deprez@arm.com> -Date: Mon, 16 Nov 2020 10:14:02 +0100 -Subject: [PATCH] WIP: Enable managed exit - -This change declares OP-TEE SP as supporting managed exit in response to -a NS interrupt triggering while the SWd runs. - -At init OP-TEE enables (HF_INTERRUPT_ENABLE) the managed exit virtual -interrupt through the Hafnium para-virtualized interface. - -Physical interrupts are trapped to the SPMC which injects a managed exit -interrupt to OP-TEE. The managed exit interrupt is acknowledged by -OP-TEE by HF_INTERUPT_GET hvc call. - -Note: this code change is meant with in mind the SPMC runs at SEL2. It -needs slight refactoring such that it does not break the SEL1 SPMC -configuration. - -Change-Id: I9a95f36cf517c11048ff04680007f40259c4f636 -Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> -Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com> - -Upstream-Status: Pending [Not submitted to upstream yet] -Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com> - ---- - core/arch/arm/kernel/boot.c | 12 ++++++++++++ - core/arch/arm/kernel/thread_a64.S | 11 ++++++++++- - core/arch/arm/kernel/thread_spmc.c | 11 +++++++++++ - .../arm/plat-totalcompute/fdts/optee_sp_manifest.dts | 1 + - 4 files changed, 34 insertions(+), 1 deletion(-) - -diff --git a/core/arch/arm/kernel/boot.c b/core/arch/arm/kernel/boot.c -index dd34173e8..7d2ac74e8 100644 ---- a/core/arch/arm/kernel/boot.c -+++ b/core/arch/arm/kernel/boot.c -@@ -1424,6 +1424,18 @@ static void init_secondary_helper(unsigned long nsec_entry) - init_vfp_sec(); - init_vfp_nsec(); - -+ /* Enable managed exit interrupt for secondary core. */ -+ __asm__ volatile ( -+ "mov x0, %0;" -+ "mov x1, %1;" -+ "mov x2, %2;" -+ "mov x3, %3;" -+ "hvc #0" -+ : : "i" (0xff03), "i" (4), "i" (1), "i" (1)); -+ -+ IMSG("%s core %lu: enabled managed exit interrupt.", -+ __func__, get_core_pos()); -+ - IMSG("Secondary CPU %zu switching to normal world boot", get_core_pos()); - } - -diff --git a/core/arch/arm/kernel/thread_a64.S b/core/arch/arm/kernel/thread_a64.S -index 4fa97de24..4facc7631 100644 ---- a/core/arch/arm/kernel/thread_a64.S -+++ b/core/arch/arm/kernel/thread_a64.S -@@ -1162,6 +1162,14 @@ END_FUNC el0_sync_abort - bl dcache_op_louis - ic iallu - #endif -+ -+ /* HF_INTERRUPT_GET */ -+ mov x0, #0xff04 -+ hvc #0 -+ /* Expect managed exit interrupt */ -+ cmp x0, #4 -+ bne . -+ - /* - * Mark current thread as suspended - */ -@@ -1318,8 +1326,9 @@ LOCAL_FUNC elx_irq , : - #endif - END_FUNC elx_irq - -+#define HF_MANAGED_EXIT 1 - LOCAL_FUNC elx_fiq , : --#if defined(CFG_ARM_GICV3) -+#if defined(CFG_ARM_GICV3) || defined (HF_MANAGED_EXIT) - foreign_intr_handler fiq - #else - native_intr_handler fiq -diff --git a/core/arch/arm/kernel/thread_spmc.c b/core/arch/arm/kernel/thread_spmc.c -index 3b4ac0b4e..8f7c18dfa 100644 ---- a/core/arch/arm/kernel/thread_spmc.c -+++ b/core/arch/arm/kernel/thread_spmc.c -@@ -1517,6 +1517,17 @@ static TEE_Result spmc_init(void) - my_endpoint_id = spmc_get_id(); - DMSG("My endpoint ID %#x", my_endpoint_id); - -+ /* Enable managed exit interrupt for boot core. */ -+ __asm__ volatile ( -+ "mov x0, %0;" -+ "mov x1, %1;" -+ "mov x2, %2;" -+ "mov x3, %3;" -+ "hvc #0" -+ : : "i" (0xff03), "i" (4), "i" (1), "i" (1)); -+ -+ IMSG("%s enabled managed exit interrupt.", __func__); -+ - return TEE_SUCCESS; - } - #endif /* !defined(CFG_CORE_SEL1_SPMC) */ -diff --git a/core/arch/arm/plat-totalcompute/fdts/optee_sp_manifest.dts b/core/arch/arm/plat-totalcompute/fdts/optee_sp_manifest.dts -index 3ebbaddc8..56e69f372 100644 ---- a/core/arch/arm/plat-totalcompute/fdts/optee_sp_manifest.dts -+++ b/core/arch/arm/plat-totalcompute/fdts/optee_sp_manifest.dts -@@ -24,6 +24,7 @@ - xlat-granule = <0>; /* 4KiB */ - boot-order = <0>; - messaging-method = <0x3>; /* Direct request/response supported */ -+ managed-exit; /* Managed exit supported */ - - device-regions { - compatible = "arm,ffa-manifest-device-regions"; diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/files/optee-os/tc/0002-plat-totalcompute-fix-TZDRAM-start-and-size.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/files/optee-os/tc/0002-plat-totalcompute-fix-TZDRAM-start-and-size.patch deleted file mode 100644 index c516be4638..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/files/optee-os/tc/0002-plat-totalcompute-fix-TZDRAM-start-and-size.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 5ddda749c60dce834bcd79e8b8d904858319adc0 Mon Sep 17 00:00:00 2001 -From: Rupinderjit Singh <rupinderjit.singh@arm.com> -Date: Tue, 7 Feb 2023 09:45:02 +0000 -Subject: [PATCH] plat-totalcompute: update TZDRAM_SIZE - -For CFG_CORE_SEL2_SPMC, manifest size is increased from 0x1000 to -0x4000 for boot protocol support. - -Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com> -Acked-by: Jens Wiklander <jens.wiklander@linaro.org> - -Upstream-Status: Backport -Signed-off-by: Jon Mason <jon.mason@arm.com> - ---- - core/arch/arm/plat-totalcompute/conf.mk | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/core/arch/arm/plat-totalcompute/conf.mk b/core/arch/arm/plat-totalcompute/conf.mk -index b39ac0f0667f..2f6c0ee1460a 100644 ---- a/core/arch/arm/plat-totalcompute/conf.mk -+++ b/core/arch/arm/plat-totalcompute/conf.mk -@@ -32,8 +32,9 @@ ifeq ($(CFG_CORE_SEL1_SPMC),y) - CFG_TZDRAM_START ?= 0xfd000000 - CFG_TZDRAM_SIZE ?= 0x02000000 - else ifeq ($(CFG_CORE_SEL2_SPMC),y) --CFG_TZDRAM_START ?= 0xfd281000 --CFG_TZDRAM_SIZE ?= 0x01d7f000 -+CFG_TZDRAM_START ?= 0xfd284000 -+# TZDRAM size 0x1980000 - 0x4000 manifest size -+CFG_TZDRAM_SIZE ?= 0x0197c000 - else - CFG_TZDRAM_START ?= 0xff000000 - CFG_TZDRAM_SIZE ?= 0x01000000 diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/files/optee-test/tc/0001-xtest-Limit-tests-to-a-single-thread.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/files/optee-test/tc/0001-xtest-Limit-tests-to-a-single-thread.patch deleted file mode 100644 index 370a81c1d5..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/files/optee-test/tc/0001-xtest-Limit-tests-to-a-single-thread.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 73bef38c5697cd6bd3ddbe9046681087f4f6454e Mon Sep 17 00:00:00 2001 -From: Ben Horgan <ben.horgan@arm.com> -Date: Thu, 27 Jan 2022 10:33:04 +0000 -Subject: [PATCH] xtest: Limit tests to a single thread - -Signed-off-by: Ben Horgan <ben.horgan@arm.com> -Upstream-Status: Inappropriate [Workaround for intermittent failures] ---- - host/xtest/regression_1000.c | 2 +- - host/xtest/regression_2000.c | 2 +- - host/xtest/regression_6000.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/host/xtest/regression_1000.c b/host/xtest/regression_1000.c -index 9ee9d02..82d1def 100644 ---- a/host/xtest/regression_1000.c -+++ b/host/xtest/regression_1000.c -@@ -1080,7 +1080,7 @@ static void *test_1013_thread(void *arg) - return NULL; - } - --#define NUM_THREADS 3 -+#define NUM_THREADS 1 - - static void xtest_tee_test_1013_single(ADBG_Case_t *c, double *mean_concurrency, - const TEEC_UUID *uuid) -diff --git a/host/xtest/regression_2000.c b/host/xtest/regression_2000.c -index 0591a42..a9f4b95 100644 ---- a/host/xtest/regression_2000.c -+++ b/host/xtest/regression_2000.c -@@ -499,7 +499,7 @@ out: - return NULL; - } - --#define NUM_THREADS 3 -+#define NUM_THREADS 1 - - static void xtest_tee_test_2002(ADBG_Case_t *c) - { -diff --git a/host/xtest/regression_6000.c b/host/xtest/regression_6000.c -index ca1c254..d67ea7f 100644 ---- a/host/xtest/regression_6000.c -+++ b/host/xtest/regression_6000.c -@@ -1568,7 +1568,7 @@ exit: - } - - --#define NUM_THREADS 4 -+#define NUM_THREADS 1 - static void xtest_tee_test_6016_loop(ADBG_Case_t *c, uint32_t storage_id) - { - struct test_6016_thread_arg arg[NUM_THREADS] = { }; --- -2.17.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-client_3.20.0.bb b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-client_3.20.0.bb deleted file mode 100644 index 3daab7f838..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-client_3.20.0.bb +++ /dev/null @@ -1,7 +0,0 @@ -require recipes-security/optee/optee-client.inc - -SRCREV = "dd2d39b49975d2ada7870fe2b7f5a84d0d3860dc" - -inherit pkgconfig -DEPENDS += "util-linux" -EXTRA_OEMAKE += "PKG_CONFIG=pkg-config" diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-client_4.0.0.bb b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-client_4.0.0.bb deleted file mode 100644 index dc9577c211..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-client_4.0.0.bb +++ /dev/null @@ -1,7 +0,0 @@ -require recipes-security/optee/optee-client.inc - -SRCREV = "acb0885c117e73cb6c5c9b1dd9054cb3f93507ee" - -inherit pkgconfig -DEPENDS += "util-linux" -EXTRA_OEMAKE += "PKG_CONFIG=pkg-config" diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch deleted file mode 100644 index 54b667a6e5..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 843eb2ef918d5ae3d09de088110cb026ca25306b Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@arm.com> -Date: Tue, 26 May 2020 14:38:02 -0500 -Subject: [PATCH] allow setting sysroot for libgcc lookup - -Explicitly pass the new variable LIBGCC_LOCATE_CFLAGS variable when searching -for the compiler libraries as there's no easy way to reliably pass --sysroot -otherwise. - -Upstream-Status: Pending [https://github.com/OP-TEE/optee_os/issues/4188] -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - mk/gcc.mk | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/mk/gcc.mk b/mk/gcc.mk -index adc77a24f25e..81bfa78ad8d7 100644 ---- a/mk/gcc.mk -+++ b/mk/gcc.mk -@@ -13,11 +13,11 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \ - -print-file-name=include 2> /dev/null) - - # Get location of libgcc from gcc --libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \ -+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \ - -print-libgcc-file-name 2> /dev/null) --libstdc++$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ -+libstdc++$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ - -print-file-name=libstdc++.a 2> /dev/null) --libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ -+libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ - -print-file-name=libgcc_eh.a 2> /dev/null) - - # Define these to something to discover accidental use diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0002-optee-enable-clang-support.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0002-optee-enable-clang-support.patch deleted file mode 100644 index b3e3098019..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0002-optee-enable-clang-support.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0ca5ef7c8256dbd9690a01a82397bc16a123e179 Mon Sep 17 00:00:00 2001 -From: Brett Warren <brett.warren@arm.com> -Date: Wed, 23 Sep 2020 09:27:34 +0100 -Subject: [PATCH] optee: enable clang support - -When compiling with clang, the LIBGCC_LOCATE_CFLAG variable used -to provide a sysroot wasn't included, which results in not locating -compiler-rt. This is mitigated by including the variable as ammended. - -Upstream-Status: Pending -ChangeId: 8ba69a4b2eb8ebaa047cb266c9aa6c2c3da45701 -Signed-off-by: Brett Warren <brett.warren@arm.com> ---- - mk/clang.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mk/clang.mk b/mk/clang.mk -index a045beee8482..1ebe2f702dcd 100644 ---- a/mk/clang.mk -+++ b/mk/clang.mk -@@ -30,7 +30,7 @@ comp-cflags-warns-clang := -Wno-language-extension-token \ - - # Note, use the compiler runtime library (libclang_rt.builtins.*.a) instead of - # libgcc for clang --libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \ -+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \ - -rtlib=compiler-rt -print-libgcc-file-name 2> /dev/null) - - # Core ASLR relies on the executable being ready to run from its preferred load diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0003-core-link-add-no-warn-rwx-segments.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0003-core-link-add-no-warn-rwx-segments.patch deleted file mode 100644 index 5d4191ff99..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0003-core-link-add-no-warn-rwx-segments.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 741df4df0ec7b69b0573cff265dc1ae7cb70b55c Mon Sep 17 00:00:00 2001 -From: Jerome Forissier <jerome.forissier@linaro.org> -Date: Fri, 5 Aug 2022 09:48:03 +0200 -Subject: [PATCH] core: link: add --no-warn-rwx-segments - -Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> -Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/pull/5474] - -binutils ld.bfd generates one RWX LOAD segment by merging several sections -with mixed R/W/X attributes (.text, .rodata, .data). After version 2.38 it -also warns by default when that happens [1], which breaks the build due to ---fatal-warnings. The RWX segment is not a problem for the TEE core, since -that information is not used to set memory permissions. Therefore, silence -the warning. - -Link: [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 -Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29448 -Reported-by: Dominique Martinet <dominique.martinet@atmark-techno.com> -Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> -Acked-by: Jens Wiklander <jens.wiklander@linaro.org> ---- - core/arch/arm/kernel/link.mk | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/core/arch/arm/kernel/link.mk b/core/arch/arm/kernel/link.mk -index 0e96e606cd9d..3fbcb6804c6f 100644 ---- a/core/arch/arm/kernel/link.mk -+++ b/core/arch/arm/kernel/link.mk -@@ -37,6 +37,7 @@ link-ldflags += --sort-section=alignment - link-ldflags += --fatal-warnings - link-ldflags += --gc-sections - link-ldflags += $(link-ldflags-common) -+link-ldflags += $(call ld-option,--no-warn-rwx-segments) - - link-ldadd = $(LDADD) - link-ldadd += $(ldflags-external) -@@ -61,6 +62,7 @@ link-script-cppflags := \ - $(cppflagscore)) - - ldargs-all_objs := -T $(link-script-dummy) --no-check-sections \ -+ $(call ld-option,--no-warn-rwx-segments) \ - $(link-ldflags-common) \ - $(link-objs) $(link-ldadd) $(libgcccore) - cleanfiles += $(link-out-dir)/all_objs.o -@@ -75,7 +77,7 @@ $(link-out-dir)/unpaged_entries.txt: $(link-out-dir)/all_objs.o - $(AWK) '/ ____keep_pager/ { printf "-u%s ", $$3 }' > $@ - - unpaged-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections \ -- $(link-ldflags-common) -+ $(link-ldflags-common) $(call ld-option,--no-warn-rwx-segments) - unpaged-ldadd := $(objs) $(link-ldadd) $(libgcccore) - cleanfiles += $(link-out-dir)/unpaged.o - $(link-out-dir)/unpaged.o: $(link-out-dir)/unpaged_entries.txt -@@ -104,7 +106,7 @@ $(link-out-dir)/init_entries.txt: $(link-out-dir)/all_objs.o - $(AWK) '/ ____keep_init/ { printf "-u%s ", $$3 }' > $@ - - init-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections \ -- $(link-ldflags-common) -+ $(link-ldflags-common) $(call ld-option,--no-warn-rwx-segments) - init-ldadd := $(link-objs-init) $(link-out-dir)/version.o $(link-ldadd) \ - $(libgcccore) - cleanfiles += $(link-out-dir)/init.o diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0004-core-Define-section-attributes-for-clang.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0004-core-Define-section-attributes-for-clang.patch deleted file mode 100644 index 6229be9949..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0004-core-Define-section-attributes-for-clang.patch +++ /dev/null @@ -1,240 +0,0 @@ -From 162493e5b212b9d7391669a55be09b69b97a9cf8 Mon Sep 17 00:00:00 2001 -From: Emekcan Aras <emekcan.aras@arm.com> -Date: Wed, 21 Dec 2022 10:55:58 +0000 -Subject: [PATCH] core: Define section attributes for clang - -Clang's attribute section is not same as gcc, here we need to add flags -to sections so they can be eventually collected by linker into final -output segments. Only way to do so with clang is to use - -pragma clang section ... - -The behavious is described here [1], this allows us to define names bss -sections. This was not an issue until clang-15 where LLD linker starts -to detect the section flags before merging them and throws the following -errors - -| ld.lld: error: section type mismatch for .nozi.kdata_page -| >>> /mnt/b/yoe/master/build/tmp/work/qemuarm64-yoe-linux/optee-os-tadevkit/3.17.0-r0/build/core/arch/arm/kernel/thread.o:(.nozi.kdata_page): SHT_PROGBITS -| >>> output section .nozi: SHT_NOBITS -| -| ld.lld: error: section type mismatch for .nozi.mmu.l2 -| >>> /mnt/b/yoe/master/build/tmp/work/qemuarm64-yoe-linux/optee-os-tadevkit/3.17.0-r0/build/core/arch/arm/mm/core_mmu_lpae.o:(.nozi.mmu.l2): SHT_PROGBITS -| >>> output section .nozi: SHT_NOBITS - -These sections should be carrying SHT_NOBITS but so far it was not -possible to do so, this patch tries to use clangs pragma to get this -going and match the functionality with gcc. - -[1] https://intel.github.io/llvm-docs/clang/LanguageExtensions.html#specifying-section-names-for-global-objects-pragma-clang-section - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - core/arch/arm/kernel/thread.c | 19 +++++++++++++++-- - core/arch/arm/mm/core_mmu_lpae.c | 35 +++++++++++++++++++++++++++---- - core/arch/arm/mm/core_mmu_v7.c | 36 +++++++++++++++++++++++++++++--- - core/arch/arm/mm/pgt_cache.c | 12 ++++++++++- - core/kernel/thread.c | 13 +++++++++++- - 5 files changed, 104 insertions(+), 11 deletions(-) - -diff --git a/core/arch/arm/kernel/thread.c b/core/arch/arm/kernel/thread.c -index 1cf76a0ca690..1e7f9f96b558 100644 ---- a/core/arch/arm/kernel/thread.c -+++ b/core/arch/arm/kernel/thread.c -@@ -44,15 +44,30 @@ static size_t thread_user_kcode_size __nex_bss; - #if defined(CFG_CORE_UNMAP_CORE_AT_EL0) && \ - defined(CFG_CORE_WORKAROUND_SPECTRE_BP_SEC) && defined(ARM64) - long thread_user_kdata_sp_offset __nex_bss; -+#ifdef __clang__ -+#ifndef CFG_VIRTUALIZATION -+#pragma clang section bss=".nozi.kdata_page" -+#else -+#pragma clang section bss=".nex_nozi.kdata_page" -+#endif -+#endif - static uint8_t thread_user_kdata_page[ - ROUNDUP(sizeof(struct thread_core_local) * CFG_TEE_CORE_NB_CORE, - SMALL_PAGE_SIZE)] - __aligned(SMALL_PAGE_SIZE) -+#ifndef __clang__ - #ifndef CFG_VIRTUALIZATION -- __section(".nozi.kdata_page"); -+ __section(".nozi.kdata_page") - #else -- __section(".nex_nozi.kdata_page"); -+ __section(".nex_nozi.kdata_page") - #endif -+#endif -+ ; -+#endif -+ -+/* reset BSS section to default ( .bss ) */ -+#ifdef __clang__ -+#pragma clang section bss="" - #endif - - #ifdef ARM32 -diff --git a/core/arch/arm/mm/core_mmu_lpae.c b/core/arch/arm/mm/core_mmu_lpae.c -index 3f08eec623f3..e6dc9261c41e 100644 ---- a/core/arch/arm/mm/core_mmu_lpae.c -+++ b/core/arch/arm/mm/core_mmu_lpae.c -@@ -233,19 +233,46 @@ typedef uint16_t l1_idx_t; - typedef uint64_t base_xlat_tbls_t[CFG_TEE_CORE_NB_CORE][NUM_BASE_LEVEL_ENTRIES]; - typedef uint64_t xlat_tbl_t[XLAT_TABLE_ENTRIES]; - -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.base_table" -+#endif - static base_xlat_tbls_t base_xlation_table[NUM_BASE_TABLES] - __aligned(NUM_BASE_LEVEL_ENTRIES * XLAT_ENTRY_SIZE) -- __section(".nozi.mmu.base_table"); -+#ifndef __clang__ -+ __section(".nozi.mmu.base_table") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l2" -+#endif - static xlat_tbl_t xlat_tables[MAX_XLAT_TABLES] -- __aligned(XLAT_TABLE_SIZE) __section(".nozi.mmu.l2"); -+ __aligned(XLAT_TABLE_SIZE) -+#ifndef __clang__ -+ __section(".nozi.mmu.l2") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - - #define XLAT_TABLES_SIZE (sizeof(xlat_tbl_t) * MAX_XLAT_TABLES) - -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l2" -+#endif - /* MMU L2 table for TAs, one for each thread */ - static xlat_tbl_t xlat_tables_ul1[CFG_NUM_THREADS] -- __aligned(XLAT_TABLE_SIZE) __section(".nozi.mmu.l2"); -- -+#ifndef __clang__ -+ __aligned(XLAT_TABLE_SIZE) __section(".nozi.mmu.l2") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - /* - * TAs page table entry inside a level 1 page table. - * -diff --git a/core/arch/arm/mm/core_mmu_v7.c b/core/arch/arm/mm/core_mmu_v7.c -index cd85bd22d385..3e18f54f6cf8 100644 ---- a/core/arch/arm/mm/core_mmu_v7.c -+++ b/core/arch/arm/mm/core_mmu_v7.c -@@ -204,16 +204,46 @@ typedef uint32_t l1_xlat_tbl_t[NUM_L1_ENTRIES]; - typedef uint32_t l2_xlat_tbl_t[NUM_L2_ENTRIES]; - typedef uint32_t ul1_xlat_tbl_t[NUM_UL1_ENTRIES]; - -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l1" -+#endif - static l1_xlat_tbl_t main_mmu_l1_ttb -- __aligned(L1_ALIGNMENT) __section(".nozi.mmu.l1"); -+ __aligned(L1_ALIGNMENT) -+#ifndef __clang__ -+ __section(".nozi.mmu.l1") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - - /* L2 MMU tables */ -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l2" -+#endif - static l2_xlat_tbl_t main_mmu_l2_ttb[MAX_XLAT_TABLES] -- __aligned(L2_ALIGNMENT) __section(".nozi.mmu.l2"); -+ __aligned(L2_ALIGNMENT) -+#ifndef __clang__ -+ __section(".nozi.mmu.l2") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - - /* MMU L1 table for TAs, one for each thread */ -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.ul1" -+#endif - static ul1_xlat_tbl_t main_mmu_ul1_ttb[CFG_NUM_THREADS] -- __aligned(UL1_ALIGNMENT) __section(".nozi.mmu.ul1"); -+ __aligned(UL1_ALIGNMENT) -+#ifndef __clang__ -+ __section(".nozi.mmu.ul1") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - - struct mmu_partition { - l1_xlat_tbl_t *l1_table; -diff --git a/core/arch/arm/mm/pgt_cache.c b/core/arch/arm/mm/pgt_cache.c -index 79553c6d2183..b9efdf42780b 100644 ---- a/core/arch/arm/mm/pgt_cache.c -+++ b/core/arch/arm/mm/pgt_cache.c -@@ -410,8 +410,18 @@ void pgt_init(void) - * has a large alignment, while .bss has a small alignment. The current - * link script is optimized for small alignment in .bss - */ -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l2" -+#endif - static uint8_t pgt_tables[PGT_CACHE_SIZE][PGT_SIZE] -- __aligned(PGT_SIZE) __section(".nozi.pgt_cache"); -+ __aligned(PGT_SIZE) -+#ifndef __clang__ -+ __section(".nozi.pgt_cache") -+#endif -+ ; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - size_t n; - - for (n = 0; n < ARRAY_SIZE(pgt_tables); n++) { -diff --git a/core/kernel/thread.c b/core/kernel/thread.c -index d1f2f3823be7..8de124ae5357 100644 ---- a/core/kernel/thread.c -+++ b/core/kernel/thread.c -@@ -38,13 +38,24 @@ struct thread_core_local thread_core_local[CFG_TEE_CORE_NB_CORE] __nex_bss; - name[stack_num][sizeof(name[stack_num]) / sizeof(uint32_t) - 1] - #endif - -+#define DO_PRAGMA(x) _Pragma (#x) -+ -+#ifdef __clang__ -+#define DECLARE_STACK(name, num_stacks, stack_size, linkage) \ -+DO_PRAGMA (clang section bss=".nozi_stack." #name) \ -+linkage uint32_t name[num_stacks] \ -+ [ROUNDUP(stack_size + STACK_CANARY_SIZE + STACK_CHECK_EXTRA, \ -+ STACK_ALIGNMENT) / sizeof(uint32_t)] \ -+ __attribute__((aligned(STACK_ALIGNMENT))); \ -+DO_PRAGMA(clang section bss="") -+#else - #define DECLARE_STACK(name, num_stacks, stack_size, linkage) \ - linkage uint32_t name[num_stacks] \ - [ROUNDUP(stack_size + STACK_CANARY_SIZE + STACK_CHECK_EXTRA, \ - STACK_ALIGNMENT) / sizeof(uint32_t)] \ - __attribute__((section(".nozi_stack." # name), \ - aligned(STACK_ALIGNMENT))) -- -+#endif - #define GET_STACK(stack) ((vaddr_t)(stack) + STACK_SIZE(stack)) - - DECLARE_STACK(stack_tmp, CFG_TEE_CORE_NB_CORE, STACK_TMP_SIZE, diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0005-core-arm-S-EL1-SPMC-boot-ABI-update.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0005-core-arm-S-EL1-SPMC-boot-ABI-update.patch deleted file mode 100644 index e6fe716812..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0005-core-arm-S-EL1-SPMC-boot-ABI-update.patch +++ /dev/null @@ -1,89 +0,0 @@ -From d0e32b6e202cde672c2b38dc568122a52be716b4 Mon Sep 17 00:00:00 2001 -From: Jens Wiklander <jens.wiklander@linaro.org> -Date: Mon, 21 Nov 2022 18:17:33 +0100 -Subject: [PATCH] core: arm: S-EL1 SPMC: boot ABI update - -Updates the boot ABI for S-EL1 SPMC to align better with other SPMCs, -like Hafnium, but also with the non-FF-A configuration. - -Register usage: -X0 - TOS FW config [1] address, if not NULL -X2 - System DTB, if not NULL - -Adds check in the default get_aslr_seed() to see if the system DTB is -present before trying to read kaslr-seed from secure-chosen. - -Note that this is an incompatible change and requires corresponding -change in TF-A ("feat(qemu): update abi between spmd and spmc") [2]. - -[1] A TF-A concept: TOS_FW_CONFIG - Trusted OS Firmware configuration - file. Used by Trusted OS (BL32), that is, OP-TEE in this case -Link: [2] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=25ae7ad1878244f78206cc7c91f7bdbd267331a1 - -Acked-by: Etienne Carriere <etienne.carriere@linaro.org> -Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> - -Upstream-Status: Backport [f1f431c7a92671b4fa397976d381cc5ad8adacc4] -Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> ---- - core/arch/arm/kernel/boot.c | 8 +++++++- - core/arch/arm/kernel/entry_a64.S | 17 ++++++++--------- - 2 files changed, 15 insertions(+), 10 deletions(-) - -diff --git a/core/arch/arm/kernel/boot.c b/core/arch/arm/kernel/boot.c -index dd34173e838d..e02c02b6097d 100644 ---- a/core/arch/arm/kernel/boot.c -+++ b/core/arch/arm/kernel/boot.c -@@ -1502,11 +1502,17 @@ struct ns_entry_context *boot_core_hpen(void) - #if defined(CFG_DT) - unsigned long __weak get_aslr_seed(void *fdt) - { -- int rc = fdt_check_header(fdt); -+ int rc = 0; - const uint64_t *seed = NULL; - int offs = 0; - int len = 0; - -+ if (!fdt) { -+ DMSG("No fdt"); -+ goto err; -+ } -+ -+ rc = fdt_check_header(fdt); - if (rc) { - DMSG("Bad fdt: %d", rc); - goto err; -diff --git a/core/arch/arm/kernel/entry_a64.S b/core/arch/arm/kernel/entry_a64.S -index 4c6e9d75ca45..047ae1f25cc9 100644 ---- a/core/arch/arm/kernel/entry_a64.S -+++ b/core/arch/arm/kernel/entry_a64.S -@@ -143,21 +143,20 @@ - .endm - - FUNC _start , : --#if defined(CFG_CORE_SEL1_SPMC) - /* -- * With OP-TEE as SPMC at S-EL1 the SPMD (SPD_spmd) in TF-A passes -- * the DTB in x0, pagaeble part in x1 and the rest of the registers -- * are unused -+ * If CFG_CORE_FFA is enabled, then x0 if non-NULL holds the TOS FW -+ * config [1] address, else x0 if non-NULL holds the pagable part -+ * address. -+ * -+ * [1] A TF-A concept: TOS_FW_CONFIG - Trusted OS Firmware -+ * configuration file. Used by Trusted OS (BL32), that is, OP-TEE -+ * here. - */ -- mov x19, x1 /* Save pagable part */ -- mov x20, x0 /* Save DT address */ --#else -- mov x19, x0 /* Save pagable part address */ -+ mov x19, x0 - #if defined(CFG_DT_ADDR) - ldr x20, =CFG_DT_ADDR - #else - mov x20, x2 /* Save DT address */ --#endif - #endif - - adr x0, reset_vect_table diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0006-core-ffa-add-TOS_FW_CONFIG-handling.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0006-core-ffa-add-TOS_FW_CONFIG-handling.patch deleted file mode 100644 index da0422b97a..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0006-core-ffa-add-TOS_FW_CONFIG-handling.patch +++ /dev/null @@ -1,247 +0,0 @@ -From 9da324001fd93e1b3d9bca076e4afddbb5cac289 Mon Sep 17 00:00:00 2001 -From: Balint Dobszay <balint.dobszay@arm.com> -Date: Fri, 10 Feb 2023 11:07:27 +0100 -Subject: [PATCH] core: ffa: add TOS_FW_CONFIG handling - -At boot TF-A passes two DT addresses (HW_CONFIG and TOS_FW_CONFIG), but -currently only the HW_CONFIG address is saved, the other one is dropped. -This commit adds functionality to save the TOS_FW_CONFIG too, so we can -retrieve it later. This is necessary for the CFG_CORE_SEL1_SPMC use -case, because the SPMC manifest is passed in this DT. - -Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> -Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> - -Upstream-Status: Backport [809fa817ae6331d98b55f7afaa3c20f8407822e4] -Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> ---- - core/arch/arm/kernel/boot.c | 60 ++++++++++++++++++++++- - core/arch/arm/kernel/entry_a32.S | 3 +- - core/arch/arm/kernel/entry_a64.S | 13 ++++- - core/arch/arm/kernel/link_dummies_paged.c | 4 +- - core/arch/arm/kernel/secure_partition.c | 2 +- - core/include/kernel/boot.h | 7 ++- - 6 files changed, 81 insertions(+), 8 deletions(-) - -diff --git a/core/arch/arm/kernel/boot.c b/core/arch/arm/kernel/boot.c -index e02c02b6097d..98e13c072d8e 100644 ---- a/core/arch/arm/kernel/boot.c -+++ b/core/arch/arm/kernel/boot.c -@@ -1,6 +1,7 @@ - // SPDX-License-Identifier: BSD-2-Clause - /* - * Copyright (c) 2015-2022, Linaro Limited -+ * Copyright (c) 2023, Arm Limited - */ - - #include <arm.h> -@@ -83,6 +84,9 @@ struct dt_descriptor { - }; - - static struct dt_descriptor external_dt __nex_bss; -+#ifdef CFG_CORE_SEL1_SPMC -+static struct dt_descriptor tos_fw_config_dt __nex_bss; -+#endif - #endif - - #ifdef CFG_SECONDARY_INIT_CNTFRQ -@@ -1224,6 +1228,54 @@ static struct core_mmu_phys_mem *get_nsec_memory(void *fdt __unused, - #endif /*CFG_CORE_DYN_SHM*/ - #endif /*!CFG_DT*/ - -+#if defined(CFG_CORE_SEL1_SPMC) && defined(CFG_DT) -+void *get_tos_fw_config_dt(void) -+{ -+ if (!IS_ENABLED(CFG_MAP_EXT_DT_SECURE)) -+ return NULL; -+ -+ assert(cpu_mmu_enabled()); -+ -+ return tos_fw_config_dt.blob; -+} -+ -+static void init_tos_fw_config_dt(unsigned long pa) -+{ -+ struct dt_descriptor *dt = &tos_fw_config_dt; -+ void *fdt = NULL; -+ int ret = 0; -+ -+ if (!IS_ENABLED(CFG_MAP_EXT_DT_SECURE)) -+ return; -+ -+ if (!pa) -+ panic("No TOS_FW_CONFIG DT found"); -+ -+ fdt = core_mmu_add_mapping(MEM_AREA_EXT_DT, pa, CFG_DTB_MAX_SIZE); -+ if (!fdt) -+ panic("Failed to map TOS_FW_CONFIG DT"); -+ -+ dt->blob = fdt; -+ -+ ret = fdt_open_into(fdt, fdt, CFG_DTB_MAX_SIZE); -+ if (ret < 0) { -+ EMSG("Invalid Device Tree at %#lx: error %d", pa, ret); -+ panic(); -+ } -+ -+ IMSG("TOS_FW_CONFIG DT found"); -+} -+#else -+void *get_tos_fw_config_dt(void) -+{ -+ return NULL; -+} -+ -+static void init_tos_fw_config_dt(unsigned long pa __unused) -+{ -+} -+#endif /*CFG_CORE_SEL1_SPMC && CFG_DT*/ -+ - #ifdef CFG_CORE_DYN_SHM - static void discover_nsec_memory(void) - { -@@ -1361,10 +1413,16 @@ static bool cpu_nmfi_enabled(void) - * Note: this function is weak just to make it possible to exclude it from - * the unpaged area. - */ --void __weak boot_init_primary_late(unsigned long fdt) -+void __weak boot_init_primary_late(unsigned long fdt, -+ unsigned long tos_fw_config) - { - init_external_dt(fdt); -+ init_tos_fw_config_dt(tos_fw_config); -+#ifdef CFG_CORE_SEL1_SPMC -+ tpm_map_log_area(get_tos_fw_config_dt()); -+#else - tpm_map_log_area(get_external_dt()); -+#endif - discover_nsec_memory(); - update_external_dt(); - configure_console_from_dt(); -diff --git a/core/arch/arm/kernel/entry_a32.S b/core/arch/arm/kernel/entry_a32.S -index 0f14ca2f6ad9..3758fd8b7674 100644 ---- a/core/arch/arm/kernel/entry_a32.S -+++ b/core/arch/arm/kernel/entry_a32.S -@@ -1,7 +1,7 @@ - /* SPDX-License-Identifier: BSD-2-Clause */ - /* - * Copyright (c) 2014, Linaro Limited -- * Copyright (c) 2021, Arm Limited -+ * Copyright (c) 2021-2023, Arm Limited - */ - - #include <arm32_macros.S> -@@ -560,6 +560,7 @@ shadow_stack_access_ok: - str r0, [r8, #THREAD_CORE_LOCAL_FLAGS] - #endif - mov r0, r6 /* DT address */ -+ mov r1, #0 /* unused */ - bl boot_init_primary_late - #ifndef CFG_VIRTUALIZATION - mov r0, #THREAD_CLF_TMP -diff --git a/core/arch/arm/kernel/entry_a64.S b/core/arch/arm/kernel/entry_a64.S -index 047ae1f25cc9..fa76437fb73c 100644 ---- a/core/arch/arm/kernel/entry_a64.S -+++ b/core/arch/arm/kernel/entry_a64.S -@@ -1,7 +1,7 @@ - /* SPDX-License-Identifier: BSD-2-Clause */ - /* - * Copyright (c) 2015-2022, Linaro Limited -- * Copyright (c) 2021, Arm Limited -+ * Copyright (c) 2021-2023, Arm Limited - */ - - #include <platform_config.h> -@@ -320,7 +320,11 @@ clear_nex_bss: - bl core_mmu_set_default_prtn_tbl - #endif - -+#ifdef CFG_CORE_SEL1_SPMC -+ mov x0, xzr /* pager not used */ -+#else - mov x0, x19 /* pagable part address */ -+#endif - mov x1, #-1 - bl boot_init_primary_early - -@@ -337,7 +341,12 @@ clear_nex_bss: - mov x22, x0 - str wzr, [x22, #THREAD_CORE_LOCAL_FLAGS] - #endif -- mov x0, x20 /* DT address */ -+ mov x0, x20 /* DT address also known as HW_CONFIG */ -+#ifdef CFG_CORE_SEL1_SPMC -+ mov x1, x19 /* TOS_FW_CONFIG DT address */ -+#else -+ mov x1, xzr /* unused */ -+#endif - bl boot_init_primary_late - #ifdef CFG_CORE_PAUTH - init_pauth_per_cpu -diff --git a/core/arch/arm/kernel/link_dummies_paged.c b/core/arch/arm/kernel/link_dummies_paged.c -index 3b8287e06a11..023a5f3f558b 100644 ---- a/core/arch/arm/kernel/link_dummies_paged.c -+++ b/core/arch/arm/kernel/link_dummies_paged.c -@@ -1,6 +1,7 @@ - // SPDX-License-Identifier: BSD-2-Clause - /* - * Copyright (c) 2017-2021, Linaro Limited -+ * Copyright (c) 2023, Arm Limited - */ - #include <compiler.h> - #include <initcall.h> -@@ -27,7 +28,8 @@ void __section(".text.dummy.call_finalcalls") call_finalcalls(void) - } - - void __section(".text.dummy.boot_init_primary_late") --boot_init_primary_late(unsigned long fdt __unused) -+boot_init_primary_late(unsigned long fdt __unused, -+ unsigned long tos_fw_config __unused) - { - } - -diff --git a/core/arch/arm/kernel/secure_partition.c b/core/arch/arm/kernel/secure_partition.c -index 1d36e90b1cf7..d386f1e4d211 100644 ---- a/core/arch/arm/kernel/secure_partition.c -+++ b/core/arch/arm/kernel/secure_partition.c -@@ -1212,7 +1212,7 @@ static TEE_Result fip_sp_map_all(void) - int subnode = 0; - int root = 0; - -- fdt = get_external_dt(); -+ fdt = get_tos_fw_config_dt(); - if (!fdt) { - EMSG("No SPMC manifest found"); - return TEE_ERROR_GENERIC; -diff --git a/core/include/kernel/boot.h b/core/include/kernel/boot.h -index 260854473b8b..941e093b29a1 100644 ---- a/core/include/kernel/boot.h -+++ b/core/include/kernel/boot.h -@@ -1,7 +1,7 @@ - /* SPDX-License-Identifier: BSD-2-Clause */ - /* - * Copyright (c) 2015-2020, Linaro Limited -- * Copyright (c) 2021, Arm Limited -+ * Copyright (c) 2021-2023, Arm Limited - */ - #ifndef __KERNEL_BOOT_H - #define __KERNEL_BOOT_H -@@ -46,7 +46,7 @@ extern const struct core_mmu_config boot_mmu_config; - /* @nsec_entry is unused if using CFG_WITH_ARM_TRUSTED_FW */ - void boot_init_primary_early(unsigned long pageable_part, - unsigned long nsec_entry); --void boot_init_primary_late(unsigned long fdt); -+void boot_init_primary_late(unsigned long fdt, unsigned long tos_fw_config); - void boot_init_memtag(void); - - void __panic_at_smc_return(void) __noreturn; -@@ -103,6 +103,9 @@ void *get_embedded_dt(void); - /* Returns external DTB if present, otherwise NULL */ - void *get_external_dt(void); - -+/* Returns TOS_FW_CONFIG DTB if present, otherwise NULL */ -+void *get_tos_fw_config_dt(void); -+ - /* - * get_aslr_seed() - return a random seed for core ASLR - * @fdt: Pointer to a device tree if CFG_DT_ADDR=y diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0007-core-spmc-handle-non-secure-interrupts.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0007-core-spmc-handle-non-secure-interrupts.patch deleted file mode 100644 index 94c1e04985..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0007-core-spmc-handle-non-secure-interrupts.patch +++ /dev/null @@ -1,275 +0,0 @@ -From 18ad0cce24addd45271edf3172ab9ce873186d7a Mon Sep 17 00:00:00 2001 -From: Imre Kis <imre.kis@arm.com> -Date: Tue, 18 Apr 2023 16:41:51 +0200 -Subject: [PATCH] core: spmc: handle non-secure interrupts - -Add FFA_INTERRUPT and FFA_RUN support for signaling non-secure -interrupts and for resuming to the secure world. If a secure partition -is preempted by a non-secure interrupt OP-TEE saves the SP's state and -sends an FFA_INTERRUPT to the normal world. After handling the interrupt -the normal world should send an FFA_RUN to OP-TEE so it can continue -running the SP. -If OP-TEE is the active FF-A endpoint (i.e. it is running TAs) the -non-secure interrupts are signaled by the existing -OPTEE_FFA_YIELDING_CALL_RETURN_INTERRUPT message instead of -FFA_INTERRUPT. - -Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/6002] - -Signed-off-by: Imre Kis <imre.kis@arm.com> -Change-Id: I577ebe86d416ee494963216a66a3bfc8206921b4 ---- - core/arch/arm/include/ffa.h | 2 +- - .../arch/arm/include/kernel/spmc_sp_handler.h | 11 +++++++ - core/arch/arm/kernel/secure_partition.c | 17 ++++++++++ - core/arch/arm/kernel/spmc_sp_handler.c | 26 ++++++++++++++++ - core/arch/arm/kernel/thread.c | 7 +++++ - core/arch/arm/kernel/thread_spmc.c | 31 ++++++++++++++++++- - core/arch/arm/kernel/thread_spmc_a64.S | 30 ++++++++++++++++++ - 7 files changed, 122 insertions(+), 2 deletions(-) - -diff --git a/core/arch/arm/include/ffa.h b/core/arch/arm/include/ffa.h -index 5a19fb0c7ff3..b3d1d354735d 100644 ---- a/core/arch/arm/include/ffa.h -+++ b/core/arch/arm/include/ffa.h -@@ -50,7 +50,7 @@ - #define FFA_ID_GET U(0x84000069) - #define FFA_MSG_WAIT U(0x8400006B) - #define FFA_MSG_YIELD U(0x8400006C) --#define FFA_MSG_RUN U(0x8400006D) -+#define FFA_RUN U(0x8400006D) - #define FFA_MSG_SEND U(0x8400006E) - #define FFA_MSG_SEND_DIRECT_REQ_32 U(0x8400006F) - #define FFA_MSG_SEND_DIRECT_REQ_64 U(0xC400006F) -diff --git a/core/arch/arm/include/kernel/spmc_sp_handler.h b/core/arch/arm/include/kernel/spmc_sp_handler.h -index f5bda7bfe7d0..30c1e4691273 100644 ---- a/core/arch/arm/include/kernel/spmc_sp_handler.h -+++ b/core/arch/arm/include/kernel/spmc_sp_handler.h -@@ -25,6 +25,8 @@ void spmc_sp_start_thread(struct thread_smc_args *args); - int spmc_sp_add_share(struct ffa_rxtx *rxtx, - size_t blen, uint64_t *global_handle, - struct sp_session *owner_sp); -+void spmc_sp_set_to_preempted(struct ts_session *ts_sess); -+int spmc_sp_resume_from_preempted(uint16_t endpoint_id); - #else - static inline void spmc_sp_start_thread(struct thread_smc_args *args __unused) - { -@@ -37,6 +39,15 @@ static inline int spmc_sp_add_share(struct ffa_rxtx *rxtx __unused, - { - return FFA_NOT_SUPPORTED; - } -+ -+static inline void spmc_sp_set_to_preempted(struct ts_session *ts_sess __unused) -+{ -+} -+ -+static inline int spmc_sp_resume_from_preempted(uint16_t endpoint_id __unused) -+{ -+ return FFA_NOT_SUPPORTED; -+} - #endif - - #endif /* __KERNEL_SPMC_SP_HANDLER_H */ -diff --git a/core/arch/arm/kernel/secure_partition.c b/core/arch/arm/kernel/secure_partition.c -index d386f1e4d211..740be6d22e47 100644 ---- a/core/arch/arm/kernel/secure_partition.c -+++ b/core/arch/arm/kernel/secure_partition.c -@@ -999,6 +999,8 @@ static TEE_Result sp_enter_invoke_cmd(struct ts_session *s, - struct sp_session *sp_s = to_sp_session(s); - struct ts_session *sess = NULL; - struct thread_ctx_regs *sp_regs = NULL; -+ uint32_t thread_id = THREAD_ID_INVALID; -+ uint32_t rpc_target_info = 0; - uint32_t panicked = false; - uint32_t panic_code = 0; - -@@ -1011,8 +1013,23 @@ static TEE_Result sp_enter_invoke_cmd(struct ts_session *s, - sp_regs->cpsr = read_daif() & (SPSR_64_DAIF_MASK << SPSR_64_DAIF_SHIFT); - - exceptions = thread_mask_exceptions(THREAD_EXCP_ALL); -+ -+ /* -+ * Store endpoint ID and thread ID in rpc_target_info. This will be used -+ * as w1 in FFA_INTERRUPT in case of a NWd interrupt. -+ */ -+ rpc_target_info = thread_get_tsd()->rpc_target_info; -+ thread_id = thread_get_id(); -+ assert((thread_id & ~0xffff) == 0); -+ thread_get_tsd()->rpc_target_info = (sp_s->endpoint_id << 16) | -+ (thread_id & 0xffff); -+ - __thread_enter_user_mode(sp_regs, &panicked, &panic_code); -+ - sp_regs->cpsr = cpsr; -+ /* Restore rpc_target_info */ -+ thread_get_tsd()->rpc_target_info = rpc_target_info; -+ - thread_unmask_exceptions(exceptions); - - thread_user_clear_vfp(&ctx->uctx); -diff --git a/core/arch/arm/kernel/spmc_sp_handler.c b/core/arch/arm/kernel/spmc_sp_handler.c -index 46a15646ecf0..12681151a796 100644 ---- a/core/arch/arm/kernel/spmc_sp_handler.c -+++ b/core/arch/arm/kernel/spmc_sp_handler.c -@@ -366,6 +366,32 @@ cleanup: - return res; - } - -+void spmc_sp_set_to_preempted(struct ts_session *ts_sess) -+{ -+ if (ts_sess && is_sp_ctx(ts_sess->ctx)) { -+ struct sp_session *sp_sess = to_sp_session(ts_sess); -+ -+ assert(sp_sess->state == sp_busy); -+ -+ sp_sess->state = sp_preempted; -+ } -+} -+ -+int spmc_sp_resume_from_preempted(uint16_t endpoint_id) -+{ -+ struct sp_session *sp_sess = sp_get_session(endpoint_id); -+ -+ if (!sp_sess) -+ return FFA_INVALID_PARAMETERS; -+ -+ if (sp_sess->state != sp_preempted) -+ return FFA_DENIED; -+ -+ sp_sess->state = sp_busy; -+ -+ return FFA_OK; -+} -+ - static bool check_rxtx(struct ffa_rxtx *rxtx) - { - return rxtx && rxtx->rx && rxtx->tx && rxtx->size > 0; -diff --git a/core/arch/arm/kernel/thread.c b/core/arch/arm/kernel/thread.c -index 1e7f9f96b558..8cd4dc961b02 100644 ---- a/core/arch/arm/kernel/thread.c -+++ b/core/arch/arm/kernel/thread.c -@@ -531,6 +531,13 @@ int thread_state_suspend(uint32_t flags, uint32_t cpsr, vaddr_t pc) - core_mmu_set_user_map(NULL); - } - -+ if (IS_ENABLED(CFG_SECURE_PARTITION)) { -+ struct ts_session *ts_sess = -+ TAILQ_FIRST(&threads[ct].tsd.sess_stack); -+ -+ spmc_sp_set_to_preempted(ts_sess); -+ } -+ - l->curr_thread = THREAD_ID_INVALID; - - if (IS_ENABLED(CFG_VIRTUALIZATION)) -diff --git a/core/arch/arm/kernel/thread_spmc.c b/core/arch/arm/kernel/thread_spmc.c -index 3b4ac0b4e35c..bc4e7687d618 100644 ---- a/core/arch/arm/kernel/thread_spmc.c -+++ b/core/arch/arm/kernel/thread_spmc.c -@@ -45,7 +45,7 @@ struct mem_frag_state { - #endif - - /* Initialized in spmc_init() below */ --static uint16_t my_endpoint_id; -+uint16_t my_endpoint_id; - - /* - * If struct ffa_rxtx::size is 0 RX/TX buffers are not mapped or initialized. -@@ -437,6 +437,32 @@ out: - FFA_PARAM_MBZ, FFA_PARAM_MBZ); - cpu_spin_unlock(&rxtx->spinlock); - } -+ -+static void spmc_handle_run(struct thread_smc_args *args) -+{ -+ uint16_t endpoint = (args->a1 >> 16) & 0xffff; -+ uint16_t thread_id = (args->a1 & 0xffff); -+ uint32_t rc = 0; -+ -+ if (endpoint != my_endpoint_id) { -+ /* -+ * The endpoint should be an SP, try to resume the SP from -+ * preempted into busy state. -+ */ -+ rc = spmc_sp_resume_from_preempted(endpoint); -+ if (rc) -+ goto out; -+ } -+ -+ thread_resume_from_rpc(thread_id, 0, 0, 0, 0); -+ -+ /* thread_resume_from_rpc return only of the thread_id is invalid */ -+ rc = FFA_INVALID_PARAMETERS; -+ -+out: -+ spmc_set_args(args, FFA_ERROR, FFA_PARAM_MBZ, rc, FFA_PARAM_MBZ, -+ FFA_PARAM_MBZ, FFA_PARAM_MBZ); -+} - #endif /*CFG_CORE_SEL1_SPMC*/ - - static void handle_yielding_call(struct thread_smc_args *args) -@@ -970,6 +996,9 @@ void thread_spmc_msg_recv(struct thread_smc_args *args) - case FFA_PARTITION_INFO_GET: - spmc_handle_partition_info_get(args, &nw_rxtx); - break; -+ case FFA_RUN: -+ spmc_handle_run(args); -+ break; - #endif /*CFG_CORE_SEL1_SPMC*/ - case FFA_INTERRUPT: - itr_core_handler(); -diff --git a/core/arch/arm/kernel/thread_spmc_a64.S b/core/arch/arm/kernel/thread_spmc_a64.S -index 21cb62513a42..7297005a6038 100644 ---- a/core/arch/arm/kernel/thread_spmc_a64.S -+++ b/core/arch/arm/kernel/thread_spmc_a64.S -@@ -14,6 +14,20 @@ - #include <kernel/thread.h> - #include <optee_ffa.h> - -+#if CFG_SECURE_PARTITION -+LOCAL_FUNC thread_ffa_interrupt , : -+ mov_imm x0, FFA_INTERRUPT /* FID */ -+ /* X1: Endpoint/vCPU IDs is set by caller */ -+ mov x2, #FFA_PARAM_MBZ /* Param MBZ */ -+ mov x3, #FFA_PARAM_MBZ /* Param MBZ */ -+ mov x4, #FFA_PARAM_MBZ /* Param MBZ */ -+ mov x5, #FFA_PARAM_MBZ /* Param MBZ */ -+ mov x6, #FFA_PARAM_MBZ /* Param MBZ */ -+ mov x7, #FFA_PARAM_MBZ /* Param MBZ */ -+ b .ffa_msg_loop -+END_FUNC thread_ffa_msg_wait -+#endif /* CFG_SECURE_PARTITION */ -+ - FUNC thread_ffa_msg_wait , : - mov_imm x0, FFA_MSG_WAIT /* FID */ - mov x1, #FFA_TARGET_INFO_MBZ /* Target info MBZ */ -@@ -171,6 +185,14 @@ END_FUNC thread_rpc - * The current thread as indicated by @thread_index has just been - * suspended. The job here is just to inform normal world the thread id to - * resume when returning. -+ * If the active FF-A endpoint is OP-TEE (or a TA) then an this function send an -+ * OPTEE_FFA_YIELDING_CALL_RETURN_INTERRUPT message to the normal world via the -+ * FFA_MSG_SEND_DIRECT_RESP interface. This is handled by the OP-TEE -+ * driver in Linux so it can schedule task to the thread. -+ * If the active endpoint is an SP the function sends an FFA_INTERRUPT. This is -+ * handled by the FF-A driver and after taking care of the NWd interrupts it -+ * returns via an FFA_RUN call. -+ * The active endpoint is determined by the upper 16 bits of rpc_target_info. - */ - FUNC thread_foreign_intr_exit , : - /* load threads[w0].tsd.rpc_target_info into w1 */ -@@ -178,6 +200,14 @@ FUNC thread_foreign_intr_exit , : - adr_l x2, threads - madd x1, x1, x0, x2 - ldr w1, [x1, #THREAD_CTX_TSD_RPC_TARGET_INFO] -+#if CFG_SECURE_PARTITION -+ adr_l x2, my_endpoint_id -+ ldrh w2, [x2] -+ lsr w3, w1, #16 -+ cmp w2, w3 -+ /* (threads[w0].tsd.rpc_target_info >> 16) != my_endpoint_id */ -+ bne thread_ffa_interrupt -+#endif /* CFG_SECURE_PARTITION */ - mov x2, #FFA_PARAM_MBZ - mov w3, #FFA_PARAM_MBZ - mov w4, #OPTEE_FFA_YIELDING_CALL_RETURN_INTERRUPT diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0008-core-spmc-configure-SP-s-NS-interrupt-action-based-o.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0008-core-spmc-configure-SP-s-NS-interrupt-action-based-o.patch deleted file mode 100644 index 9f7d781e2a..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/0008-core-spmc-configure-SP-s-NS-interrupt-action-based-o.patch +++ /dev/null @@ -1,148 +0,0 @@ -From e7835c526aabd8e5b6db335619a0d86165c587ed Mon Sep 17 00:00:00 2001 -From: Imre Kis <imre.kis@arm.com> -Date: Tue, 25 Apr 2023 14:19:14 +0200 -Subject: [PATCH] core: spmc: configure SP's NS interrupt action based on the - manifest - -Used mandatory ns-interrupts-action SP manifest property to configure -signaled or queued non-secure interrupt handling. - -Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/6002] - -Signed-off-by: Imre Kis <imre.kis@arm.com> -Change-Id: I843e69e5dbb9613ecd8b95654e8ca1730a594ca6 ---- - .../arm/include/kernel/secure_partition.h | 2 + - core/arch/arm/kernel/secure_partition.c | 66 +++++++++++++++++-- - 2 files changed, 63 insertions(+), 5 deletions(-) - -diff --git a/core/arch/arm/include/kernel/secure_partition.h b/core/arch/arm/include/kernel/secure_partition.h -index 24b0a8cc07d2..51f6b697e5eb 100644 ---- a/core/arch/arm/include/kernel/secure_partition.h -+++ b/core/arch/arm/include/kernel/secure_partition.h -@@ -43,6 +43,8 @@ struct sp_session { - unsigned int spinlock; - const void *fdt; - bool is_initialized; -+ uint32_t ns_interrupts_action; -+ uint32_t ns_interrupts_action_inherited; - TAILQ_ENTRY(sp_session) link; - }; - -diff --git a/core/arch/arm/kernel/secure_partition.c b/core/arch/arm/kernel/secure_partition.c -index 740be6d22e47..b644e1c72e6a 100644 ---- a/core/arch/arm/kernel/secure_partition.c -+++ b/core/arch/arm/kernel/secure_partition.c -@@ -46,6 +46,10 @@ - SP_MANIFEST_ATTR_WRITE | \ - SP_MANIFEST_ATTR_EXEC) - -+#define SP_MANIFEST_NS_INT_QUEUED (0x0) -+#define SP_MANIFEST_NS_INT_MANAGED_EXIT (0x1) -+#define SP_MANIFEST_NS_INT_SIGNALED (0x2) -+ - #define SP_PKG_HEADER_MAGIC (0x474b5053) - #define SP_PKG_HEADER_VERSION_V1 (0x1) - #define SP_PKG_HEADER_VERSION_V2 (0x2) -@@ -907,6 +911,30 @@ static TEE_Result sp_init_uuid(const TEE_UUID *uuid, const void * const fdt) - return res; - DMSG("endpoint is 0x%"PRIx16, sess->endpoint_id); - -+ res = sp_dt_get_u32(fdt, 0, "ns-interrupts-action", -+ &sess->ns_interrupts_action); -+ -+ if (res) { -+ EMSG("Mandatory property is missing: ns-interrupts-action"); -+ return res; -+ } -+ -+ switch (sess->ns_interrupts_action) { -+ case SP_MANIFEST_NS_INT_QUEUED: -+ case SP_MANIFEST_NS_INT_SIGNALED: -+ /* OK */ -+ break; -+ -+ case SP_MANIFEST_NS_INT_MANAGED_EXIT: -+ EMSG("Managed exit is not implemented"); -+ return TEE_ERROR_NOT_IMPLEMENTED; -+ -+ default: -+ EMSG("Invalid ns-interrupts-action value: %d", -+ sess->ns_interrupts_action); -+ return TEE_ERROR_BAD_PARAMETERS; -+ } -+ - return TEE_SUCCESS; - } - -@@ -989,17 +1017,45 @@ TEE_Result sp_enter(struct thread_smc_args *args, struct sp_session *sp) - return res; - } - -+/* -+ * According to FF-A v1.1 section 8.3.1.4 if a caller requires less permissive -+ * active on NS interrupt than the callee, the callee must inherit the caller's -+ * configuration. -+ * Each SP's own NS action setting is stored in ns_interrupts_action. The -+ * effective action will be MIN([self action], [caller's action]) which is -+ * stored in the ns_interrupts_action_inherited field. -+ */ -+static void sp_cpsr_configure_foreing_interrupts(struct sp_session *s, -+ struct ts_session *caller, -+ uint64_t *cpsr) -+{ -+ if (caller) { -+ struct sp_session *caller_sp = to_sp_session(caller); -+ -+ s->ns_interrupts_action_inherited = -+ MIN(caller_sp->ns_interrupts_action_inherited, -+ s->ns_interrupts_action); -+ } else { -+ s->ns_interrupts_action_inherited = s->ns_interrupts_action; -+ } -+ -+ if (s->ns_interrupts_action_inherited == SP_MANIFEST_NS_INT_QUEUED) -+ *cpsr |= (THREAD_EXCP_FOREIGN_INTR << ARM32_CPSR_F_SHIFT); -+ else -+ *cpsr &= ~(THREAD_EXCP_FOREIGN_INTR << ARM32_CPSR_F_SHIFT); -+} -+ - static TEE_Result sp_enter_invoke_cmd(struct ts_session *s, - uint32_t cmd __unused) - { - struct sp_ctx *ctx = to_sp_ctx(s->ctx); - TEE_Result res = TEE_SUCCESS; - uint32_t exceptions = 0; -- uint64_t cpsr = 0; - struct sp_session *sp_s = to_sp_session(s); - struct ts_session *sess = NULL; - struct thread_ctx_regs *sp_regs = NULL; - uint32_t thread_id = THREAD_ID_INVALID; -+ struct ts_session *caller = NULL; - uint32_t rpc_target_info = 0; - uint32_t panicked = false; - uint32_t panic_code = 0; -@@ -1009,11 +1065,12 @@ static TEE_Result sp_enter_invoke_cmd(struct ts_session *s, - sp_regs = &ctx->sp_regs; - ts_push_current_session(s); - -- cpsr = sp_regs->cpsr; -- sp_regs->cpsr = read_daif() & (SPSR_64_DAIF_MASK << SPSR_64_DAIF_SHIFT); -- - exceptions = thread_mask_exceptions(THREAD_EXCP_ALL); - -+ /* Enable/disable foreign interrupts in CPSR/SPSR */ -+ caller = ts_get_calling_session(); -+ sp_cpsr_configure_foreing_interrupts(sp_s, caller, &sp_regs->cpsr); -+ - /* - * Store endpoint ID and thread ID in rpc_target_info. This will be used - * as w1 in FFA_INTERRUPT in case of a NWd interrupt. -@@ -1026,7 +1083,6 @@ static TEE_Result sp_enter_invoke_cmd(struct ts_session *s, - - __thread_enter_user_mode(sp_regs, &panicked, &panic_code); - -- sp_regs->cpsr = cpsr; - /* Restore rpc_target_info */ - thread_get_tsd()->rpc_target_info = rpc_target_info; - diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/CVE-2023-41325.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/CVE-2023-41325.patch deleted file mode 100644 index 08acce07f9..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.20.0/CVE-2023-41325.patch +++ /dev/null @@ -1,634 +0,0 @@ -From 800627f054959aac0dd3527495ee3fad0137600a Mon Sep 17 00:00:00 2001 -From: Jihwan Park <jihwp@amazon.com> -Date: Mon, 3 Jul 2023 08:51:47 +0200 -Subject: [PATCH] core: crypto_bignum_free(): add indirection and set pointer - to NULL - -To prevent human mistake, crypto_bignum_free() sets the location of the -bignum pointer to NULL after freeing it. - -Signed-off-by: Jihwan Park <jihwp@amazon.com> -Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> -Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> -Reviewed-by: Joakim Bech <joakim.bech@linaro.org> -Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> - -CVE: CVE-2023-41325 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - core/crypto/crypto.c | 4 +-- - core/drivers/crypto/caam/acipher/caam_dh.c | 8 ++--- - core/drivers/crypto/caam/acipher/caam_dsa.c | 14 ++++---- - core/drivers/crypto/caam/acipher/caam_ecc.c | 10 +++--- - core/drivers/crypto/caam/acipher/caam_rsa.c | 24 ++++++------- - core/drivers/crypto/se050/core/ecc.c | 14 ++++---- - core/drivers/crypto/se050/core/rsa.c | 38 ++++++++++----------- - core/drivers/crypto/versal/ecc.c | 6 ++-- - core/include/crypto/crypto.h | 2 +- - core/lib/libtomcrypt/dh.c | 8 ++--- - core/lib/libtomcrypt/dsa.c | 14 ++++---- - core/lib/libtomcrypt/ecc.c | 10 +++--- - core/lib/libtomcrypt/mpi_desc.c | 9 +++-- - core/lib/libtomcrypt/rsa.c | 22 ++++++------ - core/tee/tee_svc_cryp.c | 7 ++-- - lib/libmbedtls/core/bignum.c | 9 +++-- - lib/libmbedtls/core/dh.c | 8 ++--- - lib/libmbedtls/core/ecc.c | 10 +++--- - lib/libmbedtls/core/rsa.c | 22 ++++++------ - 19 files changed, 122 insertions(+), 117 deletions(-) - -diff --git a/core/crypto/crypto.c b/core/crypto/crypto.c -index 9f7d35097..60cb89a31 100644 ---- a/core/crypto/crypto.c -+++ b/core/crypto/crypto.c -@@ -498,9 +498,9 @@ void crypto_bignum_copy(struct bignum *to __unused, - bignum_cant_happen(); - } - --void crypto_bignum_free(struct bignum *a) -+void crypto_bignum_free(struct bignum **a) - { -- if (a) -+ if (a && *a) - panic(); - } - -diff --git a/core/drivers/crypto/caam/acipher/caam_dh.c b/core/drivers/crypto/caam/acipher/caam_dh.c -index 6131ff0ef..35fc44541 100644 ---- a/core/drivers/crypto/caam/acipher/caam_dh.c -+++ b/core/drivers/crypto/caam/acipher/caam_dh.c -@@ -195,10 +195,10 @@ static TEE_Result do_allocate_keypair(struct dh_keypair *key, size_t size_bits) - err: - DH_TRACE("Allocation error"); - -- crypto_bignum_free(key->g); -- crypto_bignum_free(key->p); -- crypto_bignum_free(key->x); -- crypto_bignum_free(key->y); -+ crypto_bignum_free(&key->g); -+ crypto_bignum_free(&key->p); -+ crypto_bignum_free(&key->x); -+ crypto_bignum_free(&key->y); - - return TEE_ERROR_OUT_OF_MEMORY; - } -diff --git a/core/drivers/crypto/caam/acipher/caam_dsa.c b/core/drivers/crypto/caam/acipher/caam_dsa.c -index 2696f0b3c..d60bb8e89 100644 ---- a/core/drivers/crypto/caam/acipher/caam_dsa.c -+++ b/core/drivers/crypto/caam/acipher/caam_dsa.c -@@ -309,10 +309,10 @@ static TEE_Result do_allocate_keypair(struct dsa_keypair *key, size_t l_bits, - err: - DSA_TRACE("Allocation error"); - -- crypto_bignum_free(key->g); -- crypto_bignum_free(key->p); -- crypto_bignum_free(key->q); -- crypto_bignum_free(key->x); -+ crypto_bignum_free(&key->g); -+ crypto_bignum_free(&key->p); -+ crypto_bignum_free(&key->q); -+ crypto_bignum_free(&key->x); - - return TEE_ERROR_OUT_OF_MEMORY; - } -@@ -358,9 +358,9 @@ static TEE_Result do_allocate_publickey(struct dsa_public_key *key, - err: - DSA_TRACE("Allocation error"); - -- crypto_bignum_free(key->g); -- crypto_bignum_free(key->p); -- crypto_bignum_free(key->q); -+ crypto_bignum_free(&key->g); -+ crypto_bignum_free(&key->p); -+ crypto_bignum_free(&key->q); - - return TEE_ERROR_OUT_OF_MEMORY; - } -diff --git a/core/drivers/crypto/caam/acipher/caam_ecc.c b/core/drivers/crypto/caam/acipher/caam_ecc.c -index 90e87c20a..6b12b6cbe 100644 ---- a/core/drivers/crypto/caam/acipher/caam_ecc.c -+++ b/core/drivers/crypto/caam/acipher/caam_ecc.c -@@ -169,8 +169,8 @@ static TEE_Result do_allocate_keypair(struct ecc_keypair *key, size_t size_bits) - err: - ECC_TRACE("Allocation error"); - -- crypto_bignum_free(key->d); -- crypto_bignum_free(key->x); -+ crypto_bignum_free(&key->d); -+ crypto_bignum_free(&key->x); - - return TEE_ERROR_OUT_OF_MEMORY; - } -@@ -204,7 +204,7 @@ static TEE_Result do_allocate_publickey(struct ecc_public_key *key, - err: - ECC_TRACE("Allocation error"); - -- crypto_bignum_free(key->x); -+ crypto_bignum_free(&key->x); - - return TEE_ERROR_OUT_OF_MEMORY; - } -@@ -216,8 +216,8 @@ err: - */ - static void do_free_publickey(struct ecc_public_key *key) - { -- crypto_bignum_free(key->x); -- crypto_bignum_free(key->y); -+ crypto_bignum_free(&key->x); -+ crypto_bignum_free(&key->y); - } - - /* -diff --git a/core/drivers/crypto/caam/acipher/caam_rsa.c b/core/drivers/crypto/caam/acipher/caam_rsa.c -index e860c641c..b59ab0b6e 100644 ---- a/core/drivers/crypto/caam/acipher/caam_rsa.c -+++ b/core/drivers/crypto/caam/acipher/caam_rsa.c -@@ -86,14 +86,14 @@ static uint8_t caam_era; - */ - static void do_free_keypair(struct rsa_keypair *key) - { -- crypto_bignum_free(key->e); -- crypto_bignum_free(key->d); -- crypto_bignum_free(key->n); -- crypto_bignum_free(key->p); -- crypto_bignum_free(key->q); -- crypto_bignum_free(key->qp); -- crypto_bignum_free(key->dp); -- crypto_bignum_free(key->dq); -+ crypto_bignum_free(&key->e); -+ crypto_bignum_free(&key->d); -+ crypto_bignum_free(&key->n); -+ crypto_bignum_free(&key->p); -+ crypto_bignum_free(&key->q); -+ crypto_bignum_free(&key->qp); -+ crypto_bignum_free(&key->dp); -+ crypto_bignum_free(&key->dq); - } - - /* -@@ -435,8 +435,8 @@ static TEE_Result do_allocate_publickey(struct rsa_public_key *key, - err_alloc_publickey: - RSA_TRACE("Allocation error"); - -- crypto_bignum_free(key->e); -- crypto_bignum_free(key->n); -+ crypto_bignum_free(&key->e); -+ crypto_bignum_free(&key->n); - - return TEE_ERROR_OUT_OF_MEMORY; - } -@@ -448,8 +448,8 @@ err_alloc_publickey: - */ - static void do_free_publickey(struct rsa_public_key *key) - { -- crypto_bignum_free(key->e); -- crypto_bignum_free(key->n); -+ crypto_bignum_free(&key->e); -+ crypto_bignum_free(&key->n); - } - - /* -diff --git a/core/drivers/crypto/se050/core/ecc.c b/core/drivers/crypto/se050/core/ecc.c -index d74334760..52f82c69d 100644 ---- a/core/drivers/crypto/se050/core/ecc.c -+++ b/core/drivers/crypto/se050/core/ecc.c -@@ -752,9 +752,9 @@ static TEE_Result do_alloc_keypair(struct ecc_keypair *s, - goto err; - return TEE_SUCCESS; - err: -- crypto_bignum_free(s->d); -- crypto_bignum_free(s->x); -- crypto_bignum_free(s->y); -+ crypto_bignum_free(&s->d); -+ crypto_bignum_free(&s->x); -+ crypto_bignum_free(&s->y); - return TEE_ERROR_OUT_OF_MEMORY; - } - -@@ -768,8 +768,8 @@ static TEE_Result do_alloc_publickey(struct ecc_public_key *s, - goto err; - return TEE_SUCCESS; - err: -- crypto_bignum_free(s->x); -- crypto_bignum_free(s->y); -+ crypto_bignum_free(&s->x); -+ crypto_bignum_free(&s->y); - return TEE_ERROR_OUT_OF_MEMORY; - } - -@@ -778,8 +778,8 @@ static void do_free_publickey(struct ecc_public_key *s) - if (!s) - return; - -- crypto_bignum_free(s->x); -- crypto_bignum_free(s->y); -+ crypto_bignum_free(&s->x); -+ crypto_bignum_free(&s->y); - } - - static struct drvcrypt_ecc driver_ecc = { -diff --git a/core/drivers/crypto/se050/core/rsa.c b/core/drivers/crypto/se050/core/rsa.c -index 815abb3cd..475d2b99a 100644 ---- a/core/drivers/crypto/se050/core/rsa.c -+++ b/core/drivers/crypto/se050/core/rsa.c -@@ -537,14 +537,14 @@ static TEE_Result do_alloc_keypair(struct rsa_keypair *s, - - return TEE_SUCCESS; - err: -- crypto_bignum_free(s->e); -- crypto_bignum_free(s->d); -- crypto_bignum_free(s->n); -- crypto_bignum_free(s->p); -- crypto_bignum_free(s->q); -- crypto_bignum_free(s->qp); -- crypto_bignum_free(s->dp); -- crypto_bignum_free(s->dq); -+ crypto_bignum_free(&s->e); -+ crypto_bignum_free(&s->d); -+ crypto_bignum_free(&s->n); -+ crypto_bignum_free(&s->p); -+ crypto_bignum_free(&s->q); -+ crypto_bignum_free(&s->qp); -+ crypto_bignum_free(&s->dp); -+ crypto_bignum_free(&s->dq); - - return TEE_ERROR_OUT_OF_MEMORY; - } -@@ -556,7 +556,7 @@ static TEE_Result do_alloc_publickey(struct rsa_public_key *s, - if (!bn_alloc_max(&s->e)) - return TEE_ERROR_OUT_OF_MEMORY; - if (!bn_alloc_max(&s->n)) { -- crypto_bignum_free(s->e); -+ crypto_bignum_free(&s->e); - return TEE_ERROR_OUT_OF_MEMORY; - } - -@@ -566,8 +566,8 @@ static TEE_Result do_alloc_publickey(struct rsa_public_key *s, - static void do_free_publickey(struct rsa_public_key *s) - { - if (s) { -- crypto_bignum_free(s->n); -- crypto_bignum_free(s->e); -+ crypto_bignum_free(&s->n); -+ crypto_bignum_free(&s->e); - } - } - -@@ -587,14 +587,14 @@ static void do_free_keypair(struct rsa_keypair *s) - sss_se05x_key_store_erase_key(se050_kstore, &k_object); - } - -- crypto_bignum_free(s->e); -- crypto_bignum_free(s->d); -- crypto_bignum_free(s->n); -- crypto_bignum_free(s->p); -- crypto_bignum_free(s->q); -- crypto_bignum_free(s->qp); -- crypto_bignum_free(s->dp); -- crypto_bignum_free(s->dq); -+ crypto_bignum_free(&s->e); -+ crypto_bignum_free(&s->d); -+ crypto_bignum_free(&s->n); -+ crypto_bignum_free(&s->p); -+ crypto_bignum_free(&s->q); -+ crypto_bignum_free(&s->qp); -+ crypto_bignum_free(&s->dp); -+ crypto_bignum_free(&s->dq); - } - - static TEE_Result do_gen_keypair(struct rsa_keypair *key, size_t kb) -diff --git a/core/drivers/crypto/versal/ecc.c b/core/drivers/crypto/versal/ecc.c -index 3d5454509..18ec4f78d 100644 ---- a/core/drivers/crypto/versal/ecc.c -+++ b/core/drivers/crypto/versal/ecc.c -@@ -284,9 +284,9 @@ static TEE_Result sign(uint32_t algo, struct ecc_keypair *key, - - versal_mbox_alloc(bytes, NULL, &k); - crypto_bignum_bn2bin_eswap(key->curve, ephemeral.d, k.buf); -- crypto_bignum_free(ephemeral.d); -- crypto_bignum_free(ephemeral.x); -- crypto_bignum_free(ephemeral.y); -+ crypto_bignum_free(&ephemeral.d); -+ crypto_bignum_free(&ephemeral.x); -+ crypto_bignum_free(&ephemeral.y); - - /* Private key*/ - versal_mbox_alloc(bytes, NULL, &d); -diff --git a/core/include/crypto/crypto.h b/core/include/crypto/crypto.h -index 71a287ec6..0e6c139ce 100644 ---- a/core/include/crypto/crypto.h -+++ b/core/include/crypto/crypto.h -@@ -98,7 +98,7 @@ size_t crypto_bignum_num_bytes(struct bignum *a); - size_t crypto_bignum_num_bits(struct bignum *a); - void crypto_bignum_bn2bin(const struct bignum *from, uint8_t *to); - void crypto_bignum_copy(struct bignum *to, const struct bignum *from); --void crypto_bignum_free(struct bignum *a); -+void crypto_bignum_free(struct bignum **a); - void crypto_bignum_clear(struct bignum *a); - - /* return -1 if a<b, 0 if a==b, +1 if a>b */ -diff --git a/core/lib/libtomcrypt/dh.c b/core/lib/libtomcrypt/dh.c -index 4eb9916f2..b1d0a4d00 100644 ---- a/core/lib/libtomcrypt/dh.c -+++ b/core/lib/libtomcrypt/dh.c -@@ -28,10 +28,10 @@ TEE_Result crypto_acipher_alloc_dh_keypair(struct dh_keypair *s, - goto err; - return TEE_SUCCESS; - err: -- crypto_bignum_free(s->g); -- crypto_bignum_free(s->p); -- crypto_bignum_free(s->y); -- crypto_bignum_free(s->x); -+ crypto_bignum_free(&s->g); -+ crypto_bignum_free(&s->p); -+ crypto_bignum_free(&s->y); -+ crypto_bignum_free(&s->x); - return TEE_ERROR_OUT_OF_MEMORY; - } - -diff --git a/core/lib/libtomcrypt/dsa.c b/core/lib/libtomcrypt/dsa.c -index a2dc720ed..d6243c469 100644 ---- a/core/lib/libtomcrypt/dsa.c -+++ b/core/lib/libtomcrypt/dsa.c -@@ -30,10 +30,10 @@ TEE_Result crypto_acipher_alloc_dsa_keypair(struct dsa_keypair *s, - goto err; - return TEE_SUCCESS; - err: -- crypto_bignum_free(s->g); -- crypto_bignum_free(s->p); -- crypto_bignum_free(s->q); -- crypto_bignum_free(s->y); -+ crypto_bignum_free(&s->g); -+ crypto_bignum_free(&s->p); -+ crypto_bignum_free(&s->q); -+ crypto_bignum_free(&s->y); - return TEE_ERROR_OUT_OF_MEMORY; - } - -@@ -52,9 +52,9 @@ TEE_Result crypto_acipher_alloc_dsa_public_key(struct dsa_public_key *s, - goto err; - return TEE_SUCCESS; - err: -- crypto_bignum_free(s->g); -- crypto_bignum_free(s->p); -- crypto_bignum_free(s->q); -+ crypto_bignum_free(&s->g); -+ crypto_bignum_free(&s->p); -+ crypto_bignum_free(&s->q); - return TEE_ERROR_OUT_OF_MEMORY; - } - -diff --git a/core/lib/libtomcrypt/ecc.c b/core/lib/libtomcrypt/ecc.c -index 938378247..fa645e17a 100644 ---- a/core/lib/libtomcrypt/ecc.c -+++ b/core/lib/libtomcrypt/ecc.c -@@ -18,8 +18,8 @@ static void _ltc_ecc_free_public_key(struct ecc_public_key *s) - if (!s) - return; - -- crypto_bignum_free(s->x); -- crypto_bignum_free(s->y); -+ crypto_bignum_free(&s->x); -+ crypto_bignum_free(&s->y); - } - - /* -@@ -465,8 +465,8 @@ TEE_Result crypto_asym_alloc_ecc_keypair(struct ecc_keypair *s, - err: - s->ops = NULL; - -- crypto_bignum_free(s->d); -- crypto_bignum_free(s->x); -+ crypto_bignum_free(&s->d); -+ crypto_bignum_free(&s->x); - - return TEE_ERROR_OUT_OF_MEMORY; - } -@@ -541,7 +541,7 @@ TEE_Result crypto_asym_alloc_ecc_public_key(struct ecc_public_key *s, - err: - s->ops = NULL; - -- crypto_bignum_free(s->x); -+ crypto_bignum_free(&s->x); - - return TEE_ERROR_OUT_OF_MEMORY; - } -diff --git a/core/lib/libtomcrypt/mpi_desc.c b/core/lib/libtomcrypt/mpi_desc.c -index 235fbe630..ff8dd13c7 100644 ---- a/core/lib/libtomcrypt/mpi_desc.c -+++ b/core/lib/libtomcrypt/mpi_desc.c -@@ -763,10 +763,13 @@ struct bignum *crypto_bignum_allocate(size_t size_bits) - return (struct bignum *)bn; - } - --void crypto_bignum_free(struct bignum *s) -+void crypto_bignum_free(struct bignum **s) - { -- mbedtls_mpi_free((mbedtls_mpi *)s); -- free(s); -+ assert(s); -+ -+ mbedtls_mpi_free((mbedtls_mpi *)*s); -+ free(*s); -+ *s = NULL; - } - - void crypto_bignum_clear(struct bignum *s) -diff --git a/core/lib/libtomcrypt/rsa.c b/core/lib/libtomcrypt/rsa.c -index 8d0443f36..13ed23934 100644 ---- a/core/lib/libtomcrypt/rsa.c -+++ b/core/lib/libtomcrypt/rsa.c -@@ -131,7 +131,7 @@ TEE_Result sw_crypto_acipher_alloc_rsa_public_key(struct rsa_public_key *s, - goto err; - return TEE_SUCCESS; - err: -- crypto_bignum_free(s->e); -+ crypto_bignum_free(&s->e); - return TEE_ERROR_OUT_OF_MEMORY; - } - -@@ -143,8 +143,8 @@ void sw_crypto_acipher_free_rsa_public_key(struct rsa_public_key *s) - { - if (!s) - return; -- crypto_bignum_free(s->n); -- crypto_bignum_free(s->e); -+ crypto_bignum_free(&s->n); -+ crypto_bignum_free(&s->e); - } - - -@@ -155,14 +155,14 @@ void sw_crypto_acipher_free_rsa_keypair(struct rsa_keypair *s) - { - if (!s) - return; -- crypto_bignum_free(s->e); -- crypto_bignum_free(s->d); -- crypto_bignum_free(s->n); -- crypto_bignum_free(s->p); -- crypto_bignum_free(s->q); -- crypto_bignum_free(s->qp); -- crypto_bignum_free(s->dp); -- crypto_bignum_free(s->dq); -+ crypto_bignum_free(&s->e); -+ crypto_bignum_free(&s->d); -+ crypto_bignum_free(&s->n); -+ crypto_bignum_free(&s->p); -+ crypto_bignum_free(&s->q); -+ crypto_bignum_free(&s->qp); -+ crypto_bignum_free(&s->dp); -+ crypto_bignum_free(&s->dq); - } - - TEE_Result crypto_acipher_gen_rsa_key(struct rsa_keypair *key, -diff --git a/core/tee/tee_svc_cryp.c b/core/tee/tee_svc_cryp.c -index 534e5ac39..880809753 100644 ---- a/core/tee/tee_svc_cryp.c -+++ b/core/tee/tee_svc_cryp.c -@@ -869,8 +869,7 @@ static void op_attr_bignum_free(void *attr) - { - struct bignum **bn = attr; - -- crypto_bignum_free(*bn); -- *bn = NULL; -+ crypto_bignum_free(bn); - } - - static TEE_Result op_attr_value_from_user(void *attr, const void *buffer, -@@ -3445,8 +3444,8 @@ TEE_Result syscall_cryp_derive_key(unsigned long state, - } else { - res = TEE_ERROR_OUT_OF_MEMORY; - } -- crypto_bignum_free(pub); -- crypto_bignum_free(ss); -+ crypto_bignum_free(&pub); -+ crypto_bignum_free(&ss); - } else if (TEE_ALG_GET_MAIN_ALG(cs->algo) == TEE_MAIN_ALGO_ECDH) { - struct ecc_public_key key_public; - uint8_t *pt_secret; -diff --git a/lib/libmbedtls/core/bignum.c b/lib/libmbedtls/core/bignum.c -index 61f6c5c60..dea30f61a 100644 ---- a/lib/libmbedtls/core/bignum.c -+++ b/lib/libmbedtls/core/bignum.c -@@ -87,10 +87,13 @@ struct bignum *crypto_bignum_allocate(size_t size_bits) - return (struct bignum *)bn; - } - --void crypto_bignum_free(struct bignum *s) -+void crypto_bignum_free(struct bignum **s) - { -- mbedtls_mpi_free((mbedtls_mpi *)s); -- free(s); -+ assert(s); -+ -+ mbedtls_mpi_free((mbedtls_mpi *)*s); -+ free(*s); -+ *s = NULL; - } - - void crypto_bignum_clear(struct bignum *s) -diff --git a/lib/libmbedtls/core/dh.c b/lib/libmbedtls/core/dh.c -index b3415aaa7..e95aa1495 100644 ---- a/lib/libmbedtls/core/dh.c -+++ b/lib/libmbedtls/core/dh.c -@@ -35,10 +35,10 @@ TEE_Result crypto_acipher_alloc_dh_keypair(struct dh_keypair *s, - goto err; - return TEE_SUCCESS; - err: -- crypto_bignum_free(s->g); -- crypto_bignum_free(s->p); -- crypto_bignum_free(s->y); -- crypto_bignum_free(s->x); -+ crypto_bignum_free(&s->g); -+ crypto_bignum_free(&s->p); -+ crypto_bignum_free(&s->y); -+ crypto_bignum_free(&s->x); - return TEE_ERROR_OUT_OF_MEMORY; - } - -diff --git a/lib/libmbedtls/core/ecc.c b/lib/libmbedtls/core/ecc.c -index fd4a51b9d..46cd9fd1c 100644 ---- a/lib/libmbedtls/core/ecc.c -+++ b/lib/libmbedtls/core/ecc.c -@@ -40,8 +40,8 @@ static void ecc_free_public_key(struct ecc_public_key *s) - if (!s) - return; - -- crypto_bignum_free(s->x); -- crypto_bignum_free(s->y); -+ crypto_bignum_free(&s->x); -+ crypto_bignum_free(&s->y); - } - - /* -@@ -484,8 +484,8 @@ TEE_Result crypto_asym_alloc_ecc_keypair(struct ecc_keypair *s, - return TEE_SUCCESS; - - err: -- crypto_bignum_free(s->d); -- crypto_bignum_free(s->x); -+ crypto_bignum_free(&s->d); -+ crypto_bignum_free(&s->x); - - return TEE_ERROR_OUT_OF_MEMORY; - } -@@ -581,7 +581,7 @@ TEE_Result crypto_asym_alloc_ecc_public_key(struct ecc_public_key *s, - return TEE_SUCCESS; - - err: -- crypto_bignum_free(s->x); -+ crypto_bignum_free(&s->x); - - return TEE_ERROR_OUT_OF_MEMORY; - } -diff --git a/lib/libmbedtls/core/rsa.c b/lib/libmbedtls/core/rsa.c -index c3b5be509..a8aeb2c04 100644 ---- a/lib/libmbedtls/core/rsa.c -+++ b/lib/libmbedtls/core/rsa.c -@@ -183,7 +183,7 @@ TEE_Result sw_crypto_acipher_alloc_rsa_public_key(struct rsa_public_key *s, - goto err; - return TEE_SUCCESS; - err: -- crypto_bignum_free(s->e); -+ crypto_bignum_free(&s->e); - return TEE_ERROR_OUT_OF_MEMORY; - } - -@@ -194,8 +194,8 @@ void sw_crypto_acipher_free_rsa_public_key(struct rsa_public_key *s) - { - if (!s) - return; -- crypto_bignum_free(s->n); -- crypto_bignum_free(s->e); -+ crypto_bignum_free(&s->n); -+ crypto_bignum_free(&s->e); - } - - void crypto_acipher_free_rsa_keypair(struct rsa_keypair *s) -@@ -205,14 +205,14 @@ void sw_crypto_acipher_free_rsa_keypair(struct rsa_keypair *s) - { - if (!s) - return; -- crypto_bignum_free(s->e); -- crypto_bignum_free(s->d); -- crypto_bignum_free(s->n); -- crypto_bignum_free(s->p); -- crypto_bignum_free(s->q); -- crypto_bignum_free(s->qp); -- crypto_bignum_free(s->dp); -- crypto_bignum_free(s->dq); -+ crypto_bignum_free(&s->e); -+ crypto_bignum_free(&s->d); -+ crypto_bignum_free(&s->n); -+ crypto_bignum_free(&s->p); -+ crypto_bignum_free(&s->q); -+ crypto_bignum_free(&s->qp); -+ crypto_bignum_free(&s->dp); -+ crypto_bignum_free(&s->dq); - } - - TEE_Result crypto_acipher_gen_rsa_key(struct rsa_keypair *key, --- -2.34.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-tadevkit_3.20.0.bb b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-tadevkit_3.20.0.bb deleted file mode 100644 index 202caa546e..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-tadevkit_3.20.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -require optee-os_3.20.0.bb - -SUMMARY = "OP-TEE Trusted OS TA devkit" -DESCRIPTION = "OP-TEE TA devkit for build TAs" -HOMEPAGE = "https://www.op-tee.org/" - -DEPENDS += "python3-pycryptodome-native" - -do_install() { - #install TA devkit - install -d ${D}${includedir}/optee/export-user_ta/ - for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do - cp -aR $f ${D}${includedir}/optee/export-user_ta/ - done -} - -do_deploy() { - echo "Do not inherit do_deploy from optee-os." -} - -FILES:${PN} = "${includedir}/optee/" - -# Build paths are currently embedded -INSANE_SKIP:${PN}-dev += "buildpaths" diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-tadevkit_4.0.0.bb b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-tadevkit_4.0.0.bb deleted file mode 100644 index 9fe2697e60..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-tadevkit_4.0.0.bb +++ /dev/null @@ -1,29 +0,0 @@ -require optee-os_4.0.0.bb - -SUMMARY = "OP-TEE Trusted OS TA devkit" -DESCRIPTION = "OP-TEE TA devkit for build TAs" -HOMEPAGE = "https://www.op-tee.org/" - -DEPENDS += "python3-pycryptodome-native" - -do_install() { - #install TA devkit - install -d ${D}${includedir}/optee/export-user_ta/ - for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do - cp -aR $f ${D}${includedir}/optee/export-user_ta/ - done -} - -do_deploy() { - echo "Do not inherit do_deploy from optee-os." -} - -FILES:${PN} = "${includedir}/optee/" - -# Build paths are currently embedded -INSANE_SKIP:${PN}-dev += "buildpaths" - -# Include extra headers needed by SPMC tests to TA DEVKIT. -# Supported after op-tee v3.20 -EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \ - ' CFG_SPMC_TESTS=y', '' , d)}" diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-tc.inc b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-tc.inc deleted file mode 100644 index c4049f5afb..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-tc.inc +++ /dev/null @@ -1,33 +0,0 @@ -# TC0 specific configuration - -# Total Compute (tc) specific configuration for optee-os and optee-os-tadevkit - -FILESEXTRAPATHS:prepend := "${THISDIR}/files/optee-os/tc:" -SRC_URI:append:tc = " file://sp_layout.json \ - file://0001-WIP-Enable-managed-exit.patch \ - file://0002-plat-totalcompute-fix-TZDRAM-start-and-size.patch \ - " - -COMPATIBLE_MACHINE = "(tc?)" - -OPTEEMACHINE:tc1 = "totalcompute-tc1" - -# Enable optee memory layout and boot logs -EXTRA_OEMAKE += " CFG_TEE_CORE_LOG_LEVEL=3" - -# default disable latency benchmarks (over all OP-TEE layers) -EXTRA_OEMAKE += " CFG_TEE_BENCHMARK=n" - -# Enable stats -EXTRA_OEMAKE += " CFG_WITH_STATS=y" - -EXTRA_OEMAKE += " CFG_CORE_SEL2_SPMC=y" - -# Copy optee manifest file -do_install:append() { - install -d ${D}${nonarch_base_libdir}/firmware/ - install -m 644 ${WORKDIR}/sp_layout.json ${D}${nonarch_base_libdir}/firmware/ - install -m 644 \ - ${S}/core/arch/arm/plat-totalcompute/fdts/optee_sp_manifest.dts \ - ${D}${nonarch_base_libdir}/firmware/ -} diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os/0003-optee-enable-clang-support.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os/0003-optee-enable-clang-support.patch deleted file mode 100644 index 3c13ce3f02..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os/0003-optee-enable-clang-support.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 59d4c190eae11c93b26cca5a7b005a17dadc8248 Mon Sep 17 00:00:00 2001 -From: Brett Warren <brett.warren@arm.com> -Date: Wed, 23 Sep 2020 09:27:34 +0100 -Subject: [PATCH] optee: enable clang support - -When compiling with clang, the LIBGCC_LOCATE_CFLAG variable used -to provide a sysroot wasn't included, which results in not locating -compiler-rt. This is mitigated by including the variable as ammended. - -Upstream-Status: Pending -ChangeId: 8ba69a4b2eb8ebaa047cb266c9aa6c2c3da45701 -Signed-off-by: Brett Warren <brett.warren@arm.com> - ---- - mk/clang.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mk/clang.mk b/mk/clang.mk -index a045beee8..1ebe2f702 100644 ---- a/mk/clang.mk -+++ b/mk/clang.mk -@@ -30,7 +30,7 @@ comp-cflags-warns-clang := -Wno-language-extension-token \ - - # Note, use the compiler runtime library (libclang_rt.builtins.*.a) instead of - # libgcc for clang --libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \ -+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \ - -rtlib=compiler-rt -print-libgcc-file-name 2> /dev/null) - - # Core ASLR relies on the executable being ready to run from its preferred load diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os_3.20.0.bb b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os_3.20.0.bb deleted file mode 100644 index 0638cf7fac..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os_3.20.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -require recipes-security/optee/optee-os.inc - -DEPENDS += "dtc-native" - -FILESEXTRAPATHS:prepend := "${THISDIR}/${P}:" - -SRCREV = "8e74d47616a20eaa23ca692f4bbbf917a236ed94" -SRC_URI += " \ - file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \ - file://0002-optee-enable-clang-support.patch \ - file://0003-core-link-add-no-warn-rwx-segments.patch \ - file://0004-core-Define-section-attributes-for-clang.patch \ - file://0005-core-arm-S-EL1-SPMC-boot-ABI-update.patch \ - file://0006-core-ffa-add-TOS_FW_CONFIG-handling.patch \ - file://0007-core-spmc-handle-non-secure-interrupts.patch \ - file://0008-core-spmc-configure-SP-s-NS-interrupt-action-based-o.patch \ - file://CVE-2023-41325.patch \ - " diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os_3.20.0.bbappend b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os_3.20.0.bbappend deleted file mode 100644 index e276fb8629..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os_3.20.0.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -# Machine specific configurations - -MACHINE_OPTEE_OS_REQUIRE ?= "" -MACHINE_OPTEE_OS_REQUIRE:tc = "optee-os-tc.inc" - -require ${MACHINE_OPTEE_OS_REQUIRE} diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os_4.0.0.bb b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os_4.0.0.bb deleted file mode 100644 index cb326042a5..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os_4.0.0.bb +++ /dev/null @@ -1,10 +0,0 @@ -require recipes-security/optee/optee-os.inc - -DEPENDS += "dtc-native" - -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - -SRCREV = "2a5b1d1232f582056184367fb58a425ac7478ec6" -SRC_URI += " \ - file://0003-optee-enable-clang-support.patch \ - " diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test-tc.inc b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test-tc.inc deleted file mode 100644 index af73675348..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test-tc.inc +++ /dev/null @@ -1,8 +0,0 @@ -# TC specific configuration - -FILESEXTRAPATHS:prepend := "${THISDIR}/files/optee-test/tc:" -SRC_URI:append:tc = " \ - file://0001-xtest-Limit-tests-to-a-single-thread.patch \ - " - -COMPATIBLE_MACHINE = "(tc?)" diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test/0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test/0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch deleted file mode 100644 index 98c49a2087..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test/0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 53642dc98630b9c725977ab935c5bdd9c401e1aa Mon Sep 17 00:00:00 2001 -From: Jon Mason <jon.mason@arm.com> -Date: Sat, 15 Jul 2023 15:08:43 -0400 -Subject: [PATCH] xtest: regression_1000: remove unneeded stat.h include - -Hack to work around musl compile error: - In file included from optee-test/3.17.0-r0/recipe-sysroot/usr/include/sys/stat.h:23, - from optee-test/3.17.0-r0/git/host/xtest/regression_1000.c:25: - optee-test/3.17.0-r0/recipe-sysroot/usr/include/bits/stat.h:17:26: error: expected identifier or '(' before '[' token - 17 | unsigned __unused[2]; - | ^ - -stat.h is not needed, since it is not being used in this file. So removing it. - -Upstream-Status: Backport -Signed-off-by: Jon Mason <jon.mason@arm.com> -Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> -Acked-by: Jens Wiklander <jens.wiklander@linaro.org> ---- - host/xtest/regression_1000.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/host/xtest/regression_1000.c b/host/xtest/regression_1000.c -index de32c4184fd8..25b4721cdc45 100644 ---- a/host/xtest/regression_1000.c -+++ b/host/xtest/regression_1000.c -@@ -22,7 +22,6 @@ - #include <stdio.h> - #include <stdlib.h> - #include <string.h> --#include <sys/stat.h> - #include <sys/types.h> - #include <ta_arm_bti.h> - #include <ta_concurrent.h> diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test/0002-ffa_spmc-Add-arm_ffa_user-driver-compatibility-check.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test/0002-ffa_spmc-Add-arm_ffa_user-driver-compatibility-check.patch deleted file mode 100644 index 24cdf0ad1a..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test/0002-ffa_spmc-Add-arm_ffa_user-driver-compatibility-check.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 717ff43f0d58e5f5a87893bd0cf3274a1e0164dc Mon Sep 17 00:00:00 2001 -From: Gabor Toth <gabor.toth2@arm.com> -Date: Fri, 3 Mar 2023 12:25:58 +0100 -Subject: [PATCH] ffa_spmc: Add arm_ffa_user driver compatibility check - -Check the version of the arm_ffa_user Kernel Driver and fail with a -meaningful message if incompatible driver is detected. - -Upstream-Status: Backport - -Signed-off-by: Gabor Toth <gabor.toth2@arm.com> -Acked-by: Jens Wiklander <jens.wiklander@linaro.org> ---- - host/xtest/ffa_spmc_1000.c | 68 ++++++++++++++++++++++++++++++++++---- - 1 file changed, 61 insertions(+), 7 deletions(-) - -diff --git a/host/xtest/ffa_spmc_1000.c b/host/xtest/ffa_spmc_1000.c -index 15f4a468a775..1839d03f29be 100644 ---- a/host/xtest/ffa_spmc_1000.c -+++ b/host/xtest/ffa_spmc_1000.c -@@ -1,11 +1,12 @@ - // SPDX-License-Identifier: BSD-3-Clause - /* -- * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved. -+ * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved. - */ - #include <fcntl.h> - #include <ffa.h> - #include <stdio.h> - #include <string.h> -+#include <errno.h> - #include <sys/ioctl.h> - #include <unistd.h> - #include "include/uapi/linux/arm_ffa_user.h" -@@ -17,6 +18,10 @@ - #define INCORRECT_ENDPOINT_ID 0xffff - #define NORMAL_WORLD_ENDPOINT_ID 0 - -+#define FFA_USER_REQ_VER_MAJOR 5 -+#define FFA_USER_REQ_VER_MINOR 0 -+#define FFA_USER_REQ_VER_PATCH 1 -+ - /* Get the 32 least significant bits of a handle.*/ - #define MEM_SHARE_HANDLE_LOW(x) ((x) & 0xffffffff) - /* Get the 32 most significant bits of a handle.*/ -@@ -62,6 +67,50 @@ static struct ffa_ioctl_ep_desc test_endpoint3 = { - .uuid_ptr = (uint64_t)test_endpoint3_uuid, - }; - -+static bool check_ffa_user_version(void) -+{ -+ FILE *f = NULL; -+ int ver_major = -1; -+ int ver_minor = -1; -+ int ver_patch = -1; -+ int scan_cnt = 0; -+ -+ f = fopen("/sys/module/arm_ffa_user/version", "r"); -+ if (f) { -+ scan_cnt = fscanf(f, "%d.%d.%d", -+ &ver_major, &ver_minor, &ver_patch); -+ fclose(f); -+ if (scan_cnt != 3) { -+ printf("error: failed to parse arm_ffa_user version\n"); -+ return false; -+ } -+ } else { -+ printf("error: failed to read arm_ffa_user module info - %s\n", -+ strerror(errno)); -+ return false; -+ } -+ -+ if (ver_major != FFA_USER_REQ_VER_MAJOR) -+ goto err; -+ -+ if (ver_minor < FFA_USER_REQ_VER_MINOR) -+ goto err; -+ -+ if (ver_minor == FFA_USER_REQ_VER_MINOR) -+ if (ver_patch < FFA_USER_REQ_VER_PATCH) -+ goto err; -+ -+ return true; -+ -+err: -+ printf("error: Incompatible arm_ffa_user driver detected."); -+ printf("Found v%d.%d.%d wanted >= v%d.%d.%d)\n", -+ ver_major, ver_minor, ver_patch, FFA_USER_REQ_VER_MAJOR, -+ FFA_USER_REQ_VER_MINOR, FFA_USER_REQ_VER_PATCH); -+ -+ return false; -+} -+ - static void close_debugfs(void) - { - int err = 0; -@@ -76,6 +125,9 @@ static void close_debugfs(void) - - static bool init_sp_xtest(ADBG_Case_t *c) - { -+ if (!check_ffa_user_version()) -+ return false; -+ - if (ffa_fd < 0) { - ffa_fd = open(FFA_DRIVER_FS_PATH, O_RDWR); - if (ffa_fd < 0) { -@@ -83,6 +135,7 @@ static bool init_sp_xtest(ADBG_Case_t *c) - return false; - } - } -+ - return true; - } - -@@ -99,7 +152,7 @@ static uint16_t get_endpoint_id(uint64_t endp) - struct ffa_ioctl_ep_desc sid = { .uuid_ptr = endp }; - - /* Get ID of destination SP based on UUID */ -- if(ioctl(ffa_fd, FFA_IOC_GET_PART_ID, &sid)) -+ if (ioctl(ffa_fd, FFA_IOC_GET_PART_ID, &sid)) - return INCORRECT_ENDPOINT_ID; - - return sid.id; -@@ -213,14 +266,15 @@ static int set_up_mem(struct ffa_ioctl_ep_desc *endp, - rc = share_mem(endpoint, handle); - ADBG_EXPECT_COMPARE_SIGNED(c, rc, ==, 0); - -- if (!ADBG_EXPECT_TRUE(c, handle != NULL)) -- return TEEC_ERROR_GENERIC; -+ if (!ADBG_EXPECT_NOT_NULL(c, handle)) -+ return TEEC_ERROR_GENERIC; - - /* SP will retrieve the memory region. */ - memset(args, 0, sizeof(*args)); - args->dst_id = endpoint; - args->args[MEM_SHARE_HANDLE_LOW_INDEX] = MEM_SHARE_HANDLE_LOW(*handle); -- args->args[MEM_SHARE_HANDLE_HIGH_INDEX] = MEM_SHARE_HANDLE_HIGH(*handle); -+ args->args[MEM_SHARE_HANDLE_HIGH_INDEX] = -+ MEM_SHARE_HANDLE_HIGH(*handle); - args->args[MEM_SHARE_HANDLE_ENDPOINT_INDEX] = NORMAL_WORLD_ENDPOINT_ID; - - rc = start_sp_test(endpoint, EP_RETRIEVE, args); -@@ -254,7 +308,7 @@ static void xtest_ffa_spmc_test_1002(ADBG_Case_t *c) - rc = start_sp_test(endpoint1_id, EP_TEST_SP, &args); - ADBG_EXPECT_COMPARE_SIGNED(c, rc, ==, 0); - if (!ADBG_EXPECT_COMPARE_UNSIGNED(c, args.args[0], ==, SPMC_TEST_OK)) -- goto out; -+ goto out; - - /* Set up memory and have the SP retrieve it. */ - Do_ADBG_BeginSubCase(c, "Test memory set-up"); -@@ -469,7 +523,7 @@ static void xtest_ffa_spmc_test_1005(ADBG_Case_t *c) - memset(&args, 0, sizeof(args)); - args.args[1] = endpoint2; - args.args[2] = endpoint3; -- rc = start_sp_test(endpoint1, EP_SP_MEM_SHARING_MULTI,&args); -+ rc = start_sp_test(endpoint1, EP_SP_MEM_SHARING_MULTI, &args); - ADBG_EXPECT_COMPARE_SIGNED(c, rc, ==, 0); - ADBG_EXPECT_COMPARE_UNSIGNED(c, args.args[0], ==, SPMC_TEST_OK); - diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test/0003-Update-arm_ffa_user-driver-dependency.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test/0003-Update-arm_ffa_user-driver-dependency.patch deleted file mode 100644 index 44d9f9477d..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test/0003-Update-arm_ffa_user-driver-dependency.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3de910a19f01a2a9e1c9a6bd6feee1aef547f676 Mon Sep 17 00:00:00 2001 -From: Gabor Toth <gabor.toth2@arm.com> -Date: Fri, 3 Mar 2023 12:23:45 +0100 -Subject: [PATCH] Update arm_ffa_user driver dependency - -Updating arm-ffa-user to v5.0.1 to get the following changes: - - move to 64 bit direct messages - - add Linux Kernel v6.1 compatibility -The motivation is to update x-test to depend on the same driver -version as TS uefi-test and thus to enable running these in a single -configuration. -Note: arm_ffa_user.h was copied from: - - URL:https://git.gitlab.arm.com/linux-arm/linux-trusted-services.git - - SHA:18e3be71f65a405dfb5d97603ae71b3c11759861 - -Upstream-Status: Backport - -Signed-off-by: Gabor Toth <gabor.toth2@arm.com> -Acked-by: Jens Wiklander <jens.wiklander@linaro.org> ---- - host/xtest/include/uapi/linux/arm_ffa_user.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/host/xtest/include/uapi/linux/arm_ffa_user.h b/host/xtest/include/uapi/linux/arm_ffa_user.h -index 9ef0be3e1664..0acde4fb2020 100644 ---- a/host/xtest/include/uapi/linux/arm_ffa_user.h -+++ b/host/xtest/include/uapi/linux/arm_ffa_user.h -@@ -33,7 +33,7 @@ struct ffa_ioctl_ep_desc { - * @dst_id: [in] 16-bit ID of destination endpoint. - */ - struct ffa_ioctl_msg_args { -- __u32 args[5]; -+ __u64 args[5]; - __u16 dst_id; - }; - #define FFA_IOC_MSG_SEND _IOWR(FFA_IOC_MAGIC, FFA_IOC_BASE + 1, \ diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test_3.20.0.bb b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test_3.20.0.bb deleted file mode 100644 index 4409ad5f16..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test_3.20.0.bb +++ /dev/null @@ -1,8 +0,0 @@ -require recipes-security/optee/optee-test.inc - -SRC_URI += " \ - file://0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch \ - file://0002-ffa_spmc-Add-arm_ffa_user-driver-compatibility-check.patch \ - file://0003-Update-arm_ffa_user-driver-dependency.patch \ - " -SRCREV = "5db8ab4c733d5b2f4afac3e9aef0a26634c4b444" diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test_3.20.0.bbappend b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test_3.20.0.bbappend deleted file mode 100644 index 490b350049..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test_3.20.0.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -# Machine specific configurations - -MACHINE_OPTEE_TEST_REQUIRE ?= "" -MACHINE_OPTEE_TEST_REQUIRE:tc = "optee-test-tc.inc" - -require ${MACHINE_OPTEE_TEST_REQUIRE} diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test_4.0.0.bb b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test_4.0.0.bb deleted file mode 100644 index ecd949f431..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-test_4.0.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -require recipes-security/optee/optee-test.inc - -SRCREV = "1c3d6be5eaa6174e3dbabf60928d15628e39b994" - -# Include ffa_spmc test group if the SPMC test is enabled. -# Supported after op-tee v3.20 -EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \ - ' CFG_SPMC_TESTS=y CFG_SECURE_PARTITION=y', '' , d)}" - -RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \ - ' arm-ffa-user', '' , d)}" |