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
This commit is contained in:
@@ -38,7 +38,6 @@
|
||||
BaseLib
|
||||
DebugLib
|
||||
DebugAgentLib
|
||||
ArmCpuLib
|
||||
ArmLib
|
||||
ArmGicLib
|
||||
IoLib
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#/** @file
|
||||
#
|
||||
# Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>
|
||||
# Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -38,7 +39,6 @@
|
||||
BaseLib
|
||||
DebugLib
|
||||
DebugAgentLib
|
||||
ArmCpuLib
|
||||
ArmLib
|
||||
IoLib
|
||||
TimerLib
|
||||
|
@@ -14,7 +14,6 @@
|
||||
|
||||
#include <PiPei.h>
|
||||
|
||||
#include <Library/ArmCpuLib.h>
|
||||
#include <Library/DebugAgentLib.h>
|
||||
#include <Library/PrePiLib.h>
|
||||
#include <Library/PrintLib.h>
|
||||
@@ -204,11 +203,12 @@ CEntryPoint (
|
||||
if (IS_PRIMARY_CORE(MpId)) {
|
||||
mGlobalVariableBase = GlobalVariableBase;
|
||||
if (ArmIsMpCore()) {
|
||||
ArmCpuSynchronizeSignal (ARM_CPU_EVENT_DEFAULT);
|
||||
// Signal the Global Variable Region is defined (event: ARM_CPU_EVENT_DEFAULT)
|
||||
ArmCallSEV ();
|
||||
}
|
||||
} else {
|
||||
// Wait the Primay core has defined the address of the Global Variable region
|
||||
ArmCpuSynchronizeWait (ARM_CPU_EVENT_DEFAULT);
|
||||
// Wait the Primay core has defined the address of the Global Variable region (event: ARM_CPU_EVENT_DEFAULT)
|
||||
ArmCallWFE ();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user