Current MemoryAttributesTable will be installed on ReadyToBoot event
at TPL_NOTIFY level, it maybe incorrect when PcdHiiOsRuntimeSupport
= TRUE as HiiDatabaseDxe will have runtime memory allocation for HII
OS runtime support on and after ReadyToBoot. The issue was exposed at
http://article.gmane.org/gmane.comp.bios.edk2.devel/10125.

To make sure the correctness of MemoryAttributesTable, this patch is
to enhance MemoryAttributesTable installation to install
MemoryAttributesTable on ReadyToBoot event at TPL_CALLBACK - 1 level
to make sure it is at the last of ReadyToBoot event, and also hook
runtime memory allocation after ReadyToBoot.

Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Liming Gao <liming....@intel.com>
Cc: Feng Tian <feng.t...@intel.com>
Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>

Star Zeng (3):
  MdeModulePkg DxeCore: Fix a memory leak in
    InstallMemoryAttributesTable()
  MdeModulePkg DxeCore: Return memory type from internal free pool/pages
  MdeModulePkg DxeCore: Enhance MemoryAttributesTable installation

 MdeModulePkg/Core/Dxe/DxeMain.h                    | 61 ++++-----------
 MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c            |  3 +
 MdeModulePkg/Core/Dxe/Mem/Imem.h                   |  4 +-
 MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c    |  6 +-
 MdeModulePkg/Core/Dxe/Mem/Page.c                   | 15 +++-
 MdeModulePkg/Core/Dxe/Mem/Pool.c                   | 23 ++++--
 MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 90 ++++++++++++++++++----
 7 files changed, 128 insertions(+), 74 deletions(-)

-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to