From nobody Sat Apr 27 07:35:12 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+84179+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+84179+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1638323965; cv=none; d=zohomail.com; s=zohoarc; b=SX/MIR/IZgWFUbt9QmCHGxoHflWI6TxZTScu0G/fyloD6cKnppZfKnK9Xdy9wTzHCoXwwbKYD8yJfS02r5eAfxYuMJwllMNg9MY/pAB0KOkTRxGYL1zlQpgBEb0oJ/6tpeGVzsrvd/Xao3mva+ZG3XZ5O28v1brVQjAziM/VkT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638323965; 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=kk1eX0FU9icXHxYx84OYQUUxt6U5wG0bBaFlKiM7mf4=; b=jFud0wYQFFhnzpNG/kVeKZUGIo/cLxKuesOMSL8obClarSfuVLKUEKA5OJI2BmD6prCczaAWdJFhhhHdOKYAmwvcIW1IE0nElNImhQL6Yb/PuK+cuNp+D+E/tKLYJyN6Gb9dGpMm6EihXqQnD2fCHqN4AOg7QqN56/TcYBvJz1M= 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+84179+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 1638323965632972.1984307057801; Tue, 30 Nov 2021 17:59:25 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3bzMYY1788612xAOCjydtL6A; Tue, 30 Nov 2021 17:59:25 -0800 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web12.86230.1638323963944965580 for ; Tue, 30 Nov 2021 17:59:24 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10184"; a="233864518" X-IronPort-AV: E=Sophos;i="5.87,277,1631602800"; d="scan'208";a="233864518" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2021 17:59:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,277,1631602800"; d="scan'208";a="459842081" X-Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.158]) by orsmga006.jf.intel.com with ESMTP; 30 Nov 2021 17:59:21 -0800 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Guo Dong , Ray Ni , Maurice Ma , Benjamin You Subject: [edk2-devel] [Patch V2] UefiPayloadPkg: Increase SystemMemoryUefiRegionSize from 32M to 64M Date: Wed, 1 Dec 2021 09:59:17 +0800 Message-Id: <20211201015917.1929-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: 6V0bApoYGgoa5GFQtRCHFHz8x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1638323965; bh=kk1eX0FU9icXHxYx84OYQUUxt6U5wG0bBaFlKiM7mf4=; h=Cc:Date:From:Reply-To:Subject:To; b=DvZvZnSTqFimQNvsjj3T4d2rGZxILJsxk5a1vjlOo9UufmgASh68JuuxzScTjDPtICP UmRMGxQ1FH5HRXgXS7r47wnIUX4NetauZEgzyNkj4BhtzQ7/L1w9cYqFUzvtAfrRgwWxb Vw6IY/1dSjUbe5kljUn90iffMzfx0ji0hXY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1638323966608100001 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 page to hold 16 PML5 entries, each PML5 entry points to one page containing 512 PML4 entries. One PML4 entry points to one page containing 512 PML3 entries. Each PML3 entries will point to 1G memory space. Totally 8209 pages are needed, which is around 32M bytes. Therefore, increase SystemMemoryUefiRegionSize from 32M to 64M to support 5 level page tables. V2: Update the above commit message Reviewed-by: Guo Dong Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You Signed-off-by: Zhiguang Liu Reviewed-by: Ray Ni --- 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 (#84179): https://edk2.groups.io/g/devel/message/84179 Mute This Topic: https://groups.io/mt/87418854/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-