summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/ArmLib/Common
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-02 19:55:32 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-02 19:55:32 +0000
commitb1d41be7c9c0dc18cf9b73785eee6a20f13db126 (patch)
tree6cf436c0af3f6196985ef9680972a681337de484 /ArmPkg/Library/ArmLib/Common
parentf463bb00ad63cdfbec22519c9ae878f43760e97d (diff)
downloadedk2-platforms-b1d41be7c9c0dc18cf9b73785eee6a20f13db126.tar.xz
ArmPkg/ArmCpuLib: Replaced complex functions ArmCpuSynchronizeWait & ArmCpuSynchronizeSignal by sev & wfe
Previsouly the synchronization of MpCore was using the SGI (Software Generated Interrupt) to synchronize MpCore during the early boot. This commit replaced this mechanism by the more appropriate SEV/WFE instructions (Send/Wait Event instructions). That also eases the port to a new cpu/platform. Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13249 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Library/ArmLib/Common')
-rw-r--r--ArmPkg/Library/ArmLib/Common/ArmLibSupport.S12
-rw-r--r--ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm10
2 files changed, 21 insertions, 1 deletions
diff --git a/ArmPkg/Library/ArmLib/Common/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/ArmLibSupport.S
index d00a3623c5..da927b9d43 100644
--- a/ArmPkg/Library/ArmLib/Common/ArmLibSupport.S
+++ b/ArmPkg/Library/ArmLib/Common/ArmLibSupport.S
@@ -1,7 +1,7 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2011, ARM Limited. All rights reserved.
+# Copyright (c) 2011-2012, 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
@@ -40,6 +40,8 @@ GCC_ASM_EXPORT(ArmUpdateTranslationTableEntry)
GCC_ASM_EXPORT(ArmWriteNsacr)
GCC_ASM_EXPORT(ArmWriteScr)
GCC_ASM_EXPORT(ArmWriteVMBar)
+GCC_ASM_EXPORT(ArmCallWFE)
+GCC_ASM_EXPORT(ArmCallSEV)
#------------------------------------------------------------------------------
@@ -146,4 +148,12 @@ ASM_PFX(ArmWriteVMBar):
mcr p15, 0, r0, c12, c0, 1
bx lr
+ASM_PFX(ArmCallWFE):
+ wfe
+ bx lr
+
+ASM_PFX(ArmCallSEV):
+ sev
+ bx lr
+
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
diff --git a/ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm b/ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm
index b892603518..186ee33dfa 100644
--- a/ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm
+++ b/ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm
@@ -40,6 +40,8 @@
EXPORT ArmWriteNsacr
EXPORT ArmWriteScr
EXPORT ArmWriteVMBar
+ EXPORT ArmCallWFE
+ EXPORT ArmCallSEV
AREA ArmLibSupport, CODE, READONLY
@@ -146,4 +148,12 @@ ArmWriteVMBar
mcr p15, 0, r0, c12, c0, 1
bx lr
+ArmCallWFE
+ wfe
+ blx lr
+
+ArmCallSEV
+ sev
+ blx lr
+
END