diff --git a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c index ccb4f6474b..76f94c9161 100644 --- a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c +++ b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c @@ -24,30 +24,6 @@ #define MULT_U64_X_N MultU64x64 #endif -RETURN_STATUS -EFIAPI -TimerConstructor ( - VOID - ) -{ - // - // Check if the ARM Generic Timer Extension is implemented. - // - if (ArmIsArchTimerImplemented ()) { - // - // Architectural Timer Frequency must be set in Secure privileged - // mode (if secure extension is supported). - // If the reset value (0) is returned, just ASSERT. - // - ASSERT (ArmGenericTimerGetTimerFreq () != 0); - } else { - DEBUG ((DEBUG_ERROR, "ARM Architectural Timer is not available in the CPU, hence this library cannot be used.\n")); - ASSERT (0); - } - - return RETURN_SUCCESS; -} - /** A local utility function that returns the PCD value, if specified. Otherwise it defaults to ArmGenericTimerGetTimerFreq. @@ -65,6 +41,8 @@ GetPlatformTimerFreq ( TimerFreq = ArmGenericTimerGetTimerFreq (); + ASSERT (TimerFreq != 0); + return TimerFreq; } diff --git a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf index 273b1e9555..76bad81531 100644 --- a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf +++ b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf @@ -12,7 +12,6 @@ MODULE_TYPE = BASE VERSION_STRING = 1.0 LIBRARY_CLASS = TimerLib - CONSTRUCTOR = TimerConstructor [Sources.common] ArmArchTimerLib.c