]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/PiSmmCore: AllocatePool should use MemoryType.
authorJiewen Yao <jiewen.yao@intel.com>
Wed, 30 Nov 2016 15:08:51 +0000 (23:08 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Wed, 7 Dec 2016 05:13:50 +0000 (13:13 +0800)
commit5f4d3e179435f539395748bcd5187e3c395b0bf9
tree4da0d15a1a0c2cbdf34d339b4719bfdd3ed1cf8d
parent432f1d83f77acf92d52ef18d2cee6dbf7c5b9b86
MdeModulePkg/PiSmmCore: AllocatePool should use MemoryType.

PiSmmCore supports page level protection based upon the Memory Type
(EfiRuntimeServicesCode/EfiRuntimeServicesData) and PE image.

However, the Memory Type information is ignored in AllocatePool().
If a caller calls AllocatePool with EfiRuntimeServicesCode,
the final memory is still allocated as EfiRuntimeServicesData.

This patch supports AllocatePool with EfiRuntimeServicesCode.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
MdeModulePkg/Core/PiSmmCore/PiSmmCore.h
MdeModulePkg/Core/PiSmmCore/Pool.c
MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c