From patchwork Thu Jul 7 19:10:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 71619 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp56721qgy; Thu, 7 Jul 2016 12:11:09 -0700 (PDT) X-Received: by 10.98.35.27 with SMTP id j27mr3086508pfj.10.1467918669628; Thu, 07 Jul 2016 12:11:09 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id e62si5446250pfe.193.2016.07.07.12.11.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jul 2016 12:11:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9A2381A1F42; Thu, 7 Jul 2016 12:11:50 -0700 (PDT) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 E06C31A1EDF for ; Thu, 7 Jul 2016 12:11:48 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE87164386; Thu, 7 Jul 2016 19:11:06 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-80.phx2.redhat.com [10.3.116.80]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u67JAsob019088; Thu, 7 Jul 2016 15:11:04 -0400 From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 7 Jul 2016 21:10:45 +0200 Message-Id: <1467918647-14721-3-git-send-email-lersek@redhat.com> In-Reply-To: <1467918647-14721-1-git-send-email-lersek@redhat.com> References: <1467918647-14721-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 07 Jul 2016 19:11:07 +0000 (UTC) Subject: [edk2] [PATCH 2/4] OvmfPkg: increase the S3 permanent PEI RAM size by 8.5 MB X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Michael Kinney , Jordan Justen , Jeff Fan MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" When setting PcdCpuMaxLogicalProcessorNumber to 255, then CpuMpPei seems to require a bit more than 8MB of permanent PEI RAM in the PrepareAPStartupVector() function. (With the default PCD value of 64, it needs one quarter of that: approximately 2MB.) On the S3 resume path, we install only 32 KB of permanent PEI RAM however, and even that is almost exhausted already: > CpuMpPei: WakeupBuffer = 0x9F000 > AllocatePages failed: No 0x7FF Pages is available. > There is only left 0x1 pages memory resource to be allocated. > > ASSERT_EFI_ERROR (Status = Out of Resources) > ASSERT UefiCpuPkg/CpuMpPei/CpuMpPei.c(730): !EFI_ERROR (Status) Increase PcdS3AcpiReservedMemorySize by 8.5 MB (0x880000 bytes, 0x880 pages). The areas above the S3 permanent PEI RAM (decompressed PEI FV, decompressed DXE FV) are shifted up by the same amount. The EfiACPIMemoryNVS footprint increases similarly (but only if QEMU is instructed to enable S3). Cc: Jeff Fan Cc: Jordan Justen Cc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/OvmfPkgIa32.fdf | 10 +++++----- OvmfPkg/OvmfPkgIa32X64.fdf | 10 +++++----- OvmfPkg/OvmfPkgX64.fdf | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index 59a4024ff026..a55ddf05594f 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -67,10 +67,10 @@ [FD.OVMF_CODE] [FD.MEMFD] BaseAddress = $(MEMFD_BASE_ADDRESS) -Size = 0xB00000 +Size = 0x1380000 ErasePolarity = 1 BlockSize = 0x10000 -NumBlocks = 0xB0 +NumBlocks = 0x138 0x000000|0x006000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize @@ -84,14 +84,14 @@ [FD.MEMFD] 0x010000|0x008000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize -0x018000|0x008000 +0x018000|0x888000 gUefiOvmfPkgTokenSpaceGuid.PcdS3AcpiReservedMemoryBase|gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize -0x020000|0x0E0000 +0x8A0000|0x0E0000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize FV = PEIFV -0x100000|0xA00000 +0x980000|0xA00000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize FV = DXEFV diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index c6167a4176af..4503a9fdeb0f 100644 --- a/OvmfPkg/OvmfPkgIa32X64.fdf +++ b/OvmfPkg/OvmfPkgIa32X64.fdf @@ -67,10 +67,10 @@ [FD.OVMF_CODE] [FD.MEMFD] BaseAddress = $(MEMFD_BASE_ADDRESS) -Size = 0xB00000 +Size = 0x1380000 ErasePolarity = 1 BlockSize = 0x10000 -NumBlocks = 0xB0 +NumBlocks = 0x138 0x000000|0x006000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize @@ -84,14 +84,14 @@ [FD.MEMFD] 0x010000|0x008000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize -0x018000|0x008000 +0x018000|0x888000 gUefiOvmfPkgTokenSpaceGuid.PcdS3AcpiReservedMemoryBase|gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize -0x020000|0x0E0000 +0x8A0000|0x0E0000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize FV = PEIFV -0x100000|0xA00000 +0x980000|0xA00000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize FV = DXEFV diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index 30b0c2ba3fc8..9a539aa7b3c6 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -67,10 +67,10 @@ [FD.OVMF_CODE] [FD.MEMFD] BaseAddress = $(MEMFD_BASE_ADDRESS) -Size = 0xB00000 +Size = 0x1380000 ErasePolarity = 1 BlockSize = 0x10000 -NumBlocks = 0xB0 +NumBlocks = 0x138 0x000000|0x006000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize @@ -84,14 +84,14 @@ [FD.MEMFD] 0x010000|0x008000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize -0x018000|0x008000 +0x018000|0x888000 gUefiOvmfPkgTokenSpaceGuid.PcdS3AcpiReservedMemoryBase|gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdS3AcpiReservedMemorySize -0x020000|0x0E0000 +0x8A0000|0x0E0000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize FV = PEIFV -0x100000|0xA00000 +0x980000|0xA00000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize FV = DXEFV