]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c
ArmPkg/CpuDxe: Correct EFI_MEMORY_RO usage
[mirror_edk2.git] / ArmPkg / Drivers / CpuDxe / CpuMmuCommon.c
index 723604d1df966ecb0db083e4c4f749443e10de60..54d9b016333107be81fa07c6fb01996bb0652c07 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
 *\r
 *  Copyright (c) 2013, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
@@ -236,7 +237,7 @@ CpuConvertPagesToUncachedVirtualAddress (
   // be the PCI address. Code should always use the CPU address, and we will or in VirtualMask\r
   // to that address.\r
   //\r
-  Status = SetMemoryAttributes (Address, Length, EFI_MEMORY_WP, 0);\r
+  Status = SetMemoryAttributes (Address, Length, EFI_MEMORY_RO, 0);\r
   if (!EFI_ERROR (Status)) {\r
     Status = SetMemoryAttributes (Address | VirtualMask, Length, EFI_MEMORY_UC, VirtualMask);\r
   }\r
@@ -264,7 +265,7 @@ CpuReconvertPages (
   //\r
   // Unmap the aliased Address\r
   //\r
-  Status = SetMemoryAttributes (Address | VirtualMask, Length, EFI_MEMORY_WP, 0);\r
+  Status = SetMemoryAttributes (Address | VirtualMask, Length, EFI_MEMORY_RO, 0);\r
   if (!EFI_ERROR (Status)) {\r
     //\r
     // Restore atttributes\r