diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-08-24 22:41:40 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2016-08-25 16:12:50 +0800 |
commit | 42c37b3b3322a597b62e14852bcb3030c86ea3c4 (patch) | |
tree | 22c1a407994f9c7c8b452289ed3dc5f6be02f71a | |
parent | b31c1ad11e640eaa18cc32ceb095bc1ae5328ffa (diff) | |
download | edk2-platforms-42c37b3b3322a597b62e14852bcb3030c86ea3c4.tar.xz |
UefiCpuPkg/MpInitLib: Move two functions location
Just move BackupAndPrepareWakeupBuffer() and RestoreWakeupBuffer() from
PeiMpLib.c to MpLib.c.
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/MpLib.c | 39 | ||||
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/MpLib.h | 20 | ||||
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/PeiMpLib.c | 39 |
3 files changed, 59 insertions, 39 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index f0e9e46c52..c3fe72138f 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -2012,3 +2012,42 @@ GetCpuMpDataFromGuidedHob ( }
return CpuMpData;
}
+
+/**
+ Get available system memory below 1MB by specified size.
+
+ @param[in] CpuMpData The pointer to CPU MP Data structure.
+**/
+VOID
+BackupAndPrepareWakeupBuffer(
+ IN CPU_MP_DATA *CpuMpData
+ )
+{
+ CopyMem (
+ (VOID *) CpuMpData->BackupBuffer,
+ (VOID *) CpuMpData->WakeupBuffer,
+ CpuMpData->BackupBufferSize
+ );
+ CopyMem (
+ (VOID *) CpuMpData->WakeupBuffer,
+ (VOID *) CpuMpData->AddressMap.RendezvousFunnelAddress,
+ CpuMpData->AddressMap.RendezvousFunnelSize
+ );
+}
+
+/**
+ Restore wakeup buffer data.
+
+ @param[in] CpuMpData The pointer to CPU MP Data structure.
+**/
+VOID
+RestoreWakeupBuffer(
+ IN CPU_MP_DATA *CpuMpData
+ )
+{
+ CopyMem (
+ (VOID *) CpuMpData->WakeupBuffer,
+ (VOID *) CpuMpData->BackupBuffer,
+ CpuMpData->BackupBufferSize
+ );
+}
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpInitLib/MpLib.h index 165853d2af..ae78c591ff 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.h +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h @@ -550,5 +550,25 @@ CpuMpEndOfPeiCallback ( IN VOID *Ppi
);
+/**
+ Get available system memory below 1MB by specified size.
+
+ @param[in] CpuMpData The pointer to CPU MP Data structure.
+**/
+VOID
+BackupAndPrepareWakeupBuffer(
+ IN CPU_MP_DATA *CpuMpData
+ );
+
+/**
+ Restore wakeup buffer data.
+
+ @param[in] CpuMpData The pointer to CPU MP Data structure.
+**/
+VOID
+RestoreWakeupBuffer(
+ IN CPU_MP_DATA *CpuMpData
+ );
+
#endif
diff --git a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c index 590f963bd3..e242d37b3b 100644 --- a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c @@ -65,45 +65,6 @@ SaveCpuMpData ( }
/**
- Get available system memory below 1MB by specified size.
-
- @param[in] CpuMpData The pointer to CPU MP Data structure.
-**/
-VOID
-BackupAndPrepareWakeupBuffer(
- IN CPU_MP_DATA *CpuMpData
- )
-{
- CopyMem (
- (VOID *) CpuMpData->BackupBuffer,
- (VOID *) CpuMpData->WakeupBuffer,
- CpuMpData->BackupBufferSize
- );
- CopyMem (
- (VOID *) CpuMpData->WakeupBuffer,
- (VOID *) CpuMpData->AddressMap.RendezvousFunnelAddress,
- CpuMpData->AddressMap.RendezvousFunnelSize
- );
-}
-
-/**
- Restore wakeup buffer data.
-
- @param[in] CpuMpData The pointer to CPU MP Data structure.
-**/
-VOID
-RestoreWakeupBuffer(
- IN CPU_MP_DATA *CpuMpData
- )
-{
- CopyMem (
- (VOID *) CpuMpData->WakeupBuffer,
- (VOID *) CpuMpData->BackupBuffer,
- CpuMpData->BackupBufferSize
- );
-}
-
-/**
Notify function on End Of PEI PPI.
On S3 boot, this function will restore wakeup buffer data.
|