EmbeddedPkg/RealTimeClockRuntimeDxe: move common functionality into core
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sun, 5 Nov 2017 16:06:17 +0000 (16:06 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 13 Nov 2017 13:33:26 +0000 (13:33 +0000)
commit517cf877946b47c92c9fa2ebaccb9327bb2af0a5
treebef8f531225c43e44e9a36bd9a3b2342ca1c7af2
parent29788f178e48fa5ffe7d3262d73c9548e9285d2d
EmbeddedPkg/RealTimeClockRuntimeDxe: move common functionality into core

RealTimeClockRuntimeDxe defers the hardware/platform specific handling
of reading/setting the hardware clock to RealTimeClockLib, but for
unknown reasons, it also defers common functionality such as input
validation and recording the timezone and DST settings (which are
informational only and not managed by hardware)

This has led to a lot of duplication in implementations of RealTimeClockLib
as well as TimeBaseLib, to the point where each library implementation
has its own set of UEFI variables to record the timezone and DST settings.
This makes little sense, and so let's update RealTimeClockRuntimeDxe now
to allow future implementations to rely on the core driver to take care of
these things.

Note that reading the timezone and DST settings occurs before calling into
the library, so we can phase out this behavior gradually from library
implementations in EDK2, edk2-platforms or out of tree.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf