diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2021-04-12 14:30:02 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-04-13 11:54:58 +0000 |
commit | c75c6405128e7c3f9cddb05180d55301f4d891a3 (patch) | |
tree | 2b439edbc466545440c24341d3b4b6a686e1da73 /BaseTools/Source/Python/build/buildoptions.py | |
parent | 51e0bd28bba9631fd3e3244668b6ab9c561817b2 (diff) | |
download | edk2-c75c6405128e7c3f9cddb05180d55301f4d891a3.tar.gz edk2-c75c6405128e7c3f9cddb05180d55301f4d891a3.tar.bz2 edk2-c75c6405128e7c3f9cddb05180d55301f4d891a3.zip |
OvmfPkg/XenPlatformPei: Calibrate APIC timer frequency
Calculate the frequency of the APIC timer that Xen provides.
Even though the frequency is currently hard-coded, it isn't part of
the public ABI that Xen provides and thus may change at any time. OVMF
needs to determine the frequency by an other mean.
Fortunately, Xen provides a way to determines the frequency of the
TSC, so we can use TSC to calibrate the frequency of the APIC timer.
That information is found in the shared_info page which we map and
unmap once done (XenBusDxe is going to map the page somewhere else).
The shared_info page is mapped at the highest physical address allowed
as it doesn't need to be in the RAM, thus there's a call to update the
page table.
The calculated frequency is only logged in this patch, it will be used
in a following patch.
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210412133003.146438-7-anthony.perard@citrix.com>
Diffstat (limited to 'BaseTools/Source/Python/build/buildoptions.py')
0 files changed, 0 insertions, 0 deletions