diff options
-rw-r--r-- | MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf | 1 | ||||
-rw-r--r-- | MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf b/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf index f857290..96c90db 100644 --- a/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf +++ b/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf @@ -23,6 +23,7 @@ MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = RngLib
+ CONSTRUCTOR = BaseRngLibTimerConstructor
[Sources]
RngLibTimer.c
diff --git a/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c b/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c index 980854d..c4fdd1d 100644 --- a/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c +++ b/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c @@ -14,6 +14,28 @@ #define DEFAULT_DELAY_TIME_IN_MICROSECONDS 10
/**
+ This implementation is to be replaced by its MdeModulePkg copy.
+ The cause being that some GUIDs (gEdkiiRngAlgorithmUnSafe) cannot
+ be defined in the MdePkg.
+
+ @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
+**/
+RETURN_STATUS
+EFIAPI
+BaseRngLibTimerConstructor (
+ VOID
+ )
+{
+ DEBUG ((
+ DEBUG_WARN,
+ "Warning: This BaseRngTimerLib implementation will be deprecated. "
+ "Please use the MdeModulePkg implementation equivalent.\n"
+ ));
+
+ return RETURN_SUCCESS;
+}
+
+/**
Using the TimerLib GetPerformanceCounterProperties() we delay
for enough time for the PerformanceCounter to increment.
|