UefiCpuPkg/MpInitLib: Initialize CPU_AP_DATA for CPU APs

Initialize CPU_AP_DATA for CPU APs and add GetApState()/SetApState() helper
functions to get/set AP state.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Michael Kinney <michael.d.kinney@intel.com>
This commit is contained in:
Jeff Fan
2016-07-20 23:43:29 +08:00
parent e59f8f6b36
commit 03a1a92515
2 changed files with 88 additions and 0 deletions

View File

@@ -54,6 +54,17 @@ typedef enum {
ApInitDone = 3
} AP_INIT_STATE;
//
// AP state
//
typedef enum {
CpuStateIdle,
CpuStateReady,
CpuStateBusy,
CpuStateFinished,
CpuStateDisabled
} CPU_STATE;
//
// AP related data
//
@@ -66,6 +77,7 @@ typedef struct {
UINT32 ApicId;
UINT32 Health;
BOOLEAN CpuHealthy;
volatile CPU_STATE State;
BOOLEAN Waiting;
BOOLEAN *Finished;
UINT64 ExpectedTime;