From nobody Tue Feb 10 10:55:06 2026 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+68768+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+68768+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1607957199; cv=none; d=zohomail.com; s=zohoarc; b=UgSR20fqrcoB+713qru/ivGX3+ZK7gEVHhbqFt4TXYPpG1bKNebCr4vp1YxqJnO1ODhjlHOH+h402PZoeXr+Zz5y0cvE+/3auMJ3vWnXgP8xJk5DFKoO6d2cI6T9Q0HE+nOlyjTARVa8+ohqJTt55gW83EO/AXfKqc18u7ojTGI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607957199; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=pfBinx5mKcWrrT7phGeZL8GQCQlxVg/ixfVl1od94wQ=; b=dTLCSZCxlcjCeuLkS6zn3QDoEQwzRDCvr3/qOf0oPgKDoIe8+FyLSF2DBAD8Y3rRhVB0IQye3dduF+5gbTM0/C5ZyucHnZYRnALZ2gNdeTr7yAST3Zj++F+pb/kfRSsJ4ZYLBzGxnXDD0ZLc5IfaswVVjMO8IPm1MBj7+aToJX0= 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+68768+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 1607957198809857.3581249209279; Mon, 14 Dec 2020 06:46:38 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id u4N0YY1788612xGjCBQWiwtd; Mon, 14 Dec 2020 06:46:37 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.35673.1607956954116027284 for ; Mon, 14 Dec 2020 06:42:34 -0800 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 8081730E; Mon, 14 Dec 2020 06:42:33 -0800 (PST) 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 84BF43F66E; Mon, 14 Dec 2020 06:42:31 -0800 (PST) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Sami Mujawar , Ard Biesheuvel , Leif Lindholm , Sahil Malhotra , Achin Gupta Subject: [edk2-devel] [PATCH v2 02/13] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters Date: Mon, 14 Dec 2020 20:12:05 +0530 Message-Id: <20201214144216.26328-3-sughosh.ganu@linaro.org> In-Reply-To: <20201214144216.26328-1-sughosh.ganu@linaro.org> References: <20201214144216.26328-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: hgW2Dlq9BC66GA0KfaDsN9xOx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1607957197; bh=wxdZ6+ni/5cdv3f8G8AH74+Ps9aNyjCJTk6XtknvT/U=; h=Cc:Date:From:Reply-To:Subject:To; b=KwlgbGcpKX3ULAjxqvu8gdB9smwVCCA+mALlNpcuoMTww9+vbQ3dV6MPo797U0C06qK MZ3RL2VskdcBlVl3MKpUoqeJtVOu2YmSPhaN4JF9uBeddgLOoSHKW6RGYUagLAQqJ89gN uwYSie35alq3RP8yvzY8W3vEjq4Vt+uxwo8= 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 Reviewed-by: Sami Mujawar --- ArmPkg/Include/Library/ArmSvcLib.h | 10 ++++++++-- ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ArmPkg/Include/Library/ArmSvcLib.h b/ArmPkg/Include/Library/Ar= mSvcLib.h index a94ead1965..a4414270f3 100644 --- a/ArmPkg/Include/Library/ArmSvcLib.h +++ b/ArmPkg/Include/Library/ArmSvcLib.h @@ -27,10 +27,16 @@ typedef struct { /** Trigger an SVC call =20 - SVC calls can take up to 7 arguments and return up to 4 return values. - Therefore, the 4 first fields in the ARM_SVC_ARGS structure are used + SVC calls can take up to 8 arguments and return up to 8 return values. + Therefore, the 8 first fields in the ARM_SVC_ARGS structure are used for both input and output values. =20 + @param[in, out] Args Arguments to be passed as part of the SVC call + The return values of the SVC call are also placed + in the same structure + + @retval None + **/ VOID ArmCallSvc ( diff --git a/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S b/ArmPkg/Library/Arm= SvcLib/AArch64/ArmSvc.S index ee265f94b9..1a7c10cb79 100644 --- a/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S +++ b/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S @@ -33,9 +33,11 @@ ASM_PFX(ArmCallSvc): ldr x9, [sp, #16] =20 // Store the SVC returned values into the ARM_SVC_ARGS structure. - // A SVC call can return up to 4 values - we do not need to store back x= 4-x7. + // A SVC call can return up to 8 values 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 (#68768): https://edk2.groups.io/g/devel/message/68768 Mute This Topic: https://groups.io/mt/78951495/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-