]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
ArmPkg: Fix Ecc error 3002 in CpuDxe
[mirror_edk2.git] / ArmPkg / Drivers / CpuDxe / Arm / Mmu.c
index 6fb5112a1a8e26f3d8c3ea9634209a3336280459..2a668f078811b11817eefcb62086602f165b547d 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) 2013, ARM Ltd. All rights reserved.<BR>\r
+Portions copyright (c) 2013-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
@@ -366,14 +366,14 @@ EfiAttributeToArmAttribute (
   }\r
 \r
   // Determine protection attributes\r
-  if (EfiAttributes & EFI_MEMORY_RO) {\r
+  if ((EfiAttributes & EFI_MEMORY_RO) != 0) {\r
     ArmAttributes |= TT_DESCRIPTOR_SECTION_AP_RO_RO;\r
   } else {\r
     ArmAttributes |= TT_DESCRIPTOR_SECTION_AP_RW_RW;\r
   }\r
 \r
   // Determine eXecute Never attribute\r
-  if (EfiAttributes & EFI_MEMORY_XP) {\r
+  if ((EfiAttributes & EFI_MEMORY_XP) != 0) {\r
     ArmAttributes |= TT_DESCRIPTOR_SECTION_XN_MASK;\r
   }\r
 \r