Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.f...@cn.fujitsu.com> --- UefiCpuPkg/CpuDxe/CpuMp.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c index 94b72b7..453dc47 100644 --- a/UefiCpuPkg/CpuDxe/CpuMp.c +++ b/UefiCpuPkg/CpuDxe/CpuMp.c @@ -22,6 +22,7 @@ UINTN gPollInterval = 100; // 100 microseconds MP_SYSTEM_DATA mMpSystemData; EFI_HANDLE mMpServiceHandle = NULL; EFI_EVENT mExitBootServicesEvent = (EFI_EVENT)NULL; +IA32_DESCRIPTOR mIdtr; VOID *mCommonStack = 0; VOID *mTopOfApCommonStack = 0; @@ -1353,6 +1354,11 @@ ApEntryPointInC ( VOID* TopOfApStack; UINTN ProcessorNumber; + // + // APs use the same Interrupt Descriptor Table with BSP. + // + AsmWriteIdtr (&mIdtr); + if (!mAPsAlreadyInitFinished) { FillInProcessorInformation (FALSE, mMpSystemData.NumberOfProcessors); TopOfApStack = (UINT8*)mApStackStart + gApStackSize; @@ -1533,6 +1539,8 @@ InitializeMpSupport ( return; } + AsmReadIdtr (&mIdtr); + gApStackSize = (UINTN) PcdGet32 (PcdCpuApStackSize); ASSERT ((gApStackSize & (SIZE_4KB - 1)) == 0); -- 1.9.3 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel