]> git.proxmox.com Git - mirror_edk2.git/commit
ArmVirtPkg: implement ArmVirtPL031FdtClientLib
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 8 Apr 2016 09:45:03 +0000 (11:45 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 13 Apr 2016 14:55:24 +0000 (16:55 +0200)
commit658e7a41de3b85ed069f8395d7bb807249a57399
treeb2122a0eece186a54f0ea3cfc2fbc3104464659f
parent8457f5e40277d682b2de25f7769106a2cf803216
ArmVirtPkg: implement ArmVirtPL031FdtClientLib

This implements a library ArmVirtPL031FdtClientLib which is intended to
be incorporated into RealTimeClockRuntimeDxe via NULL library class
resolution. This allows us to make RealTimeClockRuntimeDxe depend on the
FDT client protocol, and discover the PL031 base address from the device tree
directly rather than relying on VirtFdtDxe to set the dynamic PCDs.

The NULL library class resolution approach to strictly order production and
consumption of dynamic PCDs is not generally safe in cases such as this one,
where the producer and the consumer of the PCD are both libraries. However,
since the PCD is produced in this library's constructor, and the consumer
library's constructor 'LibRtcInitialize' is not a 'true' constructor (it is
invoked explicitly by RealTimeClockRuntimeDxe), this case is guaranteed to
be safe after all.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c [new file with mode: 0644]
ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf [new file with mode: 0644]