]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/PL031RealTimeClockLib: don't clobber gRT table
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 13 Apr 2016 08:04:24 +0000 (10:04 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 11 May 2016 14:57:09 +0000 (16:57 +0200)
PL031RealTimeClockLib is a base library that could potentially (although
unlikely) be incorporated into other modules than the DXE_RUNTIME_DRIVER
module that it was intended to complement.

This means the library has no business whatsoever setting the Runtime
Service table pointers directly (since we have no way of knowing which
instance will 'win', and the pointers may end up referring to a module
that is not a DXE_RUNTIME_DRIVER). So remove the assignment altogether.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c

index 52ba48992b83e599731efc89bd108532fe3a64ca..516b45675c69b10245ef2b77a51f25f60ee48044 100644 (file)
@@ -650,12 +650,6 @@ LibRtcInitialize (
     return Status;\r
   }\r
 \r
     return Status;\r
   }\r
 \r
-  // Setup the setters and getters\r
-  gRT->GetTime       = LibGetTime;\r
-  gRT->SetTime       = LibSetTime;\r
-  gRT->GetWakeupTime = LibGetWakeupTime;\r
-  gRT->SetWakeupTime = LibSetWakeupTime;\r
-\r
   mRT = gRT;\r
 \r
   // Install the protocol\r
   mRT = gRT;\r
 \r
   // Install the protocol\r