From nobody Sun May 5 15:07:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517991803005279.9535517155555; Wed, 7 Feb 2018 00:23:23 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 57DF321F0DA79; Wed, 7 Feb 2018 00:17:38 -0800 (PST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E2817223972C4 for ; Wed, 7 Feb 2018 00:17:36 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Feb 2018 00:23:19 -0800 Received: from zwei4-mobl1.ccr.corp.intel.com ([10.239.158.60]) by fmsmga006.fm.intel.com with ESMTP; 07 Feb 2018 00:23:18 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=david.wei@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,471,1511856000"; d="scan'208";a="202170473" From: zwei4 To: edk2-devel@lists.01.org Date: Wed, 7 Feb 2018 16:23:13 +0800 Message-Id: <20180207082313.14016-1-david.wei@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Fix Windows 10 S3 failure. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The FSP-S preferred memory region, which is defined in FSP Integration Guid= e, must be reserved for BIOS S3 resume. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: zwei4 --- .../PlatformPreMemPei/FvCallback.c | 29 +++++++-----------= ---- .../PlatformDsc/PcdsFixedAtBuild.dsc | 2 ++ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPr= eMemPei/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 =3D 0x%X\n", FspHeader->ImageSize)); =20 // - // 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->FvLengt= h); =20 - if (BootMode !=3D BOOT_ON_S3_RESUME) { - PcdSet32S (PcdFspsBaseAddress, (UINT32) FspSImageBase); - } + PcdSet32S (PcdFspsBaseAddress, (UINT32) FspSImageBase); =20 while ((UINT32) FvHeader < PayloadTail) { if (FvHeader->Signature !=3D EFI_FVH_SIGNATURE) { @@ -319,21 +322,7 @@ ParseObbPayload ( } DEBUG ((EFI_D_INFO, "Found Fv with GUID: %g\n", FvName)); =20 - if (BootMode =3D=3D 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) || CompareG= uid (FvName, &gIbbrFirmwareFileSystemFvGuid)) { - FvHeaderS3 =3D FvHeader; - if (CompareGuid (FvName, &gIbbrFirmwareFileSystemFvGuid)) { - PeiServicesInstallFvInfoPpi (NULL, FvHeaderS3, (UINT32) FvHeader= S3->FvLength, NULL, NULL); - } else { - PcdSet32S (PcdFspsBaseAddress, (UINT32) FvHeaderS3); - } - } - } else if (CompareGuid (&FvHeader->FileSystemGuid, &gEfiSystemNvDataFv= Guid)) { + if (CompareGuid (&FvHeader->FileSystemGuid, &gEfiSystemNvDataFvGuid)) { DEBUG ((EFI_D_INFO, "NVStorage FV at 0x%x.\n", (UINT32) FvHeader)); Status =3D 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 + =20 + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x3000 =20 --=20 2.14.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel