From patchwork Tue May 20 17:27:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Szing X-Patchwork-Id: 63319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E8D8C54E71 for ; Tue, 20 May 2025 17:28:24 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.26830.1747762091869119699 for ; Tue, 20 May 2025 10:28:12 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: gyorgy.szing@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BC021152B; Tue, 20 May 2025 10:27:57 -0700 (PDT) Received: from gyoszi01-yocto.budapest.arm.com (ubul2.budapest.arm.com [10.45.25.25]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A71AF3F5A1; Tue, 20 May 2025 10:28:10 -0700 (PDT) From: Gyorgy Szing To: meta-arm@lists.yoctoproject.org Cc: Gyorgy Szing Subject: [PATCH 6/9] arm/trusted-services: enable the logging SP Date: Tue, 20 May 2025 19:27:44 +0200 Message-ID: <20250520172748.3439803-6-gyorgy.szing@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250520172748.3439803-1-gyorgy.szing@arm.com> References: <20250520172748.3439803-1-gyorgy.szing@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 20 May 2025 17:28:24 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6513 The logging service provides an SPMC agonistic to create log messages. The current version will simply dump the incoming log messages to a setial line. Future versions could provide access to log messages from the NWd, could encrypt the essages and perform more efficient when logging large messages. This change enables the logging SP on the fvp_base platform. All log messages made by SPs after the boot phase will be sent to UART3. Signed-off-by: Gyorgy Szing --- ci/fvp-base-ts.yml | 2 +- documentation/trusted-services.md | 1 + .../trusted-services/ts-sp-logging_%.bbappend | 1 + meta-arm/recipes-security/optee/optee-os-ts.inc | 7 +++++++ .../trusted-services/ts-sp-logging_git.bb | 8 ++++++++ meta-arm/recipes-security/trusted-services/ts-uuid.inc | 1 + 6 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 meta-arm-bsp/recipes-security/trusted-services/ts-sp-logging_%.bbappend create mode 100644 meta-arm/recipes-security/trusted-services/ts-sp-logging_git.bb diff --git a/ci/fvp-base-ts.yml b/ci/fvp-base-ts.yml index 89a3e1f2..62d7995b 100644 --- a/ci/fvp-base-ts.yml +++ b/ci/fvp-base-ts.yml @@ -14,7 +14,7 @@ local_conf_header: # Include all Secure Partitions into the image MACHINE_FEATURES:append = " arm-ffa ts-crypto ts-storage ts-its" MACHINE_FEATURES:append = " ts-attestation ts-smm-gateway optee-spmc-test" - MACHINE_FEATURES:append = " ts-block-storage ts-fwu" + MACHINE_FEATURES:append = " ts-block-storage ts-fwu ts-logging" MACHINE_FEATURES:append = " arm-branch-protection" SMMGW_AUTH_VAR = "1" # Include TS demo/test tools into image diff --git a/documentation/trusted-services.md b/documentation/trusted-services.md index 3dd045c7..8b7f795a 100644 --- a/documentation/trusted-services.md +++ b/documentation/trusted-services.md @@ -24,6 +24,7 @@ features for each [Secure Partition][^2] you would like to include: | se-proxy | ts-se-proxy | | smm-gateway | ts-smm-gateway | | spm-test[1-4] | optee-spmc-test | +| Logging | ts-logging | Other steps depend on your machine/platform definition: diff --git a/meta-arm-bsp/recipes-security/trusted-services/ts-sp-logging_%.bbappend b/meta-arm-bsp/recipes-security/trusted-services/ts-sp-logging_%.bbappend new file mode 100644 index 00000000..5c9ef210 --- /dev/null +++ b/meta-arm-bsp/recipes-security/trusted-services/ts-sp-logging_%.bbappend @@ -0,0 +1 @@ +require ts-arm-platforms.inc diff --git a/meta-arm/recipes-security/optee/optee-os-ts.inc b/meta-arm/recipes-security/optee/optee-os-ts.inc index 82545ccb..be4bf5bb 100644 --- a/meta-arm/recipes-security/optee/optee-os-ts.inc +++ b/meta-arm/recipes-security/optee/optee-os-ts.inc @@ -80,6 +80,13 @@ DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-block-storage', SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-block-storage', \ ' ${TS_BIN}/${BLOCK_STORAGE_UUID}${SP_EXT}', '', d)}" +# Logging SP +DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-logging', \ + ' ts-sp-logging', '' , d)}" +SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-logging', \ + ' ${TS_BIN}/${LOGGING_SP_UUID}${SP_EXT}', '', d)}" + + EXTRA_OEMAKE:append = "${@oe.utils.conditional('SP_PATHS', '', '', \ ' CFG_MAP_EXT_DT_SECURE=y CFG_SECURE_PARTITION=y \ SP_PATHS="${SP_PATHS}" ', d)}" diff --git a/meta-arm/recipes-security/trusted-services/ts-sp-logging_git.bb b/meta-arm/recipes-security/trusted-services/ts-sp-logging_git.bb new file mode 100644 index 00000000..e40349ae --- /dev/null +++ b/meta-arm/recipes-security/trusted-services/ts-sp-logging_git.bb @@ -0,0 +1,8 @@ +DESCRIPTION = "Trusted Services logging service provider" + +require ts-sp-common.inc + +SP_UUID = "${LOGGING_SP_UUID}" +TS_SP_LOGGING_CONFIG ?= "default" + +OECMAKE_SOURCEPATH="${S}/deployments/logging/config/${TS_SP_LOGGING_CONFIG}-${TS_ENV}" diff --git a/meta-arm/recipes-security/trusted-services/ts-uuid.inc b/meta-arm/recipes-security/trusted-services/ts-uuid.inc index 810ffa5e..bcf0ee97 100644 --- a/meta-arm/recipes-security/trusted-services/ts-uuid.inc +++ b/meta-arm/recipes-security/trusted-services/ts-uuid.inc @@ -13,3 +13,4 @@ SPM_TEST3_UUID = "23eb0100-e32a-4497-9052-2f11e584afa6" SPM_TEST4_UUID = "423762ed-7772-406f-99d8-0c27da0abbf8" FWU_UUID = "6823a838-1b06-470e-9774-0cce8bfb53fd" BLOCK_STORAGE_UUID = "63646e80-eb52-462f-ac4f-8cdf3987519c" +LOGGING_SP_UUID = "da9dffbd-d590-40ed-975f-19c65a3d52d3"