From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66471+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66471+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282751; cv=none; d=zohomail.com; s=zohoarc; b=mGrozqa3tGs+0BEW1cEYoIwSRZtNjk1kVELTxudjakunnMRCPuiK+w2ztVFss/POJOR7DVfUGtZaA3kcK+w6YjEZGweQv3mlbNomajCynRWp5aEdu61mx5mDsoozVLOKlmoMg8nrwe4HK4FZy/H5F+bHv2UQ4UteSGFERJN4yTs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282751; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=nOwGZS8rOraEgwNF4GQ8OyMxUHaO01O91NmjzqFDbvU=; b=hDfDsFkVjigScc3BdYbMP1Np/8k5mbhrRTz3+0hNdfbmtPi5DcK0bXiSnHSZlBqpEAbB7XmtsyYhowsBPMr+j5CoD0X/Mwumu47NLI1XpThDTVgzsTTzs+DYXrO8WJa9MI35OW8tMYnkMXnJycZGGENucIhpI/tHcpkcJk3Rk5M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66471+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282751056367.8653318519463; Wed, 21 Oct 2020 05:19:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id pTPlYY1788612xS8TWZ9psBA; Wed, 21 Oct 2020 05:19:10 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.10406.1603279996786971586 for ; Wed, 21 Oct 2020 04:33:16 -0700 X-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 5A6F51FB; Wed, 21 Oct 2020 04:33:16 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A043B3F66E; Wed, 21 Oct 2020 04:33:14 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Achin Gupta Subject: [edk2-devel] [PATCH v1 01/12] ArmPkg/IndustryStandard: Add barebones FF-A header Date: Wed, 21 Oct 2020 17:02:22 +0530 Message-Id: <20201021113233.25548-2-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: c4o5m32ETETKxNVrK1GmDV9Rx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282750; bh=5JgWUBuS3RzHRlNZth+x/7L1vvmCvrImUB8czE/v4kI=; h=Cc:Date:From:Reply-To:Subject:To; b=Ps3ERDt0QdcU4Jqx00S1hYXFPnkD0DgMktJsfJmvFVpmX5QjK9SuYP/VtHZCbL16exr /6ZuVBt73kpxu0G0k6s/dvgizZqsy8zHs1CIxMjn+gRP+KKois3EP73PN2Ugqi/XcrF1A dQrpoQn/rlRvLeuvRFttwEcUFFdDnYr57WM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Achin Gupta This patch adds a rudimentary header file with defines for FF-A ABIs that will be used as the transport between S-EL0 and the SPM Signed-off-by: Achin Gupta --- ArmPkg/Include/IndustryStandard/ArmFfaSvc.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h b/ArmPkg/Include/I= ndustryStandard/ArmFfaSvc.h new file mode 100644 index 0000000000..a8914085de --- /dev/null +++ b/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h @@ -0,0 +1,16 @@ +/** @file +* +* Copyright (c) 2020, ARM Limited. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#ifndef __ARM_FFA_SVC_H__ +#define __ARM_FFA_SVC_H__ + +#define ARM_SVC_ID_FFA_VERSION_AARCH32 0x84000063 +#define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64 0xC400006F +#define ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64 0xC4000070 + +#endif --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66471): https://edk2.groups.io/g/devel/message/66471 Mute This Topic: https://groups.io/mt/77703647/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66472+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66472+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282752; cv=none; d=zohomail.com; s=zohoarc; b=hbH8n/qI+lh+2NOpgvMsLsFtFt866mNYzHWFPbNx8/dQWyw8/qgwSI0d/a8m1RtCPnMZ91RnR5aoV4vxnhmWF/4gI3MBEvBDOY2oGoCLHgsnIImpT6BzIkQMi0MOVM9pJVRRRIwfSLQRXRz1aDHKmLz2pAdV/hLy6ugJBGjSYvc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282752; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=Lzk5CUih6rwxbweug31Qe+9oFJRvN8RWLSvh5QLRxtU=; b=dyGU34xKgLq0L7Lkd0H0HElPUciwmQzOoOOYJ+Uwy6eiq/md4WKx5AgvvCa+vzfu04mI0J2wPVbO4PAOXbP0tVmhUKLzg7EYngITJg/9BlmDVxcHaK5OsvHChv8pV9Sn4C+aPL09FwxqpKcdFCoCJD1SFUcYOjAE6cncaDAdhw0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66472+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282751999411.34413672185076; Wed, 21 Oct 2020 05:19:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id nejcYY1788612xlvBqEcWSse; Wed, 21 Oct 2020 05:19:11 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.10393.1603279998939303600 for ; Wed, 21 Oct 2020 04:33:19 -0700 X-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 889EBD6E; Wed, 21 Oct 2020 04:33:18 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CEF273F66E; Wed, 21 Oct 2020 04:33:16 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Achin Gupta Subject: [edk2-devel] [PATCH v1 02/12] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters Date: Wed, 21 Oct 2020 17:02:23 +0530 Message-Id: <20201021113233.25548-3-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: uUjBo2yyhwnqHmhC0MmDYifqx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282751; bh=OlIGGgfbnxKQ5CJCe2D2C/4kbUA3RrKZ5ACEpyKzl3c=; h=Cc:Date:From:Reply-To:Subject:To; b=u6CPx6IY9SaQ8b+ir2ie1hC4lYcFbccfhoWEB13BjFFJabHwshT1eIbDN1b0X7p2Pli VRQUFVOs6gNsvgQxOF5TX2AiOzI0Qc4wa4JjRktjpT/RvhoV9J0597RvBlaS/vMl0DGKp HyZA+DS0IgI1sVB6yTuTRx69pMz+kX/8obY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Achin Gupta The Arm SMC calling convention standard v1.2 allows 8 input and output parameter registers. The FF-A specification relies on this communication. This patch extends the number of output registers returned by ArmCallSvc() to match this convention. Signed-off-by: Achin Gupta --- ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S b/ArmPkg/Library/Arm= SvcLib/AArch64/ArmSvc.S index ee265f94b9..8cb5c45582 100644 --- a/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S +++ b/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S @@ -36,6 +36,8 @@ ASM_PFX(ArmCallSvc): // A SVC call can return up to 4 values - we do not need to store back x= 4-x7. stp x0, x1, [x9, #0] stp x2, x3, [x9, #16] + stp x4, x5, [x9, #32] + stp x6, x7, [x9, #48] =20 mov x0, x9 =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66472): https://edk2.groups.io/g/devel/message/66472 Mute This Topic: https://groups.io/mt/77703649/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66473+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66473+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282752; cv=none; d=zohomail.com; s=zohoarc; b=KMajFsv+6afx59ozMsJ2CQS5XN8iMpLD9/8J+jXzugfLXy7y+DxyIG2XM6TAn1UsPifUPoXo+lVTuSPkjH9J3onaN9RaLXFML4W2khSrBelAr4+T8RZMSBaoWiItjjZg1GeGIgyJHi/sG6AcHMkw2Xdy9zHZK8IW5KXXBVm9fcI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282752; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=JRsDOwjp+07+AcEs6scLp/x9A05uMrTnIZyn9XhJcHg=; b=Hp72ZS30U71ZNsRdGEXC610hN7KOKXt1YU7X/xYp1txbg1I72mcarJRUhcb/atpw9KAJowwWR9nIRlA8efKlLEjurTRRoIPMPVHv6np/punEes8qrcmLocKkFJQGN4Fkkan0IS44sOaCglD+0l0hDzSj97XMHrAPzJE/4qRgqDA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66473+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282752289188.572171472096; Wed, 21 Oct 2020 05:19:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id c2gLYY1788612xYlSthiYxrC; Wed, 21 Oct 2020 05:19:11 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.10394.1603280001094213044 for ; Wed, 21 Oct 2020 04:33:21 -0700 X-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 BA9B81FB; Wed, 21 Oct 2020 04:33:20 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0BF0D3F66E; Wed, 21 Oct 2020 04:33:18 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Achin Gupta Subject: [edk2-devel] [PATCH v1 03/12] StandaloneMmPkg: Use FF-A header file in Standalone MM Core entry point Date: Wed, 21 Oct 2020 17:02:24 +0530 Message-Id: <20201021113233.25548-4-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: a0uUZszLzY0j8gzd8cQsV6Tqx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282751; bh=lg0yVDGPoWMtZ52dtP5Z/sSb7xZl4DVHZv3kGyxNSRQ=; h=Cc:Date:From:Reply-To:Subject:To; b=CDp3GFk62RkC7GdhuSgkuFQNnMfBCn8thAqN6M1hR/5YK4umYlQnbGP8DCXScCWK/yq 31lhEvEtFd/zu3gNX03/ADyz4byCdpkySstLffrkp7MJXq5C33V5k6tPPcrgwmgzMMzta PitPB1Y5vAV1MrTovsBSVbzMgXi7naiCJ+E= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Achin Gupta Signed-off-by: Achin Gupta --- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCor= eEntryPoint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Sta= ndaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPo= int/AArch64/StandaloneMmCoreEntryPoint.c index 9cecfa667b..c4132b0d78 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c @@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 #include #include +#include =20 #define SPM_MAJOR_VER_MASK 0xFFFF0000 #define SPM_MINOR_VER_MASK 0x0000FFFF --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66473): https://edk2.groups.io/g/devel/message/66473 Mute This Topic: https://groups.io/mt/77703650/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66474+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66474+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282752; cv=none; d=zohomail.com; s=zohoarc; b=g5VRQNCpjxqaQKU/KDBjTfczCpR34Mn4P6BegF/FR+u/429hryjn/bswc3Do31EEEPxf54j371MGyIUagvWlMtdpMNt4SZP7H0Q1O48q7ZfhP2ThRQXWo8rSQbjHbjPi3/PMsv17kz71PbO31YLsTAoQnm56WctHDWQD3ns4tto= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282752; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=IxxS3ErB3oluasXiJNCATWPNsHnCh3RcOBZdTuwnV/Q=; b=ENSt7YL7hyI4P74qbUkRBxW0y42f9wTNTjUxQ3JDKSHaNiDpxCOGDikpbQedhCvP/pIFxbZaeQffsG/1RBAaD3tSK/jswyKKSDdzze4EboVekmlAnMyKFDB02xzlCSHHhJQ+gZqCRUit2q2UyNM+VBt2ZnFaBr+/hJV93acuAP0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66474+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282752610957.1276906770088; Wed, 21 Oct 2020 05:19:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id wdwmYY1788612xegbXrPpgmM; Wed, 21 Oct 2020 05:19:12 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.10395.1603280003196119397 for ; Wed, 21 Oct 2020 04:33:23 -0700 X-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 E808C1FB; Wed, 21 Oct 2020 04:33:22 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3A1183F66E; Wed, 21 Oct 2020 04:33:20 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Sughosh Ganu Subject: [edk2-devel] [PATCH v1 04/12] ArmPkg: Introduce support for PcdFfaEnable Date: Wed, 21 Oct 2020 17:02:25 +0530 Message-Id: <20201021113233.25548-5-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: H34L4QXdbftTWT3eTQXiPaIix1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282752; bh=qNHbfbaoGP3t2QzMnioBjmya5ONazv+3LqLZz1IqVB8=; h=Cc:Date:From:Reply-To:Subject:To; b=B7LO1PEQ8GFP3t7iXPDy4bv8RcR6JBgaf8U6cCIJzgYGOC7c5B6hvMPqrgwwVHxuWCJ iJae10F/BHVbnLoK0JBGFQrK3fJf8fDtqOF+W1GTnEpG3eTgRXX7oWTqx2zLtOSytGlwV Rk3RhpqD76YeWlo7jYY32HeD1BYrN4jJP7k= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The Secure Partition(SP) can request services from the Secure Partition Manager Core(SPMC) either through FF-A calls or through the existing SVC calls. Add a feature flag Pcd for enabling the FF-A method -- when this is set to FALSE, the SP uses the existing SVC calls for making the requests. Signed-off-by: Sughosh Ganu Reviewed-by: Sami Mujawar --- ArmPkg/ArmPkg.dec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec index eaf1072d9e..979f3e2699 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -78,6 +78,9 @@ # Define if the GICv3 controller should use the GICv2 legacy gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy|FALSE|BOOLEAN|0x00000042 =20 + # Used to select method for requesting services from S-EL1 + gArmTokenSpaceGuid.PcdFfaEnable|FALSE|BOOLEAN|0x0000005B + [PcdsFeatureFlag.ARM] # Whether to map normal memory as non-shareable. FALSE is the safe choic= e, but # TRUE may be appropriate to fix performance problems if you don't care = about --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66474): https://edk2.groups.io/g/devel/message/66474 Mute This Topic: https://groups.io/mt/77703651/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66475+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66475+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282753; cv=none; d=zohomail.com; s=zohoarc; b=IrQlIoxNgNufvamdruR+0esGCd153PMgVQwN7luqwh3kO/g3uLNZhbTNW5ZBzh/vBu7iVOCylbN1CykrJb3leYLjLces4YFMgfYh+2rM6C+e0nbLnwaZDsKl6knXKuI1KyRja8lByr8fJTPokwWvgvkfwi/3IcDFLYsTaqaB4to= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282753; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=yyv5m+AFO1Fbv3aMhiaw0RqZUqqQADWEkO9vS3EZcMc=; b=XlnJgf1/Z9uQ0tmOkrGFZbsTRES8CsUTV3HSN5kAvH6aOEdeIwu+xHzPm6YryeYlbjrU1knGoF2CbkRcRoOe7HHx//SwhwrzcfMHIDNUvhkeb8EgSUoSfDTfNaG4/yYGgU8VM0RMFmUYVpXXX4E7Wm50rY+PfvM+yK6F7ySYYIU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66475+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282753225293.5586791571974; Wed, 21 Oct 2020 05:19:13 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id M8BXYY1788612xVVdvDkiXuw; Wed, 21 Oct 2020 05:19:12 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.10369.1603280005431489452 for ; Wed, 21 Oct 2020 04:33:25 -0700 X-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 23A321FB; Wed, 21 Oct 2020 04:33:25 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 689103F66E; Wed, 21 Oct 2020 04:33:23 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Sughossh Ganu Subject: [edk2-devel] [PATCH v1 05/12] StandaloneMmPkg: Add the SPM version for FF-A Date: Wed, 21 Oct 2020 17:02:26 +0530 Message-Id: <20201021113233.25548-6-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: x17YWOFSydHo3JlY8ztnypzJx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282752; bh=yN6WNRxLujU+ojQ83nVEXfmbsyG3y9sjUCfKnnKlY1U=; h=Cc:Date:From:Reply-To:Subject:To; b=B7WHJFnZBBqXbPgAxTfLjp+jkv12KCaHtsOE0FSnsoxwB+e2TiPD1dV2VywOKR3MZ/Z R0wYBkYLgdRXfg8Q3b+gkMuCGJsHgT2Y20b3lS+gZY062zvGkAXCWVFVrTP2kTF7u+Uzt JvCnDl8u9loLfzDE21VQ8VU8Q3rObFOdMp8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Sughossh Ganu The Firmware Framework(FF-A) requires implementation of SPM version v1.0. Add new macros for the version that will be used for FF-A. Signed-off-by: Sughosh Ganu --- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCor= eEntryPoint.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Sta= ndaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPo= int/AArch64/StandaloneMmCoreEntryPoint.c index c4132b0d78..33f0db654f 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c @@ -32,6 +32,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define SPM_MINOR_VER_MASK 0x0000FFFF #define SPM_MAJOR_VER_SHIFT 16 =20 +CONST UINT32 SPM_MAJOR_VER_FFA =3D 1; +CONST UINT32 SPM_MINOR_VER_FFA =3D 0; + CONST UINT32 SPM_MAJOR_VER =3D 0; CONST UINT32 SPM_MINOR_VER =3D 1; =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66475): https://edk2.groups.io/g/devel/message/66475 Mute This Topic: https://groups.io/mt/77703653/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66476+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66476+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282754; cv=none; d=zohomail.com; s=zohoarc; b=V1O7KiLGnQzV9uFprZDCwDRJsuCEaMCspR32tixtO70FuI2XTJqIrUGEFRYubORRXnW3i21SBTduZVHUVLEPxOEkOuKV7MISePurA9JZgfUMaovYxz5ONBK3PmXaoO47YOgbsYYUS5b3Tn47pDUCcfd8zPFb8RrzR0i/7AjiuxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282754; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=kkVqOPCZ1I6b6lre53yIOrT2bGBgJ4FXfCu7X6KActo=; b=ZdivITcrJkueU1cR+cbtSmGvJb2tKhn/0SNtJZJfZMZEu0KT3wIrqRtX6g77V51hE1ecbZAKhwst64tVqh8w/Po3TOdFMM3n+kieCHBfOBZcE1PEp82Sggt3nUWTaN/Ev622OhAbkl9Fzzz0TA9z6a60FbDD4MhvviBh2RrMr3A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66476+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282754238513.9200059914253; Wed, 21 Oct 2020 05:19:14 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hd8rYY1788612xiKt4Xveo53; Wed, 21 Oct 2020 05:19:13 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10406.1603280007632875457 for ; Wed, 21 Oct 2020 04:33:27 -0700 X-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 5202F1FB; Wed, 21 Oct 2020 04:33:27 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 986273F66E; Wed, 21 Oct 2020 04:33:25 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Achin Gupta Subject: [edk2-devel] [PATCH v1 06/12] StandaloneMmPkg: Add option to use FF-A calls for getting SPM version Date: Wed, 21 Oct 2020 17:02:27 +0530 Message-Id: <20201021113233.25548-7-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: D9Nlf3mQHrRWzOeDPsru1QjDx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282753; bh=uvbJd2Dlu2Ex97cY8U/ZHpLNK2naDHlXYznxP8fQ4qI=; h=Cc:Date:From:Reply-To:Subject:To; b=Al4vjHKz2iDkGLB1X0ruUnWeZUngRqSMq42rzF126JbCE9J1GsRGEJDAtKQ2CK4nvtj TMNj1sGmLPXTySiSBKlw/p0GvWXGjP5HUb5RsRsfaT6GciogOiMS3lrdE130u+QgubXyj Bc0aO3clQ+IdDKvsbfPknjZOtfBW19yYtDQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Achin Gupta With the introduction of Firmware Framework(FF-A), a Secure Partition can get the SPM version either using FF-A calls or through the existing svc calls. Use a runtime check to use either of the two methods based on the Pcd feature flag value. Signed-off-by: Achin Gupta Co-developed-by: Sughosh Ganu --- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPo= int.inf | 3 ++ StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCor= eEntryPoint.c | 31 ++++++++++++++------ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneM= mCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/St= andaloneMmCoreEntryPoint.inf index 7d6ee4e08e..f8184f501b 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEn= tryPoint.inf @@ -49,5 +49,8 @@ gEfiStandaloneMmNonSecureBufferGuid gEfiArmTfCpuDriverEpDescriptorGuid =20 +[Pcd] + gArmTokenSpaceGuid.PcdFfaEnable + [BuildOptions] GCC:*_*_*_CC_FLAGS =3D -fpie diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Sta= ndaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPo= int/AArch64/StandaloneMmCoreEntryPoint.c index 33f0db654f..7d1e3c4d7c 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c @@ -23,6 +23,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include =20 #include #include @@ -165,19 +166,31 @@ EFI_STATUS GetSpmVersion (VOID) { EFI_STATUS Status; - UINT16 SpmMajorVersion; - UINT16 SpmMinorVersion; + UINT16 CurSpmMajorVer; + UINT16 SpmMajorVer; + UINT16 CurSpmMinorVer; + UINT16 SpmMinorVer; UINT32 SpmVersion; ARM_SVC_ARGS SpmVersionArgs; =20 - SpmVersionArgs.Arg0 =3D ARM_SVC_ID_SPM_VERSION_AARCH32; + if (FeaturePcdGet (PcdFfaEnable)) { + SpmVersionArgs.Arg0 =3D ARM_SVC_ID_FFA_VERSION_AARCH32; + SpmVersionArgs.Arg1 =3D SPM_MAJOR_VER << SPM_MAJOR_VER_SHIFT; + SpmVersionArgs.Arg1 |=3D SPM_MINOR_VER; + SpmMajorVer =3D SPM_MAJOR_VER_FFA; + SpmMinorVer =3D SPM_MINOR_VER_FFA; + } else { + SpmVersionArgs.Arg0 =3D ARM_SVC_ID_SPM_VERSION_AARCH32; + SpmMajorVer =3D SPM_MAJOR_VER; + SpmMinorVer =3D SPM_MINOR_VER; + } =20 ArmCallSvc (&SpmVersionArgs); =20 SpmVersion =3D SpmVersionArgs.Arg0; =20 - SpmMajorVersion =3D ((SpmVersion & SPM_MAJOR_VER_MASK) >> SPM_MAJOR_VER_= SHIFT); - SpmMinorVersion =3D ((SpmVersion & SPM_MINOR_VER_MASK) >> 0); + CurSpmMajorVer =3D ((SpmVersion & SPM_MAJOR_VER_MASK) >> SPM_MAJOR_VER_S= HIFT); + CurSpmMinorVer =3D ((SpmVersion & SPM_MINOR_VER_MASK) >> 0); =20 // Different major revision values indicate possibly incompatible functi= ons. // For two revisions, A and B, for which the major revision values are @@ -186,17 +199,17 @@ GetSpmVersion (VOID) // revision A must work in a compatible way with revision B. // However, it is possible for revision B to have a higher // function count than revision A. - if ((SpmMajorVersion =3D=3D SPM_MAJOR_VER) && - (SpmMinorVersion >=3D SPM_MINOR_VER)) + if ((CurSpmMajorVer =3D=3D SpmMajorVer) && + (CurSpmMinorVer >=3D SpmMinorVer)) { DEBUG ((DEBUG_INFO, "SPM Version: Major=3D0x%x, Minor=3D0x%x\n", - SpmMajorVersion, SpmMinorVersion)); + CurSpmMajorVer, CurSpmMinorVer)); Status =3D EFI_SUCCESS; } else { DEBUG ((DEBUG_INFO, "Incompatible SPM Versions.\n Current Version: Maj= or=3D0x%x, Minor=3D0x%x.\n Expected: Major=3D0x%x, Minor>=3D0x%x.\n", - SpmMajorVersion, SpmMinorVersion, SPM_MAJOR_VER, SPM_MINOR_VER= )); + CurSpmMajorVer, CurSpmMinorVer, SpmMajorVer, SpmMinorVer)); Status =3D EFI_UNSUPPORTED; } =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66476): https://edk2.groups.io/g/devel/message/66476 Mute This Topic: https://groups.io/mt/77703654/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66477+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66477+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282754; cv=none; d=zohomail.com; s=zohoarc; b=aiyJwj1zfR3fJVf0FmHbZ+7TGz+hwK5sgNEY58ueLZJ2Xhpwo19Bp/kx/8eNO2E/Zr1OQYKY/z9Vj5nqRb1oppmXe7DQ/X/nBq18Nkw6Ot0t7HQFiF1OmxIaZDegJbF/PYEkWWwriVfuk3INPaXVv/7qxr9gSQpf9kk16/SXyRo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282754; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=HYlPO/ubvLRepFnbpwBM0GtFjqsm9WS9PzjqR72BIOU=; b=eQYBJR2cGbZ+tj1dP6ksaoQb+F1g+T+iOFWFQDQo5KpVl7C//S6NX68BkOmTFgnD8pUblndYV+9fWMs7Qy+LJW2wtDULfbx6+SE3m2q2vk1iIV7zRXBt1b21qsZs84jnwJMta9fIkDstkz1yoAILSCTauBwjhk2lJVY1bxgm6SU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66477+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282754497890.7173821074042; Wed, 21 Oct 2020 05:19:14 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id i6gnYY1788612xvmdUGhemZd; Wed, 21 Oct 2020 05:19:14 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10407.1603280009826641938 for ; Wed, 21 Oct 2020 04:33:30 -0700 X-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 81CFAD6E; Wed, 21 Oct 2020 04:33:29 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C7DA33F66E; Wed, 21 Oct 2020 04:33:27 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Achin Gupta Subject: [edk2-devel] [PATCH v1 07/12] StandaloneMmPkg: Add option to use FF-A calls for communication with SPM Date: Wed, 21 Oct 2020 17:02:28 +0530 Message-Id: <20201021113233.25548-8-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: 8Eebr6kTXWsmB0CsOZwM7DOux1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282754; bh=iCWWPtiymom1muaoiZ7wkfah5IK4Lq6rrdhubnRfWPo=; h=Cc:Date:From:Reply-To:Subject:To; b=dLbiHG3f7PywF8IvGf86WT1TQUdqrDjc7AXzVyS/wk4MBHwdjFaOJWl2FJOPfS4sIbD cmzqfOXVgSHjKoSGtU2HwVlFqo8bZrmm378I0eAnrjnFSKI2KveEVsZVf7BFc7B2xkHLE XXE7bQJCtgt64Od1qpTwo/va90zzZzVLbfc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Achin Gupta Add support for reporting completion of a MM request using either the Firmware Framework(FF-A) ABI transport or through the earlier used SVC calls. Signed-off-by: Achin Gupta Co-developed-by: Sughosh Ganu --- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCor= eEntryPoint.c | 68 ++++++++++++++++---- 1 file changed, 54 insertions(+), 14 deletions(-) diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Sta= ndaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPo= int/AArch64/StandaloneMmCoreEntryPoint.c index 7d1e3c4d7c..06a8f487f9 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c @@ -112,6 +112,7 @@ DelegatedEventLoop ( IN ARM_SVC_ARGS *EventCompleteSvcArgs ) { + BOOLEAN FfaEnabled; EFI_STATUS Status; UINTN SvcStatus; =20 @@ -123,16 +124,32 @@ DelegatedEventLoop ( DEBUG ((DEBUG_INFO, "X1 : 0x%x\n", (UINT32) EventCompleteSvcArgs->Arg= 1)); DEBUG ((DEBUG_INFO, "X2 : 0x%x\n", (UINT32) EventCompleteSvcArgs->Arg= 2)); DEBUG ((DEBUG_INFO, "X3 : 0x%x\n", (UINT32) EventCompleteSvcArgs->Arg= 3)); - - Status =3D CpuDriverEntryPoint ( - EventCompleteSvcArgs->Arg0, - EventCompleteSvcArgs->Arg3, - EventCompleteSvcArgs->Arg1 - ); - - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "Failed delegated event 0x%x, Status 0x%x\n", - EventCompleteSvcArgs->Arg0, Status)); + DEBUG ((DEBUG_INFO, "X4 : 0x%x\n", (UINT32) EventCompleteSvcArgs->Arg= 4)); + DEBUG ((DEBUG_INFO, "X5 : 0x%x\n", (UINT32) EventCompleteSvcArgs->Arg= 5)); + DEBUG ((DEBUG_INFO, "X6 : 0x%x\n", (UINT32) EventCompleteSvcArgs->Arg= 6)); + DEBUG ((DEBUG_INFO, "X7 : 0x%x\n", (UINT32) EventCompleteSvcArgs->Arg= 7)); + + FfaEnabled =3D FeaturePcdGet (PcdFfaEnable); + if (FfaEnabled) { + Status =3D CpuDriverEntryPoint ( + EventCompleteSvcArgs->Arg0, + EventCompleteSvcArgs->Arg6, + EventCompleteSvcArgs->Arg3 + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed delegated event 0x%x, Status 0x%x\n", + EventCompleteSvcArgs->Arg3, Status)); + } + } else { + Status =3D CpuDriverEntryPoint ( + EventCompleteSvcArgs->Arg0, + EventCompleteSvcArgs->Arg3, + EventCompleteSvcArgs->Arg1 + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed delegated event 0x%x, Status 0x%x\n", + EventCompleteSvcArgs->Arg0, Status)); + } } =20 switch (Status) { @@ -156,8 +173,16 @@ DelegatedEventLoop ( break; } =20 - EventCompleteSvcArgs->Arg0 =3D ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; - EventCompleteSvcArgs->Arg1 =3D SvcStatus; + if (FfaEnabled) { + EventCompleteSvcArgs->Arg0 =3D ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_A= ARCH64; + EventCompleteSvcArgs->Arg1 =3D 0; + EventCompleteSvcArgs->Arg2 =3D 0; + EventCompleteSvcArgs->Arg3 =3D ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; + EventCompleteSvcArgs->Arg4 =3D SvcStatus; + } else { + EventCompleteSvcArgs->Arg0 =3D ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; + EventCompleteSvcArgs->Arg1 =3D SvcStatus; + } } } =20 @@ -216,6 +241,22 @@ GetSpmVersion (VOID) return Status; } =20 +STATIC +VOID +InitArmSvcArgs (ARM_SVC_ARGS *InitMmFoundationSvcArgs, EFI_STATUS *Status) +{ + if (FeaturePcdGet (PcdFfaEnable)) { + InitMmFoundationSvcArgs->Arg0 =3D ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_= AARCH64; + InitMmFoundationSvcArgs->Arg1 =3D 0; + InitMmFoundationSvcArgs->Arg2 =3D 0; + InitMmFoundationSvcArgs->Arg3 =3D ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; + InitMmFoundationSvcArgs->Arg4 =3D *Status; + } else { + InitMmFoundationSvcArgs->Arg0 =3D ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; + InitMmFoundationSvcArgs->Arg1 =3D *Status; + } +} + /** The entry point of Standalone MM Foundation. =20 @@ -329,7 +370,6 @@ _ModuleEntryPoint ( =20 finish: ZeroMem (&InitMmFoundationSvcArgs, sizeof(InitMmFoundationSvcArgs)); - InitMmFoundationSvcArgs.Arg0 =3D ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64; - InitMmFoundationSvcArgs.Arg1 =3D Status; + InitArmSvcArgs(&InitMmFoundationSvcArgs, &Status); DelegatedEventLoop (&InitMmFoundationSvcArgs); } --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66477): https://edk2.groups.io/g/devel/message/66477 Mute This Topic: https://groups.io/mt/77703655/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66478+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66478+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282759; cv=none; d=zohomail.com; s=zohoarc; b=ME2Br86SZmCD7R3FwhSEGCfl+S8Y76Y9+ZdltgtKzguW+T1PkrM2DCCxQWdqkX5uLKJeIqJvCIF3JY9vEe6dCe0c5aAd4Vr7tfnpzokGHVT2rC4PRf9nhlY3D8XoMYa3YBpVGbHJ+btxWQELIzUSYjgW+asnXMJ3k44ml+s34wI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282759; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=RylW+V8aY9/EaEaZrouAEmWFlvnk9yjhtQSD7cUxiWk=; b=QCAZSjq9PBYJBUcL7x2FU33bkP61fSgmJvfRoh8aY7CXoqMGGqYWVZi9FyS9evBnC3DV69fzctfDYq/zMg/dbiECfY5eDCoXbwhh7YTT12qzc59RuJblOSoHpQu9b1K3/HwROS9MV/YmP0+oRkPTnUkxCMbkOyBUwz1h4Ev/dmQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66478+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282759578815.1985964591006; Wed, 21 Oct 2020 05:19:19 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Kap8YY1788612xEqiwGrTfTM; Wed, 21 Oct 2020 05:19:19 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.10440.1603280011977217604 for ; Wed, 21 Oct 2020 04:33:32 -0700 X-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 B18791FB; Wed, 21 Oct 2020 04:33:31 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 024F13F66E; Wed, 21 Oct 2020 04:33:29 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Achin Gupta Subject: [edk2-devel] [PATCH v1 08/12] StandaloneMmPkg: Use FF-A header file in Standalone MM Arm MMU library Date: Wed, 21 Oct 2020 17:02:29 +0530 Message-Id: <20201021113233.25548-9-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: UKrWW0KWnBsRb5BpE2b8brybx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282759; bh=DYq4DjBtFIf+XGciCNvsJMoqFniTnbHnNAxZc6z94+o=; h=Cc:Date:From:Reply-To:Subject:To; b=uuLAaQd6skiybB/9X2y7IrnUq5cPn4bcWTd3wreHv5kQ/aNw/fQrR6Cx56aGpjY4lj9 vj1kN91Gldsiv6h/0WQ3L4HzfACwCwvBS3mB9NqWAouc2dsWHFlkh0c0mb7PJ6Pj/QdEg 3JVz/Mt6T/tnXWQUCNm24fyX1iW36Z8NOPE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Achin Gupta Signed-off-by: Achin Gupta --- ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLi= b.c b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c index 3806490f70..362b1a0f8a 100644 --- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c +++ b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c @@ -9,6 +9,7 @@ =20 #include #include +#include =20 #include #include --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66478): https://edk2.groups.io/g/devel/message/66478 Mute This Topic: https://groups.io/mt/77703656/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66479+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66479+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282755; cv=none; d=zohomail.com; s=zohoarc; b=dPzQUDeL7S02mJy7vTGOAfSW9JbaZm5Ib8+YP4Qfk0VRU75xWEjA8rwBewGnVTwr7k7+MtC6ic4nO9eAwZ4ecsicsr2xI9BJAyzxsnF+qj6BShjNlZzW8wZlSVEogsotz5vdTpBUEgv2YURztmsMFLB9oBC/LBsF/VRUTIQzUno= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282755; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=kGO/C07sOgJJAumHDr17SNvOTBuOX6wJyHczQ4sIELo=; b=Y57RkodI1vNonQ6uUUvnbO4ZUHzLN19WRmXDSElBY+2Xb7mVvElGMNNhjgF2RrXshSXmbGg0hSLGEZHIOsXC3++3U/C1gom6LwWq78a8b0IVkOWtxfO86EvpguxKBj9gIfT5jGYnctBY7El9zEbNIc19fqdV1stU9vysKBPkHz0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66479+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282755511252.00683464072006; Wed, 21 Oct 2020 05:19:15 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 24xWYY1788612xytW4fZG9YJ; Wed, 21 Oct 2020 05:19:14 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.10371.1603280014213714444 for ; Wed, 21 Oct 2020 04:33:34 -0700 X-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 E06C71FB; Wed, 21 Oct 2020 04:33:33 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 321303F66E; Wed, 21 Oct 2020 04:33:31 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Achin Gupta Subject: [edk2-devel] [PATCH v1 09/12] ArmPkg/StandaloneMmMmuLib: Add option to use FF-A calls to get memory region's permissions Date: Wed, 21 Oct 2020 17:02:30 +0530 Message-Id: <20201021113233.25548-10-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: EMFR1uEx8sRpJkfwdEszWojLx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282754; bh=JN44K/bUhtgN1b6fDBKA/+xtJbnOl57kMQXl5loHepY=; h=Cc:Date:From:Reply-To:Subject:To; b=vSAhHbXQECMxW+WgcpZvPh9XRVUnPIBzdBWCOM5+idy8g2t1nZDhzvJGp81nQFWnJi7 cfTJF0/LsoC31M0gaD5h8gIpLmRWCjI9xjbhaCrwBJsKFzlVWUahnoqjqNsAca07Nnf4+ F6NMvbZAWiOE2M9Wzn1RGzyF9ozOis+SDKQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Achin Gupta Allow getting memory region's permissions using either of the Firmware Framework(FF-A) ABI transport or through the earlier used SVC calls. Signed-off-by: Achin Gupta Co-developed-by: Sughosh Ganu --- ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf | 3 +++ ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c | 28 +++= ++++++++++++----- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf b/= ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf index 85973687f5..a29dd800b5 100644 --- a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf +++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf @@ -23,6 +23,9 @@ ArmPkg/ArmPkg.dec MdePkg/MdePkg.dec =20 +[Pcd] + gArmTokenSpaceGuid.PcdFfaEnable + [LibraryClasses] ArmLib CacheMaintenanceLib diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLi= b.c b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c index 362b1a0f8a..ab13602556 100644 --- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c +++ b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c @@ -16,6 +16,7 @@ #include #include #include +#include =20 STATIC EFI_STATUS @@ -25,19 +26,32 @@ GetMemoryPermissions ( ) { ARM_SVC_ARGS GetMemoryPermissionsSvcArgs =3D {0}; - - GetMemoryPermissionsSvcArgs.Arg0 =3D ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AA= RCH64; - GetMemoryPermissionsSvcArgs.Arg1 =3D BaseAddress; - GetMemoryPermissionsSvcArgs.Arg2 =3D 0; - GetMemoryPermissionsSvcArgs.Arg3 =3D 0; + BOOLEAN FfaEnabled; + + FfaEnabled =3D FeaturePcdGet (PcdFfaEnable); + if (FfaEnabled) { + GetMemoryPermissionsSvcArgs.Arg0 =3D ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RE= Q_AARCH64; + GetMemoryPermissionsSvcArgs.Arg1 =3D 0x3; + GetMemoryPermissionsSvcArgs.Arg2 =3D 0; + GetMemoryPermissionsSvcArgs.Arg3 =3D ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_= AARCH64; + GetMemoryPermissionsSvcArgs.Arg4 =3D BaseAddress; + } else { + GetMemoryPermissionsSvcArgs.Arg0 =3D ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_= AARCH64; + GetMemoryPermissionsSvcArgs.Arg1 =3D BaseAddress; + GetMemoryPermissionsSvcArgs.Arg2 =3D 0; + GetMemoryPermissionsSvcArgs.Arg3 =3D 0; + } =20 ArmCallSvc (&GetMemoryPermissionsSvcArgs); - if (GetMemoryPermissionsSvcArgs.Arg0 =3D=3D ARM_SVC_SPM_RET_INVALID_PARA= MS) { + if (GetMemoryPermissionsSvcArgs.Arg0 =3D=3D ARM_SVC_SPM_RET_INVALID_PARA= MS || + GetMemoryPermissionsSvcArgs.Arg3 =3D=3D ARM_SVC_SPM_RET_INVALID_PARA= MS) { *MemoryAttributes =3D 0; return EFI_INVALID_PARAMETER; } =20 - *MemoryAttributes =3D GetMemoryPermissionsSvcArgs.Arg0; + *MemoryAttributes =3D FfaEnabled ? + GetMemoryPermissionsSvcArgs.Arg3 : GetMemoryPermissionsSvcArgs.Arg0; + return EFI_SUCCESS; } =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66479): https://edk2.groups.io/g/devel/message/66479 Mute This Topic: https://groups.io/mt/77703657/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66480+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66480+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282756; cv=none; d=zohomail.com; s=zohoarc; b=JXubh2texWt7tS/JXBPYC96ajsx5IQGjDRb2SFjS4FOMgWHX5rawVsTMJSUQ8w+jRukciu+d6H2eIdsUF114pU7ivGKEgk8pUl3+qeQlWlUXFALw40VO4vm/Vi6qiseO8eQJtz3zcCFOA4QJspWLPtjFkDyXWTVpLWez9v3QEbA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282756; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=TL3f6o/SDysMJQzgUP4j9WmpiYVloOMoPG6fpMEU4Ug=; b=KsapGWQ8HocIk8zWpRg0h8iTZOdZ0vn/kBsb4XtNVIEMFe3ySFlN3ERtvLTa4eVLiA8vDN5YjPGtdLYkDv8IP6RSRJm4RoXDp46gio2OaHLGBqx0YNyybSE6GpTofdiygpp9sssF9tdK2uL6CquEw4pUJcKXFJ5i7Dlxpd2n99c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66480+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282756871766.7193102515998; Wed, 21 Oct 2020 05:19:16 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id beqIYY1788612xfL6UBUNWb7; Wed, 21 Oct 2020 05:19:16 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.10441.1603280016367006280 for ; Wed, 21 Oct 2020 04:33:36 -0700 X-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 1C9891FB; Wed, 21 Oct 2020 04:33:36 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 60CF43F66E; Wed, 21 Oct 2020 04:33:34 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Achin Gupta Subject: [edk2-devel] [PATCH v1 10/12] ArmPkg/StandaloneMmMmuLib: Add option to use FF-A calls to set memory region's permissions Date: Wed, 21 Oct 2020 17:02:31 +0530 Message-Id: <20201021113233.25548-11-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: 8bs5Zinwan8slBE9RnlMRQSox1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282756; bh=Wnas6/8q+OEpLzn/B21eHq3NzxCbxnXb6wGzHz3uCWU=; h=Cc:Date:From:Reply-To:Subject:To; b=mNnzjXSrqr8RjIOi85yCQKXBTyK0Z8Y+gC7iCgTZYrl/wwKCShCn3z7McBtxrsPU9s3 XPZNyhFiTGRq2/FNN2B3lL9tw9+lpW7OOAYW1VkTAz7QTmG/PVZUltgeHcxZLZmVJf62L QvO6Ke0ay+1TvxYuysYAUVBua12UZEJ8FUU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Achin Gupta Allow setting memory region's permissions using either of the Firmware Framework(FF-A) ABI transport or through the earlier used SVC calls. Signed-off-by: Achin Gupta Co-developed-by: Sughosh Ganu --- ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c | 24 +++= +++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLi= b.c b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c index ab13602556..fef5eb4d22 100644 --- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c +++ b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c @@ -63,17 +63,31 @@ RequestMemoryPermissionChange ( IN UINTN Permissions ) { + BOOLEAN FfaEnabled; EFI_STATUS Status; ARM_SVC_ARGS ChangeMemoryPermissionsSvcArgs =3D {0}; =20 - ChangeMemoryPermissionsSvcArgs.Arg0 =3D ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES= _AARCH64; - ChangeMemoryPermissionsSvcArgs.Arg1 =3D BaseAddress; - ChangeMemoryPermissionsSvcArgs.Arg2 =3D EFI_SIZE_TO_PAGES(Length); - ChangeMemoryPermissionsSvcArgs.Arg3 =3D Permissions; + FfaEnabled =3D FeaturePcdGet (PcdFfaEnable); + + if (FfaEnabled) { + ChangeMemoryPermissionsSvcArgs.Arg0 =3D ARM_SVC_ID_FFA_MSG_SEND_DIRECT= _REQ_AARCH64; + ChangeMemoryPermissionsSvcArgs.Arg1 =3D 0x3; + ChangeMemoryPermissionsSvcArgs.Arg2 =3D 0; + ChangeMemoryPermissionsSvcArgs.Arg3 =3D ARM_SVC_ID_SP_SET_MEM_ATTRIBUT= ES_AARCH64; + ChangeMemoryPermissionsSvcArgs.Arg4 =3D BaseAddress; + ChangeMemoryPermissionsSvcArgs.Arg5 =3D EFI_SIZE_TO_PAGES(Length); + ChangeMemoryPermissionsSvcArgs.Arg6 =3D Permissions; + } else { + ChangeMemoryPermissionsSvcArgs.Arg0 =3D ARM_SVC_ID_SP_SET_MEM_ATTRIBUT= ES_AARCH64; + ChangeMemoryPermissionsSvcArgs.Arg1 =3D BaseAddress; + ChangeMemoryPermissionsSvcArgs.Arg2 =3D EFI_SIZE_TO_PAGES(Length); + ChangeMemoryPermissionsSvcArgs.Arg3 =3D Permissions; + } =20 ArmCallSvc (&ChangeMemoryPermissionsSvcArgs); =20 - Status =3D ChangeMemoryPermissionsSvcArgs.Arg0; + Status =3D FfaEnabled ? + ChangeMemoryPermissionsSvcArgs.Arg3 : ChangeMemoryPermissionsSvcArgs.A= rg0; =20 switch (Status) { case ARM_SVC_SPM_RET_SUCCESS: --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66480): https://edk2.groups.io/g/devel/message/66480 Mute This Topic: https://groups.io/mt/77703658/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66481+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66481+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282760; cv=none; d=zohomail.com; s=zohoarc; b=BLXUfuRMwjIQLkkGVeflMbFYzjUOfsygLoHzRQDwjWXJAYYIGBOx2tqqUHCGte8nGbOCpzNhKNUZlYfdHn8b3MEm5URenUt3kqZLk56QQsaaDbv2t+E2eJOcchN+Ct6dNdvx2fCgrhH2sq29Ypoz+OchNMJeggzYiHhg1SkGbtc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282760; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=xUoYhXwCiVwiDYz+Qv0dGYJVhGKfReRpfRmFo85rEzo=; b=US7Iy4yATRzJ39pOu1BNPFuw70cQLqElq6vSv7Ba34pG9L2LABHZVZhNc/PgyfPOjoFrwNleg5EF4q7ZVsCDyOB6Mw9SqdnVjqYa1wTNLNz2JaFTlVsRe97qk6oizvmjn8MgkPI3kpFOertq5Rxot9vv5tgKAc34kZb5JHD8v8Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66481+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603282760163938.2226497497928; Wed, 21 Oct 2020 05:19:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id KNcHYY1788612xErkrOxuJ6g; Wed, 21 Oct 2020 05:19:19 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.10397.1603280018623611011 for ; Wed, 21 Oct 2020 04:33:38 -0700 X-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 4B0951FB; Wed, 21 Oct 2020 04:33:38 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 908F43F66E; Wed, 21 Oct 2020 04:33:36 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Ilias Apalodimas Subject: [edk2-devel] [PATCH v1 11/12] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd Date: Wed, 21 Oct 2020 17:02:32 +0530 Message-Id: <20201021113233.25548-12-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: Zd9AH4kcOTfA6MBwc6akXG7Ox1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282759; bh=59X1GROf8kxrK60Vj2k2IsaAxeEkCsei3A6MbjL1ou4=; h=Cc:Date:From:Reply-To:Subject:To; b=VZ1WgXhXOg9e80SYRviGUgWRPtjyrqNcOHsx/LmvysQlows5lVmm2KdeluIpD7xRsnn FV5/vnh0alOSPzu84MTFjd+rNkOC/n3WtBS6os6e/XUGOTabuwWFp+5ufmw1BglXZiJoS /Qw8HPSiEuvXnQmCjKP8sRtCQRM9e2VCj4k= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Ilias Apalodimas Instead of running StMM as a SP, OP-TEE creates a new secure partition, which emulates SPM and isolates StMM from the rest of the Trusted Applications (TAs). We can then compile StMM as an FD image and run it in OP-TEE. With the addition of a new RPMB driver, we can leverage OP-TEE and store variables to an RPMB device. Since EDK2 upper layers expect byte addressable code, for the RPMB to work, we need to allocate memory and sync it with the hardware on read/writes. Since DynamicPCDs are not supported in that context we can only use PatchablePCDs. So let's switch them to Pcd instead of FixedPcd and accomodate the new driver. Signed-off-by: Ilias Apalodimas Reviewed-by: Sami Mujawar --- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf | 6 ++= ++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneM= m.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf index 6e17f6cdf5..dfed7fe069 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf @@ -115,10 +115,12 @@ ## SOMETIMES_PRODUCES ## Variable:L"VarErrorFlag" gEdkiiVarErrorFlagGuid =20 -[FixedPcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CO= NSUMES +[Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## SO= METIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## CO= NSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CO= NSUMES + +[FixedPcd] gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize ## CO= NSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize ## CO= NSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize ## CO= NSUMES --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66481): https://edk2.groups.io/g/devel/message/66481 Mute This Topic: https://groups.io/mt/77703659/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 16:36:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66482+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66482+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603282756; cv=none; d=zohomail.com; s=zohoarc; b=cMlT4VWK7ffil8ZGAKvJDPfIx+bEjA8PoRzXCD/cwX8ikcw/tCe55nRUwypVPzPnt9aYnzN3klbBA5wTnoUZQomxpxgdtZs79O3Ygkbb2+4hOUG/TinCe8jvLstWhcZlrD3DUQES9/q8Ov1wgkDb2XiSWmT2i6g3Y4QxeURptys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603282756; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=BQQ2BgnEevH9E/49oEsUT5WLBEI53voQ04eAz5g3bDA=; b=RsgT+XEFi2efwNrRYf4GY892nBuQKuwLwJRhixJmAgP4W6bmscntezja2nKy6TtDGlqZY3hJzoeXRXQpSIdcmeSY99KgCSDZk09EOXxUbr0Kb2TwJ95L6mbWscmmIdC292tkK89IZi0lkdscxMJg88mcHUnLIstZTTtgUsjRGPk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66482+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16032827561121003.284785215244; Wed, 21 Oct 2020 05:19:16 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id yNtdYY1788612xenATTXHKt3; Wed, 21 Oct 2020 05:19:15 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.10399.1603280021036509800 for ; Wed, 21 Oct 2020 04:33:41 -0700 X-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 B57451FB; Wed, 21 Oct 2020 04:33:40 -0700 (PDT) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C02173F66E; Wed, 21 Oct 2020 04:33:38 -0700 (PDT) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Ilias Apalodimas , Sughosh Ganu Subject: [edk2-devel] [PATCH v1 12/12] StandaloneMmPkg: Allow sending FFA Direct Request message to StandaloneMm Date: Wed, 21 Oct 2020 17:02:33 +0530 Message-Id: <20201021113233.25548-13-sughosh.ganu@linaro.org> In-Reply-To: <20201021113233.25548-1-sughosh.ganu@linaro.org> References: <20201021113233.25548-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: EsMecohl1dsUOj2qSACwimqwx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603282755; bh=v0wf+dRk+X8hXimLsEJwKPVFHOfOiojgENICV/OKC3g=; h=Cc:Date:From:Reply-To:Subject:To; b=S+Y+Yj/rUuHnEX3/YmOFWl7xWgxCAzryQtPLiKXWmKigXWs84eMRpni8Sba8di9FBpM OoSR78XuzdBU6qs7dvVHVA9t2uYFGQ1DrVGyEoWoqvJJaovwExIg+V9jDpMDcKC5+v4sT WO0lk3faDGDWseaS9c+ExDBY0WfDsWLstJo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Ilias Apalodimas Allow passing of a request to StandaloneMm Core through the Firmware Framework(FF-A) using FFA_MSG_SEND_DIRECT_REQ method. This method is used as a mechanism for requesting some service from StandaloneMm. Signed-off-by: Ilias Apalodimas Signed-off-by: Sughosh Ganu --- StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c = b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c index 6a25c4c548..199441f7d2 100644 --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c @@ -22,6 +22,7 @@ #include #include =20 +#include #include =20 #include "StandaloneMmCpu.h" @@ -78,7 +79,8 @@ PiMmStandaloneArmTfCpuDriverEntry ( // receipt of a synchronous MM request. Use the Event ID to distinguish // between synchronous and asynchronous events. // - if (ARM_SMC_ID_MM_COMMUNICATE_AARCH64 !=3D EventId) { + if (ARM_SMC_ID_MM_COMMUNICATE_AARCH64 !=3D EventId && + ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64 !=3D EventId) { DEBUG ((DEBUG_INFO, "UnRecognized Event - 0x%x\n", EventId)); return EFI_INVALID_PARAMETER; } --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66482): https://edk2.groups.io/g/devel/message/66482 Mute This Topic: https://groups.io/mt/77703660/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-