diff --git a/MdePkg/Library/PeiDxeExtractGuidedSectionLib/PeiDxeExtractGuidedSectionLib.c b/MdePkg/Library/PeiDxeExtractGuidedSectionLib/PeiDxeExtractGuidedSectionLib.c index 5de312aa92..33c582b371 100644 --- a/MdePkg/Library/PeiDxeExtractGuidedSectionLib/PeiDxeExtractGuidedSectionLib.c +++ b/MdePkg/Library/PeiDxeExtractGuidedSectionLib/PeiDxeExtractGuidedSectionLib.c @@ -26,6 +26,7 @@ Abstract: #include #include #include +#include STATIC GUID *mExtractHandlerGuidTable; STATIC UINT32 mNumberOfExtractHandler; @@ -109,6 +110,13 @@ ExtractGuidedSectionRegisterHandlers ( IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER DecodeHandler ) { + if (GetBootModeHob () == BOOT_ON_S3_RESUME) { + // + // (Work around fix to bypass registeration on S3 resume.) + // S3 resume does not shadow DxeIpl. + // + return RETURN_SUCCESS; + } // // Check input paramter. // diff --git a/MdePkg/Library/PeiDxeExtractGuidedSectionLib/PeiDxeExtractGuidedSectionLib.inf b/MdePkg/Library/PeiDxeExtractGuidedSectionLib/PeiDxeExtractGuidedSectionLib.inf index 0316107219..7cb040c525 100644 --- a/MdePkg/Library/PeiDxeExtractGuidedSectionLib/PeiDxeExtractGuidedSectionLib.inf +++ b/MdePkg/Library/PeiDxeExtractGuidedSectionLib/PeiDxeExtractGuidedSectionLib.inf @@ -43,6 +43,7 @@ MemoryAllocationLib BaseMemoryLib DebugLib + HobLib [FixedPcd.common] gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler