- @retval EFI_SUCCESS Caculated the frequency successfully.\r
- @retval Others Failed to caculate the frequency.\r
+ ASSERT (gCpu != NULL);\r
+\r
+ Status = gCpu->GetTimerValue (gCpu, 0, &mCurrentTick, &TimerPeriod);\r
+ if (EFI_ERROR (Status)) {\r
+ //\r
+ // The WinntGetTimerValue will return EFI_UNSUPPORTED. Set the\r
+ // TimerPeriod by ourselves.\r
+ //\r
+ mCurrentTick += 1000000;\r
+ }\r
+ \r
+ return mCurrentTick;\r
+}\r
+\r
+\r
+/**\r
+ Get and calculate the frequency in ticks/ms.\r
+ The result is saved in the global variable mFrequency\r
+\r
+ @retval EFI_SUCCESS Calculated the frequency successfully.\r
+ @retval Others Failed to calculate the frequency.\r