[edk2-devel] [PATCH v4 35/35] OvmfPkg/OvmfXen: use RealTimeClockRuntimeDxe from EmbeddedPkg

Anthony PERARD anthony.perard at citrix.com
Thu Aug 8 14:03:48 UTC 2019


On Wed, Aug 07, 2019 at 06:09:57PM +0200, Roger Pau Monné wrote:
> On Mon, Jul 29, 2019 at 04:39:44PM +0100, Anthony PERARD wrote:
> > A Xen PVH guest doesn't have a RTC that OVMF would expect, so
> > PcatRealTimeClockRuntimeDxe fails to initialize and prevent the
> > firmware from finish to boot. To prevent that, we will use
> > XenRealTimeClockLib which simply always return the same time.
> > This will work on both Xen PVH and HVM guests.
> 
> Not that this is not correct, but what's the point in requiring a
> clock if it can be faked by always returning the same value?

It's not a clock that is required, it is a library that implements
RealTimeClockLib. Something needs it, so it is provided, even if it is
only to display the "current time".

> It seems like it's usage is not really required, and could indeed be
> dropped altogether?

Way to much work to drop it. Also, I don't work to fork OVMF.

The ARM implementation of OVMF for Xen does the same thing and simply
always return the same value.

> Alternatively, there's the PV clock which is available to PVH guests
> and will return a proper time.

We might need to do that one day I guess, but right now it is just a
nice to have.

Thanks,

-- 
Anthony PERARD

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45194): https://edk2.groups.io/g/devel/message/45194
Mute This Topic: https://groups.io/mt/32644082/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list