public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: devel@edk2.groups.io
Cc: Liming Gao <gaoliming@byosoft.com.cn>,
	Aaron Li <aaron.li@intel.com>, Liu Yun <yun.y.liu@intel.com>,
	Andrew Fish <afish@apple.com>, Laszlo Ersek <lersek@redhat.com>
Subject: [edk2-devel] [Patch v3 0/2] MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB
Date: Mon, 29 Jan 2024 10:58:06 -0800	[thread overview]
Message-ID: <20240129185808.776-1-michael.d.kinney@intel.com> (raw)

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]
-=-=-=-=-=-=-=-=-=-=-=-



             reply	other threads:[~2024-01-29 18:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 18:58 Michael D Kinney [this message]
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

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=20240129185808.776-1-michael.d.kinney@intel.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