From nobody Fri May 3 16:43:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84125+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84125+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1638163804; cv=none; d=zohomail.com; s=zohoarc; b=AmX4u4JCi8/V2M766evNgdvik6dpMoEaxX2AXnyQjLNWecAb3cJuxGIuTJR7patl0XhqB43bSwuvmNC7+S/iE522dxxV+WwBOlBXwTFRES5cdVw+0DnAL0OkKjblgvm49MK2H1fds2+Befkm086xv54ZzWmdjLa8g83aB4ipOCo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638163804; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=o4JcQMNt/QQ+EyAnO1W3whhoVr9RXSLHOlLihSWtQNw=; b=bE901BAZpc+n9kqtjI3Ap6x0UnRJN64jxwgzuORf2sTPanKjn71pm163N5lHUIyoN2WOJ6sc358MPmU1pzQQvcQBsoHG1w87Wp0HurrxlESEnCt6ZjwjkkR6Uo+By8zO6Ern5DOFpnU83bskeKYSZgnr9i68EPhQvJ231n6ohDs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84125+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1638163804432195.01687513198067; Sun, 28 Nov 2021 21:30:04 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id RP1ZYY1788612x8lPY4rXtYj; Sun, 28 Nov 2021 21:30:04 -0800 X-Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web12.57204.1638163802680434165 for ; Sun, 28 Nov 2021 21:30:03 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10182"; a="223126231" X-IronPort-AV: E=Sophos;i="5.87,272,1631602800"; d="scan'208";a="223126231" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2021 21:30:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,272,1631602800"; d="scan'208";a="511535638" X-Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.158]) by orsmga008.jf.intel.com with ESMTP; 28 Nov 2021 21:30:00 -0800 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Guo Dong , Ray Ni , Maurice Ma , Benjamin You Subject: [edk2-devel] [PATCH] UefiPayloadPkg: Increase SystemMemoryUefiRegionSize from 32M to 64M Date: Mon, 29 Nov 2021 13:29:54 +0800 Message-Id: <20211129052954.246-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: lyW8LcKqJm0V77dHkdJ8wVkQx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1638163804; bh=o4JcQMNt/QQ+EyAnO1W3whhoVr9RXSLHOlLihSWtQNw=; h=Cc:Date:From:Reply-To:Subject:To; b=ZpFs9T3xMoMBLrZrKRtYCXhP0GycjKWdn1ievxH+h7I36XQYSWQd8PNJK44dlt6Yt/L F83jT2tFApuBvQKp789hNk/9oUUu5wbA/tkT/Yc3INzgF+hFMsAL82M/2hLFPZcjFzTpj zhbOF7FASTUwQxySPdmfUpm0arvWfZNxAoY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1638163805179100002 Content-Type: text/plain; charset="utf-8" Current, the SystemMemoryUefiRegionSize is 32M, which means in universal payload entry, we can at most use 32M heap. However, this can't meet the memory requirment for 5 level page table. In UefiPayloadPkg\UefiPayloadEntry\X64\VirtualMemory.c, we assume the Physical Address at most has 52 bits. Using 1G table support, with 52 bits Physical Address, to build page table, we need one overall page table, eight five-level page tables, and for each five-level page table, we need 512 four-level page tables. Totally 8209 pages are needed, which is around 32M bytes. Therefore, increase SystemMemoryUefiRegionSize from 32M to 64M to support 5 level page tables. Cc: Guo Dong Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You Signed-off-by: Zhiguang Liu Reviewed-by: Guo Dong --- UefiPayloadPkg/UefiPayloadPkg.dec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayload= Pkg.dec index faa98eb98a..551f0a4915 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dec +++ b/UefiPayloadPkg/UefiPayloadPkg.dec @@ -79,7 +79,7 @@ gUefiPayloadPkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServ= icesData|0xC0|UINT32|0x gUefiPayloadPkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x80|UIN= T32|0x00000016 =20 # Size of the region used by UEFI in permanent memory -gUefiPayloadPkgTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x02000000|UIN= T32|0x00000017 +gUefiPayloadPkgTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000|UIN= T32|0x00000017 =20 gUefiPayloadPkgTokenSpaceGuid.PcdPcdDriverFile|{ 0x57, 0x72, 0xcf, 0x80, 0= xab, 0x87, 0xf9, 0x47, 0xa3, 0xfe, 0xD5, 0x0B, 0x76, 0xd8, 0x95, 0x41 }|VOI= D*|0x00000018 =20 --=20 2.32.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84125): https://edk2.groups.io/g/devel/message/84125 Mute This Topic: https://groups.io/mt/87372359/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-