public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io, 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
Date: Tue, 2 Nov 2021 10:58:49 +0100	[thread overview]
Message-ID: <20211102095849.xwhyj3xoz6uftypn@sirius.home.kraxel.org> (raw)
In-Reply-To: <PH0PR11MB48855E29AC161B4D088749B48C8B9@PH0PR11MB4885.namprd11.prod.outlook.com>

  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


  reply	other threads:[~2021-11-02  9:59 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   ` Gerd Hoffmann [this message]
2021-11-02 10:05     ` [edk2-devel] " Yao, Jiewen
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=20211102095849.xwhyj3xoz6uftypn@sirius.home.kraxel.org \
    --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