public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [Patch v2 0/2] MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB
@ 2024-01-29  3:45 Michael D Kinney
  2024-01-29  3:45 ` [edk2-devel] [Patch v2 1/2] MdeModulePkg/Core/Dxe: Initialize GCD before RT memory allocations Michael D Kinney
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael D Kinney @ 2024-01-29  3:45 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Aaron Li, Liu Yun, Andrew Fish

New in V2
=========
* Break single patch into 2 patches
  * Moves GCD Initialization before RT data allocations
  * Set MemoryTypeInfo bin range from HOB feature
* Update description of Memory Type Information GUID to 
  describe additional use case as Owner GUID in a Resource
  Descriptor HOB for preferred memory range for Memory Type 
  Information bins.
  
Provide an optional method for PEI to declare a specific address
range to use for the Memory Type Information bins. The current
algorithm uses heuristics that tends to place the Memory Type
Information bins in the same location, but memory configuration
changes across boots or algorithm changes across a firmware
updates could potentially change the Memory Type Information bin
location.

If the HOB List contains a Resource Descriptor HOB that
describes tested system memory and has an Owner GUID of
gEfiMemoryTypeInformationGuid, then use the address range
described by the Resource Descriptor HOB as the preferred
location of the Memory Type Information bins. If this HOB is
not detected, then the current behavior is preserved.

The HOB with an Owner GUID of gEfiMemoryTypeInformationGuid
is ignored for the following conditions:
* The HOB with an Owner GUID of gEfiMemoryTypeInformationGuid
  is smaller than the Memory Type Information bins.
* The HOB list contains more than one Resource Descriptor HOB
  with an owner GUID of gEfiMemoryTypeInformationGuid.
* The Resource Descriptor HOB with an Owner GUID of
  gEfiMemoryTypeInformationGuid is the same Resource Descriptor
  HOB that that describes the PHIT memory range.

Update the DxeMain initialization order to initialize GCD
services before any runtime allocations are performed.  This
is required to prevent runtime data fragmentation when the
UEFI System Table and UEFI Runtime Service Table are allocated
before both the memory and GCD services are initialized.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Aaron Li <aaron.li@intel.com>
Cc: Liu Yun <yun.y.liu@intel.com>
Cc: Andrew Fish <afish@apple.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>

Michael D Kinney (2):
  MdeModulePkg/Core/Dxe: Initialize GCD before RT memory allocations
  MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB

 MdeModulePkg/Core/Dxe/DxeMain.h               |   6 ++
 MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c       |  23 ++--
 MdeModulePkg/Core/Dxe/Gcd/Gcd.c               |  72 ++++++++++++-
 MdeModulePkg/Core/Dxe/Image/Image.c           |   1 -
 MdeModulePkg/Core/Dxe/Mem/Page.c              | 101 ++++++++++++++++++
 .../Include/Guid/MemoryTypeInformation.h      |  14 ++-
 6 files changed, 199 insertions(+), 18 deletions(-)

-- 
2.40.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114669): https://edk2.groups.io/g/devel/message/114669
Mute This Topic: https://groups.io/mt/104025662/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-29 21:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29  3:45 [edk2-devel] [Patch v2 0/2] MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB Michael D Kinney
2024-01-29  3:45 ` [edk2-devel] [Patch v2 1/2] MdeModulePkg/Core/Dxe: Initialize GCD before RT memory allocations Michael D Kinney
2024-01-29 19:53   ` Laszlo Ersek
2024-01-29  3:45 ` [edk2-devel] [Patch v2 2/2] MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB Michael D Kinney
2024-01-29 20:07   ` Laszlo Ersek
2024-01-29 21:36     ` Michael D Kinney
2024-01-29  9:03 ` 回复: [edk2-devel] [Patch v2 0/2] " gaoliming via groups.io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox