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
This commit is contained in:
committed by
oliviermartin
parent
9a9dd4e839
commit
b4e53e389d
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2012-2013, ARM Limited. All rights reserved.
|
||||
// Copyright (c) 2012-2014, ARM Limited. All rights reserved.
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -15,18 +15,6 @@
|
||||
.align 3
|
||||
|
||||
GCC_ASM_EXPORT(ArmCallSmc)
|
||||
GCC_ASM_EXPORT(ArmCallSmcArg1)
|
||||
GCC_ASM_EXPORT(ArmCallSmcArg2)
|
||||
GCC_ASM_EXPORT(ArmCallSmcArg3)
|
||||
|
||||
ASM_PFX(ArmCallSmc):
|
||||
ret
|
||||
|
||||
ASM_PFX(ArmCallSmcArg1):
|
||||
ret
|
||||
|
||||
ASM_PFX(ArmCallSmcArg2):
|
||||
ret
|
||||
|
||||
ASM_PFX(ArmCallSmcArg3):
|
||||
ret
|
||||
|
Reference in New Issue
Block a user