UefiCpuPkg: Check SMM Delayed/Blocked AP Count
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4173 Due to more core count increasement, it's hard to reflect all APs state via AP bitvector support in the register. Actually, SMM CPU driver doesn't need to check each AP state to know all CPUs in SMI or not, one alternative method is to check the SMM Delayed & Blocked AP Count number: APs in SMI + Blocked Count + Disabled Count >= All supported Aps (code comments explained why can be > All supported Aps) With above change, the returned value of "SmmRegSmmEnable" & "SmmRegSmmDelayed" & "SmmRegSmmBlocked" from SmmCpuFeaturesLib should be the AP count number within the existing CPU package. For register that return the bitvector state, require SmmCpuFeaturesGetSmmRegister() returns count number of all bit per logical processor within the same package. For register that return the AP count, require SmmCpuFeaturesGetSmmRegister() returns the register value directly. v3: - Refine the coding style v2: - Rename "mPackageBspInfo" to "mPackageFirstThreadIndex" - Clarify the expected value of "SmmRegSmmEnable" & "SmmRegSmmDelayed" & "SmmRegSmmBlocked" returned from SmmCpuFeaturesLib. - Thread: https://edk2.groups.io/g/devel/message/96722 v1: - Thread: https://edk2.groups.io/g/devel/message/96671 Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Zeng Star <star.zeng@intel.com> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
@@ -194,11 +194,6 @@ typedef struct {
|
||||
|
||||
#define INVALID_APIC_ID 0xFFFFFFFFFFFFFFFFULL
|
||||
|
||||
typedef UINT32 SMM_CPU_ARRIVAL_EXCEPTIONS;
|
||||
#define ARRIVAL_EXCEPTION_BLOCKED 0x1
|
||||
#define ARRIVAL_EXCEPTION_DELAYED 0x2
|
||||
#define ARRIVAL_EXCEPTION_SMI_DISABLED 0x4
|
||||
|
||||
//
|
||||
// Wrapper used to convert EFI_AP_PROCEDURE2 and EFI_AP_PROCEDURE.
|
||||
//
|
||||
@@ -1462,6 +1457,17 @@ RegisterStartupProcedure (
|
||||
IN OUT VOID *ProcedureArguments OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
Initialize PackageBsp Info. Processor specified by mPackageFirstThreadIndex[PackageIndex]
|
||||
will do the package-scope register programming. Set default CpuIndex to (UINT32)-1, which
|
||||
means not specified yet.
|
||||
|
||||
**/
|
||||
VOID
|
||||
InitPackageFirstThreadIndexInfo (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Allocate buffer for SpinLock and Wrapper function buffer.
|
||||
|
||||
|
Reference in New Issue
Block a user