summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2023-08-11 17:48:11 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-08-12 18:32:43 +0300
commit2a25492c13e2b768f94b864a51f84e82e4238aef (patch)
tree64102f707447c221fc7b27788cbed43052ed22a5 /meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000
parent6fddef299932b1270a799e78566e25daa911f742 (diff)
downloadopenbmc-2a25492c13e2b768f94b864a51f84e82e4238aef.tar.xz
subtree updates
meta-openembedded: 0e3f5e5201..491b7592f4: Alexander Kanavin (1): libadwaita: move recipe to oe-core Andrej Valek (1): cve_check: convert CVE_CHECK_IGNORE to CVE_STATUS Archana Polampalli (1): yasm: fix CVE-2023-31975 Chase Qi (1): meta-python: add python3-telnetlib3 package Chen Qi (3): iperf3: remove incorrect CVE_PRODUCT setting open-vm-tools: add CVE_PRODUCT grpc: fix CVE-2023-32732 Chi Xu (1): lapack: Add ptest support Chris Dimich (1): image_types_sparse: Fix syntax error Christian Hohnstaedt (1): android-tools: fix QA warning about buildpaths Christophe Vu-Brugier (2): libnvme: add recipe nvme-cli: upgrade 1.13 -> 2.5 Etienne Cordonnier (1): uutils-coreutils: upgrade 0.0.19 -> 0.0.20 Gianfranco Costamagna (3): vbxguestdrivers: upgrade 7.0.8 -> 7.0.10 dlt-daemon: Add patch to fix build with googletest 1.13 gpsd: make sure gps-utils-python runtime-depends on python3-pyserial JD Schroeder (2): radvd: Fix groupname gid change warning cyrus-sasl: Fix groupname gid change warning Jan Vermaete (1): openh264: version bump 2.1.1 -> 2.3.1 Jasper Orschulko (1): yaml-cpp: Fix cmake export Khem Raj (9): openwsman: Link with -lm to get floor() definition portaudio-v19: Update to latest tip of trunk python3-pyaudio: Fix cross builds poco: Fix ptests pcmciautils: Pass LD=CC via Make cmdline ply: Pass LD via environment to configure sip: upgrade 6.7.10 -> 6.7.11 nodejs: Upgrade to 18.17.0 python3-m2crypto: Remove __pycache__ files Marek Vasut (1): libiio: update to version 0.25 Markus Volk (9): pipewire: update 0.3.73 -> 0.3.75 libcamera: update 0.0.5 -> 0.1.0 webkitgtk3: add recipe geary: update 43.0 -> 44.0 webkitgtk3: upgrade 2.40.2 -> 2.40.5 fuse3: update 3.14.1 -> 3.15.1 pipewire: update 0.3.75 -> 0.3.77 pipewire: add support for liblc3 gnome-software: update 44.3 -> 44.4 Martin Jansa (4): libtommath: add recipe for LibTomMath used by dropbear libtomcrypt: backport a fix for CVE-2019-17362 libtomcrypt: add PACKAGECONFIG for ltm enabled by default dlm: Do not use -fcf-protection=full on aarch64 platforms Michael Opdenacker (7): remove unused AUTHOR variable remove unused AUTHOR variable remove unused AUTHOR variable remove unused AUTHOR variable remove unused AUTHOR variable remove unused AUTHOR variable meta-python: Remove unused AUTHOR variable Mingli Yu (2): dracut: Remove busybox from RRECOMMENDS mariadb: Upgrade to 10.11.4 Nicolas Marguet (2): rsyslog: update from 8.2302.0 to 8.2306.0 rsyslog: Fix function inline errors in debug optimization Peter Marko (1): cve_check: fix conversion errors Ramon Fried (1): bitwise: Upgrade 0.43 -> 0.50 Ross Burton (1): cherokee: add CVE_PRODUCT Tim Orling (1): libmodule-build-tiny-perl: upgrade 0.045 -> 0.046 Trevor Gamblin (31): python3-django: upgrade 4.2.2 -> 4.2.3 python3-ipython: upgrade 8.12.0 -> 8.14.0 python3-awesomeversion: upgrade 22.9.0 -> 23.5.0 python3-binwalk: upgrade 2.3.3 -> 2.3.4 python3-bitstring: upgrade 3.1.9 -> 4.0.2 python3-bitstring: add python3-io to RDEPENDS, alphabetize python3-blinker: upgrade 1.5 -> 1.6.2 python3-blinker: add python3-asyncio to RDEPENDS python3-execnet: upgrade 1.9.0 -> 2.0.2 python3-flask: upgrade 2.2.3 -> 2.3.2 python3-flask: add python3-blinker to RDEPENDS, alphabetize python3-greenstalk: upgrade 2.0.0 -> 2.0.2 python3-humanize: upgrade 4.4.0 -> 4.7.0 python3-versioneer: add recipe python3-parse: upgrade 1.19.0 -> 1.19.1 python3-pandas: upgrade 1.5.3 -> 2.0.3 python3-pyperf: upgrade 2.5.0 -> 2.6.1 python3-rdflib: upgrade 6.2.0 -> 6.3.2 python3-semver: upgrade 2.13.0 -> 3.0.1 python3-send2trash: upgrade 1.8.0 -> 1.8.2 python3-sh: upgrade 1.14.3 -> 2.0.4 python3-snagboot: upgrade 1.0 -> 1.1 python3-werkzeug: upgrade 2.2.3 -> 2.3.6 python3-beautifulsoup4: upgrade 4.11.1 -> 4.12.2 python3-fastjsonschema: upgrade 2.16.3 -> 2.18.0 python3-jsonpatch: upgrade 1.32 -> 1.33 python3-m2crypto: upgrade 0.38.0 -> 0.39.0 python3-matplotlib: upgrade 3.6.3 -> 3.7.2 python3-pyaudio: upgrade 0.2.11 -> 0.2.13 python3-pybind11: upgrade 2.10.3 -> 2.11.1 python3-sqlparse: upgrade 0.4.3 -> 0.4.4 Vivien Didelot (1): libcamera: bump to latest master Wang Mingyu (83): c-periphery: upgrade 2.4.1 -> 2.4.2 ctags: upgrade 6.0.20230611.0 -> 6.0.20230716.0 gensio: upgrade 2.6.6 -> 2.6.7 gnome-commander: upgrade 1.16.0 -> 1.16.1 hiredis: upgrade 1.1.0 -> 1.2.0 iperf3: upgrade 3.13 -> 3.14 iwd: upgrade 2.6 -> 2.7 libbytesize: upgrade 2.8 -> 2.9 libinih: upgrade 56 -> 57 libnftnl: upgrade 1.2.5 -> 1.2.6 lvgl: upgrade 8.3.7 -> 8.3.8 bats: upgrade 1.9.0 -> 1.10.0 function2: upgrade 4.2.2 -> 4.2.3 lmdb: upgrade 0.9.29 -> 0.9.31 redis: upgrade 6.2.12 -> 6.2.13 ser2net: upgrade 4.3.12 -> 4.3.13 python3-obd: upgrade 0.7.1 -> 0.7.2 python3-path: upgrade 16.6.0 -> 16.7.1 nginx: upgrade 1.24.0 -> 1.25.1 php: upgrade 8.2.7 -> 8.2.8 python3-charset-normalizer: upgrade 3.1.0 -> 3.2.0 python3-click: upgrade 8.1.3 -> 8.1.5 python3-dnspython: upgrade 2.3.0 -> 2.4.0 python3-engineio: upgrade 4.4.1 -> 4.5.1 python3-eth-utils: upgrade 2.1.1 -> 2.2.0 python3-frozenlist: upgrade 1.3.3 -> 1.4.0 python3-gevent: upgrade 22.10.2 -> 23.7.0 python3-google-api-python-client: upgrade 2.92.0 -> 2.93.0 python3-google-auth: upgrade 2.21.0 -> 2.22.0 python3-mock: upgrade 5.0.2 -> 5.1.0 python3-platformdirs: upgrade 3.8.0 -> 3.9.1 python3-protobuf: upgrade 4.23.3 -> 4.23.4 python3-pymisp: upgrade 2.4.172 -> 2.4.173 python3-pymongo: upgrade 4.4.0 -> 4.4.1 python3-tox: upgrade 4.6.3 -> 4.6.4 python3-virtualenv: upgrade 20.23.1 -> 20.24.0 python3-zeroconf: upgrade 0.70.0 -> 0.71.0 redis-plus-plus: upgrade 1.3.9 -> 1.3.10 redis: upgrade 7.0.11 -> 7.0.12 smemstat: upgrade 0.02.11 -> 0.02.12 tesseract: upgrade 5.3.1 -> 5.3.2 weechat: upgrade 4.0.1 -> 4.0.2 wireshark: upgrade 4.0.6 -> 4.0.7 xterm: upgrade 383 -> 384 lastlog2: add new recipe wtmpdb: add new recipe babeld: upgrade 1.12.2 -> 1.13.1 ctags: upgrade 6.0.20230716.0 -> 6.0.20230730.0 gspell: upgrade 1.12.1 -> 1.12.2 libcompress-raw-bzip2-perl: upgrade 2.204 -> 2.206 libcompress-raw-lzma-perl: upgrade 2.204 -> 2.206 libcompress-raw-zlib-perl: upgrade 2.204 -> 2.206 libio-compress-lzma-perl: upgrade 2.204 -> 2.206 libio-compress-perl: upgrade 2.204 -> 2.206 libqb: upgrade 2.0.7 -> 2.0.8 logcheck: upgrade 1.4.2 -> 1.4.3 mdio-tools,mdio-netlink: Upgrade recipes to 1.3.0 python3-dill: upgrade 0.3.6 -> 0.3.7 python3-gunicorn: upgrade 20.1.0 -> 21.2.0 python3-web3: upgrade 6.3.0 -> 6.7.0 python3-aiohttp: upgrade 3.8.4 -> 3.8.5 python3-bitarray: upgrade 2.7.6 -> 2.8.0 python3-click: upgrade 8.1.5 -> 8.1.6 python3-cmake: upgrade 3.26.4 -> 3.27.0 python3-configargparse: upgrade 1.5.5 -> 1.7 python3-cytoolz: upgrade 0.12.1 -> 0.12.2 python3-dnspython: upgrade 2.4.0 -> 2.4.1 python3-elementpath: upgrade 4.1.4 -> 4.1.5 python3-flask-socketio: upgrade 5.3.4 -> 5.3.5 python3-gnupg: upgrade 0.5.0 -> 0.5.1 python3-google-api-python-client: upgrade 2.93.0 -> 2.95.0 python3-grpcio: upgrade 1.56.0 -> 1.56.2 python3-jedi: upgrade 0.18.2 -> 0.19.0 python3-marshmallow: upgrade 3.19.0 -> 3.20.1 python3-portion: upgrade 2.4.0 -> 2.4.1 python3-pymodbus: upgrade 3.3.2 -> 3.4.1 python3-robotframework: upgrade 6.1 -> 6.1.1 python3-tomlkit: upgrade 0.11.8 -> 0.12.1 python3-typeguard: upgrade 4.0.0 -> 4.1.0 python3-virtualenv: upgrade 20.24.0 -> 20.24.2 python3-zeroconf: upgrade 0.71.0 -> 0.71.4 rdma-core: upgrade 46.0 -> 47.0 sip: upgrade 6.7.9 -> 6.7.10 Willy Tu (1): mstpd: Add initial recipe for mstpd Yi Zhao (4): samba: upgrade 4.18.4 -> 4.18.5 libnfnetlink: enable native build libnetfilter-queue: enable native build daq: enable nfq module build meta-raspberrypi: e3f733cadd..5e2f79a6fa: Jan Vermaete (2): kas-poky-rpi.yml: renamed ABORT to HALT rpi-base.inc: add the disable-wifi overlay Khem Raj (1): rpi-base: Remove customizing SPLASH var Martin Jansa (1): libcamera: update PACKAGECONFIG for libcamera-0.1.0 Vincent Davis Jr (1): rpidistro-vlc: fix error uint64_t does not name Vivien Didelot (10): rpi-libcamera-apps: fix Illegal Instruction rpi-libcamera-apps: add opencv build dependency rpi-libcamera-apps: add drm support rpi-libcamera-apps: replace tensorflow config rpi-libcamera-apps: don't force COMPATIBLE_MACHINE rpi-libcamera-apps: rename to libcamera-apps libcamera-apps: move recipe to dynamic-layers libcamera-apps: bump to 3d9ac10 libcamera-apps: switch from CMake to meson libcamera-apps: bump to latest main meta-arm: b4d50a273d..992c07f7c0: Abdellatif El Khlifi (2): arm-bsp/trusted-firmware-a: corstone1000: psci: SMCCC_ARCH_FEATURES discovery through PSCI_FEATURES arm-bsp/u-boot: corstone1000: upgrade to v2023.07 Adam Johnston (1): arm-bsp/trusted-firmware-a: Reserve OP-TEE memory from NWd on N1SDP Emekcan Aras (1): arm-bsp/u-boot: corstone1000: increase the kernel size Jon Mason (9): CI: add defaults for get-binary-toolchains CI: workaround 32bit timer warning in binary toolchain arm-bsp/corstone1000: update u-boot preferred version arm-toolchain/gcc-aarch64-none-elf: upgrade to 12.3.rel1 arm/edk2: move 202211 recipe to meta-arm-bsp arm-bsp: clean-up patch noise arm/optee-test: update musl workaround patch arm-bsp/tc1: remove trusted-firmware-m target arm/trusted-firmware-m: upgrade to v1.8.0 Robbie Cao (1): arm/recipes-kernel: Add preempt-rt support for generic-arm64 Ross Burton (5): arm-toolchain/androidclang: remove arm-toolchain/arm-binary-toolchain: install to a versioned directory arm-toolchain/gcc-arm-none-eabi-11.2: add new recipe arm/trusted-firmware-m: explicitly use Arm GCC 11.2 arm-toolchain/gcc-arm-none-eabi: upgrade to 12.3.rel1 Ziad Elhanafy (1): arm/recipes-devtools,doc: Update FVP version poky: b398c7653e..71282bbc53: Alex Kiernan (3): base-passwd: Add the sgx group udev: eudev: Revert add group to sgx poky/poky-tiny: Explicitly exclude `shadow` Alexander Kanavin (25): meta: add missing summaries for image recipes insane.bbclass: add do_recipe_qa task devtool: do not run recipe_qa task when extracting source insane.bbclass: add a SUMMARY/HOMEPAGE check (oe-core recipes only) insane.bbclass: add a RECIPE_MAINTAINER check (oe-core recipes only) librsvg: fix upstream version check acpica: tarball and homepage relocated to intel.com gnu-efi: upgrade 3.0.15 -> 3.0.17 gettext-minimal-native: obtain the needed files directly from gettext source tarball kbd: upgrade 2.6.0 -> 2.6.1 systemd: upgrade 253.3 -> 253.7 jquery: upgrade 3.6.3 -> 3.7.0 strace: upgrade 6.3 -> 6.4 sudo: update 1.9.13p3 -> 1.9.14p2 libadwaita: add recipe from meta-gnome epiphany: upgrade 43.1 -> 44.5 glibc-locale: use stricter matching for metapackages' runtime dependencies uninative-tarball: install the full set of gconv modules buildtools-extended-tarball: install the full set of gconv modules procps: address failure with gettext 0.22 util-linux: upgrade 2.38.1 -> 2.39.1 ref-manual: document image-specific variant of INCOMPATIBLE_LICENSE devtool/upgrade: raise an error if extracting source produces more than one directory scripts/lib/scriptutils.py: add recipe_qa artifacts to exclusion list in filter_src_subdirs() curl: ensure all ptest failures are caught Alexandre Belloni (2): base-files: bump PR because conf files are now sorted wic: bootimg-efi: Stop hardcoding VMA offsets Alexis Lothoré (3): scripts/resulttool: add mention about new detected tests scripts/resulttool: allow to replace test raw status with custom string scripts/resulttool: define custom string for "not found" test results Andrej Valek (2): maintainers.inc: Modify email address ref-manual: document CVE_STATUS and CVE_CHECK_STATUSMAP Anuj Mittal (4): glibc/check-test-wrapper: don't emit warnings from ssh selftest/cases/glibc.py: increase the memory for testing oeqa/utils/nfs: allow requesting non-udp ports selftest/cases/glibc.py: switch to using NFS over TCP BELOUARGA Mohamed (3): linux-firmware : Add firmware of RTL8822 serie bitbake: bitbake: fetch2/npmsw: Check if there are dependencies before trying to fetch them bitbake: fetch2: Check if path is 'None' before calculating checksums Bruce Ashfield (11): kernel: make LOCALVERSION consistent between recipes linux-yocto/6.4: fix CONFIG_LEDS_TRIGGER_GPIO kernel audit warning linux-yocto/6.4: update to v6.4.6 linux-yocto/6.1: update to v6.1.41 linux-yocto/6.4: update to v6.4.7 linux-yocto-dev: bump to v6.5+ linux-yocto/6.4: update to v6.4.8 linux-yocto/6.1: update to v6.1.43 linux-yocto/6.4: update to v6.4.9 linux-yocto/6.4: fix qemuarm boot failure linux-yocto-tiny/6.4: fix HID configuration warning Chen Qi (4): ncurses: fix CVE-2023-29491 multilib.conf: explicitly make MULTILIB_VARIANTS vardeps on MULTILIBS gcc-crosssdk: ignore MULTILIB_VARIANTS in signature computation openssh: sync with upstream's default Christopher Larson (6): bitbake: tests.data: add test for inline python calling a def'd function bitbake: tests.codeparser: add test for exec of builtin from inline python bitbake: data_smart: check for python builtins directly for context lookup bitbake: tests.data: add test for builtin preferred over metadata value bitbake: data_smart: directly check for methodpool functions in context lookup bitbake: bb.tests.data: don't require the func flag for context functions Denis OSTERLAND-HEIM (1): kernel-fitImage: add machine compatible to config section Dit Kozmaj (1): bitbake: fetch2: Set maxsplit to match expected variables Dmitry Baryshkov (5): kmscube: bump SRCREV to get offscreen rendering to work linux-firmware: package firmare for Dragonboard 410c mesa: simplify overriding GALLIUMDRIVERS_LLVM mesa: enable swrast Vulkan driver if LLVM drivers are enabled linux-firmware: split platform-specific Adreno shaders to separate packages Frederic Martinsons (4): ptest-cargo.bbclass: Support of cargo workspaces cargo.bbclass: Use --frozen flag for cargo operations cargo_common.bbclass: Handle Cargo.lock modifications for git dependencies rust-hello-world: Drop recipe Jean-Marie Lemetayer (1): package: always sort the conffiles Joel Stanley (1): kernel: don't fail if Modules.symvers doesn't exist Jose Quaresma (1): systemd: fix efi stubs Joshua Watt (1): bitbake: contrib: vim: Fix up a few errors when reloading Julien Stephan (1): libexif: add ptest support Khem Raj (16): nfs-utils: Fix host path contamination building locktest ltp: Use bfd linker when lld is distro linker default ffmpeg: Use bfd linker on i386 when lld is distro linker default ltp: Use bfd linker for KVM_LD as well when ld-is-lld autoconf: Backport upstreamed patches Revert "site: merged common-glibc from OE" x32-linux: Do not cache ac_cv_sys_file_offset_bits gcc: Upgrade to 13.2 release gnu-efi: Fix build break on riscv64 ffmpeg: Fix wrong code found with gas/2.41 systemd: Point to target binary paths for loadkeys and setfont systemd: Make 254 work on musl musl: Upgrade to tip of trunk binutils: Upgrade to 2.41 release systemd-boot: Ensure EFI_LD is also passed to compiler driver pm-utils: Do not require GNU grep at runtime Lee Chee Yang (2): migration-guides: add release notes for 4.0.11 migration-guides: add release notes for 4.2.2 Luca Boccassi (2): systemd: update to v254 systemd: add usrmerge to REQUIRED_DISTRO_FEATURES Marek Vasut (1): linux-firmware: Fix mediatek mt7601u firmware path Mark Hatle (1): tcf-agent: Update to 1.8.0 release Markus Volk (4): gcr3: remove recipe systemd: add a packageconfig to support colored logs webkitgtk: upgrade 2.40.2 -> 2.40.5 epiphany: upgrade 44.5 -> 44.6 Martin Jansa (3): patchelf: add 3 fixes to optimize and fix uninative alsa-utils: backport a fix to build with glibc-2.38 efivar: drop -fuse-ld=bfd Michael Halstead (1): yocto-uninative: Update hashes for uninative 4.1 Michael Opdenacker (4): ref-manual: releases.svg: updates ref-manual: LTS releases now supported for 4 years poky.conf: update SANITY_TESTED_DISTROS to match autobuilder recipes: remove unused AUTHOR variable Oleksandr Hnatiuk (2): file: return wrapper to fix builds when file is in buildtools-tarball file: fix the way path is written to environment-setup.d Ovidiu Panait (2): mdadm: add util-linux-blockdev ptest dependency mdadm: save ptest logs Peter Marko (4): cve-extra-exclusions: fix syntax error libarchive: ignore CVE-2023-30571 cve-exclusion_6.1: correct typo in exclusion list name bluez5: correct CVE status of ignored CVEs Peter Suti (1): externalsrc: fix dependency chain issues Quentin Schulz (1): docs: sdk-manual: appendix-obtain: fix literal block content Richard Purdie (21): createrepo-c: Fix 32 bit architecture segfaults with 64 bit time build-appliance-image: Update to master head revision oeqa/target/ssh: Ensure EAGAIN doesn't truncate output createrepo-c: Update patch status oeqa/runtime/ltp: Increase ltp test output timeout oeqa/ltp: Show warning for non-zero exit codes ltp: Add kernel loopback module dependency target/ssh: Ensure exit code set for commands autoconf: Upgrade to 2.72c oeqa/ssh: Further improve process exit handling oeqa/selftest/rust: Round test execution time to integer qemuboot/runqemu: Fix 6.2 and later kernel network device naming bitbake: siggen: Improve runtaskdeps data to fix sstate debugging sstatesig: Update to match bitbake changes to runtaskdeps Revert "kea: upgrade to v2.5.0" selftest/reproducible: Update config to match ongoing changes gnupg: Fix reproducibility failure selftest: Ensure usrmerge is enabled with systemd conf/init-mamager-systemd: Add usrmerge to DISTRO_FEATURES bitbake.conf: Drop PE and PR from WORKDIR and STAMP qemuboot: Update hardcoded path to match new layout Robert Joslyn (2): curl: Update from 8.1.2 to 8.2.0 curl: Refine ptest perl RDEPENDS Ross Burton (8): systemd: set correct paths for kdb binaries systemd: depend on util-linux's swapon/off linux-yocto: add script to generate kernel CVE_STATUS entries ghostscript: backport fix for CVE-2023-38559 ghostscript: ignore CVE-2023-38560 openssh: upgrade to 9.3p2 librsvg: upgrade to 2.56.3 linux-yocto: extract generic kernel CVE_STATUS Sakib Sajal (1): go: upgrade 1.20.6 -> 1.20.7 Sudip Mukherjee (3): libgit2: upgrade to v1.7.0 bind: upgrade to v9.18.17 kea: upgrade to v2.5.0 Tim Orling (10): python3-urllib3: upgrade 2.0.3 -> 2.0.4 python3-hypothesis: upgrade 6.81.2 -> 6.82.0 python3-pyyaml: upgrade 6.0 -> 6.0.1 python_setuptools3_rust: inherit ...build_meta python3-sphinx: upgrade 7.0.1 -> 7.1.1 python3-certifi: upgrade 2023.5.7 -> 2023.7.22 python3-more-itertools: upgrade 9.1.0 -> 10.0.0 python3-wheel: upgrade 0.40.0 -> 0.41.0 python3-chardet: upgrade 5.1.0 -> 5.2.0 python3-cryptography{-vectors}: upgrade -> 41.0.3 Trevor Gamblin (7): python3-dtschema: upgrade 2023.4 -> 2023.6.1 python3-dtc: add from meta-virtualization python3-dtschema: add python3-dtc to RDEPENDS nfs-utils: upgrade 2.6.2 -> 2.6.3 iproute2: upgrade 6.3.0 -> 6.4.0 git: upgrade 2.39.3 -> 2.41.0 python3: add additional timing-related test skips Ulrich Ölmann (3): ref-manual: classes: kernel-fitimage: fix source of imagetype ref-manual: classes: kernel-fitimage: fix typos ref-manual: classes: kernel-fitimage: refine role of INITRAMFS_IMAGE_BUNDLE Yang Xu (2): oeqa/selftest/ssate: Add test for find_siginfo bitbake: server/process: fix sig handle Yash Shinde (5): rust: Fix BOOTSTRAP_CARGO failure during Rust Oe-selftest oeqa/selftest/rust: Add failed test cases to exclude list for Rust Oe-selftest oeqa/selftest/binutils: Add elapsed time for binutils test report. oeqa/selftest/gcc: Add elapsed time for gcc test report. oeqa/selftest/glibc: Add elapsed time for glibc test report. Yoann Congal (1): bitbake: fetch2/gitsm: Document that we won't support propagating user parameter meta-security: 405cca4028..b9bc938785: Armin Kuster (21): bastille: bastille/config should not be world writeable. ossec-hids: Fix usermod python3-flask-script: add package python3-segno: add new package python3-privacyidea: fixup REDPENDS qemu: move qemu setting to image and out of layer.conf packagegroup-core-security: only include firejail x86-64 and arch64 firejail: only allow x86-64 and arm64 to build python3-tpm2-pytss: add python tss2 support packagegroup: add python3-tpm2-pytss clamav: update SRC_URI scap-security-guide: refactor patches packagegroup-security-tpm2: add more pkgs scap-security-guide: enable ptest python3-yamlpath: Add new pkg python3-json2html: add new pkg python3-json2html: add new pkg meta-integrity: drop ima.cfg in favor of new k-cache sshguard: Update to 2.4.3 meta-tpm linux-yocto-rt: Add the bbappend for rt kernel layer: add QA_WARNINGS to all layers Kai Kang (2): openscap: fix buildpaths issue sssd: 2.7.4 -> 2.9.1 Kevin Hao (1): linux-yocto-rt: Add the bbappend for rt kernel Luke Granger-Brown (1): glome: update to tip Wurm, Stephan (1): dm-verity-image-initramfs: Allow compressed image types Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Icf1ba0c270d53f4c3c3838d4305116e5d6f794de
Diffstat (limited to 'meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000')
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-Increase-BL2-size-in-flash-lay.patch (renamed from meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0013-Platform-corstone1000-Increase-BL2-size-in-flash-lay.patch)8
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-make-sure-to-write-fwu-metadata-to-repl.patch43
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0002-Platform-Corstone1000-Increase-BL2_DATA_SIZE.patch (renamed from meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0014-Platform-Corstone1000-Increase-BL2_DATA_SIZE.patch)8
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0002-Platform-corstone1000-get-fwu-and-private-metadata-f.patch307
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0003-Platform-Corstone1000-Calculate-the-new-CRC32-value-.patch (renamed from meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0015-Platform-Corstone1000-Calculate-the-new-CRC32-value-.patch)10
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0003-Platform-corstone1000-Add-watchdog_reset_timer.patch47
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0004-Platform-corstone1000-Replace-MCUBOOT-BL1-by-TFM-s.patch1034
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0004-arm-trusted-firmware-m-disable-fatal-warnings.patch (renamed from meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/rwx.patch)5
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0005-Platform-corstone1000-Replace-MCUBOOT-BL1-by-TFM-s-B.patch202
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0006-Platform-corstone1000-Reorganize-bl2-files.patch61
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0007-Platform-corstone1000-Fix-linker-script-comment.patch47
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0008-Platform-corstone1000-Fix-linkerscripts-copyright-ye.patch39
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0009-Platform-corstone1000-fix-flash-reading-issue-for-fi.patch38
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0010-Platform-corstone1000-Adds-compiler-flags-to-FWU-age.patch273
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0011-Platform-corstone1000-adjust-PS-asset-configuration.patch29
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0012-Platform-corstone1000-Increase-number-of-assets.patch36
16 files changed, 12 insertions, 2175 deletions
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0013-Platform-corstone1000-Increase-BL2-size-in-flash-lay.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-Increase-BL2-size-in-flash-lay.patch
index 92d17cc0db..98dabbe96c 100644
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0013-Platform-corstone1000-Increase-BL2-size-in-flash-lay.patch
+++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-Increase-BL2-size-in-flash-lay.patch
@@ -1,12 +1,13 @@
-From 77c5a3bd090955e48ffca92bf9535185d26e9017 Mon Sep 17 00:00:00 2001
+From 60598f3b44237bd5038e33400e749ec1e7e8fbda Mon Sep 17 00:00:00 2001
From: Emekcan Aras <emekcan.aras@arm.com>
Date: Mon, 15 May 2023 10:42:23 +0100
-Subject: [PATCH 2/4] Platform: corstone1000: Increase BL2 size in flash layout
+Subject: [PATCH] Platform: corstone1000: Increase BL2 size in flash layout
Increases BL2 size to align with the flash page size in corstone1000.
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Upstream-Status: Pending [Not submitted to upstream yet]
+
---
platform/ext/target/arm/corstone1000/partition/flash_layout.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -24,6 +25,3 @@ index 41b4c6323f..bfe8c4fb3c 100644
#define SE_BL2_BANK_0_OFFSET (0x9000) /* 72nd LBA */
#define SE_BL2_BANK_1_OFFSET (0x1002000) /* 32784th LBA */
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-make-sure-to-write-fwu-metadata-to-repl.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-make-sure-to-write-fwu-metadata-to-repl.patch
deleted file mode 100644
index eeaf6d197e..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-make-sure-to-write-fwu-metadata-to-repl.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 0ee6842d348e206d511ec89a7ff5b29a6f325456 Mon Sep 17 00:00:00 2001
-From: Rui Miguel Silva <rui.silva@linaro.org>
-Date: Sun, 29 Jan 2023 19:01:08 +0000
-Subject: [PATCH] corstone1000: make sure to write fwu metadata to replica 2
-
-u-boot and other, before using fwu metadata validate if
-the copies in both replicas are good. so, make sure
-we write fwu metadata in both replicas.
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20550]
-Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
----
- .../arm/corstone1000/fw_update_agent/fwu_agent.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-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 e1fa297ac923..215902ce71b9 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
-@@ -238,6 +238,20 @@ static enum fwu_agent_error_t metadata_write(
- return FWU_AGENT_ERROR;
- }
-
-+ FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-+ FWU_METADATA_REPLICA_2_OFFSET, sizeof(struct fwu_metadata));
-+
-+ ret = FWU_METADATA_FLASH_DEV.EraseSector(FWU_METADATA_REPLICA_2_OFFSET);
-+ if (ret != ARM_DRIVER_OK) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.ProgramData(FWU_METADATA_REPLICA_2_OFFSET,
-+ p_metadata, sizeof(struct fwu_metadata));
-+ if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
- FWU_LOG_MSG("%s: success: active = %u, previous = %d\n\r", __func__,
- p_metadata->active_index, p_metadata->previous_active_index);
- return FWU_AGENT_SUCCESS;
---
-2.39.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0014-Platform-Corstone1000-Increase-BL2_DATA_SIZE.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0002-Platform-Corstone1000-Increase-BL2_DATA_SIZE.patch
index e2844bacc0..d348d02dbc 100644
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0014-Platform-Corstone1000-Increase-BL2_DATA_SIZE.patch
+++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0002-Platform-Corstone1000-Increase-BL2_DATA_SIZE.patch
@@ -1,13 +1,14 @@
-From 17244ac692495c23008ff784611d0ee1d42c83dc Mon Sep 17 00:00:00 2001
+From b05fb661b3afc3ed8e3d4817df2798e9d4877b39 Mon Sep 17 00:00:00 2001
From: Emekcan Aras <emekcan.aras@arm.com>
Date: Mon, 15 May 2023 10:46:18 +0100
-Subject: [PATCH 3/4] Platform: Corstone1000: Increase BL2_DATA_SIZE
+Subject: [PATCH] Platform: Corstone1000: Increase BL2_DATA_SIZE
Increases BL2_DATA_SIZE to accommodate the changes in
metadata_write/read.
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Upstream-Status: Pending [Not submitted to upstream yet]
+
---
platform/ext/target/arm/corstone1000/partition/region_defs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -28,6 +29,3 @@ index abfac39b62..e7f0bad2ba 100644
#define BL2_DATA_LIMIT (BL2_DATA_START + BL2_DATA_SIZE - 1)
/* SE BL1 regions */
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0002-Platform-corstone1000-get-fwu-and-private-metadata-f.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0002-Platform-corstone1000-get-fwu-and-private-metadata-f.patch
deleted file mode 100644
index 3d7fc4b3d1..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0002-Platform-corstone1000-get-fwu-and-private-metadata-f.patch
+++ /dev/null
@@ -1,307 +0,0 @@
-From 4a4d1b0a5a2455ad799a45f7f87c0c9fd0173034 Mon Sep 17 00:00:00 2001
-From: Rui Miguel Silva <rui.silva@linaro.org>
-Date: Wed, 29 Mar 2023 10:58:32 +0100
-Subject: [PATCH] Platform: Corstone1000: get fwu and private metadata from gpt
-
-Read and Write the FWU metadata and private metadata using instead
-static flash offsets get the partitions and start address from gpt
-partition table.
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20551]
-Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
----
- .../target/arm/corstone1000/CMakeLists.txt | 7 ++
- .../corstone1000/fw_update_agent/fwu_agent.c | 90 +++++++++++++++----
- .../target/arm/corstone1000/partition/efi.h | 1 +
- .../arm/corstone1000/partition/partition.c | 14 +++
- .../arm/corstone1000/partition/partition.h | 1 +
- .../ext/target/arm/corstone1000/platform.h | 5 ++
- 6 files changed, 99 insertions(+), 19 deletions(-)
-
-diff --git a/platform/ext/target/arm/corstone1000/CMakeLists.txt b/platform/ext/target/arm/corstone1000/CMakeLists.txt
-index 19863bcdb6d2..f232c7639bd5 100644
---- a/platform/ext/target/arm/corstone1000/CMakeLists.txt
-+++ b/platform/ext/target/arm/corstone1000/CMakeLists.txt
-@@ -64,6 +64,8 @@ target_include_directories(platform_s
- cc312
- fw_update_agent
- soft_crc
-+ io
-+ partition
- )
-
- target_sources(platform_s
-@@ -81,6 +83,11 @@ target_sources(platform_s
- fw_update_agent/fwu_agent.c
- fw_update_agent/uefi_fmp.c
- soft_crc/soft_crc.c
-+ io/io_block.c
-+ io/io_flash.c
-+ io/io_storage.c
-+ partition/partition.c
-+ partition/gpt.c
- $<$<NOT:$<BOOL:${PLATFORM_DEFAULT_OTP}>>:${PLATFORM_DIR}/ext/accelerator/cc312/otp_cc312.c>
- )
-
-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 b6ed656de833..9c76b25a3a38 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
-@@ -14,6 +14,8 @@
- #include "region_defs.h"
- #include "uefi_capsule_parser.h"
- #include "flash_common.h"
-+#include "partition.h"
-+#include "platform.h"
- #include "platform_base_address.h"
- #include "platform_description.h"
- #include "tfm_plat_nv_counters.h"
-@@ -146,6 +148,8 @@ extern ARM_DRIVER_FLASH FWU_METADATA_FLASH_DEV;
- static enum fwu_agent_error_t private_metadata_read(
- struct fwu_private_metadata* p_metadata)
- {
-+ partition_entry_t *part;
-+ uuid_t private_uuid = PRIVATE_METADATA_TYPE_UUID;
- int ret;
-
- FWU_LOG_MSG("%s: enter\n\r", __func__);
-@@ -154,7 +158,13 @@ static enum fwu_agent_error_t private_metadata_read(
- return FWU_AGENT_ERROR;
- }
-
-- ret = FWU_METADATA_FLASH_DEV.ReadData(FWU_PRIVATE_METADATA_REPLICA_1_OFFSET, p_metadata,
-+ part = get_partition_entry_by_type(&private_uuid);
-+ if (!part) {
-+ FWU_LOG_MSG("Private metadata partition not found\n\r");
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.ReadData(part->start, p_metadata,
- sizeof(struct fwu_private_metadata));
- if (ret < 0 || ret != sizeof(struct fwu_private_metadata)) {
- return FWU_AGENT_ERROR;
-@@ -169,6 +179,8 @@ static enum fwu_agent_error_t private_metadata_read(
- static enum fwu_agent_error_t private_metadata_write(
- struct fwu_private_metadata* p_metadata)
- {
-+ uuid_t private_uuid = PRIVATE_METADATA_TYPE_UUID;
-+ partition_entry_t *part;
- int ret;
-
- FWU_LOG_MSG("%s: enter: boot_index = %u\n\r", __func__,
-@@ -178,12 +190,18 @@ static enum fwu_agent_error_t private_metadata_write(
- return FWU_AGENT_ERROR;
- }
-
-- ret = FWU_METADATA_FLASH_DEV.EraseSector(FWU_PRIVATE_METADATA_REPLICA_1_OFFSET);
-+ part = get_partition_entry_by_type(&private_uuid);
-+ if (!part) {
-+ FWU_LOG_MSG("Private metadata partition not found\n\r");
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.EraseSector(part->start);
- if (ret != ARM_DRIVER_OK) {
- return FWU_AGENT_ERROR;
- }
-
-- ret = FWU_METADATA_FLASH_DEV.ProgramData(FWU_PRIVATE_METADATA_REPLICA_1_OFFSET,
-+ ret = FWU_METADATA_FLASH_DEV.ProgramData(part->start,
- p_metadata, sizeof(struct fwu_private_metadata));
- if (ret < 0 || ret != sizeof(struct fwu_private_metadata)) {
- return FWU_AGENT_ERROR;
-@@ -219,16 +237,25 @@ static enum fwu_agent_error_t metadata_validate(struct fwu_metadata *p_metadata)
-
- static enum fwu_agent_error_t metadata_read_without_validation(struct fwu_metadata *p_metadata)
- {
-+ uuid_t metadata_uuid = FWU_METADATA_TYPE_UUID;
-+ partition_entry_t *part;
- int ret;
-
-- FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-- FWU_METADATA_REPLICA_1_OFFSET, sizeof(struct fwu_metadata));
--
- if (!p_metadata) {
- return FWU_AGENT_ERROR;
- }
-
-- ret = FWU_METADATA_FLASH_DEV.ReadData(FWU_METADATA_REPLICA_1_OFFSET,
-+ part = get_partition_entry_by_type(&metadata_uuid);
-+ if (!part) {
-+ FWU_LOG_MSG("%s: FWU metadata partition not found\n\r", __func__);
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-+ part->start, sizeof(struct fwu_metadata));
-+
-+
-+ ret = FWU_METADATA_FLASH_DEV.ReadData(part->start,
- p_metadata, sizeof(struct fwu_metadata));
- if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
- return FWU_AGENT_ERROR;
-@@ -242,16 +269,24 @@ static enum fwu_agent_error_t metadata_read_without_validation(struct fwu_metada
-
- static enum fwu_agent_error_t metadata_read(struct fwu_metadata *p_metadata)
- {
-+ uuid_t metadata_uuid = FWU_METADATA_TYPE_UUID;
-+ partition_entry_t *part;
- int ret;
-
-- FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-- FWU_METADATA_REPLICA_1_OFFSET, sizeof(struct fwu_metadata));
--
- if (!p_metadata) {
- return FWU_AGENT_ERROR;
- }
-
-- ret = FWU_METADATA_FLASH_DEV.ReadData(FWU_METADATA_REPLICA_1_OFFSET,
-+ part = get_partition_entry_by_type(&metadata_uuid);
-+ if (!part) {
-+ FWU_LOG_MSG("%s: FWU metadata partition not found\n\r", __func__);
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-+ part->start, sizeof(struct fwu_metadata));
-+
-+ ret = FWU_METADATA_FLASH_DEV.ReadData(part->start,
- p_metadata, sizeof(struct fwu_metadata));
- if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
- return FWU_AGENT_ERROR;
-@@ -270,35 +305,49 @@ static enum fwu_agent_error_t metadata_read(struct fwu_metadata *p_metadata)
- static enum fwu_agent_error_t metadata_write(
- struct fwu_metadata *p_metadata)
- {
-+ uuid_t metadata_uuid = FWU_METADATA_TYPE_UUID;
-+ partition_entry_t *part;
- int ret;
-
-- FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-- FWU_METADATA_REPLICA_1_OFFSET, sizeof(struct fwu_metadata));
--
- if (!p_metadata) {
- return FWU_AGENT_ERROR;
- }
-
-- ret = FWU_METADATA_FLASH_DEV.EraseSector(FWU_METADATA_REPLICA_1_OFFSET);
-+ part = get_partition_entry_by_type(&metadata_uuid);
-+ if (!part) {
-+ FWU_LOG_MSG("%s: FWU metadata partition not found\n\r", __func__);
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-+ part->start, sizeof(struct fwu_metadata));
-+
-+ ret = FWU_METADATA_FLASH_DEV.EraseSector(part->start);
- if (ret != ARM_DRIVER_OK) {
- return FWU_AGENT_ERROR;
- }
-
-- ret = FWU_METADATA_FLASH_DEV.ProgramData(FWU_METADATA_REPLICA_1_OFFSET,
-+ ret = FWU_METADATA_FLASH_DEV.ProgramData(part->start,
- p_metadata, sizeof(struct fwu_metadata));
- if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
- return FWU_AGENT_ERROR;
- }
-
-+ part = get_partition_replica_by_type(&metadata_uuid);
-+ if (!part) {
-+ FWU_LOG_MSG("%s: FWU metadata replica partition not found\n\r", __func__);
-+ return FWU_AGENT_ERROR;
-+ }
-+
- FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-- FWU_METADATA_REPLICA_2_OFFSET, sizeof(struct fwu_metadata));
-+ part->start, sizeof(struct fwu_metadata));
-
-- ret = FWU_METADATA_FLASH_DEV.EraseSector(FWU_METADATA_REPLICA_2_OFFSET);
-+ ret = FWU_METADATA_FLASH_DEV.EraseSector(part->start);
- if (ret != ARM_DRIVER_OK) {
- return FWU_AGENT_ERROR;
- }
-
-- ret = FWU_METADATA_FLASH_DEV.ProgramData(FWU_METADATA_REPLICA_2_OFFSET,
-+ ret = FWU_METADATA_FLASH_DEV.ProgramData(part->start,
- p_metadata, sizeof(struct fwu_metadata));
- if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
- return FWU_AGENT_ERROR;
-@@ -355,6 +404,9 @@ enum fwu_agent_error_t fwu_metadata_provision(void)
-
- FWU_LOG_MSG("%s: enter\n\r", __func__);
-
-+ plat_io_storage_init();
-+ partition_init(PLATFORM_GPT_IMAGE);
-+
- ret = fwu_metadata_init();
- if (ret) {
- return ret;
-diff --git a/platform/ext/target/arm/corstone1000/partition/efi.h b/platform/ext/target/arm/corstone1000/partition/efi.h
-index f66daffb32d6..7e6a4bc883e6 100644
---- a/platform/ext/target/arm/corstone1000/partition/efi.h
-+++ b/platform/ext/target/arm/corstone1000/partition/efi.h
-@@ -8,6 +8,7 @@
- #ifndef DRIVERS_PARTITION_EFI_H
- #define DRIVERS_PARTITION_EFI_H
-
-+#include <stdint.h>
- #include <string.h>
-
- #include "uuid.h"
-diff --git a/platform/ext/target/arm/corstone1000/partition/partition.c b/platform/ext/target/arm/corstone1000/partition/partition.c
-index afc6aa1c5cb8..d76e123d728f 100644
---- a/platform/ext/target/arm/corstone1000/partition/partition.c
-+++ b/platform/ext/target/arm/corstone1000/partition/partition.c
-@@ -293,6 +293,20 @@ const partition_entry_t *get_partition_entry_by_type(const uuid_t *type_uuid) {
- return NULL;
- }
-
-+const partition_entry_t *get_partition_replica_by_type(const uuid_t *type_uuid) {
-+ int count = 0;
-+ int i;
-+
-+ for (i = 0; i < list.entry_count; i++) {
-+ if (guidcmp(type_uuid, &list.list[i].type_guid) == 0) {
-+ if (++count == 2)
-+ return &list.list[i];
-+ }
-+ }
-+
-+ return NULL;
-+}
-+
- const partition_entry_t *get_partition_entry_by_uuid(const uuid_t *part_uuid) {
- int i;
-
-diff --git a/platform/ext/target/arm/corstone1000/partition/partition.h b/platform/ext/target/arm/corstone1000/partition/partition.h
-index 54af47aca415..450cf20a073c 100644
---- a/platform/ext/target/arm/corstone1000/partition/partition.h
-+++ b/platform/ext/target/arm/corstone1000/partition/partition.h
-@@ -40,6 +40,7 @@ typedef struct partition_entry_list {
- int load_partition_table(unsigned int image_id);
- const partition_entry_t *get_partition_entry(const char *name);
- const partition_entry_t *get_partition_entry_by_type(const uuid_t *type_guid);
-+const partition_entry_t *get_partition_replica_by_type(const uuid_t *type_uuid);
- const partition_entry_t *get_partition_entry_by_uuid(const uuid_t *part_uuid);
- const partition_entry_list_t *get_partition_entry_list(void);
- void partition_init(unsigned int image_id);
-diff --git a/platform/ext/target/arm/corstone1000/platform.h b/platform/ext/target/arm/corstone1000/platform.h
-index 894f5e309029..a88093ed4f9d 100644
---- a/platform/ext/target/arm/corstone1000/platform.h
-+++ b/platform/ext/target/arm/corstone1000/platform.h
-@@ -13,6 +13,11 @@ typedef enum {
- PLATFORM_IMAGE_COUNT,
- }platform_image_id_t;
-
-+#define FWU_METADATA_TYPE_UUID \
-+ ((uuid_t){{0xa0, 0x84, 0x7a, 0x8a}, {0x87, 0x83}, {0xf6, 0x40}, 0xab, 0x41, {0xa8, 0xb9, 0xa5, 0xa6, 0x0d, 0x23}})
-+#define PRIVATE_METADATA_TYPE_UUID \
-+ ((uuid_t){{0xc3, 0x5d, 0xb5, 0xec}, {0xb7, 0x8a}, {0x84, 0x4a}, 0xab, 0x56, {0xeb, 0x0a, 0x99, 0x74, 0xdb, 0x42}})
-+
- /* Initialize io storage of the platform */
- int32_t plat_io_storage_init(void);
-
---
-2.40.0
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0015-Platform-Corstone1000-Calculate-the-new-CRC32-value-.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0003-Platform-Corstone1000-Calculate-the-new-CRC32-value-.patch
index fd977ac2fd..bf7aba8de8 100644
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0015-Platform-Corstone1000-Calculate-the-new-CRC32-value-.patch
+++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0003-Platform-Corstone1000-Calculate-the-new-CRC32-value-.patch
@@ -1,8 +1,8 @@
-From 83e423497afecc202a3a50c3e472161390056ebd Mon Sep 17 00:00:00 2001
+From 88cfce2e04913d48ec8636b6a3550d71ebdd49c4 Mon Sep 17 00:00:00 2001
From: Emekcan Aras <emekcan.aras@arm.com>
Date: Mon, 15 May 2023 10:47:27 +0100
-Subject: [PATCH 4/4] Platform: Corstone1000: Calculate the new CRC32 value
- after changing the metadata
+Subject: [PATCH] Platform: Corstone1000: Calculate the new CRC32 value after
+ changing the metadata
Calculates the new CRC32 value for the metadata struct after chaing a value
during the capsule update. It also updates the CRC32 field in the metadata
@@ -13,6 +13,7 @@ the boot anymore.
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Upstream-Status: Pending [Not submitted to upstream yet]
+
---
.../arm/corstone1000/fw_update_agent/fwu_agent.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
@@ -66,6 +67,3 @@ index afd8d66e42..f564f2902c 100644
if (priv_metadata->nv_counter[i] < security_cnt) {
return FWU_AGENT_ERROR;
} else if (priv_metadata->nv_counter[i] > security_cnt) {
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0003-Platform-corstone1000-Add-watchdog_reset_timer.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0003-Platform-corstone1000-Add-watchdog_reset_timer.patch
deleted file mode 100644
index 3ffd83e9a8..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0003-Platform-corstone1000-Add-watchdog_reset_timer.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 33d8f45c8f14e9e0d7add7d2804ed76c7d7fd0c2 Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <emekcan.aras@arm.com>
-Date: Sat, 25 Feb 2023 09:04:38 +0000
-Subject: [PATCH 1/7] Platform: corstone1000: Add watchdog_reset_timer
-
-From: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-
-Implement watchdog_reset_timer
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20552]
-Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-Change-Id: I2684ca54f9a456b22efcbcd364abef3537d4c91f
----
- .../arm/corstone1000/Native_Driver/watchdog.c | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/platform/ext/target/arm/corstone1000/Native_Driver/watchdog.c b/platform/ext/target/arm/corstone1000/Native_Driver/watchdog.c
-index 4e024a3b1..f6e182194 100644
---- a/platform/ext/target/arm/corstone1000/Native_Driver/watchdog.c
-+++ b/platform/ext/target/arm/corstone1000/Native_Driver/watchdog.c
-@@ -80,6 +80,23 @@ int corstone1000_watchdog_init()
- return ARM_DRIVER_OK;
- }
-
-+/**
-+ * \brief Reset the Secure Enclave & SoC Watchdog's.
-+ *
-+ * \returns ARM Driver return code.
-+ */
-+int corstone1000_watchdog_reset_timer() {
-+ /* Unlock, clear and lock the watchdog timer */
-+ arm_watchdog_unlock(&SE_WD_DEV);
-+ arm_watchdog_clear_interrupt_and_refresh_counter(&SE_WD_DEV);
-+ arm_watchdog_lock(&SE_WD_DEV);
-+ /* Unlock, clear and lock the watchdog timer */
-+ arm_watchdog_unlock(&SOC_WD_DEV);
-+ arm_watchdog_clear_interrupt_and_refresh_counter(&SOC_WD_DEV);
-+ arm_watchdog_lock(&SOC_WD_DEV);
-+ return ARM_DRIVER_OK;
-+}
-+
- /*
- * Secure Host Watchdog WS1 Handler
- * efi_reset_system from the host triggers "Secure
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0004-Platform-corstone1000-Replace-MCUBOOT-BL1-by-TFM-s.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0004-Platform-corstone1000-Replace-MCUBOOT-BL1-by-TFM-s.patch
deleted file mode 100644
index 0ad44947f0..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0004-Platform-corstone1000-Replace-MCUBOOT-BL1-by-TFM-s.patch
+++ /dev/null
@@ -1,1034 +0,0 @@
-From e46fd33355b54c08d1764c2a8e7b553960d61157 Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <emekcan.aras@arm.com>
-Date: Sat, 25 Feb 2023 10:29:55 +0000
-Subject: [PATCH 1/6] Platform: corstone1000: Replace MCUBOOT BL1 by TFM's
-
-From: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-
-Replace The current BL1 (MCUBOOT) with the TFM BL1
-by enabling
-- PLATFORM_DEFAULT_BL1
-- Update linkerscripts
-- Update CMakeFile
-- Adapt boot_hal
-- Adapt provisioning (to use the provision bundle)
-- Adapt flash_layout and region_defs
-- Update documentation of corstone1000 build and run sections
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20553]
-Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-Change-Id: I224b24d0f4423e62468e609c11a239a4575cdae4
----
- .../target/arm/corstone1000/CMakeLists.txt | 70 +++++-
- .../Device/Include/boot_measurement.h | 24 +++
- .../Device/Include/platform_base_address.h | 3 +
- .../Device/Source/gcc/corstone1000_bl1_1.ld | 203 ++++++++++++++++++
- ...stone1000_bl1.ld => corstone1000_bl1_2.ld} | 8 +-
- .../target/arm/corstone1000/bl1/bl1_rotpk.c | 48 -----
- .../bl1/{bl1_boot_hal.c => boot_hal_bl1.c} | 102 ++++-----
- .../arm/corstone1000/bl1/flash_map_extended.c | 103 ---------
- .../arm/corstone1000/bl1/provisioning.c | 109 +++++-----
- .../ext/target/arm/corstone1000/config.cmake | 18 +-
- .../arm/corstone1000/partition/flash_layout.h | 10 -
- .../arm/corstone1000/partition/region_defs.h | 37 +++-
- 12 files changed, 434 insertions(+), 301 deletions(-)
- create mode 100644 platform/ext/target/arm/corstone1000/Device/Include/boot_measurement.h
- create mode 100644 platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld
- rename platform/ext/target/arm/corstone1000/Device/Source/gcc/{corstone1000_bl1.ld => corstone1000_bl1_2.ld} (95%)
- delete mode 100644 platform/ext/target/arm/corstone1000/bl1/bl1_rotpk.c
- rename platform/ext/target/arm/corstone1000/bl1/{bl1_boot_hal.c => boot_hal_bl1.c} (90%)
- delete mode 100644 platform/ext/target/arm/corstone1000/bl1/flash_map_extended.c
-
-diff --git a/platform/ext/target/arm/corstone1000/CMakeLists.txt b/platform/ext/target/arm/corstone1000/CMakeLists.txt
-index 19863bcdb..a4fe28c08 100644
---- a/platform/ext/target/arm/corstone1000/CMakeLists.txt
-+++ b/platform/ext/target/arm/corstone1000/CMakeLists.txt
-@@ -41,6 +41,23 @@ target_add_scatter_file(bl2
- $<$<C_COMPILER_ID:GNU>:${PLATFORM_DIR}/ext/common/gcc/tfm_common_bl2.ld>
- )
-
-+target_sources(bl1_1
-+PRIVATE
-+ $<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/Device/Source/startup_corstone1000.c>
-+)
-+
-+target_add_scatter_file(bl1_1
-+ $<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/Device/Source/gcc/corstone1000_bl1_1.ld>
-+)
-+
-+target_sources(bl1_2
-+PRIVATE
-+ $<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/Device/Source/startup_corstone1000.c>
-+)
-+target_add_scatter_file(bl1_2
-+ $<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/Device/Source/gcc/corstone1000_bl1_2.ld>
-+)
-+
- #========================= Platform Secure ====================================#
-
- add_subdirectory(openamp)
-@@ -115,6 +132,55 @@ if (TFM_PARTITION_CRYPTO)
- )
- endif()
-
-+#========================= Platform BL1 =======================================#
-+
-+target_sources(platform_bl1
-+ PRIVATE
-+ ./Device/Source/system_core_init.c
-+ ./Device/Source/device_definition.c
-+ ./bl1/boot_hal_bl1.c
-+ ./Native_Driver/firewall.c
-+ ./CMSIS_Driver/Driver_Flash.c
-+ ./CMSIS_Driver/Driver_USART.c
-+ ./Native_Driver/uart_pl011_drv.c
-+ $<$<BOOL:${PLATFORM_IS_FVP}>:${CMAKE_CURRENT_SOURCE_DIR}/Native_Driver/cfi_drv.c>
-+ $<$<BOOL:${PLATFORM_IS_FVP}>:${PLATFORM_DIR}/ext/target/arm/drivers/flash/strata/spi_strataflashj3_flash_lib.c>
-+ $<$<NOT:$<BOOL:${PLATFORM_IS_FVP}>>:${PLATFORM_DIR}/ext/target/arm/drivers/qspi/xilinx_pg153_axi/xilinx_pg153_axi_qspi_controller_drv.c>
-+ $<$<NOT:$<BOOL:${PLATFORM_IS_FVP}>>:${PLATFORM_DIR}/ext/target/arm/drivers/flash/n25q256a/spi_n25q256a_flash_lib.c>
-+ $<$<NOT:$<BOOL:${PLATFORM_IS_FVP}>>:${PLATFORM_DIR}/ext/target/arm/drivers/flash/sst26vf064b/spi_sst26vf064b_flash_lib.c>
-+ ./fw_update_agent/uefi_capsule_parser.c
-+ ./fw_update_agent/fwu_agent.c
-+ ./fw_update_agent/uefi_fmp.c
-+ ./soft_crc/soft_crc.c
-+ ./Native_Driver/arm_watchdog_drv.c
-+ ./Native_Driver/watchdog.c
-+ ./bl1/provisioning.c
-+ $<$<NOT:$<BOOL:${PLATFORM_DEFAULT_OTP}>>:${PLATFORM_DIR}/ext/accelerator/cc312/otp_cc312.c>
-+)
-+
-+target_compile_definitions(platform_bl1
-+ PUBLIC
-+ $<$<BOOL:${PLATFORM_IS_FVP}>:PLATFORM_IS_FVP>
-+ $<$<AND:$<BOOL:${CONFIG_TFM_BOOT_STORE_MEASUREMENTS}>,$<BOOL:${TFM_PARTITION_MEASURED_BOOT}>>:MEASURED_BOOT_API>
-+ $<$<BOOL:${PLATFORM_DEFAULT_OTP_WRITEABLE}>:OTP_WRITEABLE>
-+)
-+
-+target_include_directories(platform_bl1_interface
-+ INTERFACE
-+ .
-+ ./Device/Include
-+ ./Device/Config
-+ ./Native_Driver
-+ ./CMSIS_Driver/Config
-+ ./fw_update_agent
-+ ./soft_crc
-+ ${PLATFORM_DIR}/ext/target/arm/drivers/flash/common
-+ ${PLATFORM_DIR}/ext/target/arm/drivers/flash/strata
-+ ${PLATFORM_DIR}/ext/target/arm/drivers/qspi/xilinx_pg153_axi/
-+ ${PLATFORM_DIR}/ext/target/arm/drivers/flash/n25q256a/
-+ ${PLATFORM_DIR}/ext/target/arm/drivers/flash/sst26vf064b/
-+)
-+
- #========================= Platform BL2 =======================================#
-
- set(BL2_SOURCE ${CMAKE_SOURCE_DIR}/bl2)
-@@ -214,10 +280,6 @@ target_include_directories(platform_bl2
- $<BUILD_INTERFACE:${BL2_SOURCE}/ext/mcuboot/include>
- )
-
--#========================= BL1 component =======================================#
--
--add_subdirectory(bl1)
--
- #========================= ns_agent_mailbox ===================================#
-
- target_sources(tfm_psa_rot_partition_ns_agent_mailbox
-diff --git a/platform/ext/target/arm/corstone1000/Device/Include/boot_measurement.h b/platform/ext/target/arm/corstone1000/Device/Include/boot_measurement.h
-new file mode 100644
-index 000000000..a47bdb148
---- /dev/null
-+++ b/platform/ext/target/arm/corstone1000/Device/Include/boot_measurement.h
-@@ -0,0 +1,24 @@
-+/*
-+ * Copyright (c) 2023, Arm Limited. All rights reserved.
-+ *
-+ * SPDX-License-Identifier: BSD-3-Clause
-+ *
-+ */
-+
-+#ifndef __BOOT_MEASUREMENT_H__
-+#define __BOOT_MEASUREMENT_H__
-+
-+enum boot_measurement_slot_t {
-+ BOOT_MEASUREMENT_SLOT_BL1_2 = 0,
-+ BOOT_MEASUREMENT_SLOT_BL2,
-+ BOOT_MEASUREMENT_SLOT_RT_0,
-+ BOOT_MEASUREMENT_SLOT_RT_1,
-+ BOOT_MEASUREMENT_SLOT_RT_2,
-+ BOOT_MEASUREMENT_SLOT_MAX = 32,
-+ BOOT_MEASUREMENT_SLOT_MAX_THEORETICAL = 63 /* Slot index is stored in
-+ * 6 bits in the shared
-+ * memory area.
-+ */
-+};
-+
-+#endif /* __BOOT_MEASUREMENT_H__ */
-diff --git a/platform/ext/target/arm/corstone1000/Device/Include/platform_base_address.h b/platform/ext/target/arm/corstone1000/Device/Include/platform_base_address.h
-index 5cca4c4a1..416f0ebcd 100644
---- a/platform/ext/target/arm/corstone1000/Device/Include/platform_base_address.h
-+++ b/platform/ext/target/arm/corstone1000/Device/Include/platform_base_address.h
-@@ -79,4 +79,7 @@
- #define CORSTONE1000_HOST_AXI_QSPI_CTRL_REG_BASE_SE_SECURE_FLASH (0x90010000U) /* AXI QSPI Controller for SE FLash */
- #define CORSTONE1000_HOST_DRAM_UEFI_CAPSULE (0xA0000000U) /* 1.5 GB DDR */
-
-+/* Map Component definitions to Corstone definitions */
-+#define CC3XX_BASE_S CORSTONE1000_CRYPTO_ACCELERATOR_BASE
-+
- #endif /* __PLATFORM_BASE_ADDRESS_H__ */
-diff --git a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld
-new file mode 100644
-index 000000000..d4eca2841
---- /dev/null
-+++ b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld
-@@ -0,0 +1,203 @@
-+;/*
-+; * Copyright (c) 2009-2022, Arm Limited. All rights reserved.
-+; *
-+; * Licensed under the Apache License, Version 2.0 (the "License");
-+; * you may not use this file except in compliance with the License.
-+; * You may obtain a copy of the License at
-+; *
-+; * http://www.apache.org/licenses/LICENSE-2.0
-+; *
-+; * Unless required by applicable law or agreed to in writing, software
-+; * distributed under the License is distributed on an "AS IS" BASIS,
-+; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+; * See the License for the specific language governing permissions and
-+; * limitations under the License.
-+; *
-+; *
-+; * This file is derivative of CMSIS V5.00 gcc_arm.ld
-+; */
-+
-+/* Linker script to configure memory regions. */
-+/* This file will be run trough the pre-processor. */
-+
-+#include "region_defs.h"
-+
-+MEMORY
-+{
-+ FLASH (rx) : ORIGIN = BL1_1_CODE_START, LENGTH = BL1_1_CODE_SIZE
-+ RAM (rwx) : ORIGIN = BL1_1_DATA_START, LENGTH = BL1_1_DATA_SIZE
-+}
-+
-+__heap_size__ = BL1_1_HEAP_SIZE;
-+__msp_stack_size__ = BL1_1_MSP_STACK_SIZE;
-+
-+/* Library configurations */
-+GROUP(libgcc.a libc.a libm.a libnosys.a)
-+
-+ENTRY(Reset_Handler)
-+
-+SECTIONS
-+{
-+ .text :
-+ {
-+ KEEP(*(.vectors))
-+ __Vectors_End = .;
-+ __Vectors_Size = __Vectors_End - __Vectors;
-+ __end__ = .;
-+
-+ *(.text*)
-+
-+ KEEP(*shared_lib*:*(.text*))
-+ KEEP(*bl1_tests_shared*:*(.text*))
-+ KEEP(*bl1_crypto_hw*:*(.text*))
-+ KEEP(*boot_hal_bl1*(.text*))
-+
-+ KEEP(*(.init))
-+ KEEP(*(.fini))
-+
-+
-+ /* .ctors */
-+ *crtbegin.o(.ctors)
-+ *crtbegin?.o(.ctors)
-+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
-+ *(SORT(.ctors.*))
-+ *(.ctors)
-+
-+ /* .dtors */
-+ *crtbegin.o(.dtors)
-+ *crtbegin?.o(.dtors)
-+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
-+ *(SORT(.dtors.*))
-+ *(.dtors)
-+
-+ *(.rodata*)
-+
-+ KEEP(*(.eh_frame*))
-+ } > FLASH
-+
-+ .ARM.extab :
-+ {
-+ *(.ARM.extab* .gnu.linkonce.armextab.*)
-+ } > FLASH
-+
-+ __exidx_start = .;
-+ .ARM.exidx :
-+ {
-+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
-+ } > FLASH
-+ __exidx_end = .;
-+
-+ /* To copy multiple ROM to RAM sections,
-+ * define etext2/data2_start/data2_end and
-+ * define __STARTUP_COPY_MULTIPLE in startup_corstone700_bl2.S */
-+ .copy.table :
-+ {
-+ . = ALIGN(4);
-+ __copy_table_start__ = .;
-+ LONG (__etext)
-+ LONG (__data_start__)
-+ LONG ((__data_end__ - __data_start__) / 4)
-+ LONG (DEFINED(__etext2) ? __etext2 : 0)
-+ LONG (DEFINED(__data2_start__) ? __data2_start__ : 0)
-+ LONG (DEFINED(__data2_start__) ? ((__data2_end__ - __data2_start__) / 4) : 0)
-+ __copy_table_end__ = .;
-+ } > FLASH
-+
-+ /* To clear multiple BSS sections,
-+ * uncomment .zero.table section and,
-+ * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_cmsdk_musca_bl2.S */
-+ .zero.table :
-+ {
-+ . = ALIGN(4);
-+ __zero_table_start__ = .;
-+ LONG (__bss_start__)
-+ LONG ((__bss_end__ - __bss_start__) / 4)
-+ LONG (DEFINED(__bss2_start__) ? __bss2_start__ : 0)
-+ LONG (DEFINED(__bss2_start__) ? ((__bss2_end__ - __bss2_start__) / 4) : 0)
-+ __zero_table_end__ = .;
-+ } > FLASH
-+
-+ __etext = ALIGN (4);
-+
-+ .tfm_bl2_shared_data : ALIGN(32)
-+ {
-+ . += BOOT_TFM_SHARED_DATA_SIZE;
-+ } > RAM
-+ Image$$SHARED_DATA$$RW$$Base = ADDR(.tfm_bl2_shared_data);
-+ Image$$SHARED_DATA$$RW$$Limit = ADDR(.tfm_bl2_shared_data) + SIZEOF(.tfm_bl2_shared_data);
-+
-+ . = BL1_1_DATA_START;
-+ Image$$BL1_1_ER_DATA_START$$Base = .;
-+ .data : AT (__etext)
-+ {
-+ __data_start__ = .;
-+ *(vtable)
-+ *(.data*)
-+
-+ . = ALIGN(4);
-+ /* preinit data */
-+ PROVIDE_HIDDEN (__preinit_array_start = .);
-+ KEEP(*(.preinit_array))
-+ PROVIDE_HIDDEN (__preinit_array_end = .);
-+
-+ . = ALIGN(4);
-+ /* init data */
-+ PROVIDE_HIDDEN (__init_array_start = .);
-+ KEEP(*(SORT(.init_array.*)))
-+ KEEP(*(.init_array))
-+ PROVIDE_HIDDEN (__init_array_end = .);
-+
-+
-+ . = ALIGN(4);
-+ /* finit data */
-+ PROVIDE_HIDDEN (__fini_array_start = .);
-+ KEEP(*(SORT(.fini_array.*)))
-+ KEEP(*(.fini_array))
-+ PROVIDE_HIDDEN (__fini_array_end = .);
-+
-+ KEEP(*(.jcr*))
-+ . = ALIGN(4);
-+ /* All data end */
-+ __data_end__ = .;
-+
-+ } > RAM
-+ Image$$ER_DATA$$Base = ADDR(.data);
-+
-+ .bss :
-+ {
-+ . = ALIGN(4);
-+ __bss_start__ = .;
-+ *(.bss*)
-+ *(COMMON)
-+ . = ALIGN(4);
-+ __bss_end__ = .;
-+ } > RAM
-+
-+ bss_size = __bss_end__ - __bss_start__;
-+
-+ .msp_stack (NOLOAD) : ALIGN(32)
-+ {
-+ . += __msp_stack_size__;
-+ } > RAM
-+ Image$$ARM_LIB_STACK$$ZI$$Base = ADDR(.msp_stack);
-+ Image$$ARM_LIB_STACK$$ZI$$Limit = ADDR(.msp_stack) + SIZEOF(.msp_stack);
-+
-+ .heap (NOLOAD): ALIGN(8)
-+ {
-+ . = ALIGN(8);
-+ __end__ = .;
-+ PROVIDE(end = .);
-+ __HeapBase = .;
-+ . += __heap_size__;
-+ __HeapLimit = .;
-+ __heap_limit = .; /* Add for _sbrk */
-+ } > RAM
-+ Image$$ARM_LIB_HEAP$$ZI$$Limit = ADDR(.heap) + SIZEOF(.heap);
-+
-+ PROVIDE(__stack = Image$$ARM_LIB_STACK$$ZI$$Limit);
-+
-+ Image$$BL1_1_ER_DATA_LIMIT$$Base = .;
-+
-+ Image$$BL1_2_ER_DATA_START$$Base = BL1_2_DATA_START;
-+ Image$$BL1_2_ER_DATA_LIMIT$$Base = BL1_2_DATA_START + BL1_2_DATA_SIZE;
-+}
-diff --git a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1.ld b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld
-similarity index 95%
-rename from platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1.ld
-rename to platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld
-index 73be37d7c..6cd806378 100644
---- a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1.ld
-+++ b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld
-@@ -24,12 +24,12 @@
-
- MEMORY
- {
-- FLASH (rx) : ORIGIN = BL1_CODE_START, LENGTH = BL1_CODE_SIZE
-- RAM (rwx) : ORIGIN = BL1_DATA_START, LENGTH = BL1_DATA_SIZE
-+ FLASH (rx) : ORIGIN = BL1_2_CODE_START, LENGTH = BL1_2_CODE_SIZE
-+ RAM (rwx) : ORIGIN = BL1_2_DATA_START, LENGTH = BL1_2_DATA_SIZE
- }
-
--__heap_size__ = BL1_HEAP_SIZE;
--__msp_stack_size__ = BL1_MSP_STACK_SIZE;
-+__heap_size__ = BL1_2_HEAP_SIZE;
-+__msp_stack_size__ = BL1_2_MSP_STACK_SIZE;
-
- /* Library configurations */
- GROUP(libgcc.a libc.a libm.a libnosys.a)
-diff --git a/platform/ext/target/arm/corstone1000/bl1/bl1_rotpk.c b/platform/ext/target/arm/corstone1000/bl1/bl1_rotpk.c
-deleted file mode 100644
-index d8cfe3759..000000000
---- a/platform/ext/target/arm/corstone1000/bl1/bl1_rotpk.c
-+++ /dev/null
-@@ -1,48 +0,0 @@
--/*
-- * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
-- *
-- * SPDX-License-Identifier: BSD-3-Clause
-- *
-- */
--
--#include <stdint.h>
--#include "tfm_plat_otp.h"
--
--static enum tfm_plat_err_t get_rotpk_hash(enum tfm_otp_element_id_t id,
-- uint8_t* rotpk_hash,
-- uint32_t* rotpk_hash_size)
--{
-- enum tfm_plat_err_t err;
-- size_t otp_size;
--
-- err = tfm_plat_otp_read(id, *rotpk_hash_size, rotpk_hash);
-- if (err != TFM_PLAT_ERR_SUCCESS) {
-- return err;
-- }
--
-- err = tfm_plat_otp_get_size(id, &otp_size);
-- if (err != TFM_PLAT_ERR_SUCCESS) {
-- return err;
-- }
--
-- *rotpk_hash_size = otp_size;
--
-- return TFM_PLAT_ERR_SUCCESS;
--}
--
--enum tfm_plat_err_t
--tfm_plat_get_rotpk_hash(uint8_t image_id,
-- uint8_t *rotpk_hash,
-- uint32_t *rotpk_hash_size)
--{
-- switch(image_id) {
-- case 0:
-- return get_rotpk_hash(PLAT_OTP_ID_BL1_ROTPK_0, rotpk_hash,
-- rotpk_hash_size);
--
-- default:
-- return TFM_PLAT_ERR_INVALID_INPUT;
-- }
--
-- return TFM_PLAT_ERR_SYSTEM_ERR;
--}
-diff --git a/platform/ext/target/arm/corstone1000/bl1/bl1_boot_hal.c b/platform/ext/target/arm/corstone1000/bl1/boot_hal_bl1.c
-similarity index 90%
-rename from platform/ext/target/arm/corstone1000/bl1/bl1_boot_hal.c
-rename to platform/ext/target/arm/corstone1000/bl1/boot_hal_bl1.c
-index a5fe0f7da..678342443 100644
---- a/platform/ext/target/arm/corstone1000/bl1/bl1_boot_hal.c
-+++ b/platform/ext/target/arm/corstone1000/bl1/boot_hal_bl1.c
-@@ -12,13 +12,16 @@
- #include "Driver_Flash.h"
- #include "flash_layout.h"
- #include "fih.h"
--#include "bootutil/bootutil_log.h"
- #include "firewall.h"
- #include "watchdog.h"
- #include "mpu_config.h"
- #include "tfm_plat_otp.h"
- #include "tfm_plat_provisioning.h"
- #include "fwu_agent.h"
-+#include "uart_stdout.h"
-+#include "region_defs.h"
-+#include "log.h"
-+
-
- #if defined(CRYPTO_HW_ACCELERATOR) || \
- defined(CRYPTO_HW_ACCELERATOR_OTP_PROVISIONING)
-@@ -81,6 +84,9 @@ enum host_firewall_host_comp_id_t {
- COMP_DEBUG,
- };
-
-+extern uint32_t platform_code_is_bl1_2;
-+
-+
- static void setup_mpu(void)
- {
- uint32_t size; /* region size */
-@@ -581,56 +587,44 @@ static void setup_host_firewall(void)
- fw_lockdown(FW_FULL_LOCKDOWN);
- }
-
--
--__attribute__((naked)) void boot_clear_bl2_ram_area(void)
-+uint32_t bl1_image_get_flash_offset(uint32_t image_id)
- {
-- __ASM volatile(
-- ".syntax unified \n"
-- "movs r0, #0 \n"
-- "ldr r1, =Image$$ER_DATA$$Base \n"
-- "ldr r2, =Image$$ARM_LIB_HEAP$$ZI$$Limit \n"
-- "subs r2, r2, r1 \n"
-- "Loop: \n"
-- "subs r2, #4 \n"
-- "blt Clear_done \n"
-- "str r0, [r1, r2] \n"
-- "b Loop \n"
-- "Clear_done: \n"
-- "bx lr \n"
-- : : : "r0" , "r1" , "r2" , "memory"
-- );
-+ /* SE BL2 Offset is equal to bank offset as it is the first think in the Bank */
-+ uint32_t se_bl2_offset = 0;
-+ bl1_get_active_bl2_image(&se_bl2_offset);
-+ switch (image_id) {
-+ case 0:
-+ return se_bl2_offset;
-+ case 1:
-+ return se_bl2_offset + SE_BL2_PARTITION_SIZE;
-+ default:
-+ FIH_PANIC;
-+ }
- }
-
--extern void set_flash_area_image_offset(uint32_t offset);
--
- int32_t boot_platform_init(void)
- {
- int32_t result;
- uint32_t image_offset;
-
-- result = corstone1000_watchdog_init();
-- if (result != ARM_DRIVER_OK) {
-- return 1;
-- }
--
-+ if (!platform_code_is_bl1_2) {
-+ result = corstone1000_watchdog_init();
-+ if (result != ARM_DRIVER_OK) {
-+ return 1;
-+ }
- #if !(PLATFORM_IS_FVP)
-- setup_mpu();
-+ setup_mpu();
- #endif
-- setup_se_firewall();
-+ setup_se_firewall();
- #if !(PLATFORM_IS_FVP)
-- setup_host_firewall();
-+ setup_host_firewall();
- #endif
--
-- result = FLASH_DEV_NAME.Initialize(NULL);
-- if (result != ARM_DRIVER_OK) {
-- return 1;
- }
--#if PLATFORM_DEFAULT_OTP
-- result = FLASH_DEV_NAME_SE_SECURE_FLASH.Initialize(NULL);
-- if (result != ARM_DRIVER_OK) {
-- return 1;
-- }
--#endif
-+
-+#if defined(TFM_BL1_LOGGING) || defined(TEST_BL1_1) || defined(TEST_BL1_2)
-+ stdio_init();
-+#endif /* defined(TFM_BL1_LOGGING) || defined(TEST_BL1_1) || defined(TEST_BL1_2) */
-+
-
- #ifdef CRYPTO_HW_ACCELERATOR
- result = crypto_hw_accelerator_init();
-@@ -639,23 +633,11 @@ int32_t boot_platform_init(void)
- }
- #endif /* CRYPTO_HW_ACCELERATOR */
-
-- result = tfm_plat_otp_init();
-- if (result != TFM_PLAT_ERR_SUCCESS) {
-- BOOT_LOG_ERR("OTP system initialization failed");
-- FIH_PANIC;
-- }
--
-- if (tfm_plat_provisioning_is_required()) {
-- result = fwu_metadata_provision();
-- if (result != FWU_AGENT_SUCCESS) {
-- BOOT_LOG_ERR("Provisioning FWU Metadata failed");
-- FIH_PANIC;
-- }
-- }
--
-- bl1_get_active_bl2_image(&image_offset);
-- set_flash_area_image_offset(image_offset);
-+ return 0;
-+}
-
-+int32_t boot_platform_post_init(void)
-+{
- return 0;
- }
-
-@@ -678,17 +660,15 @@ void boot_platform_quit(struct boot_arm_vector_table *vt)
- (void)fih_delay_init();
- #endif /* CRYPTO_HW_ACCELERATOR */
-
-- result = FLASH_DEV_NAME.Uninitialize();
-- if (result != ARM_DRIVER_OK) {
-- while (1);
-- }
-
--#if PLATFORM_DEFAULT_OTP
-- result = FLASH_DEV_NAME_SE_SECURE_FLASH.Uninitialize();
-+#if defined(TFM_BL1_LOGGING) || defined(TEST_BL1_1) || defined(TEST_BL1_2)
-+ stdio_uninit();
-+#endif /* defined(TFM_BL1_LOGGING) || defined(TEST_BL1_1) || defined(TEST_BL1_2) */
-+
-+ result = corstone1000_watchdog_reset_timer();
- if (result != ARM_DRIVER_OK) {
- while (1);
- }
--#endif
-
- vt_cpy = vt;
-
-diff --git a/platform/ext/target/arm/corstone1000/bl1/flash_map_extended.c b/platform/ext/target/arm/corstone1000/bl1/flash_map_extended.c
-deleted file mode 100644
-index b6632b6c2..000000000
---- a/platform/ext/target/arm/corstone1000/bl1/flash_map_extended.c
-+++ /dev/null
-@@ -1,103 +0,0 @@
--/*
-- * Copyright (c) 2018 Nordic Semiconductor ASA
-- * Copyright (c) 2015 Runtime Inc
-- * Copyright (c) 2019-2021 Arm Limited.
-- *
-- * SPDX-License-Identifier: Apache-2.0
-- */
--
--/*
-- * Original code taken from mcuboot project at:
-- * https://github.com/mcu-tools/mcuboot
-- * Git SHA of the original version: ac55554059147fff718015be9f4bd3108123f50a
-- */
--
--#include <errno.h>
--#include "target.h"
--#include "cmsis.h"
--#include "Driver_Flash.h"
--#include "sysflash/sysflash.h"
--#include "flash_map/flash_map.h"
--#include "flash_map_backend/flash_map_backend.h"
--#include "bootutil/bootutil_log.h"
--
--__WEAK int flash_device_base(uint8_t fd_id, uintptr_t *ret)
--{
-- if (fd_id != FLASH_DEVICE_ID) {
-- BOOT_LOG_ERR("invalid flash ID %d; expected %d",
-- fd_id, FLASH_DEVICE_ID);
-- return -1;
-- }
-- *ret = FLASH_DEVICE_BASE;
-- return 0;
--}
--
--/*
-- * This depends on the mappings defined in flash_map.h.
-- * MCUBoot uses continuous numbering for the primary slot, the secondary slot,
-- * and the scratch while TF-M might number it differently.
-- */
--int flash_area_id_from_multi_image_slot(int image_index, int slot)
--{
-- switch (slot) {
-- case 0: return BL1_FLASH_AREA_IMAGE_PRIMARY(image_index);
-- case 1: return BL1_FLASH_AREA_IMAGE_SECONDARY(image_index);
-- case 2: return BL1_FLASH_AREA_IMAGE_SCRATCH;
-- }
--
-- return -1; /* flash_area_open will fail on that */
--}
--
--int flash_area_id_from_image_slot(int slot)
--{
-- return flash_area_id_from_multi_image_slot(0, slot);
--}
--
--int flash_area_id_to_multi_image_slot(int image_index, int area_id)
--{
-- if (area_id == BL1_FLASH_AREA_IMAGE_PRIMARY(image_index)) {
-- return 0;
-- }
-- if (area_id == BL1_FLASH_AREA_IMAGE_SECONDARY(image_index)) {
-- return 1;
-- }
--
-- BOOT_LOG_ERR("invalid flash area ID");
-- return -1;
--}
--
--int flash_area_id_to_image_slot(int area_id)
--{
-- return flash_area_id_to_multi_image_slot(0, area_id);
--}
--
--uint8_t flash_area_erased_val(const struct flash_area *fap)
--{
-- return DRV_FLASH_AREA(fap)->GetInfo()->erased_value;
--}
--
--int flash_area_read_is_empty(const struct flash_area *fa, uint32_t off,
-- void *dst, uint32_t len)
--{
-- uint32_t i;
-- uint8_t *u8dst;
-- int rc;
--
-- BOOT_LOG_DBG("read_is_empty area=%d, off=%#x, len=%#x",
-- fa->fa_id, off, len);
--
-- rc = DRV_FLASH_AREA(fa)->ReadData(fa->fa_off + off, dst, len);
-- if (rc) {
-- return -1;
-- }
--
-- u8dst = (uint8_t*)dst;
--
-- for (i = 0; i < len; i++) {
-- if (u8dst[i] != flash_area_erased_val(fa)) {
-- return 0;
-- }
-- }
--
-- return 1;
--}
-diff --git a/platform/ext/target/arm/corstone1000/bl1/provisioning.c b/platform/ext/target/arm/corstone1000/bl1/provisioning.c
-index 832fcea89..683bc45ea 100644
---- a/platform/ext/target/arm/corstone1000/bl1/provisioning.c
-+++ b/platform/ext/target/arm/corstone1000/bl1/provisioning.c
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2021-2022, Arm Limited. All rights reserved.
-+ * Copyright (c) 2021-2023, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
-@@ -11,7 +11,9 @@
- #include "tfm_plat_otp.h"
- #include "tfm_attest_hal.h"
- #include "psa/crypto.h"
--#include "bootutil/bootutil_log.h"
-+#include "region_defs.h"
-+#include "log.h"
-+#include "fwu_agent.h"
-
- #include <string.h>
-
-@@ -19,51 +21,20 @@
-
- __PACKED_STRUCT bl1_assembly_and_test_provisioning_data_t {
- uint32_t magic;
-- uint8_t bl1_rotpk_0[32];
-+ uint8_t bl2_encryption_key[32];
-+ uint8_t guk[32];
-+ uint8_t bl1_2_image_hash[32];
-+ uint8_t bl2_image_hash[32];
-+ uint8_t bl1_2_image[BL1_2_CODE_SIZE];
-+ uint8_t bl1_rotpk_0[56];
- };
-
--#ifdef TFM_DUMMY_PROVISIONING
--static const struct bl1_assembly_and_test_provisioning_data_t bl1_assembly_and_test_prov_data = {
-- ASSEMBLY_AND_TEST_PROV_DATA_MAGIC,
--#if (MCUBOOT_SIGN_RSA_LEN == 2048)
-- /* bl1 rotpk 0 */
-- {
-- 0xfc, 0x57, 0x01, 0xdc, 0x61, 0x35, 0xe1, 0x32,
-- 0x38, 0x47, 0xbd, 0xc4, 0x0f, 0x04, 0xd2, 0xe5,
-- 0xbe, 0xe5, 0x83, 0x3b, 0x23, 0xc2, 0x9f, 0x93,
-- 0x59, 0x3d, 0x00, 0x01, 0x8c, 0xfa, 0x99, 0x94,
-- },
--#elif (MCUBOOT_SIGN_RSA_LEN == 3072)
-- /* bl1 rotpk 0 */
-- {
-- 0xbf, 0xe6, 0xd8, 0x6f, 0x88, 0x26, 0xf4, 0xff,
-- 0x97, 0xfb, 0x96, 0xc4, 0xe6, 0xfb, 0xc4, 0x99,
-- 0x3e, 0x46, 0x19, 0xfc, 0x56, 0x5d, 0xa2, 0x6a,
-- 0xdf, 0x34, 0xc3, 0x29, 0x48, 0x9a, 0xdc, 0x38,
-- },
--#else
--#error "No public key available for given signing algorithm."
--#endif /* MCUBOOT_SIGN_RSA_LEN */
--};
--#else
--static const struct bl1_assembly_and_test_provisioning_data_t bl1_assembly_and_test_prov_data;
--#endif /* TFM_DUMMY_PROVISIONING */
-+static const struct bl1_assembly_and_test_provisioning_data_t *bl1_assembly_and_test_prov_data =
-+ (struct bl1_assembly_and_test_provisioning_data_t *)PROVISIONING_DATA_START;
-+
-
- void tfm_plat_provisioning_check_for_dummy_keys(void)
- {
-- uint64_t iak_start;
--
-- tfm_plat_otp_read(PLAT_OTP_ID_IAK, sizeof(iak_start), (uint8_t*)&iak_start);
--
-- if(iak_start == 0xA4906F6DB254B4A9) {
-- BOOT_LOG_WRN("%s%s%s%s",
-- "\033[1;31m",
-- "This device was provisioned with dummy keys. ",
-- "This device is \033[1;1mNOT SECURE",
-- "\033[0m");
-- }
--
-- memset(&iak_start, 0, sizeof(iak_start));
- }
-
- int tfm_plat_provisioning_is_required(void)
-@@ -85,12 +56,47 @@ enum tfm_plat_err_t provision_assembly_and_test(void)
- enum tfm_plat_err_t err;
-
- err = tfm_plat_otp_write(PLAT_OTP_ID_BL1_ROTPK_0,
-- sizeof(bl1_assembly_and_test_prov_data.bl1_rotpk_0),
-- bl1_assembly_and_test_prov_data.bl1_rotpk_0);
-+ sizeof(bl1_assembly_and_test_prov_data->bl1_rotpk_0),
-+ bl1_assembly_and_test_prov_data->bl1_rotpk_0);
-+ if (err != TFM_PLAT_ERR_SUCCESS && err != TFM_PLAT_ERR_UNSUPPORTED) {
-+ return err;
-+ }
-+
-+
-+ err = tfm_plat_otp_write(PLAT_OTP_ID_BL1_2_IMAGE_HASH,
-+ sizeof(bl1_assembly_and_test_prov_data->bl1_2_image_hash),
-+ bl1_assembly_and_test_prov_data->bl1_2_image_hash);
-+ if (err != TFM_PLAT_ERR_SUCCESS && err != TFM_PLAT_ERR_UNSUPPORTED) {
-+ return err;
-+ }
-+
-+
-+ err = tfm_plat_otp_write(PLAT_OTP_ID_BL1_2_IMAGE,
-+ sizeof(bl1_assembly_and_test_prov_data->bl1_2_image),
-+ bl1_assembly_and_test_prov_data->bl1_2_image);
-+ if (err != TFM_PLAT_ERR_SUCCESS && err != TFM_PLAT_ERR_UNSUPPORTED) {
-+ return err;
-+ }
-+
-+ err = tfm_plat_otp_write(PLAT_OTP_ID_KEY_BL2_ENCRYPTION,
-+ sizeof(bl1_assembly_and_test_prov_data->bl2_encryption_key),
-+ bl1_assembly_and_test_prov_data->bl2_encryption_key);
- if (err != TFM_PLAT_ERR_SUCCESS && err != TFM_PLAT_ERR_UNSUPPORTED) {
- return err;
- }
-
-+ err = tfm_plat_otp_write(PLAT_OTP_ID_BL2_IMAGE_HASH,
-+ sizeof(bl1_assembly_and_test_prov_data->bl2_image_hash),
-+ bl1_assembly_and_test_prov_data->bl2_image_hash);
-+ if (err != TFM_PLAT_ERR_SUCCESS && err != TFM_PLAT_ERR_UNSUPPORTED) {
-+ return err;
-+ }
-+
-+ err = fwu_metadata_provision();
-+ if (err != FWU_AGENT_SUCCESS) {
-+ return 1;
-+ }
-+
- return err;
- }
-
-@@ -104,19 +110,18 @@ enum tfm_plat_err_t tfm_plat_provisioning_perform(void)
- return err;
- }
-
-- BOOT_LOG_INF("Beginning BL1 provisioning");
-+ BL1_LOG("[INF] Beginning BL1 provisioning\r\n");
-
- #ifdef TFM_DUMMY_PROVISIONING
-- BOOT_LOG_WRN("%s%s%s%s",
-- "\033[1;31m",
-- "TFM_DUMMY_PROVISIONING is not suitable for production! ",
-- "This device is \033[1;1mNOT SECURE",
-- "\033[0m");
-+ BL1_LOG("\033[1;31m[WRN]");
-+ BL1_LOG("TFM_DUMMY_PROVISIONING is not suitable for production! ");
-+ BL1_LOG("This device is \033[1;1mNOT SECURE");
-+ BL1_LOG("\033[0m\r\n");
- #endif /* TFM_DUMMY_PROVISIONING */
-
- if (lcs == PLAT_OTP_LCS_ASSEMBLY_AND_TEST) {
-- if (bl1_assembly_and_test_prov_data.magic != ASSEMBLY_AND_TEST_PROV_DATA_MAGIC) {
-- BOOT_LOG_ERR("No valid ASSEMBLY_AND_TEST provisioning data found");
-+ if (bl1_assembly_and_test_prov_data->magic != ASSEMBLY_AND_TEST_PROV_DATA_MAGIC) {
-+ BL1_LOG("[ERR] No valid ASSEMBLY_AND_TEST provisioning data found\r\n");
- return TFM_PLAT_ERR_INVALID_INPUT;
- }
-
-diff --git a/platform/ext/target/arm/corstone1000/config.cmake b/platform/ext/target/arm/corstone1000/config.cmake
-index aca75394d..1b0675404 100644
---- a/platform/ext/target/arm/corstone1000/config.cmake
-+++ b/platform/ext/target/arm/corstone1000/config.cmake
-@@ -8,7 +8,14 @@
- #-------------------------------------------------------------------------------
-
- set(BL1 ON CACHE BOOL "Whether to build BL1")
--set(PLATFORM_DEFAULT_BL1 OFF CACHE STRING "Whether to use default BL1 or platform-specific one")
-+set(PLATFORM_DEFAULT_BL1 ON CACHE STRING "Whether to use default BL1 or platform-specific one")
-+set(PLATFORM_DEFAULT_OTP OFF CACHE BOOL "Use trusted on-chip flash to implement OTP memory")
-+
-+set(TFM_BL1_DEFAULT_PROVISIONING OFF CACHE BOOL "Whether BL1_1 will use default provisioning")
-+set(TFM_BL1_SOFTWARE_CRYPTO OFF CACHE BOOL "Whether BL1_1 will use software crypto")
-+set(TFM_BL1_MEMORY_MAPPED_FLASH OFF CACHE BOOL "Whether BL1 can directly access flash content")
-+set(TFM_BL1_PQ_CRYPTO OFF CACHE BOOL "Enable LMS PQ crypto for BL2 verification. This is experimental and should not yet be used in production")
-+
- set(BL2 ON CACHE BOOL "Whether to build BL2")
- set(BL2_TRAILER_SIZE 0x800 CACHE STRING "Trailer size")
- set(DEFAULT_MCUBOOT_FLASH_MAP OFF CACHE BOOL "Whether to use the default flash map defined by TF-M project")
-@@ -26,13 +33,6 @@ set(TFM_CRYPTO_TEST_ALG_CFB OFF CACHE BOOL "Test CFB cryp
- set(NS FALSE CACHE BOOL "Whether to build NS app")
- set(EXTERNAL_SYSTEM_SUPPORT OFF CACHE BOOL "Whether to include external system support.")
-
--# FVP is not integrated/tested with CC312.
--if (${PLATFORM_IS_FVP})
-- set(PLATFORM_DEFAULT_OTP TRUE CACHE BOOL "Use trusted on-chip flash to implement OTP memory")
--else()
-- set(PLATFORM_DEFAULT_OTP FALSE CACHE BOOL "Use trusted on-chip flash to implement OTP memory")
--endif()
--
- # External dependency on OpenAMP and Libmetal
- set(LIBMETAL_SRC_PATH "DOWNLOAD" CACHE PATH "Path to Libmetal (or DOWNLOAD to fetch automatically")
- set(LIBMETAL_VERSION "f252f0e007fbfb8b3a52b1d5901250ddac96baad" CACHE STRING "The version of libmetal to use")
-@@ -59,6 +59,8 @@ set(TFM_PARTITION_PROTECTED_STORAGE ON CACHE BOOL "Enable Prot
- set(TFM_PARTITION_CRYPTO ON CACHE BOOL "Enable Crypto partition")
- set(TFM_PARTITION_INITIAL_ATTESTATION ON CACHE BOOL "Enable Initial Attestation partition")
- set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON CACHE BOOL "Enable Internal Trusted Storage partition")
-+set(TFM_PARTITION_MEASURED_BOOT ON CACHE BOOL "Enable Measured boot partition")
-+
-
- if (${CMAKE_BUILD_TYPE} STREQUAL Debug OR ${CMAKE_BUILD_TYPE} STREQUAL RelWithDebInfo)
- set(ENABLE_FWU_AGENT_DEBUG_LOGS TRUE CACHE BOOL "Enable Firmware update agent debug logs.")
-diff --git a/platform/ext/target/arm/corstone1000/partition/flash_layout.h b/platform/ext/target/arm/corstone1000/partition/flash_layout.h
-index b01a3621b..a95ff63ef 100644
---- a/platform/ext/target/arm/corstone1000/partition/flash_layout.h
-+++ b/platform/ext/target/arm/corstone1000/partition/flash_layout.h
-@@ -34,16 +34,6 @@
-
- #define BL2_DATA_GAP_SIZE (0x09800) /* 38 KB */
-
--#define BL1_DATA_START (SRAM_BASE)
--#define BL1_DATA_SIZE (0x10000) /* 64 KiB*/
--#define BL1_DATA_LIMIT (BL1_DATA_START + BL1_DATA_SIZE - 1)
--
--#ifdef BL1
--
--#define IMAGE_EXECUTABLE_RAM_START (SRAM_BASE + BL1_DATA_SIZE)
--#define IMAGE_EXECUTABLE_RAM_SIZE (SRAM_SIZE - BL1_DATA_SIZE)
--
--#endif /* BL1 */
-
- /*****************/
- /***** Flash *****/
-diff --git a/platform/ext/target/arm/corstone1000/partition/region_defs.h b/platform/ext/target/arm/corstone1000/partition/region_defs.h
-index 35055fe9c..8157c36bf 100644
---- a/platform/ext/target/arm/corstone1000/partition/region_defs.h
-+++ b/platform/ext/target/arm/corstone1000/partition/region_defs.h
-@@ -20,12 +20,17 @@
-
- #include "flash_layout.h"
-
-+/* BL1_1 */
-+#define BL1_1_HEAP_SIZE (0x0001000) /* 4KiB */
-+#define BL1_1_MSP_STACK_SIZE (0x0001800) /* 6KiB */
-+
-+/* BL1_2 */
-+#define BL1_2_HEAP_SIZE (0x0001000) /* 4KiB */
-+#define BL1_2_MSP_STACK_SIZE (0x0001800) /* 6KiB */
-+
- #define BL2_HEAP_SIZE (0x0001000)
- #define BL2_MSP_STACK_SIZE (0x0001E00)
-
--#define BL1_HEAP_SIZE (0x0001000)
--#define BL1_MSP_STACK_SIZE (0x0001800)
--
- #ifdef ENABLE_HEAP
- #define S_HEAP_SIZE (0x0000200)
- #endif
-@@ -80,8 +85,8 @@
-
-
- /* SE BL2 regions */
--#define BL2_CODE_START (SRAM_BASE + TFM_PARTITION_SIZE + \
-- BL2_DATA_GAP_SIZE + BL2_HEADER_SIZE)
-+#define BL2_IMAGE_START (SRAM_BASE + SRAM_SIZE - SE_BL2_PARTITION_SIZE)
-+#define BL2_CODE_START (BL2_IMAGE_START + BL2_HEADER_SIZE)
- #define BL2_CODE_SIZE (IMAGE_BL2_CODE_SIZE)
- #define BL2_CODE_LIMIT (BL2_CODE_START + BL2_CODE_SIZE - 1)
-
-@@ -91,9 +96,25 @@
- #define BL2_DATA_LIMIT (BL2_DATA_START + BL2_DATA_SIZE - 1)
-
- /* SE BL1 regions */
--#define BL1_CODE_START (0)
--#define BL1_CODE_SIZE (0x00020000) /* Whole SE ROM, 128 KiB */
--#define BL1_CODE_LIMIT (BL2_CODE_START + BL2_CODE_SIZE - 1)
-+#define BL1_1_CODE_START (0)
-+#define BL1_1_CODE_SIZE (0x0000A000) /* 40 KiB */
-+#define BL1_1_CODE_LIMIT (BL1_1_CODE_START + BL1_1_CODE_SIZE - 1)
-+
-+#define PROVISIONING_DATA_START (BL1_1_CODE_START + BL1_1_CODE_SIZE)
-+#define PROVISIONING_DATA_SIZE (0x00002000) /* 8 KiB */
-+#define PROVISIONING_DATA_LIMIT (PROVISIONING_DATA_START + PROVISIONING_DATA_SIZE - 1)
-+
-+#define BL1_1_DATA_START (SRAM_BASE)
-+#define BL1_1_DATA_SIZE (0x8000) /* 32 KiB*/
-+#define BL1_1_DATA_LIMIT (BL1_1_DATA_START + BL1_1_DATA_SIZE - 1)
-+
-+#define BL1_2_CODE_START (BL1_1_DATA_START + BL1_1_DATA_SIZE)
-+#define BL1_2_CODE_SIZE (0x00001000) /* 4 KiB */
-+#define BL1_2_CODE_LIMIT (BL1_2_CODE_START + BL1_2_CODE_SIZE - 1)
-+
-+#define BL1_2_DATA_START (BL1_2_CODE_START+BL1_2_CODE_SIZE)
-+#define BL1_2_DATA_SIZE (0x8000) /* 32 KiB*/
-+#define BL1_2_DATA_LIMIT (BL1_2_DATA_START + BL1_2_DATA_SIZE - 1)
-
- #define BOOT_TFM_SHARED_DATA_BASE (S_DATA_PRIV_START)
-
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/rwx.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0004-arm-trusted-firmware-m-disable-fatal-warnings.patch
index 1efd661827..07db4f6d59 100644
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/rwx.patch
+++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0004-arm-trusted-firmware-m-disable-fatal-warnings.patch
@@ -1,4 +1,4 @@
-From 1d548c77d07fc9a83e3e9aa28a23aa19a0177e3b Mon Sep 17 00:00:00 2001
+From 04ce07d289e8cec75223349e9ebf7e69126fc04d Mon Sep 17 00:00:00 2001
From: Jon Mason <jon.mason@arm.com>
Date: Wed, 18 Jan 2023 15:13:37 -0500
Subject: [PATCH] arm/trusted-firmware-m: disable fatal warnings
@@ -11,7 +11,7 @@ Upstream-Status: Inappropriate
1 file changed, 1 deletion(-)
diff --git a/toolchain_GNUARM.cmake b/toolchain_GNUARM.cmake
-index 7978eaca68..88395f922a 100644
+index 7989718515..a5939323d6 100644
--- a/toolchain_GNUARM.cmake
+++ b/toolchain_GNUARM.cmake
@@ -71,7 +71,6 @@ macro(tfm_toolchain_reset_linker_flags)
@@ -22,4 +22,3 @@ index 7978eaca68..88395f922a 100644
LINKER:--gc-sections
LINKER:--no-wchar-size-warning
${MEMORY_USAGE_FLAG}
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0005-Platform-corstone1000-Replace-MCUBOOT-BL1-by-TFM-s-B.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0005-Platform-corstone1000-Replace-MCUBOOT-BL1-by-TFM-s-B.patch
deleted file mode 100644
index 697061e2d9..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0005-Platform-corstone1000-Replace-MCUBOOT-BL1-by-TFM-s-B.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-From d5a7cde4648d2247f83a0f259aa088152199dfbd Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <emekcan.aras@arm.com>
-Date: Mon, 27 Feb 2023 20:58:30 +0000
-Subject: [PATCH 2/6] Platform: corstone1000: Replace MCUBOOT BL1 by TFM's
- (BL2)
-
-From: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-
-Set region_defs of BL2 correctly
-Set FLASH Areas 0 and 1 to have BL2
-Set FLASH Areas 2 and 3 to have TFM
-Set FLASH Areas 4 and 5 to have FIP
-Initialize FLASH in BL1_2 boot platform code
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20554]
-Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-Change-Id: I987d29cb6318b8b30cafab67d24f446aaadfe500
----
- .../arm/corstone1000/bl1/boot_hal_bl1.c | 14 +++++++
- .../target/arm/corstone1000/bl2_flash_map.c | 8 ++--
- .../ext/target/arm/corstone1000/config.cmake | 3 ++
- .../arm/corstone1000/partition/flash_layout.h | 41 +++++++++++++------
- .../arm/corstone1000/partition/region_defs.h | 4 +-
- 5 files changed, 51 insertions(+), 19 deletions(-)
-
-diff --git a/platform/ext/target/arm/corstone1000/bl1/boot_hal_bl1.c b/platform/ext/target/arm/corstone1000/bl1/boot_hal_bl1.c
-index 678342443..2124720b2 100644
---- a/platform/ext/target/arm/corstone1000/bl1/boot_hal_bl1.c
-+++ b/platform/ext/target/arm/corstone1000/bl1/boot_hal_bl1.c
-@@ -638,6 +638,13 @@ int32_t boot_platform_init(void)
-
- int32_t boot_platform_post_init(void)
- {
-+ int32_t result;
-+ if (platform_code_is_bl1_2) {
-+ result = FLASH_DEV_NAME.Initialize(NULL);
-+ if (result != ARM_DRIVER_OK) {
-+ return 1;
-+ }
-+ }
- return 0;
- }
-
-@@ -665,6 +672,13 @@ void boot_platform_quit(struct boot_arm_vector_table *vt)
- stdio_uninit();
- #endif /* defined(TFM_BL1_LOGGING) || defined(TEST_BL1_1) || defined(TEST_BL1_2) */
-
-+ if (platform_code_is_bl1_2) {
-+ result = FLASH_DEV_NAME.Uninitialize();
-+ if (result != ARM_DRIVER_OK) {
-+ return 1;
-+ }
-+ }
-+
- result = corstone1000_watchdog_reset_timer();
- if (result != ARM_DRIVER_OK) {
- while (1);
-diff --git a/platform/ext/target/arm/corstone1000/bl2_flash_map.c b/platform/ext/target/arm/corstone1000/bl2_flash_map.c
-index 599f80b41..2b1cdfa19 100644
---- a/platform/ext/target/arm/corstone1000/bl2_flash_map.c
-+++ b/platform/ext/target/arm/corstone1000/bl2_flash_map.c
-@@ -25,14 +25,14 @@ extern ARM_DRIVER_FLASH FLASH_DEV_NAME;
- */
- struct flash_area flash_map[] = {
- {
-- .fa_id = FLASH_AREA_0_ID,
-+ .fa_id = FLASH_AREA_2_ID,
- .fa_device_id = FLASH_DEVICE_ID,
- .fa_driver = &FLASH_DEV_NAME,
- .fa_off = FLASH_INVALID_OFFSET,
- .fa_size = FLASH_INVALID_SIZE,
- },
- {
-- .fa_id = FLASH_AREA_1_ID,
-+ .fa_id = FLASH_AREA_3_ID,
- .fa_device_id = FLASH_DEVICE_ID,
- .fa_driver = &FLASH_DEV_NAME,
- .fa_off = FLASH_INVALID_OFFSET,
-@@ -40,14 +40,14 @@ struct flash_area flash_map[] = {
- },
- #ifndef TFM_S_REG_TEST
- {
-- .fa_id = FLASH_AREA_2_ID,
-+ .fa_id = FLASH_AREA_4_ID,
- .fa_device_id = FLASH_DEVICE_ID,
- .fa_driver = &FLASH_DEV_NAME,
- .fa_off = FLASH_INVALID_OFFSET,
- .fa_size = FLASH_INVALID_SIZE,
- },
- {
-- .fa_id = FLASH_AREA_3_ID,
-+ .fa_id = FLASH_AREA_5_ID,
- .fa_device_id = FLASH_DEVICE_ID,
- .fa_driver = &FLASH_DEV_NAME,
- .fa_off = FLASH_INVALID_OFFSET,
-diff --git a/platform/ext/target/arm/corstone1000/config.cmake b/platform/ext/target/arm/corstone1000/config.cmake
-index 1b0675404..bec6b84f0 100644
---- a/platform/ext/target/arm/corstone1000/config.cmake
-+++ b/platform/ext/target/arm/corstone1000/config.cmake
-@@ -16,6 +16,9 @@ set(TFM_BL1_SOFTWARE_CRYPTO OFF CACHE BOOL "Whether BL1_1
- set(TFM_BL1_MEMORY_MAPPED_FLASH OFF CACHE BOOL "Whether BL1 can directly access flash content")
- set(TFM_BL1_PQ_CRYPTO OFF CACHE BOOL "Enable LMS PQ crypto for BL2 verification. This is experimental and should not yet be used in production")
-
-+set(TFM_BL2_IMAGE_FLASH_AREA_NUM 0 CACHE STRING "Which flash area BL2 is stored in")
-+set(MCUBOOT_S_IMAGE_FLASH_AREA_NUM 2 CACHE STRING "ID of the flash area containing the primary Secure image")
-+
- set(BL2 ON CACHE BOOL "Whether to build BL2")
- set(BL2_TRAILER_SIZE 0x800 CACHE STRING "Trailer size")
- set(DEFAULT_MCUBOOT_FLASH_MAP OFF CACHE BOOL "Whether to use the default flash map defined by TF-M project")
-diff --git a/platform/ext/target/arm/corstone1000/partition/flash_layout.h b/platform/ext/target/arm/corstone1000/partition/flash_layout.h
-index a95ff63ef..41b4c6323 100644
---- a/platform/ext/target/arm/corstone1000/partition/flash_layout.h
-+++ b/platform/ext/target/arm/corstone1000/partition/flash_layout.h
-@@ -136,23 +136,38 @@
- #define BANK_PARTITION_SIZE (0xFE0000) /* 15.875 MB */
- #define TFM_PARTITION_SIZE (0x5E000) /* 376 KB */
-
--/* Macros needed to imgtool.py, used when creating BL2 signed image */
--#define BL2_IMAGE_LOAD_ADDRESS (SRAM_BASE + TFM_PARTITION_SIZE + BL2_DATA_GAP_SIZE)
--#define BL2_IMAGE_OFFSET (0x0)
--#define BL2_IMAGE_MAX_SIZE (SE_BL2_PARTITION_SIZE)
-+/************************************************************/
-+/* Bank : Images flash offsets are with respect to the bank */
-+/************************************************************/
-
--/* Image 1: TF-M primary and secondary images */
-+/* Image 0: BL2 primary and secondary images */
- #define FLASH_AREA_0_ID (1)
--#define FLASH_AREA_0_SIZE (TFM_PARTITION_SIZE)
-+#define FLASH_AREA_0_OFFSET (0) /* starting from 0th offset of the bank */
-+#define FLASH_AREA_0_SIZE (SE_BL2_PARTITION_SIZE)
-+
- #define FLASH_AREA_1_ID (FLASH_AREA_0_ID + 1)
--#define FLASH_AREA_1_SIZE (TFM_PARTITION_SIZE)
-+#define FLASH_AREA_1_OFFSET (FLASH_AREA_0_OFFSET + FLASH_AREA_0_SIZE)
-+#define FLASH_AREA_1_SIZE (SE_BL2_PARTITION_SIZE)
-+
-+/* Image 1: TF-M primary and secondary images */
-+#define FLASH_AREA_2_ID (1)
-+#define FLASH_AREA_2_SIZE (TFM_PARTITION_SIZE)
-+#define FLASH_AREA_3_ID (FLASH_AREA_2_ID + 1)
-+#define FLASH_AREA_3_SIZE (TFM_PARTITION_SIZE)
-
- /* Image 2: Host FIP */
- #define FIP_SIGNATURE_AREA_SIZE (0x1000) /* 4 KB */
-
- /* Host BL2 (TF-A) primary and secondary image. */
--#define FLASH_AREA_2_ID (FLASH_AREA_1_ID + 1)
--#define FLASH_AREA_3_ID (FLASH_AREA_2_ID + 1)
-+#define FLASH_AREA_4_ID (FLASH_AREA_3_ID + 1)
-+#define FLASH_AREA_5_ID (FLASH_AREA_4_ID + 1)
-+
-+#define BL1_FLASH_AREA_IMAGE_PRIMARY(x) (((x) == 0) ? FLASH_AREA_0_ID : \
-+ 255 )
-+#define BL1_FLASH_AREA_IMAGE_SECONDARY(x) (((x) == 0) ? FLASH_AREA_1_ID : \
-+ 255 )
-+
-+#define BL1_FLASH_AREA_IMAGE_SCRATCH 255
-
- /* Macros needed to imgtool.py, used when creating TF-M signed image */
- #define S_IMAGE_LOAD_ADDRESS (SRAM_BASE)
-@@ -161,11 +176,11 @@
- #define NON_SECURE_IMAGE_OFFSET (TFM_PARTITION_SIZE)
- #define NON_SECURE_IMAGE_MAX_SIZE (0x0)
-
--#define FLASH_AREA_IMAGE_PRIMARY(x) (((x) == 0) ? FLASH_AREA_0_ID : \
-- ((x) == 1) ? FLASH_AREA_2_ID : \
-+#define FLASH_AREA_IMAGE_PRIMARY(x) (((x) == 0) ? FLASH_AREA_2_ID : \
-+ ((x) == 1) ? FLASH_AREA_4_ID : \
- 255 )
--#define FLASH_AREA_IMAGE_SECONDARY(x) (((x) == 0) ? FLASH_AREA_1_ID : \
-- ((x) == 1) ? FLASH_AREA_3_ID : \
-+#define FLASH_AREA_IMAGE_SECONDARY(x) (((x) == 0) ? FLASH_AREA_3_ID : \
-+ ((x) == 1) ? FLASH_AREA_5_ID : \
- 255 )
-
- #define FLASH_AREA_IMAGE_SCRATCH 255
-diff --git a/platform/ext/target/arm/corstone1000/partition/region_defs.h b/platform/ext/target/arm/corstone1000/partition/region_defs.h
-index 8157c36bf..fc9f734f6 100644
---- a/platform/ext/target/arm/corstone1000/partition/region_defs.h
-+++ b/platform/ext/target/arm/corstone1000/partition/region_defs.h
-@@ -48,7 +48,7 @@
- (TFM_PARTITION_SIZE - BL2_HEADER_SIZE - BL2_TRAILER_SIZE)
-
- #define IMAGE_BL2_CODE_SIZE \
-- (SE_BL2_PARTITION_SIZE - BL2_HEADER_SIZE - BL2_TRAILER_SIZE)
-+ (SE_BL2_PARTITION_SIZE - BL1_HEADER_SIZE - BL1_TRAILER_SIZE)
-
- /* Secure regions */
- #define S_CODE_START (SRAM_BASE + BL2_HEADER_SIZE)
-@@ -86,7 +86,7 @@
-
- /* SE BL2 regions */
- #define BL2_IMAGE_START (SRAM_BASE + SRAM_SIZE - SE_BL2_PARTITION_SIZE)
--#define BL2_CODE_START (BL2_IMAGE_START + BL2_HEADER_SIZE)
-+#define BL2_CODE_START (BL2_IMAGE_START + BL1_HEADER_SIZE)
- #define BL2_CODE_SIZE (IMAGE_BL2_CODE_SIZE)
- #define BL2_CODE_LIMIT (BL2_CODE_START + BL2_CODE_SIZE - 1)
-
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0006-Platform-corstone1000-Reorganize-bl2-files.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0006-Platform-corstone1000-Reorganize-bl2-files.patch
deleted file mode 100644
index 1e56e363d4..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0006-Platform-corstone1000-Reorganize-bl2-files.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 535d366137d2dd0804d3e67ada78151e0e318eeb Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <emekcan.aras@arm.com>
-Date: Fri, 3 Mar 2023 12:25:04 +0000
-Subject: [PATCH 3/6] Platform: corstone1000: Reorganize bl2 files
-
-From: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-
-To be consistnant, organize bl2 files same as bl1 files
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20555]
-Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-Change-Id: I3332f4dbbde1c5f2cde5a187b038dc3430b9503f
----
- platform/ext/target/arm/corstone1000/CMakeLists.txt | 6 +++---
- .../ext/target/arm/corstone1000/{ => bl2}/boot_hal_bl2.c | 0
- .../corstone1000/{bl2_flash_map.c => bl2/flash_map_bl2.c} | 0
- .../{bl2_security_cnt.c => bl2/security_cnt_bl2.c} | 0
- 4 files changed, 3 insertions(+), 3 deletions(-)
- rename platform/ext/target/arm/corstone1000/{ => bl2}/boot_hal_bl2.c (100%)
- rename platform/ext/target/arm/corstone1000/{bl2_flash_map.c => bl2/flash_map_bl2.c} (100%)
- rename platform/ext/target/arm/corstone1000/{bl2_security_cnt.c => bl2/security_cnt_bl2.c} (100%)
-
-diff --git a/platform/ext/target/arm/corstone1000/CMakeLists.txt b/platform/ext/target/arm/corstone1000/CMakeLists.txt
-index a4fe28c08..3d4c787a6 100644
---- a/platform/ext/target/arm/corstone1000/CMakeLists.txt
-+++ b/platform/ext/target/arm/corstone1000/CMakeLists.txt
-@@ -196,7 +196,7 @@ target_sources(platform_bl2
- Native_Driver/arm_watchdog_drv.c
- fip_parser/fip_parser.c
- fw_update_agent/fwu_agent.c
-- bl2_security_cnt.c
-+ bl2/security_cnt_bl2.c
- $<$<NOT:$<BOOL:${PLATFORM_DEFAULT_OTP}>>:${PLATFORM_DIR}/ext/accelerator/cc312/otp_cc312.c>
- io/io_block.c
- io/io_flash.c
-@@ -235,8 +235,8 @@ target_compile_definitions(platform_bl2
- # platform_init/quit* apis symbol collision in bl1.
- target_sources(bl2
- PRIVATE
-- bl2_flash_map.c
-- boot_hal_bl2.c
-+ bl2/flash_map_bl2.c
-+ bl2/boot_hal_bl2.c
- )
-
- target_link_libraries(bl2
-diff --git a/platform/ext/target/arm/corstone1000/boot_hal_bl2.c b/platform/ext/target/arm/corstone1000/bl2/boot_hal_bl2.c
-similarity index 100%
-rename from platform/ext/target/arm/corstone1000/boot_hal_bl2.c
-rename to platform/ext/target/arm/corstone1000/bl2/boot_hal_bl2.c
-diff --git a/platform/ext/target/arm/corstone1000/bl2_flash_map.c b/platform/ext/target/arm/corstone1000/bl2/flash_map_bl2.c
-similarity index 100%
-rename from platform/ext/target/arm/corstone1000/bl2_flash_map.c
-rename to platform/ext/target/arm/corstone1000/bl2/flash_map_bl2.c
-diff --git a/platform/ext/target/arm/corstone1000/bl2_security_cnt.c b/platform/ext/target/arm/corstone1000/bl2/security_cnt_bl2.c
-similarity index 100%
-rename from platform/ext/target/arm/corstone1000/bl2_security_cnt.c
-rename to platform/ext/target/arm/corstone1000/bl2/security_cnt_bl2.c
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0007-Platform-corstone1000-Fix-linker-script-comment.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0007-Platform-corstone1000-Fix-linker-script-comment.patch
deleted file mode 100644
index 62a9d85399..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0007-Platform-corstone1000-Fix-linker-script-comment.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 25b131f0d082b32b262c4e788f3bc95b7761bef7 Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <emekcan.aras@arm.com>
-Date: Mon, 13 Mar 2023 00:16:49 +0000
-Subject: [PATCH 4/6] Platform: corstone1000: Fix linker script comment
-
-From: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-
-Comment explaining the necessary defines to copy multiple ROM to RAM
-sections, was refering to the wrong file.
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20556]
-Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-Change-Id: I3e5f806330481daa24c5456d9c956e0cf589afee
----
- .../arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld | 2 +-
- .../arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld
-index d4eca2841..8ee334c6b 100644
---- a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld
-+++ b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld
-@@ -89,7 +89,7 @@ SECTIONS
-
- /* To copy multiple ROM to RAM sections,
- * define etext2/data2_start/data2_end and
-- * define __STARTUP_COPY_MULTIPLE in startup_corstone700_bl2.S */
-+ * define __STARTUP_COPY_MULTIPLE in startup_corstone1000.c */
- .copy.table :
- {
- . = ALIGN(4);
-diff --git a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld
-index 6cd806378..e1e4f2966 100644
---- a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld
-+++ b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld
-@@ -84,7 +84,7 @@ SECTIONS
-
- /* To copy multiple ROM to RAM sections,
- * define etext2/data2_start/data2_end and
-- * define __STARTUP_COPY_MULTIPLE in startup_corstone700_bl2.S */
-+ * define __STARTUP_COPY_MULTIPLE in startup_corstone1000.c */
- .copy.table :
- {
- . = ALIGN(4);
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0008-Platform-corstone1000-Fix-linkerscripts-copyright-ye.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0008-Platform-corstone1000-Fix-linkerscripts-copyright-ye.patch
deleted file mode 100644
index 7f7f6ed083..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0008-Platform-corstone1000-Fix-linkerscripts-copyright-ye.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 7db7b197ec3f01163422450947540060d3cb0c17 Mon Sep 17 00:00:00 2001
-From: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-Date: Mon, 13 Mar 2023 00:21:44 +0000
-Subject: [PATCH 6/6] Platform: corstone1000: Fix linkerscripts copyright year
-
-set the copyright year to 2023 as these files are introduced in
-2023.
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20557]
-Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-Change-Id: I293a4a380d5d1d59aba1e2ab17e0e5924664dbb4
----
- .../arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld | 2 +-
- .../arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld
-index 8ee334c6b..cb6797f27 100644
---- a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld
-+++ b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_1.ld
-@@ -1,5 +1,5 @@
- ;/*
--; * Copyright (c) 2009-2022, Arm Limited. All rights reserved.
-+; * Copyright (c) 2023, Arm Limited. All rights reserved.
- ; *
- ; * Licensed under the Apache License, Version 2.0 (the "License");
- ; * you may not use this file except in compliance with the License.
-diff --git a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld
-index e1e4f2966..e66e54aa6 100644
---- a/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld
-+++ b/platform/ext/target/arm/corstone1000/Device/Source/gcc/corstone1000_bl1_2.ld
-@@ -1,5 +1,5 @@
- ;/*
--; * Copyright (c) 2009-2022, Arm Limited. All rights reserved.
-+; * Copyright (c) 2023, Arm Limited. All rights reserved.
- ; *
- ; * Licensed under the Apache License, Version 2.0 (the "License");
- ; * you may not use this file except in compliance with the License.
---
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0009-Platform-corstone1000-fix-flash-reading-issue-for-fi.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0009-Platform-corstone1000-fix-flash-reading-issue-for-fi.patch
deleted file mode 100644
index 5c0024b29e..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0009-Platform-corstone1000-fix-flash-reading-issue-for-fi.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 7914ec3f96dbb8228e791d9492cfc3651cf9deca Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <emekcan.aras@arm.com>
-Date: Wed, 5 Apr 2023 10:28:57 +0100
-Subject: [PATCH] Platform: corstone1000: Fix Flash reading issue for FIP data
-
-Fixes the flash reading issue since bl2 needs to read the data from
-flash in XIP mode on FPGA (mps3).
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20558]
-Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
----
- platform/ext/target/arm/corstone1000/bl2/boot_hal_bl2.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/platform/ext/target/arm/corstone1000/bl2/boot_hal_bl2.c b/platform/ext/target/arm/corstone1000/bl2/boot_hal_bl2.c
-index cf6340c5a9..e4183c7a57 100644
---- a/platform/ext/target/arm/corstone1000/bl2/boot_hal_bl2.c
-+++ b/platform/ext/target/arm/corstone1000/bl2/boot_hal_bl2.c
-@@ -89,6 +89,7 @@ static bool fill_flash_map_with_fip_data(uint8_t boot_index) {
-
- /* parse directly from flash using XIP mode */
- /* FIP is large so its not a good idea to load it in memory */
-+ Select_XIP_Mode_For_Shared_Flash();
- result = parse_fip_and_extract_tfa_info(
- FLASH_BASE_ADDRESS + fip_offset + FIP_SIGNATURE_AREA_SIZE, fip_size,
- &tfa_offset, &tfa_size);
-@@ -96,7 +97,7 @@ static bool fill_flash_map_with_fip_data(uint8_t boot_index) {
- BOOT_LOG_ERR("parse_fip_and_extract_tfa_info failed");
- return false;
- }
--
-+ Select_Write_Mode_For_Shared_Flash();
- flash_map[2].fa_off = fip_offset + FIP_SIGNATURE_AREA_SIZE + tfa_offset;
- flash_map[2].fa_size = tfa_size;
- flash_map[3].fa_off = flash_map[2].fa_off + flash_map[2].fa_size;
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0010-Platform-corstone1000-Adds-compiler-flags-to-FWU-age.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0010-Platform-corstone1000-Adds-compiler-flags-to-FWU-age.patch
deleted file mode 100644
index 29fce5eb65..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0010-Platform-corstone1000-Adds-compiler-flags-to-FWU-age.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-From 11f6af40dc322630031511146763cc9059bdb805 Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <emekcan.aras@arm.com>
-Date: Fri, 14 Apr 2023 16:35:55 +0100
-Subject: [PATCH] Platform: corstone1000: Adds compiler flags to FWU agent for
- BL1
-
-Adds compiler flags for BL1 to fwu_agent.c functions to not use GPT parser and
-IO libraries in BL1 rom code.
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20559]
-Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
----
- .../corstone1000/fw_update_agent/fwu_agent.c | 176 +++++++++++++++++-
- 1 file changed, 174 insertions(+), 2 deletions(-)
-
-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 8ecb03d157..afd8d66e42 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
-@@ -14,8 +14,6 @@
- #include "region_defs.h"
- #include "uefi_capsule_parser.h"
- #include "flash_common.h"
--#include "partition.h"
--#include "platform.h"
- #include "platform_base_address.h"
- #include "platform_description.h"
- #include "tfm_plat_nv_counters.h"
-@@ -23,6 +21,10 @@
- #include "uefi_fmp.h"
- #include "uart_stdout.h"
- #include "soft_crc.h"
-+#if !BL1
-+#include "partition.h"
-+#include "platform.h"
-+#endif
-
- /* Properties of image in a bank */
- struct fwu_image_properties {
-@@ -145,6 +147,30 @@ extern ARM_DRIVER_FLASH FWU_METADATA_FLASH_DEV;
-
- #define HOST_ACK_TIMEOUT_SEC (6 * 60) /* ~seconds, not exact */
-
-+#if BL1
-+static enum fwu_agent_error_t private_metadata_read(
-+ struct fwu_private_metadata* p_metadata)
-+{
-+ int ret;
-+
-+ FWU_LOG_MSG("%s: enter\n\r", __func__);
-+
-+ if (!p_metadata) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.ReadData(FWU_PRIVATE_METADATA_REPLICA_1_OFFSET, p_metadata,
-+ sizeof(struct fwu_private_metadata));
-+ if (ret < 0 || ret != sizeof(struct fwu_private_metadata)) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: success: boot_index = %u\n\r", __func__,
-+ p_metadata->boot_index);
-+
-+ return FWU_AGENT_SUCCESS;
-+}
-+#elif
- static enum fwu_agent_error_t private_metadata_read(
- struct fwu_private_metadata* p_metadata)
- {
-@@ -175,7 +201,36 @@ static enum fwu_agent_error_t private_metadata_read(
-
- return FWU_AGENT_SUCCESS;
- }
-+#endif
-
-+#if BL1
-+static enum fwu_agent_error_t private_metadata_write(
-+ struct fwu_private_metadata* p_metadata)
-+{
-+ int ret;
-+
-+ FWU_LOG_MSG("%s: enter: boot_index = %u\n\r", __func__,
-+ p_metadata->boot_index);
-+
-+ if (!p_metadata) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.EraseSector(FWU_PRIVATE_METADATA_REPLICA_1_OFFSET);
-+ if (ret != ARM_DRIVER_OK) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.ProgramData(FWU_PRIVATE_METADATA_REPLICA_1_OFFSET,
-+ p_metadata, sizeof(struct fwu_private_metadata));
-+ if (ret < 0 || ret != sizeof(struct fwu_private_metadata)) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: success\n\r", __func__);
-+ return FWU_AGENT_SUCCESS;
-+}
-+#elif
- static enum fwu_agent_error_t private_metadata_write(
- struct fwu_private_metadata* p_metadata)
- {
-@@ -210,6 +265,7 @@ static enum fwu_agent_error_t private_metadata_write(
- FWU_LOG_MSG("%s: success\n\r", __func__);
- return FWU_AGENT_SUCCESS;
- }
-+#endif
-
- static enum fwu_agent_error_t metadata_validate(struct fwu_metadata *p_metadata)
- {
-@@ -235,6 +291,30 @@ static enum fwu_agent_error_t metadata_validate(struct fwu_metadata *p_metadata)
- return FWU_AGENT_SUCCESS;
- }
-
-+#if BL1
-+static enum fwu_agent_error_t metadata_read_without_validation(struct fwu_metadata *p_metadata)
-+{
-+ int ret;
-+
-+ FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-+ FWU_METADATA_REPLICA_1_OFFSET, sizeof(struct fwu_metadata));
-+
-+ if (!p_metadata) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.ReadData(FWU_METADATA_REPLICA_1_OFFSET,
-+ p_metadata, sizeof(struct fwu_metadata));
-+ if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: success: active = %u, previous = %d\n\r", __func__,
-+ p_metadata->active_index, p_metadata->previous_active_index);
-+
-+ return FWU_AGENT_SUCCESS;
-+}
-+#elif
- static enum fwu_agent_error_t metadata_read_without_validation(struct fwu_metadata *p_metadata)
- {
- uuid_t metadata_uuid = FWU_METADATA_TYPE_UUID;
-@@ -266,7 +346,36 @@ static enum fwu_agent_error_t metadata_read_without_validation(struct fwu_metada
-
- return FWU_AGENT_SUCCESS;
- }
-+#endif
-+
-+#if BL1
-+static enum fwu_agent_error_t metadata_read(struct fwu_metadata *p_metadata)
-+{
-+ int ret;
-
-+ FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-+ FWU_METADATA_REPLICA_1_OFFSET, sizeof(struct fwu_metadata));
-+
-+ if (!p_metadata) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.ReadData(FWU_METADATA_REPLICA_1_OFFSET,
-+ p_metadata, sizeof(struct fwu_metadata));
-+ if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ if (metadata_validate(p_metadata) != FWU_AGENT_SUCCESS) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: success: active = %u, previous = %d\n\r", __func__,
-+ p_metadata->active_index, p_metadata->previous_active_index);
-+
-+ return FWU_AGENT_SUCCESS;
-+}
-+#elif
- static enum fwu_agent_error_t metadata_read(struct fwu_metadata *p_metadata)
- {
- uuid_t metadata_uuid = FWU_METADATA_TYPE_UUID;
-@@ -301,7 +410,66 @@ static enum fwu_agent_error_t metadata_read(struct fwu_metadata *p_metadata)
-
- return FWU_AGENT_SUCCESS;
- }
-+#endif
-+
-
-+#if BL1
-+static enum fwu_agent_error_t metadata_write(
-+ struct fwu_metadata *p_metadata)
-+{
-+ int ret;
-+
-+ FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-+ FWU_METADATA_REPLICA_1_OFFSET, sizeof(struct fwu_metadata));
-+
-+ if (!p_metadata) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.EraseSector(FWU_METADATA_REPLICA_1_OFFSET);
-+ if (ret != ARM_DRIVER_OK) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.ProgramData(FWU_METADATA_REPLICA_1_OFFSET,
-+ p_metadata, sizeof(struct fwu_metadata));
-+ if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-+ FWU_METADATA_REPLICA_2_OFFSET, sizeof(struct fwu_metadata));
-+
-+ ret = FWU_METADATA_FLASH_DEV.EraseSector(FWU_METADATA_REPLICA_2_OFFSET);
-+ if (ret != ARM_DRIVER_OK) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.ProgramData(FWU_METADATA_REPLICA_2_OFFSET,
-+ p_metadata, sizeof(struct fwu_metadata));
-+ if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: enter: flash addr = %u, size = %d\n\r", __func__,
-+ FWU_METADATA_REPLICA_2_OFFSET, sizeof(struct fwu_metadata));
-+
-+ ret = FWU_METADATA_FLASH_DEV.EraseSector(FWU_METADATA_REPLICA_2_OFFSET);
-+ if (ret != ARM_DRIVER_OK) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ ret = FWU_METADATA_FLASH_DEV.ProgramData(FWU_METADATA_REPLICA_2_OFFSET,
-+ p_metadata, sizeof(struct fwu_metadata));
-+ if (ret < 0 || ret != sizeof(struct fwu_metadata)) {
-+ return FWU_AGENT_ERROR;
-+ }
-+
-+ FWU_LOG_MSG("%s: success: active = %u, previous = %d\n\r", __func__,
-+ p_metadata->active_index, p_metadata->previous_active_index);
-+ return FWU_AGENT_SUCCESS;
-+}
-+#elif
- static enum fwu_agent_error_t metadata_write(
- struct fwu_metadata *p_metadata)
- {
-@@ -371,6 +539,8 @@ static enum fwu_agent_error_t metadata_write(
- p_metadata->active_index, p_metadata->previous_active_index);
- return FWU_AGENT_SUCCESS;
- }
-+#endif
-+
-
- enum fwu_agent_error_t fwu_metadata_init(void)
- {
-@@ -418,8 +588,10 @@ enum fwu_agent_error_t fwu_metadata_provision(void)
-
- FWU_LOG_MSG("%s: enter\n\r", __func__);
-
-+#if !BL1
- plat_io_storage_init();
- partition_init(PLATFORM_GPT_IMAGE);
-+#endif
-
- ret = fwu_metadata_init();
- if (ret) {
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0011-Platform-corstone1000-adjust-PS-asset-configuration.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0011-Platform-corstone1000-adjust-PS-asset-configuration.patch
deleted file mode 100644
index 19a3773125..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0011-Platform-corstone1000-adjust-PS-asset-configuration.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 148d82d0984273b30d8b148f0c4e0ad0d3f23062 Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <emekcan.aras@arm.com>
-Date: Mon, 17 Apr 2023 12:07:55 +0100
-Subject: [PATCH 1/3] Platform: corstone1000: adjust PS asset configuration
-
-Adjust protected storage asset configuration to be more inline
-with the one in trusted service side, that would make thinks
-work when testing and using more than the default variables.
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20560]
-Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
-Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
-Change-Id: I181f9c72a816c727c2170c609100aec1d233fea7
----
- platform/ext/target/arm/corstone1000/config.cmake | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/platform/ext/target/arm/corstone1000/config.cmake b/platform/ext/target/arm/corstone1000/config.cmake
-index bec6b84f0..0c91fa59f 100644
---- a/platform/ext/target/arm/corstone1000/config.cmake
-+++ b/platform/ext/target/arm/corstone1000/config.cmake
-@@ -76,3 +76,4 @@ endif()
- # Platform-specific configurations
- set(CONFIG_TFM_USE_TRUSTZONE OFF)
- set(TFM_MULTI_CORE_TOPOLOGY ON)
-+set(PS_NUM_ASSETS "40" CACHE STRING "The maximum number of assets to be stored in the Protected Storage area")
---
-2.17.1
-
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0012-Platform-corstone1000-Increase-number-of-assets.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0012-Platform-corstone1000-Increase-number-of-assets.patch
deleted file mode 100644
index d2fc332d45..0000000000
--- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0012-Platform-corstone1000-Increase-number-of-assets.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 34263d1ea99da7b8a680a80601a73149bc9530e5 Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <emekcan.aras@arm.com>
-Date: Fri, 21 Apr 2023 15:17:21 +0100
-Subject: [PATCH] Platform: corstone1000: Increase number of assets
-
-As Corstone1000 stores at boot time few efi variables.
-Therefore, number of assets is increased to compansate this early usage.
-
-Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20656]
-Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
-Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
-Change-Id: Id8555a09335ce13b80c07a33c4d913f5cb0f9084
----
- platform/ext/target/arm/corstone1000/config_tfm_target.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/platform/ext/target/arm/corstone1000/config_tfm_target.h b/platform/ext/target/arm/corstone1000/config_tfm_target.h
-index bf8d2f95f..e96836663 100644
---- a/platform/ext/target/arm/corstone1000/config_tfm_target.h
-+++ b/platform/ext/target/arm/corstone1000/config_tfm_target.h
-@@ -16,4 +16,12 @@
- #undef PLATFORM_SERVICE_OUTPUT_BUFFER_SIZE
- #define PLATFORM_SERVICE_OUTPUT_BUFFER_SIZE 256
-
-+/* The maximum number of assets to be stored in the Internal Trusted Storage. */
-+#undef ITS_NUM_ASSETS
-+#define ITS_NUM_ASSETS 20
-+
-+/* The maximum number of assets to be stored in the Protected Storage area. */
-+#undef PS_NUM_ASSETS
-+#define PS_NUM_ASSETS 20
-+
- #endif /* __CONFIG_TFM_TARGET_H__ */
---
-2.17.1
-