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

New in V3
==========
* Fix uncrustify formatting in Image.c
* Add DEBUG_ERROR log message in CoreSetMemoryTypeInformationRange() 
  if bin locations are already set.
* Add details to commit message about improvements in S4 resume.
  
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>
Cc: Laszlo Ersek <lersek@redhat.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           |  13 ++-
 MdeModulePkg/Core/Dxe/Mem/Page.c              | 102 ++++++++++++++++++
 .../Include/Guid/MemoryTypeInformation.h      |  14 ++-
 6 files changed, 206 insertions(+), 24 deletions(-)

-- 
2.40.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114732): https://edk2.groups.io/g/devel/message/114732
Mute This Topic: https://groups.io/mt/104038198/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] 4+ messages in thread

end of thread, other threads:[~2024-01-30 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 18:58 [edk2-devel] [Patch v3 0/2] MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB Michael D Kinney
2024-01-29 18:58 ` [edk2-devel] [Patch v3 1/2] MdeModulePkg/Core/Dxe: Initialize GCD before RT memory allocations Michael D Kinney
2024-01-29 18:58 ` [edk2-devel] [Patch v3 2/2] MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB Michael D Kinney
2024-01-30 16:39   ` Laszlo Ersek

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