]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
ArmPkg: Fix Ecc error 3002 in CpuDxe
[mirror_edk2.git] / ArmPkg / Drivers / CpuDxe / AArch64 / Mmu.c
index fca2d4f7638a0d3c355a2a35dfb90f772b8785ad..4b6bc47e51850a345f8f0198f251d5bfb6b78e87 100644 (file)
@@ -2,7 +2,7 @@
 \r
 Copyright (c) 2009, Hewlett-Packard Company. All rights reserved.<BR>\r
 Portions copyright (c) 2010, Apple Inc. All rights reserved.<BR>\r
-Portions copyright (c) 2011-2013, ARM Ltd. All rights reserved.<BR>\r
+Portions copyright (c) 2011-2021, Arm Limited. All rights reserved.<BR>\r
 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
 \r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
@@ -282,12 +282,12 @@ EfiAttributeToArmAttribute (
   ArmAttributes |= TT_AF;\r
 \r
   // Determine protection attributes\r
-  if (EfiAttributes & EFI_MEMORY_RO) {\r
+  if ((EfiAttributes & EFI_MEMORY_RO) != 0) {\r
     ArmAttributes |= TT_AP_RO_RO;\r
   }\r
 \r
   // Process eXecute Never attribute\r
-  if (EfiAttributes & EFI_MEMORY_XP) {\r
+  if ((EfiAttributes & EFI_MEMORY_XP) != 0) {\r
     ArmAttributes |= TT_PXN_MASK;\r
   }\r
 \r