audk/UefiCpuPkg
Ruiyu Ni 374168ae65 UefiCpuPkg/CpuExceptionHandlerLib: Avoid calling PEI services from AP
When an exception happens in AP, system hangs at
GetPeiServicesTablePointer(), complaining the PeiServices retrieved
from memory before IDT is NULL.

Due to the following commit:
c563077a38
* UefiCpuPkg/MpInitLib: Avoid calling PEI services from AP
the IDT used by AP no longer preserve PeiServices pointer in the
very beginning.
But the implementation of PeiExceptionHandlerLib still assumes
the PeiServices pointer is there, so the assertion happens.

The patch fixes the exception handler library to not call
PEI services from AP.

The patch duplicates the #0 exception stub header in an allocated
pool but with extra 4-byte/8-byte to store the exception handler
data which was originally stored in HOB.
When AP exception happens, the code gets the exception handler data
from the exception handler for #0.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Fan Jeff <vanjeff_919@hotmail.com>
2018-09-03 14:02:26 +08:00
..
Application/Cpuid UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
CpuDxe UefiCpuPkg/CpuDxe: change level of DEBUG message 2018-08-30 07:43:56 +08:00
CpuFeatures UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
CpuIo2Dxe UefiCpuPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:52 +08:00
CpuIo2Smm UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
CpuIoPei UefiCpuPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:52 +08:00
CpuMpPei UefiCpuPkg/CpuMpPei: Correct BIST PPI logic. 2018-07-24 08:35:33 +08:00
CpuS3DataDxe UefiCpuPkg/CpuS3DataDxe: Remove below 4G limitation. 2018-08-16 08:42:01 +08:00
Include UefiCpuPkg/AcpiCpuData.h: Remove AcpiNVS and Below 4G limitation. 2018-08-16 08:42:00 +08:00
Library UefiCpuPkg/CpuExceptionHandlerLib: Avoid calling PEI services from AP 2018-09-03 14:02:26 +08:00
PiSmmCommunication UefiCpuPkg PiSmmCommunicationSmm: Deprecate SMM Communication ACPI Table 2017-07-27 14:08:09 +08:00
PiSmmCpuDxeSmm UefiCpuPkg/PiSmmCpuDxeSmm: implement non-stop mode for SMM 2018-08-30 07:22:30 +08:00
ResetVector UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
SecCore UefiCpuPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:52 +08:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
UefiCpuPkg.dec UefiCpuPkg: Update package version. 2018-01-22 19:23:56 +08:00
UefiCpuPkg.dsc UefiCpuPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:52 +08:00
UefiCpuPkg.uni UefiCpuPkg/UefiCpuPkg.uni: Add missing string definition for new PCDs 2017-12-26 09:44:14 +08:00
UefiCpuPkgExtra.uni UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00