Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: ada905ab5c0e7ea7017e71d52219aaec1abd8dcb
      
https://github.com/tianocore/edk2/commit/ada905ab5c0e7ea7017e71d52219aaec1abd8dcb
  Author: Mike Turner <mike...@microsoft.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M MdeModulePkg/Core/Dxe/Mem/Page.c

  Log Message:
  -----------
  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.w...@intel.com>
Cc: Hao A Wu <hao.a...@intel.com>
Cc: Dandan Bi <dandan...@intel.com>
Cc: Laszlo Ersek <ler...@redhat.com>
Signed-off-by: Liming Gao <liming....@intel.com>
Acked-by: Laszlo Ersek <ler...@redhat.com>
Reviewed-by: Dandan Bi <dandan...@intel.com>
Acked-by: Hao A Wu <hao.a...@intel.com>




_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to