From: zwei4 <david.wei@intel.com>
To: edk2-devel@lists.01.org
Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Fix Windows 10 S3 failure.
Date: Wed, 7 Feb 2018 16:23:13 +0800 [thread overview]
Message-ID: <20180207082313.14016-1-david.wei@intel.com> (raw)
The FSP-S preferred memory region, which is defined in FSP Integration Guide, must be reserved for BIOS S3 resume.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: zwei4 <david.wei@intel.com>
---
.../PlatformPreMemPei/FvCallback.c | 29 +++++++---------------
.../PlatformDsc/PcdsFixedAtBuild.dsc | 2 ++
2 files changed, 11 insertions(+), 20 deletions(-)
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c
index 6a2c9fd91..4a3a67574 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/FvCallback.c
@@ -269,7 +269,6 @@ ParseObbPayload (
UINTN VariableSize;
EFI_STATUS Status;
EFI_FIRMWARE_VOLUME_HEADER *FvHeader;
- EFI_FIRMWARE_VOLUME_HEADER *FvHeaderS3;
EFI_PLATFORM_INFO_HOB *PlatformInfo;
EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices;
SYSTEM_CONFIGURATION SystemConfiguration;
@@ -298,13 +297,17 @@ ParseObbPayload (
DEBUG ((EFI_D_INFO, "FSP-S Fsp Size = 0x%X\n", FspHeader->ImageSize));
//
- // Copy to FSP-S to preferred base
+ // Copy to FSP-S to preferred base. The preferred base is defined in FSP Integration Guide.
+ // This region must be reserved for BIOS S3 resume.
//
+ BuildMemoryAllocationHob (
+ (EFI_PHYSICAL_ADDRESS)FspSImageBase,
+ (UINT64)FspHeader->ImageSize,
+ EfiReservedMemoryType
+ );
CopyMemSse4 ((VOID*) FspSImageBase, FvHeader, (UINT32) FvHeader->FvLength);
- if (BootMode != BOOT_ON_S3_RESUME) {
- PcdSet32S (PcdFspsBaseAddress, (UINT32) FspSImageBase);
- }
+ PcdSet32S (PcdFspsBaseAddress, (UINT32) FspSImageBase);
while ((UINT32) FvHeader < PayloadTail) {
if (FvHeader->Signature != EFI_FVH_SIGNATURE) {
@@ -319,21 +322,7 @@ ParseObbPayload (
}
DEBUG ((EFI_D_INFO, "Found Fv with GUID: %g\n", FvName));
- if (BootMode == BOOT_ON_S3_RESUME) {
- //
- // FspW requires both IBBR and FSP-S on S3 resume
- // but only copy FSP-S, do not install it.
- //
- DEBUG ((DEBUG_INFO, "S3 Resume: Only looking for IBBR and FSP-S.\n"));
- if (CompareGuid (FvName, &gFspSFirmwareFileSystemFvGuid) || CompareGuid (FvName, &gIbbrFirmwareFileSystemFvGuid)) {
- FvHeaderS3 = FvHeader;
- if (CompareGuid (FvName, &gIbbrFirmwareFileSystemFvGuid)) {
- PeiServicesInstallFvInfoPpi (NULL, FvHeaderS3, (UINT32) FvHeaderS3->FvLength, NULL, NULL);
- } else {
- PcdSet32S (PcdFspsBaseAddress, (UINT32) FvHeaderS3);
- }
- }
- } else if (CompareGuid (&FvHeader->FileSystemGuid, &gEfiSystemNvDataFvGuid)) {
+ if (CompareGuid (&FvHeader->FileSystemGuid, &gEfiSystemNvDataFvGuid)) {
DEBUG ((EFI_D_INFO, "NVStorage FV at 0x%x.\n", (UINT32) FvHeader));
Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **) &VariableServices);
if (EFI_ERROR (Status)) {
diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc
index b7cefdca0..6c26acaf5 100644
--- a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc
+++ b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc
@@ -83,4 +83,6 @@
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE
!endif
+
+ gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x3000
--
2.14.1.windows.1
reply other threads:[~2018-02-07 8:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180207082313.14016-1-david.wei@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox