]> git.proxmox.com Git - mirror_edk2.git/commit - ArmPkg/Library/ArmSmcLib/Arm/ArmSmc.asm
ArmPkg/ArmSmcLib: Fixed SMC helper functions
authorOlivier Martin <olivier.martin@arm.com>
Mon, 4 Aug 2014 14:18:13 +0000 (14:18 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Aug 2014 14:18:13 +0000 (14:18 +0000)
commitb4e53e389d2a04678fb28bc445cd5b554bb175e0
tree02f998bd9cc6b4be7b903943872c0c5a5cbeda6f
parent9a9dd4e8393177a48e5d8a773ce8aa42566045b9
ArmPkg/ArmSmcLib: Fixed SMC helper functions

The SMC helper functions were buggy as they were assuming that
the values in x1-x7 registers were preserved across an SMC call,
which is not the case.  This patch fixes this issue.

It also simplifies the code by providing only 1 version of the SMC
helper function.  We used to have 4 versions depending on the number
of arguments.  The problem with this approach was that the number of
arguments also dictated the number of return values, which is
completely unrelated.  E.g. you can have an SMC call that takes
1 argument but returns 4 values.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15748 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/Include/Library/ArmSmcLib.h
ArmPkg/Library/ArmSmcLib/AArch64/ArmSmc.S
ArmPkg/Library/ArmSmcLib/Arm/ArmSmc.S
ArmPkg/Library/ArmSmcLib/Arm/ArmSmc.asm
ArmPkg/Library/ArmSmcLibNull/AArch64/ArmSmcNull.S
ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.S
ArmPkg/Library/ArmSmcLibNull/Arm/ArmSmcNull.asm