We can state, this driver is to support fixed frequency. If a real platform happens to have fixed frequency, then it can be used.
gEfiMdePkgTokenSpaceGuid.PcdFSBClock is defined in MdePkg. The consumer need set PcdFSBClock. I don't see a need to bind to OVMF. Thank you Yao Jiewen > -----Original Message----- > From: Gerd Hoffmann <kra...@redhat.com> > Sent: Tuesday, November 2, 2021 5:59 PM > To: devel@edk2.groups.io; Yao, Jiewen <jiewen....@intel.com> > Cc: Xu, Min M <min.m...@intel.com>; Ard Biesheuvel > <ardb+tianoc...@kernel.org>; Justen, Jordan L <jordan.l.jus...@intel.com>; > Brijesh Singh <brijesh.si...@amd.com>; Erdem Aktas > <erdemak...@google.com>; James Bottomley <j...@linux.ibm.com>; Tom > Lendacky <thomas.lenda...@amd.com> > Subject: Re: [edk2-devel] [PATCH V2 0/2] Rename XenTimerDxe to > LocalApicTimerDxe > > Hi, > > > Do you think it should so generic that it can remove OvmfPkg dependency and > be moved to UefiCpuPkg? > > It's not fully standalone, the driver needs to know the lapic frequency > (that is the reason why PcdFSBClock exists). > > For KVM this is easy, the lapic uses a fixed frequency so it can simply > be set in the .dsc file. > > For Xen the lapic frequency is the same as the tsc frequency, so the xen > code (platform init I think) goes figure the tsc freq and sets > PcdFSBClock accordingly. > > So, when you want use the driver elsewhere you need to fill that gap, > and there is little reason to go that extra mile because on physical > hardware you have other options like using the hpet timer. > > [ qemu supports hpet emulation but it is disabled by default for > performance reasons, other timers have less virtualization > overhead. ] > > I'd suggest to keep it in OvmfPkg. > > take care, > Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#83124): https://edk2.groups.io/g/devel/message/83124 Mute This Topic: https://groups.io/mt/86735078/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-