diff options
Diffstat (limited to 'meta-arm/meta-arm-bsp')
19 files changed, 96 insertions, 584 deletions
diff --git a/meta-arm/meta-arm-bsp/conf/machine/include/corstone1000.inc b/meta-arm/meta-arm-bsp/conf/machine/include/corstone1000.inc index 063a315b7a..381eaaf365 100644 --- a/meta-arm/meta-arm-bsp/conf/machine/include/corstone1000.inc +++ b/meta-arm/meta-arm-bsp/conf/machine/include/corstone1000.inc @@ -52,7 +52,7 @@ EXTRA_IMAGEDEPENDS += "external-system" # Linux kernel PREFERRED_PROVIDER_virtual/kernel:forcevariable = "linux-yocto" -PREFERRED_VERSION_linux-yocto = "6.5%" +PREFERRED_VERSION_linux-yocto = "6.6.%" KERNEL_IMAGETYPE = "Image.gz" INITRAMFS_IMAGE_BUNDLE ?= "1" diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/rwx-segments.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/rwx-segments.patch index a4518ec6b0..403381c9d6 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/rwx-segments.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/rwx-segments.patch @@ -1,4 +1,8 @@ -Binutils 2.39 now warns when a segment has RXW permissions[1]: +From 051c723a6463a579b05dcaa81f204516737a3645 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +Date: Wed, 9 Aug 2023 15:56:03 -0400 +Subject: [PATCH] Binutils 2.39 now warns when a segment has RXW + permissions[1]: aarch64-none-elf-ld.bfd: warning: bl31.elf has a LOAD segment with RWX permissions @@ -13,12 +17,15 @@ remove --fatal-warnings. Upstream-Status: Inappropriate Signed-off-by: Ross Burton <ross.burton@arm.com> +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile -index 3941f8698..13bbac348 100644 +index 1ddb7b84417d..9eae30c923ec 100644 --- a/Makefile +++ b/Makefile -@@ -418,7 +418,7 @@ TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH)) +@@ -425,7 +425,7 @@ TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH)) # LD = gcc (used when GCC LTO is enabled) else ifneq ($(findstring gcc,$(notdir $(LD))),) # Pass ld options with Wl or Xlinker switches @@ -27,7 +34,7 @@ index 3941f8698..13bbac348 100644 TF_LDFLAGS += -Wl,--gc-sections ifeq ($(ENABLE_LTO),1) ifeq (${ARCH},aarch64) -@@ -435,7 +435,7 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH))) +@@ -442,7 +442,7 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH))) # LD = gcc-ld (ld) or llvm-ld (ld.lld) or other else diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/tf-a-tests-no-warn-rwx-segments.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/tf-a-tests-no-warn-rwx-segments.patch index 5d02e35317..0193e8cc41 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/tf-a-tests-no-warn-rwx-segments.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/tf-a-tests-no-warn-rwx-segments.patch @@ -1,4 +1,8 @@ -Binutils 2.39 now warns when a segment has RXW permissions[1]: +From 6635341615a5bcb36ce71479ee30dae1599081e2 Mon Sep 17 00:00:00 2001 +From: Anton Antonov <anrton.antonov@arm.com> +Date: Wed, 9 Aug 2023 15:56:03 -0400 +Subject: [PATCH] Binutils 2.39 now warns when a segment has RXW + permissions[1]: aarch64-poky-linux-musl-ld: tftf.elf has a LOAD segment with RWX permissions @@ -10,12 +14,15 @@ disable the warning Upstream-Status: Inappropriate Signed-off-by: Anton Antonov <anrton.antonov@arm.com> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index 6d0774e1..be3f84ce 100644 +index 286a47c7d454..3481187b62cf 100644 --- a/Makefile +++ b/Makefile -@@ -238,7 +238,7 @@ TFTF_SOURCES := ${FRAMEWORK_SOURCES} ${TESTS_SOURCES} ${PLAT_SOURCES} ${LIBC_SR +@@ -246,7 +246,7 @@ TFTF_SOURCES := ${FRAMEWORK_SOURCES} ${TESTS_SOURCES} ${PLAT_SOURCES} ${LIBC_SR TFTF_INCLUDES += ${PLAT_INCLUDES} TFTF_CFLAGS += ${COMMON_CFLAGS} TFTF_ASFLAGS += ${COMMON_ASFLAGS} diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/0001-cmake-modify-path-to-libmetal-version-file.patch b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/0001-cmake-modify-path-to-libmetal-version-file.patch new file mode 100644 index 0000000000..d53524ad0d --- /dev/null +++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/0001-cmake-modify-path-to-libmetal-version-file.patch @@ -0,0 +1,27 @@ +From 6b38b9990c4dab0cb8524506ef129d4f326f3800 Mon Sep 17 00:00:00 2001 +From: Jon Mason <jon.mason@arm.com> +Date: Thu, 14 Dec 2023 09:23:09 -0500 +Subject: [PATCH] cmake: modify path to libmetal version file + +Commit ad87802d6e01e97946de20b6c2fa28aed184ed20 changed how the +versioning is done and created a version file. Due to this change, +the VERSION file is not being found when building because the source dir +is pointing to tf-m. Modify to point where we want it. + +Upstream-Status: Inappropriate [Build workaround] + +Signed-off-by: Jon Mason <jon.mason@arm.com> +--- + cmake/options.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/options.cmake b/cmake/options.cmake +index a7b4ef8bdf03..a06009b6acc4 100644 +--- a/cmake/options.cmake ++++ b/cmake/options.cmake +@@ -1,4 +1,4 @@ +-file(READ ${LIBMETAL_ROOT_DIR}/VERSION ver) ++file(READ ${LIBMETAL_ROOT_DIR}/../libmetal/VERSION ver) + + string(REGEX MATCH "VERSION_MAJOR = ([0-9]*)" _ ${ver}) + set(PROJECT_VERSION_MAJOR ${CMAKE_MATCH_1}) diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc index 7cf3b944bf..f4623f50f9 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +++ b/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc @@ -11,18 +11,20 @@ TFM_PLATFORM_IS_FVP ?= "FALSE" EXTRA_OECMAKE += "-DPLATFORM_IS_FVP=${TFM_PLATFORM_IS_FVP}" EXTRA_OECMAKE += "-DCC312_LEGACY_DRIVER_API_ENABLED=ON" -# libmetal +# libmetal v2023.04.0 LICENSE += "& BSD-3-Clause" -LIC_FILES_CHKSUM += "file://../libmetal/LICENSE.md;md5=fe0b8a4beea8f0813b606d15a3df3d3c" -SRC_URI += "git://github.com/OpenAMP/libmetal.git;protocol=https;branch=main;name=libmetal;destsuffix=git/libmetal" -SRCREV_libmetal = "f252f0e007fbfb8b3a52b1d5901250ddac96baad" +LIC_FILES_CHKSUM += "file://../libmetal/LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4" +SRC_URI += "git://github.com/OpenAMP/libmetal.git;protocol=https;branch=main;name=libmetal;destsuffix=git/libmetal \ + file://0001-cmake-modify-path-to-libmetal-version-file.patch;patchdir=../libmetal \ + " +SRCREV_libmetal = "28fa2351d6a8121ce6c1c2ac5ee43ce08d38dbae" EXTRA_OECMAKE += "-DLIBMETAL_SRC_PATH=${S}/../libmetal -DLIBMETAL_BIN_PATH=${B}/libmetal-build" -# OpenAMP +# OpenAMP v2023.04.0 LICENSE += "& BSD-2-Clause & BSD-3-Clause" -LIC_FILES_CHKSUM += "file://../openamp/LICENSE.md;md5=a8d8cf662ef6bf9936a1e1413585ecbf" +LIC_FILES_CHKSUM += "file://../openamp/LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505" SRC_URI += "git://github.com/OpenAMP/open-amp.git;protocol=https;branch=main;name=openamp;destsuffix=git/openamp" -SRCREV_openamp = "347397decaa43372fc4d00f965640ebde042966d" +SRCREV_openamp = "accac4d3610cbb268f3c3fe3c31dc45dd4c4dd17" EXTRA_OECMAKE += "-DLIBOPENAMP_SRC_PATH=${S}/../openamp -DLIBOPENAMP_BIN_PATH=${B}/libopenamp-build" diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc index b766181bed..9aca993f5c 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc @@ -1,8 +1,7 @@ # FVP base specific U-boot support SRC_URI:append = " \ - file://0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch \ - file://0002-vexpress64-Set-the-DM_RNG-property.patch \ - file://0003-vexpress64-Select-PSCI-RESET-by-default.patch \ - file://0004-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch \ + file://0001-vexpress64-Set-the-DM_RNG-property.patch \ + file://0002-vexpress64-Select-PSCI-RESET-by-default.patch \ + file://0003-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch \ " diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0002-vexpress64-Set-the-DM_RNG-property.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-vexpress64-Set-the-DM_RNG-property.patch index 2f99eaf87c..8f05311289 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0002-vexpress64-Set-the-DM_RNG-property.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-vexpress64-Set-the-DM_RNG-property.patch @@ -1,4 +1,4 @@ -From 9a28caf05b8345cd19276cf7a840599bd9e37749 Mon Sep 17 00:00:00 2001 +From ddb132d10952366c359bdd04482c1a8c0ba08b8f Mon Sep 17 00:00:00 2001 From: Debbie Martin <Debbie.Martin@arm.com> Date: Fri, 25 Aug 2023 15:09:33 +0100 Subject: [PATCH] vexpress64: Set the DM_RNG property @@ -15,7 +15,7 @@ Signed-off-by: Debbie Martin <Debbie.Martin@arm.com> 1 file changed, 1 insertion(+) diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig -index cf998096e4..7ae5055f59 100644 +index cf998096e45f..7ae5055f59b1 100644 --- a/board/armltd/vexpress64/Kconfig +++ b/board/armltd/vexpress64/Kconfig @@ -21,6 +21,7 @@ config VEXPRESS64_BASE_MODEL @@ -23,9 +23,6 @@ index cf998096e4..7ae5055f59 100644 select LINUX_KERNEL_IMAGE_HEADER select POSITION_INDEPENDENT + imply DM_RNG - + choice prompt "VExpress64 board variant" --- -2.25.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch deleted file mode 100644 index 689361d1d3..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 3ab73b453016d91b9f942a7c12173854135530a4 Mon Sep 17 00:00:00 2001 -From: Peter Hoyes <Peter.Hoyes@arm.com> -Date: Wed, 23 Aug 2023 21:17:17 +0100 -Subject: [PATCH] virtio: rng: Workaround for FVP returning zero-size buffer - -The FVP virtio-rng device is observed to always 8 fewer bytes of random -data than requested. When 8 of fewer bytes are requested, the FVP -returns 0 bytes. This causes U-Boot to hang upon attempting to fill the -last 8 bytes of the input buffer. - -The virtio spec states than entropy devices must always return at least -1 byte of random data. - -To workaround this, always request exactly 16 bytes from the virtio -device, discarding any unused data. - -Upstream-Status: Inappropriate [Temporary workaround] -Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> ---- - drivers/virtio/virtio_rng.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/virtio/virtio_rng.c b/drivers/virtio/virtio_rng.c -index b85545c2ee5..1e4fc342406 100644 ---- a/drivers/virtio/virtio_rng.c -+++ b/drivers/virtio/virtio_rng.c -@@ -29,7 +29,7 @@ static int virtio_rng_read(struct udevice *dev, void *data, size_t len) - - while (len) { - sg.addr = buf; -- sg.length = min(len, sizeof(buf)); -+ sg.length = sizeof(buf); - sgs[0] = &sg; - - ret = virtqueue_add(priv->rng_vq, sgs, 0, 1); -@@ -44,8 +44,8 @@ static int virtio_rng_read(struct udevice *dev, void *data, size_t len) - if (rsize > sg.length) - return -EIO; - -- memcpy(ptr, buf, rsize); -- len -= rsize; -+ memcpy(ptr, buf, min(len, (size_t)rsize)); -+ len -= min(len, (size_t)rsize); - ptr += rsize; - } - --- -2.34.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0003-vexpress64-Select-PSCI-RESET-by-default.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0002-vexpress64-Select-PSCI-RESET-by-default.patch index 9d9a5bdfd1..1b00da4821 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0003-vexpress64-Select-PSCI-RESET-by-default.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0002-vexpress64-Select-PSCI-RESET-by-default.patch @@ -1,12 +1,9 @@ -From 43881e2e9dd165a65791927b1455f4b6c8727f4c Mon Sep 17 00:00:00 2001 -Message-Id: <43881e2e9dd165a65791927b1455f4b6c8727f4c.1696397516.git.diego.sueiro@arm.com> -In-Reply-To: <98035c418c3df58817ab678037599303842ee931.1696397516.git.diego.sueiro@arm.com> -References: <98035c418c3df58817ab678037599303842ee931.1696397516.git.diego.sueiro@arm.com> +From fdf67502a8112bb54cb1d25657cb35a37035f3e9 Mon Sep 17 00:00:00 2001 From: Diego Sueiro <diego.sueiro@arm.com> Date: Wed, 4 Oct 2023 06:31:50 +0100 -Subject: [PATCH 2/2] vexpress64: Select PSCI RESET by default +Subject: [PATCH] vexpress64: Select PSCI RESET by default -Set SYSRESET and SYSRESET_PSCI config for vexpress64 by +Set SYSRESET and SYSRESET_PSCI config for vexpress64 by by default. This means that the reset_cpu function in vexpress64.c is no longer needed because it is called in sysreset-uclass.c instead. @@ -19,10 +16,10 @@ Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig -index 0d161740fb..0c2e5f8759 100644 +index 7ae5055f59b1..b8aead6cc35c 100644 --- a/board/armltd/vexpress64/Kconfig +++ b/board/armltd/vexpress64/Kconfig -@@ -31,6 +31,8 @@ config TARGET_VEXPRESS64_BASE_FVP +@@ -30,6 +30,8 @@ config TARGET_VEXPRESS64_BASE_FVP bool "Support Versatile Express ARMv8a FVP BASE model" select VEXPRESS64_BASE_MODEL imply OF_HAS_PRIOR_STAGE @@ -32,7 +29,7 @@ index 0d161740fb..0c2e5f8759 100644 config TARGET_VEXPRESS64_BASER_FVP bool "Support Versatile Express ARMv8r64 FVP BASE model" diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c -index ee65a59683..f73de56464 100644 +index ee65a596838a..f73de56464fa 100644 --- a/board/armltd/vexpress64/vexpress64.c +++ b/board/armltd/vexpress64/vexpress64.c @@ -207,11 +207,6 @@ void *board_fdt_blob_setup(int *err) @@ -47,6 +44,3 @@ index ee65a59683..f73de56464 100644 /* * Board specific ethernet initialization routine. */ --- -2.39.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0004-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0003-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch index 3d10994b60..ec3a2a3f61 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0004-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0003-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch @@ -1,12 +1,11 @@ -From 98035c418c3df58817ab678037599303842ee931 Mon Sep 17 00:00:00 2001 -Message-Id: <98035c418c3df58817ab678037599303842ee931.1696397516.git.diego.sueiro@arm.com> +From 0b2c98baada9541af1595bb552b7e44d6b79c727 Mon Sep 17 00:00:00 2001 From: Diego Sueiro <diego.sueiro@arm.com> Date: Wed, 4 Oct 2023 06:29:12 +0100 -Subject: [PATCH 1/2] vexpress64: Imply CONFIG_ARM64_CRC32 by default +Subject: [PATCH] vexpress64: Imply CONFIG_ARM64_CRC32 by default -Enable the Arm64 CRC-32 instruction by default for -vexpress64. The CRC-32 instruction is a required -feature of ARMv8.1 and newer. +Enable the Arm64 CRC-32 instruction by default for +vexpress64. The CRC-32 instruction is a required +feature of ARMv8.1 and newer. Upstream-Status: Pending Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> @@ -15,7 +14,7 @@ Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> 1 file changed, 1 insertion(+) diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig -index 7ae5055f59..0d161740fb 100644 +index b8aead6cc35c..0c2e5f875950 100644 --- a/board/armltd/vexpress64/Kconfig +++ b/board/armltd/vexpress64/Kconfig @@ -22,6 +22,7 @@ config VEXPRESS64_BASE_MODEL @@ -26,6 +25,3 @@ index 7ae5055f59..0d161740fb 100644 choice prompt "VExpress64 board variant" --- -2.39.1 - diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/juno/0001-configs-vexpress-modify-to-boot-compressed-initramfs.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/juno/0001-configs-vexpress-modify-to-boot-compressed-initramfs.patch index 0967df76dd..bd2ed131af 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/juno/0001-configs-vexpress-modify-to-boot-compressed-initramfs.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/juno/0001-configs-vexpress-modify-to-boot-compressed-initramfs.patch @@ -1,4 +1,4 @@ -From 726f8b4dbd3c5b1873aad531d5e26af3acd9b9ca Mon Sep 17 00:00:00 2001 +From 3d266a5d77c908566b1a541f3ff8b717f17a9a8a Mon Sep 17 00:00:00 2001 From: Jon Mason <jdmason@kudzu.us> Date: Mon, 19 Dec 2022 11:36:04 -0500 Subject: [PATCH] configs: vexpress: modify to boot compressed initramfs @@ -10,10 +10,10 @@ Upstream-Status: Inappropriate 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/configs/vexpress_aemv8.h b/include/configs/vexpress_aemv8.h -index 0c11b6b3331e..4ba4bebfbbae 100644 +index 24d8ca086653..0935461340b7 100644 --- a/include/configs/vexpress_aemv8.h +++ b/include/configs/vexpress_aemv8.h -@@ -192,8 +192,10 @@ +@@ -198,8 +198,10 @@ #define VEXPRESS_RAMDISK_ADDR 0x8fe00000 #define EXTRA_ENV_NAMES \ diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/uefi/files/n1sdp/0009-Platform-ARM-N1Sdp-Reserve-OP-TEE-Region-from-UEFI.patch b/meta-arm/meta-arm-bsp/recipes-bsp/uefi/files/n1sdp/0009-Platform-ARM-N1Sdp-Reserve-OP-TEE-Region-from-UEFI.patch index 00c85ebc06..0fdf9ee308 100644 --- a/meta-arm/meta-arm-bsp/recipes-bsp/uefi/files/n1sdp/0009-Platform-ARM-N1Sdp-Reserve-OP-TEE-Region-from-UEFI.patch +++ b/meta-arm/meta-arm-bsp/recipes-bsp/uefi/files/n1sdp/0009-Platform-ARM-N1Sdp-Reserve-OP-TEE-Region-from-UEFI.patch @@ -1,7 +1,6 @@ -From 235fabb2269a86e016bab2886b9129c77f0fea71 Wed Oct 11 16:18:22 2023 +From f2a76d6595b31b0bc1be7029277676af1b1cc3d3 Mon Sep 17 00:00:00 2001 From: Mariam Elshakfy <mariam.elshakfy@arm.com> -Date: Wed Oct 11 16:18:22 2023 +0000 - +Date: Wed, 11 Oct 2023 16:18:22 +0000 Subject: [PATCH] Platform/ARM/N1Sdp: Reserve OP-TEE Region from UEFI To enable cache on N1SDP, OP-TEE has to be moved @@ -11,6 +10,12 @@ known to application side, it must be reserved Upstream-Status: Pending (not yet submitted to upstream) Signed-off-by: Mariam Elshakfy <mariam.elshakfy@arm.com> +--- + .../Library/PlatformLib/PlatformLib.inf | 3 +++ + .../Library/PlatformLib/PlatformLibMem.c | 13 +++++++++++++ + Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec | 4 ++++ + 3 files changed, 20 insertions(+) + diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf index 78f309c3aa..dc82d5bd87 100644 --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf @@ -50,7 +55,7 @@ index 8bb9407490..d8ad0f975c 100644 EFI_RESOURCE_SYSTEM_MEMORY,
ResourceAttributes,
diff --git a/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec b/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec -index 9e257ebde0..b400b94fd5 100644 +index 9e257ebde0..587319262a 100644 --- a/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec +++ b/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec @@ -86,5 +86,9 @@ diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/aarch64/0001-arm64-defconfig-remove-CONFIG_COMMON_CLK_NPCM8XX-y.patch b/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/aarch64/0001-arm64-defconfig-remove-CONFIG_COMMON_CLK_NPCM8XX-y.patch deleted file mode 100644 index bff81dfcc6..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/aarch64/0001-arm64-defconfig-remove-CONFIG_COMMON_CLK_NPCM8XX-y.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 94a5e7ffe5855272708a94190820534c4f51bdd8 Mon Sep 17 00:00:00 2001 -From: Mikko Rapeli <mikko.rapeli@linaro.org> -Date: Tue, 15 Aug 2023 10:36:56 +0300 -Subject: [PATCH] arm64: defconfig: remove CONFIG_COMMON_CLK_NPCM8XX=y - -There is no code for this config option and enabling it in defconfig -causes warnings from tools which are detecting unused and obsolete -kernel config flags since the flag will be completely missing from -effective build config after "make olddefconfig". - -Fixes yocto kernel recipe build time warning: - -WARNING: [kernel config]: This BSP contains fragments with warnings: -... -[INFO]: the following symbols were not found in the active -configuration: - - CONFIG_COMMON_CLK_NPCM8XX - -The flag was added with commit 45472f1e5348c7b755b4912f2f529ec81cea044b -v5.19-rc4-15-g45472f1e5348 so 6.1 and 6.4 stable kernel trees are -affected. - -Fixes: 45472f1e5348c7b755b4912f2f529ec81cea044b ("arm64: defconfig: Add Nuvoton NPCM family support") -Cc: stable@kernel.org -Cc: Bruce Ashfield <bruce.ashfield@gmail.com> -Cc: Jon Mason <jon.mason@arm.com> -Cc: Jon Mason <jdmason@kudzu.us> -Cc: Ross Burton <ross@burtonini.com> -Cc: Arnd Bergmann <arnd@arndb.de> -Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> - -Signed-off-by: Jon Mason <jon.mason@arm.com> -Upstream-Status: Submitted [https://lists.infradead.org/pipermail/linux-arm-kernel/2023-August/859760.html] - ---- - arch/arm64/configs/defconfig | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig -index 0777bcae9104..1cf24537fda2 100644 ---- a/arch/arm64/configs/defconfig -+++ b/arch/arm64/configs/defconfig -@@ -1146,7 +1146,6 @@ CONFIG_COMMON_CLK_S2MPS11=y - CONFIG_COMMON_CLK_PWM=y - CONFIG_COMMON_CLK_RS9_PCIE=y - CONFIG_COMMON_CLK_VC5=y --CONFIG_COMMON_CLK_NPCM8XX=y - CONFIG_COMMON_CLK_BD718XX=m - CONFIG_CLK_RASPBERRYPI=m - CONFIG_CLK_IMX8MM=y diff --git a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto_6.4.bb b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto_6.5.bb index f4c0654354..a5cc546191 100644 --- a/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto_6.4.bb +++ b/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto_6.5.bb @@ -1,28 +1,28 @@ -KBRANCH ?= "v6.4/standard/base" +KBRANCH ?= "v6.5/standard/base" require recipes-kernel/linux/linux-yocto.inc # CVE exclusions include recipes-kernel/linux/cve-exclusion.inc -include recipes-kernel/linux/cve-exclusion_6.4.inc +include recipes-kernel/linux/cve-exclusion_6.5.inc -SRCREV_machine ?= "ef91ff6a4be36037808af1ca786fdd557f265a1d" -SRCREV_meta ?= "13efe44fe9dd2626eaf6552288ea31770ec71cf1" +SRCREV_machine ?= "e53dc7514de7d2fbe0f80547a50c0542928e2d11" +SRCREV_meta ?= "3b1f87ec237ec3ad9acffb3d75c55efe958085dc" # set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll # get the <version>/base branch, which is pure upstream -stable, and the same # meta SRCREV as the linux-yocto-standard builds. Select your version using the # normal PREFERRED_VERSION settings. BBCLASSEXTEND = "devupstream:target" -SRCREV_machine:class-devupstream ?= "ae4e4fc35b4258626644c162a702e2bce2b79190" +SRCREV_machine:class-devupstream ?= "4631960b4700dd53f5cebb4f7055fd00ccd556ce" PN:class-devupstream = "linux-yocto-upstream" -KBRANCH:class-devupstream = "v6.4/base" +KBRANCH:class-devupstream = "v6.5/base" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.4;destsuffix=${KMETA};protocol=https" + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.5;destsuffix=${KMETA};protocol=https" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" -LINUX_VERSION ?= "6.4.16" +LINUX_VERSION ?= "6.5.13" PV = "${LINUX_VERSION}+git" @@ -35,5 +35,3 @@ KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}" - -SRC_URI:append:aarch64 = " file://0001-arm64-defconfig-remove-CONFIG_COMMON_CLK_NPCM8XX-y.patch" diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch deleted file mode 100644 index 2aec7fc36f..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch +++ /dev/null @@ -1,34 +0,0 @@ -From fed478758e495f35d18a9e2a89193e6577b06799 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@arm.com> -Date: Tue, 26 May 2020 14:38:02 -0500 -Subject: [PATCH] allow setting sysroot for libgcc lookup - -Explicitly pass the new variable LIBGCC_LOCATE_CFLAGS variable when searching -for the compiler libraries as there's no easy way to reliably pass --sysroot -otherwise. - -Upstream-Status: Pending [https://github.com/OP-TEE/optee_os/issues/4188] -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - mk/gcc.mk | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/mk/gcc.mk b/mk/gcc.mk -index adc77a24f25e..81bfa78ad8d7 100644 ---- a/mk/gcc.mk -+++ b/mk/gcc.mk -@@ -13,11 +13,11 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \ - -print-file-name=include 2> /dev/null) - - # Get location of libgcc from gcc --libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \ -+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \ - -print-libgcc-file-name 2> /dev/null) --libstdc++$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ -+libstdc++$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ - -print-file-name=libstdc++.a 2> /dev/null) --libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ -+libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ - -print-file-name=libgcc_eh.a 2> /dev/null) - - # Define these to something to discover accidental use diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0002-optee-enable-clang-support.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0002-optee-enable-clang-support.patch deleted file mode 100644 index 7441e74466..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0002-optee-enable-clang-support.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f158e3af6633bd689a76d53be2c9c590c0385350 Mon Sep 17 00:00:00 2001 -From: Brett Warren <brett.warren@arm.com> -Date: Wed, 23 Sep 2020 09:27:34 +0100 -Subject: [PATCH] optee: enable clang support - -When compiling with clang, the LIBGCC_LOCATE_CFLAG variable used -to provide a sysroot wasn't included, which results in not locating -compiler-rt. This is mitigated by including the variable as ammended. - -Upstream-Status: Pending -ChangeId: 8ba69a4b2eb8ebaa047cb266c9aa6c2c3da45701 -Signed-off-by: Brett Warren <brett.warren@arm.com> ---- - mk/clang.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mk/clang.mk b/mk/clang.mk -index c141a3f2ed0b..7d067cc007fa 100644 ---- a/mk/clang.mk -+++ b/mk/clang.mk -@@ -27,7 +27,7 @@ comp-cflags-warns-clang := -Wno-language-extension-token \ - - # Note, use the compiler runtime library (libclang_rt.builtins.*.a) instead of - # libgcc for clang --libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \ -+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \ - -rtlib=compiler-rt -print-libgcc-file-name 2> /dev/null) - - # Core ASLR relies on the executable being ready to run from its preferred load diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0003-core-link-add-no-warn-rwx-segments.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0003-core-link-add-no-warn-rwx-segments.patch deleted file mode 100644 index 62aee35632..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0003-core-link-add-no-warn-rwx-segments.patch +++ /dev/null @@ -1,64 +0,0 @@ -From fb69397234b1efe3528714b6c0c1921ce37ad6a6 Mon Sep 17 00:00:00 2001 -From: Jerome Forissier <jerome.forissier@linaro.org> -Date: Fri, 5 Aug 2022 09:48:03 +0200 -Subject: [PATCH] core: link: add --no-warn-rwx-segments - -Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> -Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/pull/5474] - -binutils ld.bfd generates one RWX LOAD segment by merging several sections -with mixed R/W/X attributes (.text, .rodata, .data). After version 2.38 it -also warns by default when that happens [1], which breaks the build due to ---fatal-warnings. The RWX segment is not a problem for the TEE core, since -that information is not used to set memory permissions. Therefore, silence -the warning. - -Link: [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 -Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29448 -Reported-by: Dominique Martinet <dominique.martinet@atmark-techno.com> -Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> -Acked-by: Jens Wiklander <jens.wiklander@linaro.org> ---- - core/arch/arm/kernel/link.mk | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/core/arch/arm/kernel/link.mk b/core/arch/arm/kernel/link.mk -index 7eed333a32de..c39d43cbfc5b 100644 ---- a/core/arch/arm/kernel/link.mk -+++ b/core/arch/arm/kernel/link.mk -@@ -31,6 +31,7 @@ link-ldflags += -T $(link-script-pp) -Map=$(link-out-dir)/tee.map - link-ldflags += --sort-section=alignment - link-ldflags += --fatal-warnings - link-ldflags += --gc-sections -+link-ldflags += $(call ld-option,--no-warn-rwx-segments) - - link-ldadd = $(LDADD) - link-ldadd += $(ldflags-external) -@@ -55,6 +56,7 @@ link-script-cppflags := \ - $(cppflagscore)) - - ldargs-all_objs := -T $(link-script-dummy) --no-check-sections \ -+ $(call ld-option,--no-warn-rwx-segments) \ - $(link-objs) $(link-ldadd) $(libgcccore) - cleanfiles += $(link-out-dir)/all_objs.o - $(link-out-dir)/all_objs.o: $(objs) $(libdeps) $(MAKEFILE_LIST) -@@ -67,7 +69,8 @@ $(link-out-dir)/unpaged_entries.txt: $(link-out-dir)/all_objs.o - $(q)$(NMcore) $< | \ - $(AWK) '/ ____keep_pager/ { printf "-u%s ", $$3 }' > $@ - --unpaged-ldargs = -T $(link-script-dummy) --no-check-sections --gc-sections -+unpaged-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections \ -+ $(call ld-option,--no-warn-rwx-segments) - unpaged-ldadd := $(objs) $(link-ldadd) $(libgcccore) - cleanfiles += $(link-out-dir)/unpaged.o - $(link-out-dir)/unpaged.o: $(link-out-dir)/unpaged_entries.txt -@@ -95,7 +98,8 @@ $(link-out-dir)/init_entries.txt: $(link-out-dir)/all_objs.o - $(q)$(NMcore) $< | \ - $(AWK) '/ ____keep_init/ { printf "-u%s ", $$3 }' > $@ - --init-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections -+init-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections \ -+ $(call ld-option,--no-warn-rwx-segments) - init-ldadd := $(link-objs-init) $(link-out-dir)/version.o $(link-ldadd) \ - $(libgcccore) - cleanfiles += $(link-out-dir)/init.o diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0004-core-Define-section-attributes-for-clang.patch b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0004-core-Define-section-attributes-for-clang.patch deleted file mode 100644 index e3c509f692..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-3.18.0/0004-core-Define-section-attributes-for-clang.patch +++ /dev/null @@ -1,240 +0,0 @@ -From 0690909f07779a8f35b1f3d0baf8d4c5c9305d14 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 13 Aug 2022 19:24:55 -0700 -Subject: [PATCH] core: Define section attributes for clang - -Clang's attribute section is not same as gcc, here we need to add flags -to sections so they can be eventually collected by linker into final -output segments. Only way to do so with clang is to use - -pragma clang section ... - -The behavious is described here [1], this allows us to define names bss -sections. This was not an issue until clang-15 where LLD linker starts -to detect the section flags before merging them and throws the following -errors - -| ld.lld: error: section type mismatch for .nozi.kdata_page -| >>> /mnt/b/yoe/master/build/tmp/work/qemuarm64-yoe-linux/optee-os-tadevkit/3.17.0-r0/build/core/arch/arm/kernel/thread.o:(.nozi.kdata_page): SHT_PROGBITS -| >>> output section .nozi: SHT_NOBITS -| -| ld.lld: error: section type mismatch for .nozi.mmu.l2 -| >>> /mnt/b/yoe/master/build/tmp/work/qemuarm64-yoe-linux/optee-os-tadevkit/3.17.0-r0/build/core/arch/arm/mm/core_mmu_lpae.o:(.nozi.mmu.l2): SHT_PROGBITS -| >>> output section .nozi: SHT_NOBITS - -These sections should be carrying SHT_NOBITS but so far it was not -possible to do so, this patch tries to use clangs pragma to get this -going and match the functionality with gcc. - -[1] https://intel.github.io/llvm-docs/clang/LanguageExtensions.html#specifying-section-names-for-global-objects-pragma-clang-section - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - core/arch/arm/kernel/thread.c | 19 +++++++++++++++-- - core/arch/arm/mm/core_mmu_lpae.c | 35 +++++++++++++++++++++++++++---- - core/arch/arm/mm/core_mmu_v7.c | 36 +++++++++++++++++++++++++++++--- - core/arch/arm/mm/pgt_cache.c | 12 ++++++++++- - core/kernel/thread.c | 13 +++++++++++- - 5 files changed, 104 insertions(+), 11 deletions(-) - -diff --git a/core/arch/arm/kernel/thread.c b/core/arch/arm/kernel/thread.c -index f083b159e969..432983c86c9f 100644 ---- a/core/arch/arm/kernel/thread.c -+++ b/core/arch/arm/kernel/thread.c -@@ -44,15 +44,30 @@ static size_t thread_user_kcode_size __nex_bss; - #if defined(CFG_CORE_UNMAP_CORE_AT_EL0) && \ - defined(CFG_CORE_WORKAROUND_SPECTRE_BP_SEC) && defined(ARM64) - long thread_user_kdata_sp_offset __nex_bss; -+#ifdef __clang__ -+#ifndef CFG_VIRTUALIZATION -+#pragma clang section bss=".nozi.kdata_page" -+#else -+#pragma clang section bss=".nex_nozi.kdata_page" -+#endif -+#endif - static uint8_t thread_user_kdata_page[ - ROUNDUP(sizeof(struct thread_core_local) * CFG_TEE_CORE_NB_CORE, - SMALL_PAGE_SIZE)] - __aligned(SMALL_PAGE_SIZE) -+#ifndef __clang__ - #ifndef CFG_VIRTUALIZATION -- __section(".nozi.kdata_page"); -+ __section(".nozi.kdata_page") - #else -- __section(".nex_nozi.kdata_page"); -+ __section(".nex_nozi.kdata_page") - #endif -+#endif -+ ; -+#endif -+ -+/* reset BSS section to default ( .bss ) */ -+#ifdef __clang__ -+#pragma clang section bss="" - #endif - - #ifdef ARM32 -diff --git a/core/arch/arm/mm/core_mmu_lpae.c b/core/arch/arm/mm/core_mmu_lpae.c -index 3f08eec623f3..e6dc9261c41e 100644 ---- a/core/arch/arm/mm/core_mmu_lpae.c -+++ b/core/arch/arm/mm/core_mmu_lpae.c -@@ -233,19 +233,46 @@ typedef uint16_t l1_idx_t; - typedef uint64_t base_xlat_tbls_t[CFG_TEE_CORE_NB_CORE][NUM_BASE_LEVEL_ENTRIES]; - typedef uint64_t xlat_tbl_t[XLAT_TABLE_ENTRIES]; - -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.base_table" -+#endif - static base_xlat_tbls_t base_xlation_table[NUM_BASE_TABLES] - __aligned(NUM_BASE_LEVEL_ENTRIES * XLAT_ENTRY_SIZE) -- __section(".nozi.mmu.base_table"); -+#ifndef __clang__ -+ __section(".nozi.mmu.base_table") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l2" -+#endif - static xlat_tbl_t xlat_tables[MAX_XLAT_TABLES] -- __aligned(XLAT_TABLE_SIZE) __section(".nozi.mmu.l2"); -+ __aligned(XLAT_TABLE_SIZE) -+#ifndef __clang__ -+ __section(".nozi.mmu.l2") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - - #define XLAT_TABLES_SIZE (sizeof(xlat_tbl_t) * MAX_XLAT_TABLES) - -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l2" -+#endif - /* MMU L2 table for TAs, one for each thread */ - static xlat_tbl_t xlat_tables_ul1[CFG_NUM_THREADS] -- __aligned(XLAT_TABLE_SIZE) __section(".nozi.mmu.l2"); -- -+#ifndef __clang__ -+ __aligned(XLAT_TABLE_SIZE) __section(".nozi.mmu.l2") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - /* - * TAs page table entry inside a level 1 page table. - * -diff --git a/core/arch/arm/mm/core_mmu_v7.c b/core/arch/arm/mm/core_mmu_v7.c -index cd85bd22d385..3e18f54f6cf8 100644 ---- a/core/arch/arm/mm/core_mmu_v7.c -+++ b/core/arch/arm/mm/core_mmu_v7.c -@@ -204,16 +204,46 @@ typedef uint32_t l1_xlat_tbl_t[NUM_L1_ENTRIES]; - typedef uint32_t l2_xlat_tbl_t[NUM_L2_ENTRIES]; - typedef uint32_t ul1_xlat_tbl_t[NUM_UL1_ENTRIES]; - -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l1" -+#endif - static l1_xlat_tbl_t main_mmu_l1_ttb -- __aligned(L1_ALIGNMENT) __section(".nozi.mmu.l1"); -+ __aligned(L1_ALIGNMENT) -+#ifndef __clang__ -+ __section(".nozi.mmu.l1") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - - /* L2 MMU tables */ -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l2" -+#endif - static l2_xlat_tbl_t main_mmu_l2_ttb[MAX_XLAT_TABLES] -- __aligned(L2_ALIGNMENT) __section(".nozi.mmu.l2"); -+ __aligned(L2_ALIGNMENT) -+#ifndef __clang__ -+ __section(".nozi.mmu.l2") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - - /* MMU L1 table for TAs, one for each thread */ -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.ul1" -+#endif - static ul1_xlat_tbl_t main_mmu_ul1_ttb[CFG_NUM_THREADS] -- __aligned(UL1_ALIGNMENT) __section(".nozi.mmu.ul1"); -+ __aligned(UL1_ALIGNMENT) -+#ifndef __clang__ -+ __section(".nozi.mmu.ul1") -+#endif -+; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - - struct mmu_partition { - l1_xlat_tbl_t *l1_table; -diff --git a/core/arch/arm/mm/pgt_cache.c b/core/arch/arm/mm/pgt_cache.c -index dee1d207943f..382cae1c3f30 100644 ---- a/core/arch/arm/mm/pgt_cache.c -+++ b/core/arch/arm/mm/pgt_cache.c -@@ -104,8 +104,18 @@ void pgt_init(void) - * has a large alignment, while .bss has a small alignment. The current - * link script is optimized for small alignment in .bss - */ -+#ifdef __clang__ -+#pragma clang section bss=".nozi.mmu.l2" -+#endif - static uint8_t pgt_tables[PGT_CACHE_SIZE][PGT_SIZE] -- __aligned(PGT_SIZE) __section(".nozi.pgt_cache"); -+ __aligned(PGT_SIZE) -+#ifndef __clang__ -+ __section(".nozi.pgt_cache") -+#endif -+ ; -+#ifdef __clang__ -+#pragma clang section bss="" -+#endif - size_t n; - - for (n = 0; n < ARRAY_SIZE(pgt_tables); n++) { -diff --git a/core/kernel/thread.c b/core/kernel/thread.c -index 18d34e6adfe2..086129e282bc 100644 ---- a/core/kernel/thread.c -+++ b/core/kernel/thread.c -@@ -37,13 +37,24 @@ struct thread_core_local thread_core_local[CFG_TEE_CORE_NB_CORE] __nex_bss; - name[stack_num][sizeof(name[stack_num]) / sizeof(uint32_t) - 1] - #endif - -+#define DO_PRAGMA(x) _Pragma (#x) -+ -+#ifdef __clang__ -+#define DECLARE_STACK(name, num_stacks, stack_size, linkage) \ -+DO_PRAGMA (clang section bss=".nozi_stack." #name) \ -+linkage uint32_t name[num_stacks] \ -+ [ROUNDUP(stack_size + STACK_CANARY_SIZE + STACK_CHECK_EXTRA, \ -+ STACK_ALIGNMENT) / sizeof(uint32_t)] \ -+ __attribute__((aligned(STACK_ALIGNMENT))); \ -+DO_PRAGMA(clang section bss="") -+#else - #define DECLARE_STACK(name, num_stacks, stack_size, linkage) \ - linkage uint32_t name[num_stacks] \ - [ROUNDUP(stack_size + STACK_CANARY_SIZE + STACK_CHECK_EXTRA, \ - STACK_ALIGNMENT) / sizeof(uint32_t)] \ - __attribute__((section(".nozi_stack." # name), \ - aligned(STACK_ALIGNMENT))) -- -+#endif - #define GET_STACK(stack) ((vaddr_t)(stack) + STACK_SIZE(stack)) - - DECLARE_STACK(stack_tmp, CFG_TEE_CORE_NB_CORE, diff --git a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-ts-3.18.inc b/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-ts-3.18.inc deleted file mode 100644 index 4dffc46da3..0000000000 --- a/meta-arm/meta-arm-bsp/recipes-security/optee/optee-os-ts-3.18.inc +++ /dev/null @@ -1,54 +0,0 @@ -# Include Trusted Services SPs accordingly to defined machine features - -# Please notice that OPTEE will load SPs in the order listed in this file. -# If an SP requires another SP to be already loaded it must be listed lower. - -# TS SPs UUIDs definitions -require recipes-security/trusted-services/ts-uuid.inc - -TS_ENV = "opteesp" -TS_BIN = "${RECIPE_SYSROOT}/usr/${TS_ENV}/bin" - -# ITS SP -DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-its', \ - ' ts-sp-its', '' , d)}" -SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-its', \ - ' ${TS_BIN}/${ITS_UUID}.stripped.elf', '', d)}" - -# Storage SP -DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-storage', \ - ' ts-sp-storage', '' , d)}" -SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-storage', \ - ' ${TS_BIN}/${STORAGE_UUID}.stripped.elf', '', d)}" - -# Crypto SP. -DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-crypto', \ - ' ts-sp-crypto', '' , d)}" -SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-crypto', \ - ' ${TS_BIN}/${CRYPTO_UUID}.stripped.elf', '', d)}" - -# Attestation SP -DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-attestation', \ - ' ts-sp-attestation', '' , d)}" -SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-attestation', \ - ' ${TS_BIN}/${ATTESTATION_UUID}.stripped.elf', '', d)}" - -# Env-test SP -DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-env-test', \ - ' ts-sp-env-test', '' , d)}" -SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-env-test', \ - ' ${TS_BIN}/${ENV_TEST_UUID}.stripped.elf', '', d)}" - -# SE-Proxy SP -DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-se-proxy', \ - ' ts-sp-se-proxy', '' , d)}" -SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-se-proxy', \ - ' ${TS_BIN}/${SE_PROXY_UUID}.stripped.elf', '', d)}" - -# SMM Gateway -DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-smm-gateway', \ - ' ts-sp-smm-gateway', '' , d)}" -SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-smm-gateway', \ - ' ${TS_BIN}/${SMM_GATEWAY_UUID}.stripped.elf', '', d)}" - -EXTRA_OEMAKE:append = "${@oe.utils.conditional('SP_PATHS', '', '', ' CFG_MAP_EXT_DT_SECURE=y CFG_SECURE_PARTITION=y SP_PATHS="${SP_PATHS}" ', d)}" |