]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Added new ARM Processor Feature Register definitions
authorOlivier Martin <olivier.martin@arm.com>
Tue, 3 Jun 2014 16:39:23 +0000 (16:39 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Jun 2014 16:39:23 +0000 (16:39 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15552 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Include/Chipset/AArch64.h
ArmPkg/Include/Chipset/ArmV7.h
ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c

index 3e5b55bfd7345dedd7fcd0bd5362ad0b4a87694e..72bde15afebff1a50bbdbd265b63d452efba818b 100644 (file)
@@ -33,6 +33,7 @@
 \r
 // ID_AA64PFR0 - AArch64 Processor Feature Register 0 definitions\r
 #define AARCH64_PFR0_FP         (0xF << 16)\r
+#define AARCH64_PFR0_GIC        (0xF << 24)\r
 \r
 // SCR - Secure Configuration Register definitions\r
 #define SCR_NS                  (1 << 0)\r
index 345554eb28a7063631593fd970fcfa303ea10235..839a1925165e5aa509c80bdb3d31aa6944c97cb2 100644 (file)
 // ARM Interrupt ID in Exception Table\r
 #define ARM_ARCH_EXCEPTION_IRQ            EXCEPT_ARM_IRQ\r
 \r
+// ID_PFR1 - ARM Processor Feature Register 1 definitions\r
+#define ARM_PFR1_SEC        (0xFUL << 4)\r
+#define ARM_PFR1_TIMER      (0xFUL << 16)\r
+#define ARM_PFR1_GIC        (0xFUL << 28)\r
+\r
 // Domain Access Control Register\r
 #define DOMAIN_ACCESS_CONTROL_MASK(a)     (3UL << (2 * (a)))\r
 #define DOMAIN_ACCESS_CONTROL_NONE(a)     (0UL << (2 * (a)))\r
index 4373e8c2e74c8c5172b0ab00287e7fb54f2521dc..d1cd0c8e6e3c9c2de0a8e3fe5156dec91ab1dc83 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Generic ARM implementation of TimerLib.h\r
 \r
-  Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
-  \r
+  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -46,7 +46,7 @@ TimerConstructor (
 #ifdef MDE_CPU_ARM\r
     // Only set the frequency for ARMv7. We expect the secure firmware to have already do it\r
     // If the security extensions are not implemented set Timer Frequency\r
-    if ((ArmReadIdPfr1 () & 0xF0) == 0x0) {\r
+    if ((ArmReadIdPfr1 () & ARM_PFR1_SEC) == 0x0) {\r
       ArmArchTimerSetTimerFreq (PcdGet32 (PcdArmArchTimerFreqInHz));\r
     }\r
 #endif\r