diff options
author | Malgorzata Kukiello <jacek.kukiello@intel.com> | 2020-09-24 18:21:31 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-10-10 04:04:50 +0000 |
commit | f1567720b13a578ffa54716119f826df622babcd (patch) | |
tree | 63e873450e03aca8b1c1013b8f582111907a2d8e /MdeModulePkg | |
parent | 61915c4144ab490de797b540e840bc8a09256d49 (diff) | |
download | edk2-f1567720b13a578ffa54716119f826df622babcd.tar.gz edk2-f1567720b13a578ffa54716119f826df622babcd.tar.bz2 edk2-f1567720b13a578ffa54716119f826df622babcd.zip |
MdeModulePkg/Core/Dxe: expose SP and CRYPTO capabilities in UEFI memmap
OSs are now capable of treating SP and CRYPTO memory as true capabilities
and therefore these should be exposed. This requires usage of a separate
ACCESS_MASK to hide all page-access permission capabilities.
Change in masking and hiding of SP and CRYPTO was introduced in
3bd5c994c879f78e8e3d5346dc3b627f199291aa
Signed-off-by: Malgorzata Kukiello <jacek.kukiello@intel.com>
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: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Oleksiy Yakovlev <oleksiyy@ami.com>
Cc: Ard Biesheuvel (ARM address) <ard.biesheuvel@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Mem/Page.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 2c2c9cd6c3..731bf08bc9 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1924,16 +1924,16 @@ CoreGetMemoryMap ( // set attributes and change memory paging attribute accordingly.
// But current EFI_MEMORY_DESCRIPTOR.Attribute is assigned by
// value from Capabilities in GCD memory map. This might cause
- // boot problems. Clearing all paging related capabilities can
- // workaround it. Following code is supposed to be removed once
- // the usage of EFI_MEMORY_DESCRIPTOR.Attribute is clarified in
- // UEFI spec and adopted by both EDK-II Core and all supported
- // OSs.
+ // boot problems. Clearing all page-access permission related
+ // capabilities can workaround it. Following code is supposed to
+ // be removed once the usage of EFI_MEMORY_DESCRIPTOR.Attribute
+ // is clarified in UEFI spec and adopted by both EDK-II Core and
+ // all supported OSs.
//
MemoryMapEnd = MemoryMap;
MemoryMap = MemoryMapStart;
while (MemoryMap < MemoryMapEnd) {
- MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ATTRIBUTE_MASK;
+ MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ACCESS_MASK;
MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size);
}
MergeMemoryMap (MemoryMapStart, &BufferSize, Size);
|