<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Core/Pei/Memory, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-06-24T15:53:58+00:00</updated>
<entry>
<title>MdeModulePkg: PeiCore: Add Memory Bin Support to Post-Mem PEI</title>
<updated>2026-06-24T15:53:58+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2026-03-30T17:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2e7aa4810bd3e4008e561f2ea5a9de1dc189c817'/>
<id>urn:sha1:2e7aa4810bd3e4008e561f2ea5a9de1dc189c817</id>
<content type='text'>
This commit adds opt-in support for post-mem PEI memory bins.
See the README for full details.

MemoryBin.c is duplicated to PeiCore per request.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Don't Allocate Page 0</title>
<updated>2025-07-08T03:45:09+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-06-17T22:29:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=91bb5cee36fe52ef012ddbead4f5932b3f9fd862'/>
<id>urn:sha1:91bb5cee36fe52ef012ddbead4f5932b3f9fd862</id>
<content type='text'>
Currently DxeIpl attempts to set page 0 to all 0's and to
create a memory allocation HOB for it. However, DxeIpl will
also unmap the page when mapping page tables and if null
detection is not enabled, DxeCore will set the page to 0,
regardless of allocation status.

Because no consumers are using the memory allocation HOB for
page 0, drop it. Instead, ensure that PeiCore and DxeCore do
not allow allocating page 0; it should always be reserved for
null pointer detection. It also complicates the story for
platforms that are attempting to audit the system and ensure that
no modules are using page 0. With these memory allocation HOBs
in place, it is difficult to tell if it is simply DxeIpl who
has allocated the memory or another module.

This commit drops the memory allocation HOB publishing and ensures
that DxeCore and PeiCore do not allocate page 0. DxeCore already
will not allocate page 0 to callers of AllocatePages who call with
a type other than AllocateAddress, this just changes so that
AllocateAddress cannot allocate at page 0 (which if null detection
is enabled will cause a page fault). PeiCore does not have
AllocateAddress and so this ensures standard allocations do not
receive page 0.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Replace right bit shift operator with RShiftU64</title>
<updated>2024-10-17T13:32:42+00:00</updated>
<author>
<name>Jeremy Compostella</name>
<email>jeremy.compostella@intel.com</email>
</author>
<published>2024-10-09T22:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=866abb233817eb349fa5fe2b32283e990a8e5056'/>
<id>urn:sha1:866abb233817eb349fa5fe2b32283e990a8e5056</id>
<content type='text'>
Instead of using bit shift operations, it is preferable to use BaseLib
bit shift functions to prevent compilers from inserting intrinsics.

Signed-off-by: Jeremy Compostella &lt;jeremy.compostella@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Fix PeiAllocatePages() corner case</title>
<updated>2024-10-17T13:32:42+00:00</updated>
<author>
<name>Jeremy Compostella</name>
<email>jeremy.compostella@intel.com</email>
</author>
<published>2024-10-08T23:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=996e740cc83aa499d91b3ab3ae857dab7578e05c'/>
<id>urn:sha1:996e740cc83aa499d91b3ab3ae857dab7578e05c</id>
<content type='text'>
I recently ran into an AllocatePages() hang. It turns out that
AllocatePages() does not account for the Memory Allocation HOB when it
makes the decision of allocating out of free memory.

Here is the scenario:

  FreeMemoryTop    - 0x71C03000
  FreeMemoryBottom - 0x71BDBFD8
  =&gt; We have 159,784 bytes left =&gt; ~39.0098 pages left.

We attempt to allocate 39 pages. There are enough pages left but
allocating those pages requires to allocate a Memory Allocation HOB
which needs an extra 48 bytes. But once the pages are allocated,
there are only 40 bytes left.

In addition to taking into account the Memory Allocation HOB size,
this commit reverses the condition to keep it simple.

Signed-off-by: Jeremy Compostella &lt;jeremy.compostella@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Remove PeiAllocatePool() Assert</title>
<updated>2024-07-10T02:10:37+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2018-07-12T23:44:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f91211049c1522f7db2ae8f7a509ac270868d0e9'/>
<id>urn:sha1:f91211049c1522f7db2ae8f7a509ac270868d0e9</id>
<content type='text'>
Removes an assert if PeiAllocatePool() fails to allocate memory to
defer error handling to the caller so the error can be handled
gracefully or asserted at that location which is more specific to
the call that led to the allocation.

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: DxeCore: Correct Runtime Granularity Memory Type</title>
<updated>2024-03-14T16:29:22+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@linux.microsoft.com</email>
</author>
<published>2024-03-09T19:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=68461c2c37afe11c7dda2769efc10bf20d2a7b23'/>
<id>urn:sha1:68461c2c37afe11c7dda2769efc10bf20d2a7b23</id>
<content type='text'>
Per the UEFI spec 2.10, section 2.3.6 (for the AARCH64 arch, other
architectures in section two confirm the same) the memory types that
need runtime page allocation granularity are EfiReservedMemoryType,
EfiACPIMemoryNVS, EfiRuntimeServicesCode, and EfiRuntimeServicesData.
However, legacy code was setting runtime page allocation granularity for
EfiACPIReclaimMemory and not EfiReservedMemoryType. This patch fixes
that error.

Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
Cc: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;

Signed-off-by: Oliver Smith-Denny &lt;osde@linux.microsoft.com&gt;
Suggested-by: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Support customized FV Migration Information</title>
<updated>2023-12-25T04:57:18+00:00</updated>
<author>
<name>Cheng Sun</name>
<email>chengx.sun@intel.com</email>
</author>
<published>2023-12-21T02:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1065536c64ab919ad5c207e50b82d4a88ac29ed8'/>
<id>urn:sha1:1065536c64ab919ad5c207e50b82d4a88ac29ed8</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4533

There are use cases which not all FVs need be migrated from TempRam to
permanent memory before TempRam tears down. This new guid is introduced
to avoid unnecessary FV migration to improve boot performance. Platform
can publish MigrationInfo hob with this guid to customize FV migration
info, and PeiCore will only migrate FVs indicated by this Hob info.

This is a backwards compatible change, PeiCore will check MigrationInfo
hob before migration. If MigrationInfo hobs exists, only migrate FVs
recorded by hobs. If MigrationInfo hobs not exists, migrate all FVs to
permanent memory.

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Cheng Sun &lt;chengx.sun@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:54:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1436aea4d5707e672672a11bda72be2c63c936c3'/>
<id>urn:sha1:1436aea4d5707e672672a11bda72be2c63c936c3</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Change use of EFI_D_* to DEBUG_*</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2021-11-17T03:21:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=87000d77082339be464d07855d9fc194c6b4e8a6'/>
<id>urn:sha1:87000d77082339be464d07855d9fc194c6b4e8a6</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739

Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/PeiCore: Enable T-RAM evacuation in PeiCore (CVE-2019-11098)</title>
<updated>2020-07-28T01:43:16+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.a.kubacki@intel.com</email>
</author>
<published>2019-04-11T22:46:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9bedaec05b7b8ba9aee248361bb61a85a26726cb'/>
<id>urn:sha1:9bedaec05b7b8ba9aee248361bb61a85a26726cb</id>
<content type='text'>
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614

Introduces new changes to PeiCore to move the contents of temporary
RAM visible to the PeiCore to permanent memory. This expands on
pre-existing shadowing support in the PeiCore to perform the following
additional actions:

 1. Migrate pointers in PPIs installed in PeiCore to the permanent
    memory copy of PeiCore.

 2. Copy all installed firmware volumes to permanent memory.

 3. Relocate and fix up the PEIMs within the firmware volumes.

 4. Convert all PPIs into the migrated firmware volume to the corresponding
    PPI address in the permanent memory location.

    This applies to PPIs and PEI notifications.

 5. Convert all status code callbacks in the migrated firmware volume to
    the corresponding address in the permanent memory location.

 6. Update the FV HOB to the corresponding firmware volume in permanent
    memory.

 7. Use PcdMigrateTemporaryRamFirmwareVolumes to control if enable the
    feature or not. when disable the PCD, the EvacuateTempRam() will
    never be called.

The function control flow as below:
  PeiCore()
    DumpPpiList()
    EvacuateTempRam()
      ConvertPeiCorePpiPointers()
        ConvertPpiPointersFv()
      MigratePeimsInFv()
        MigratePeim()
          PeiGetPe32Data()
          LoadAndRelocatePeCoffImageInPlace()
      MigrateSecModulesInFv()
      ConvertPpiPointersFv()
      ConvertStatusCodeCallbacks()
      ConvertFvHob()
      RemoveFvHobsInTemporaryMemory()
    DumpPpiList()

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Hao A Wu &lt;hao.a.wu@intel.com&gt;
Cc: Dandan Bi &lt;dandan.bi@intel.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Debkumar De &lt;debkumar.de@intel.com&gt;
Cc: Harry Han &lt;harry.han@intel.com&gt;
Cc: Catharine West &lt;catharine.west@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.a.kubacki@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
Acked-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
</content>
</entry>
</feed>
