public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "Liu, Zhiguang" <zhiguang.liu@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Guo" <guo.dong@intel.com>,
	"Ma, Maurice" <maurice.ma@intel.com>,
	"You, Benjamin" <benjamin.you@intel.com>
Subject: Re: [Patch V2] UefiPayloadPkg: Increase SystemMemoryUefiRegionSize from 32M to 64M
Date: Wed, 1 Dec 2021 02:16:11 +0000	[thread overview]
Message-ID: <BN0PR11MB5696775D7637CD22DA554C7C8C689@BN0PR11MB5696.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211201015917.1929-1-zhiguang.liu@intel.com>

Reviewed-by: Ray Ni <ray.ni@intel.com>

-----Original Message-----
From: Liu, Zhiguang <zhiguang.liu@intel.com> 
Sent: Wednesday, December 1, 2021 9:59 AM
To: devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: [Patch V2] UefiPayloadPkg: Increase SystemMemoryUefiRegionSize from 32M to 64M

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 <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayloadPkg.dec
index faa98eb98a..551f0a4915 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dec
+++ b/UefiPayloadPkg/UefiPayloadPkg.dec
@@ -79,7 +79,7 @@ gUefiPayloadPkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0xC0|UINT32|0x
 gUefiPayloadPkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x80|UINT32|0x00000016  # Size of the region used by UEFI in permanent memory-gUefiPayloadPkgTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x02000000|UINT32|0x00000017+gUefiPayloadPkgTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000|UINT32|0x00000017  gUefiPayloadPkgTokenSpaceGuid.PcdPcdDriverFile|{ 0x57, 0x72, 0xcf, 0x80, 0xab, 0x87, 0xf9, 0x47, 0xa3, 0xfe, 0xD5, 0x0B, 0x76, 0xd8, 0x95, 0x41 }|VOID*|0x00000018 --
2.32.0.windows.2


      reply	other threads:[~2021-12-01  2:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  1:59 [Patch V2] UefiPayloadPkg: Increase SystemMemoryUefiRegionSize from 32M to 64M Zhiguang Liu
2021-12-01  2:16 ` Ni, Ray [this message]

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=BN0PR11MB5696775D7637CD22DA554C7C8C689@BN0PR11MB5696.namprd11.prod.outlook.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