summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/CpuMpPei/CpuMpPei.h
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2015-07-15 03:37:50 +0000
committervanjeff <vanjeff@Edk2>2015-07-15 03:37:50 +0000
commite66d675de4ce53aab19b85fa1906c0256383dc39 (patch)
tree672cde8077130635cf317c28f8a9f84049a8c676 /UefiCpuPkg/CpuMpPei/CpuMpPei.h
parent8018cb158ccd3b466692533532edcd534d4704ff (diff)
downloadedk2-e66d675de4ce53aab19b85fa1906c0256383dc39.tar.gz
edk2-e66d675de4ce53aab19b85fa1906c0256383dc39.tar.bz2
edk2-e66d675de4ce53aab19b85fa1906c0256383dc39.zip
UefiCpuPkg/CpuMpPei: Prepare for buffer for AP wakeup and CPU MP data
Get AP wakeup buffer and copy AP reset code into it. Allocate APs' stack and CPU MP data buffer. Fill CPU MP data fields accordingly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17995 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/CpuMpPei/CpuMpPei.h')
-rw-r--r--UefiCpuPkg/CpuMpPei/CpuMpPei.h41
1 files changed, 40 insertions, 1 deletions
diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
index 7c96084ca2..1219e4ea5a 100644
--- a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
+++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
@@ -17,11 +17,25 @@
#include <PiPei.h>
+#include <Ppi/SecPlatformInformation.h>
#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
#include <Library/HobLib.h>
+#include <Library/LocalApicLib.h>
+#include <Library/PcdLib.h>
#include <Library/PeimEntryPoint.h>
+#include <Library/PeiServicesLib.h>
#include <Library/UefiCpuLib.h>
+//
+// AP state
+//
+typedef enum {
+ CpuStateIdle,
+ CpuStateBusy,
+ CpuStateDisabled
+} CPU_STATE;
//
// AP reset code information
@@ -33,7 +47,9 @@ typedef struct {
UINTN RendezvousFunnelSize;
} MP_ASSEMBLY_ADDRESS_MAP;
-#pragma pack(1)
+typedef struct _PEI_CPU_MP_DATA PEI_CPU_MP_DATA;
+
+#pragma pack()
typedef union {
struct {
@@ -73,6 +89,29 @@ typedef struct {
#pragma pack()
+typedef struct {
+ UINT32 ApicId;
+ EFI_HEALTH_FLAGS Health;
+ CPU_STATE State;
+ BOOLEAN CpuHealthy;
+} PEI_CPU_DATA;
+
+//
+// PEI CPU MP Data save in memory
+//
+struct _PEI_CPU_MP_DATA {
+ UINT32 CpuCount;
+ UINT32 BspNumber;
+ UINTN Buffer;
+ UINTN CpuApStackSize;
+ MP_ASSEMBLY_ADDRESS_MAP AddressMap;
+ UINTN WakeupBuffer;
+ UINTN BackupBuffer;
+ UINTN BackupBufferSize;
+ PEI_CPU_DATA *CpuData;
+ volatile MP_CPU_EXCHANGE_INFO *MpCpuExchangeInfo;
+};
+
/**
Assembly code to get starting address and size of the rendezvous entry for APs.
Information for fixing a jump instruction in the code is also returned.