[edk2-devel] [PATCH v1 02/12] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters

Sami Mujawar sami.mujawar at arm.com
Tue Nov 10 12:02:46 UTC 2020


Hi Sughosh,

Please find my response inline marked [SAMI].

General feedback:
- Add reference to the SMCC v1.2 spec and FF-A spec in the file header.
- Do you plan to submit a similar patch for AArch32?
- Can you update the function documentation for ArmCallSvc () in ArmPkg\Include\Library\ArmSvcLib.h, please? 
  Ref: https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/appendix_a_common_examples#functioon-declarations

Regards,

Sami Mujawar

-----Original Message-----
From: Sughosh Ganu <sughosh.ganu at linaro.org> 
Sent: 21 October 2020 12:32 PM
To: devel at edk2.groups.io
Cc: Ard Biesheuvel <Ard.Biesheuvel at arm.com>; Sami Mujawar <Sami.Mujawar at arm.com>; Jiewen Yao <jiewen.yao at intel.com>; Achin Gupta <Achin.Gupta at arm.com>
Subject: [PATCH v1 02/12] ArmPkg/ArmSvcLib: Return x4-x7 in output parameters

From: Achin Gupta <achin.gupta at arm.com>

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 <achin.gupta at arm.com>
---
 ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ArmPkg/Library/ArmSvcLib/AArch64/ArmSvc.S b/ArmPkg/Library/ArmSvcLib/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 x4-x7.

[SAMI] Please update the comment to reflect that 8 values can be returned. 
[/SAMI]

   stp   x0, x1, [x9, #0]
   stp   x2, x3, [x9, #16]
+  stp   x4, x5, [x9, #32]
+  stp   x6, x7, [x9, #48]
 
   mov   x0, x9
 
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#67222): https://edk2.groups.io/g/devel/message/67222
Mute This Topic: https://groups.io/mt/77703649/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list