mirror of https://github.com/acidanthera/audk.git
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
3bd5c994c8
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>
This commit is contained in:
parent
61915c4144
commit
f1567720b1
|
@ -1924,16 +1924,16 @@ CoreGetMemoryMap (
|
||||||
// set attributes and change memory paging attribute accordingly.
|
// set attributes and change memory paging attribute accordingly.
|
||||||
// But current EFI_MEMORY_DESCRIPTOR.Attribute is assigned by
|
// But current EFI_MEMORY_DESCRIPTOR.Attribute is assigned by
|
||||||
// value from Capabilities in GCD memory map. This might cause
|
// value from Capabilities in GCD memory map. This might cause
|
||||||
// boot problems. Clearing all paging related capabilities can
|
// boot problems. Clearing all page-access permission related
|
||||||
// workaround it. Following code is supposed to be removed once
|
// capabilities can workaround it. Following code is supposed to
|
||||||
// the usage of EFI_MEMORY_DESCRIPTOR.Attribute is clarified in
|
// be removed once the usage of EFI_MEMORY_DESCRIPTOR.Attribute
|
||||||
// UEFI spec and adopted by both EDK-II Core and all supported
|
// is clarified in UEFI spec and adopted by both EDK-II Core and
|
||||||
// OSs.
|
// all supported OSs.
|
||||||
//
|
//
|
||||||
MemoryMapEnd = MemoryMap;
|
MemoryMapEnd = MemoryMap;
|
||||||
MemoryMap = MemoryMapStart;
|
MemoryMap = MemoryMapStart;
|
||||||
while (MemoryMap < MemoryMapEnd) {
|
while (MemoryMap < MemoryMapEnd) {
|
||||||
MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ATTRIBUTE_MASK;
|
MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ACCESS_MASK;
|
||||||
MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size);
|
MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size);
|
||||||
}
|
}
|
||||||
MergeMemoryMap (MemoryMapStart, &BufferSize, Size);
|
MergeMemoryMap (MemoryMapStart, &BufferSize, Size);
|
||||||
|
|
Loading…
Reference in New Issue