summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/PiSmmCpuDxeSmm
diff options
context:
space:
mode:
authorMike Turner <miketur@microsoft.com>2019-08-16 23:39:35 +0800
committerLiming Gao <liming.gao@intel.com>2019-08-20 19:53:31 +0800
commitada905ab5c0e7ea7017e71d52219aaec1abd8dcb (patch)
treea0556c3720b312a70fea8a302fdf814cc03f3a80 /UefiCpuPkg/PiSmmCpuDxeSmm
parent0970a80583a9a0595eb357f380e604b57136fa26 (diff)
downloadedk2-ada905ab5c0e7ea7017e71d52219aaec1abd8dcb.tar.gz
edk2-ada905ab5c0e7ea7017e71d52219aaec1abd8dcb.tar.bz2
edk2-ada905ab5c0e7ea7017e71d52219aaec1abd8dcb.zip
MdeModulePkg DxeCore: Fix for missing Memory Attributes Table (MAT) update
The Fpdt driver (FirmwarePerformanceDxe) saves a memory address across reboots, and then does an AllocatePage for that memory address. If, on this boot, that memory comes from a Runtime memory bucket, the MAT table is not updated. This causes Windows to boot into Recovery. This patch blocks the memory manager from changing the page from a special bucket to a different memory type. Once the buckets are allocated, we freeze the memory ranges for the OS, and fragmenting the special buckets will cause errors resuming from hibernate (S4). The references to S4 here are the use case that fails. This failure is root caused to an inconsistent behavior of the core memory services themselves when type AllocateAddress is used. The main issue is apparently with the UEFI memory map -- the UEFI memory map reflects the pre-allocated bins, but the actual allocations at fixed addresses may go out of sync with that. Everything else, such as: - EFI_MEMORY_ATTRIBUTES_TABLE (page protections) being out of sync, - S4 failing are just symptoms / consequences. This patch is cherry pick from Project Mu: https://github.com/microsoft/mu_basecore/commit/a9be767d9be96af94016ebd391ea6f340920735a With the minor change, 1. Update commit message format to keep the message in 80 characters one line. 2. Remove // MU_CHANGE comments in source code. 3. Update comments style to follow edk2 style. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Acked-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm')
0 files changed, 0 insertions, 0 deletions