audk/PcAtChipsetPkg
Michael D Kinney a6013625a3 PcAtChipsetPkg/HpetTimerDxe: Fix nested interrupt time accuracy
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4659

When HPET timer is used as the timer interrupt and nested
interrupts into the HPET timer interrupt handler occur, the
elapsed time passed into the DXE Core is sometime too large
and this causes the DXE Core internal system time to run too
fast. Fix the logic so the previous main counter value stored
in the module global variable mPreviousMainCounter is always
captured before the timer notification function is called.

Without this change, mPreviousMainCounter is updated after
the timer notification function is called and when nesting
occurs, it updates with the value from the first level of
nesting which is further back in time than the interrupt from
the deepest level of nesting.  This causes the next two timer
interrupts to compute a TimerPeriod that is twice the actual
time period since the last interrupt and this causes the DXE
Core internal time to run faster than expected.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
2024-01-29 19:17:00 +00:00
..
Bus/Pci/IdeControllerDxe PcAtChipsetPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HpetTimerDxe PcAtChipsetPkg/HpetTimerDxe: Fix nested interrupt time accuracy 2024-01-29 19:17:00 +00:00
Include PcAtChipsetPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Library PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with XhciDxe 2023-12-06 22:45:20 +00:00
PcatRealTimeClockRuntimeDxe PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent 2023-10-18 16:15:41 +00:00
PcAtChipsetPkg.ci.yaml PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add configuration for Ecc check 2020-08-17 03:28:09 +00:00
PcAtChipsetPkg.dec PcAtChipsetPkg: Add PCD for RTC default year 2023-03-27 06:19:04 +00:00
PcAtChipsetPkg.dsc PcAtChipsetPkg: Remove UefiCpuLib from module INFs. 2023-03-10 08:23:56 +00:00
PcAtChipsetPkg.uni PcAtChipsetPkg: Add PCD for RTC default year 2023-03-27 06:19:04 +00:00
PcAtChipsetPkgExtra.uni