From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Xu, Min M" <min.m.xu@intel.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
"Justen, Jordan L" <jordan.l.justen@intel.com>,
Brijesh Singh <brijesh.singh@amd.com>,
Erdem Aktas <erdemaktas@google.com>,
James Bottomley <jejb@linux.ibm.com>,
Tom Lendacky <thomas.lendacky@amd.com>
Subject: Re: [edk2-devel] [PATCH V2 0/2] Rename XenTimerDxe to LocalApicTimerDxe
Date: Tue, 2 Nov 2021 10:05:56 +0000 [thread overview]
Message-ID: <PH0PR11MB4885A1F1FD31CF75B457DB7C8C8B9@PH0PR11MB4885.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211102095849.xwhyj3xoz6uftypn@sirius.home.kraxel.org>
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 <kraxel@redhat.com>
> Sent: Tuesday, November 2, 2021 5:59 PM
> To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>
> Cc: Xu, Min M <min.m.xu@intel.com>; Ard Biesheuvel
> <ardb+tianocore@kernel.org>; Justen, Jordan L <jordan.l.justen@intel.com>;
> Brijesh Singh <brijesh.singh@amd.com>; Erdem Aktas
> <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>; Tom
> Lendacky <thomas.lendacky@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
next prev parent reply other threads:[~2021-11-02 10:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 8:46 [PATCH V2 0/2] Rename XenTimerDxe to LocalApicTimerDxe Min Xu
2021-11-01 8:46 ` [PATCH V2 1/2] OvmfPkg: " Min Xu
2021-11-01 8:46 ` [PATCH V2 2/2] OvmfPkg: Switch timer in build time for OvmfPkg Min Xu
2021-11-02 9:32 ` [PATCH V2 0/2] Rename XenTimerDxe to LocalApicTimerDxe Gerd Hoffmann
2021-11-02 9:38 ` Yao, Jiewen
2021-11-02 9:58 ` [edk2-devel] " Gerd Hoffmann
2021-11-02 10:05 ` Yao, Jiewen [this message]
2021-11-02 10:21 ` Gerd Hoffmann
2021-11-02 10:24 ` Yao, Jiewen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PH0PR11MB4885A1F1FD31CF75B457DB7C8C8B9@PH0PR11MB4885.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox