diff options
Diffstat (limited to 'MdeModulePkg/Core/Pei/PeiMain')
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c index 05e0d0fda4..d36f89c3dd 100644 --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -259,7 +259,11 @@ PeiCore ( // Shadow PEI Core. When permanent memory is avaiable, shadow
// PEI Core and PEIMs to get high performance.
//
- OldCoreData->ShadowedPeiCore = ShadowPeiCore (OldCoreData);
+ OldCoreData->ShadowedPeiCore = (PEICORE_FUNCTION_POINTER) (UINTN) PeiCore;
+ if ((HandoffInformationTable->BootMode == BOOT_ON_S3_RESUME && PcdGetBool (PcdShadowPeimOnS3Boot))
+ || (HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME && PcdGetBool (PcdShadowPeimOnBoot))) {
+ OldCoreData->ShadowedPeiCore = ShadowPeiCore (OldCoreData);
+ }
//
// PEI Core has now been shadowed to memory. Restart PEI Core in memory.
|