mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/CpuDxe: install Mp Service protocol
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16371 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
dee9376ffc
commit
4a50c27285
|
@ -20,6 +20,7 @@ UINTN gApStackSize;
|
||||||
UINTN gPollInterval = 100; // 100 microseconds
|
UINTN gPollInterval = 100; // 100 microseconds
|
||||||
|
|
||||||
MP_SYSTEM_DATA mMpSystemData;
|
MP_SYSTEM_DATA mMpSystemData;
|
||||||
|
EFI_HANDLE mMpServiceHandle = NULL;
|
||||||
|
|
||||||
VOID *mCommonStack = 0;
|
VOID *mCommonStack = 0;
|
||||||
VOID *mTopOfApCommonStack = 0;
|
VOID *mTopOfApCommonStack = 0;
|
||||||
|
@ -1472,6 +1473,8 @@ InitializeMpSupport (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
gMaxLogicalProcessorNumber = (UINTN) PcdGet32 (PcdCpuMaxLogicalProcessorNumber);
|
gMaxLogicalProcessorNumber = (UINTN) PcdGet32 (PcdCpuMaxLogicalProcessorNumber);
|
||||||
if (gMaxLogicalProcessorNumber < 1) {
|
if (gMaxLogicalProcessorNumber < 1) {
|
||||||
DEBUG ((DEBUG_ERROR, "Setting PcdCpuMaxLogicalProcessorNumber should be more than zero.\n"));
|
DEBUG ((DEBUG_ERROR, "Setting PcdCpuMaxLogicalProcessorNumber should be more than zero.\n"));
|
||||||
|
@ -1516,6 +1519,13 @@ InitializeMpSupport (
|
||||||
|
|
||||||
mAPsAlreadyInitFinished = TRUE;
|
mAPsAlreadyInitFinished = TRUE;
|
||||||
|
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&mMpServiceHandle,
|
||||||
|
&gEfiMpServiceProtocolGuid, &mMpServicesTemplate,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
if (mMpSystemData.NumberOfProcessors < gMaxLogicalProcessorNumber) {
|
if (mMpSystemData.NumberOfProcessors < gMaxLogicalProcessorNumber) {
|
||||||
FreePages (mApStackStart, EFI_SIZE_TO_PAGES (
|
FreePages (mApStackStart, EFI_SIZE_TO_PAGES (
|
||||||
(gMaxLogicalProcessorNumber - mMpSystemData.NumberOfProcessors) *
|
(gMaxLogicalProcessorNumber - mMpSystemData.NumberOfProcessors) *
|
||||||
|
|
Loading…
Reference in New Issue