On Tue, Aug 31, 2021 at 06:25:49PM +0200, Philippe Mathieu-Daudé wrote:
> On 8/31/21 11:57 AM, Gerd Hoffmann wrote:
> > Microvm has no acpi timer, so go use XenTimerDxe
> > which uses the local apic instead.
> >
> > FIXME: timer frequency is wrong.
>
> Xen seems to expect a 10MHz timer. Maybe use as constant
> to make a generic LocalAPICTimer driver used by both Xen
> and microVM (with different clock rates)?
It's configurable already (PcdFSBClock).
I can tweak that in my .dsc file, which improves the situation a bit for
me. Of course the problem is the lapic timer frequency is not constant,
and xen uses the xen clock to calibrate the timer
(see CalibrateLapicTimer in XenPlatformPei/Xen.c).
Maybe I can use kvmclock to figure the frequency. Maybe it makes sense
to just go all in and write a kvmclock-based timer driver then.
Is it possible to have multiple drivers implementing the
EfiTimerArchProtocol in one firmware binary, then just use the one which
successfully initializes first? If so, can I define the initialization
order? i.e. can I add a kvmclock driver, try initialize it first, when
it works use it, otherwise (because tcg) fallback to some other driver?
take care,
Gerd
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80058): https://edk2.groups.io/g/devel/message/80058
Mute This Topic: https://groups.io/mt/85272566/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-