#include <Library/IoLib.h>\r
#include <Library/PcdLib.h>\r
\r
+#define APIC_LVTERR 0x370\r
+#define APIC_TMICT 0x380 \r
+#define APIC_TMCCT 0x390\r
+#define APIC_TDCR 0x3e0\r
\r
//\r
// The following array is used in calculating the frequency of local APIC\r
{\r
return\r
PcdGet32(PcdFSBClock) /\r
- mTimerLibLocalApicDivisor[MmioBitFieldRead32 (ApicBase + 0x3e0, 0, 3)];\r
+ mTimerLibLocalApicDivisor[MmioBitFieldRead32 (ApicBase + APIC_TDCR, 0, 3)];\r
}\r
\r
/**\r
IN UINTN ApicBase\r
)\r
{\r
- return MmioRead32 (ApicBase + 0x390);\r
+ return MmioRead32 (ApicBase + APIC_TMCCT);\r
}\r
\r
/**\r
ApicBase = InternalX86GetApicBase ();\r
\r
if (StartValue != NULL) {\r
- *StartValue = MmioRead32 (ApicBase + 0x380);\r
+ *StartValue = MmioRead32 (ApicBase + APIC_TMICT);\r
}\r
\r
if (EndValue != NULL) {\r
*EndValue = 0;\r
}\r
\r
- return (UINT64) InternalX86GetTimerFrequency (ApicBase);;\r
+ return (UINT64) InternalX86GetTimerFrequency (ApicBase);\r
}\r