UefiCpuPkg/CpuMpPei: Place APs in proper loop mode after AP execution

After AP function is executed, we will place AP in proper loop mode. Because AP
maybe waken up by SMI or other reasons. We need to read signature in monitor
buffer to check if APs is waken up by BSP. If it is not waken up by BSP, we will
continue to place them into proper loop mode.

Contributed-under: TianoCore Contribution Agreement 1.0
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Tested-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19345 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Jeff Fan
2015-12-18 03:25:32 +00:00
committed by vanjeff
parent e001e11f90
commit c87e41b445
3 changed files with 113 additions and 53 deletions

View File

@@ -38,6 +38,7 @@
#include <Library/SynchronizationLib.h>
#include <Library/TimerLib.h>
#include <Library/UefiCpuLib.h>
#include <Library/CpuLib.h>
#include "Microcode.h"
@@ -50,6 +51,8 @@ typedef enum {
CpuStateDisabled
} CPU_STATE;
#define WAKEUP_AP_SIGNAL SIGNATURE_32 ('S', 'T', 'A', 'P')
typedef enum {
ApInHltLoop = 1,
ApInMwaitLoop = 2,