summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
diff options
context:
space:
mode:
authorOleksiy Yakovlev <oleksiyy@ami.com>2020-07-02 16:50:37 -0400
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-07-15 14:58:25 +0000
commit3bd5c994c879f78e8e3d5346dc3b627f199291aa (patch)
treeb835c171aabf2d1da423b2431a47624ec16acfaa /MdeModulePkg/Core/Dxe/Gcd/Gcd.c
parent82d0007750002837f91d96753b5a82e9b71c99b1 (diff)
downloadedk2-3bd5c994c879f78e8e3d5346dc3b627f199291aa.tar.gz
edk2-3bd5c994c879f78e8e3d5346dc3b627f199291aa.tar.bz2
edk2-3bd5c994c879f78e8e3d5346dc3b627f199291aa.zip
MdeModulePkg: 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-3-oleksiyy@ami.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Gcd/Gcd.c')
-rw-r--r--MdeModulePkg/Core/Dxe/Gcd/Gcd.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
index 74f3b1b9f6..2d8c076f71 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -35,13 +35,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define PRESENT_MEMORY_ATTRIBUTES (EFI_RESOURCE_ATTRIBUTE_PRESENT)
-#define EXCLUSIVE_MEMORY_ATTRIBUTES (EFI_MEMORY_UC | EFI_MEMORY_WC | \
- EFI_MEMORY_WT | EFI_MEMORY_WB | \
- EFI_MEMORY_WP | EFI_MEMORY_UCE)
-
-#define NONEXCLUSIVE_MEMORY_ATTRIBUTES (EFI_MEMORY_XP | EFI_MEMORY_RP | \
- EFI_MEMORY_RO)
-
//
// Module Variables
//
@@ -665,7 +658,7 @@ ConverToCpuArchAttributes (
{
UINT64 CpuArchAttributes;
- CpuArchAttributes = Attributes & NONEXCLUSIVE_MEMORY_ATTRIBUTES;
+ CpuArchAttributes = Attributes & EFI_MEMORY_ATTRIBUTE_MASK;
if ( (Attributes & EFI_MEMORY_UC) == EFI_MEMORY_UC) {
CpuArchAttributes |= EFI_MEMORY_UC;
@@ -951,7 +944,7 @@ CoreConvertSpace (
// Keep original CPU arch attributes when caller just calls
// SetMemorySpaceAttributes() with none CPU arch attributes (for example, RUNTIME).
//
- Attributes |= (Entry->Attributes & (EXCLUSIVE_MEMORY_ATTRIBUTES | NONEXCLUSIVE_MEMORY_ATTRIBUTES));
+ Attributes |= (Entry->Attributes & (EFI_CACHE_ATTRIBUTE_MASK | EFI_MEMORY_ATTRIBUTE_MASK));
}
Entry->Attributes = Attributes;
break;