UefiCpuPkg: Add New Memory Attributes
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO attributes introduced in UEFI 2.8. (UEFI 2.8, mantis 1919 and 1872). Use attributes bitmasks, defined in MdePkg. Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20200702205039.52400-5-oleksiyy@ami.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
c2e38a520e
commit
e77966b341
@@ -717,7 +717,7 @@ ConvertMemoryPageAttributes (
|
||||
return RETURN_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) != 0) {
|
||||
if ((Attributes & ~EFI_MEMORY_ATTRIBUTE_MASK) != 0) {
|
||||
DEBUG ((DEBUG_ERROR, "Attributes(0x%lx) has unsupported bit\n", Attributes));
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
@@ -1018,9 +1018,9 @@ RefreshGcdMemoryAttributesFromPaging (
|
||||
|
||||
Length = MIN (PageLength, MemorySpaceLength);
|
||||
if (Attributes != (MemorySpaceMap[Index].Attributes &
|
||||
EFI_MEMORY_PAGETYPE_MASK)) {
|
||||
EFI_MEMORY_ATTRIBUTE_MASK)) {
|
||||
NewAttributes = (MemorySpaceMap[Index].Attributes &
|
||||
~EFI_MEMORY_PAGETYPE_MASK) | Attributes;
|
||||
~EFI_MEMORY_ATTRIBUTE_MASK) | Attributes;
|
||||
Status = gDS->SetMemorySpaceAttributes (
|
||||
BaseAddress,
|
||||
Length,
|
||||
|
Reference in New Issue
Block a user