audk/PcAtChipsetPkg
Michael Kinney 70830df6dc PcAtChipsetPkg/HpetTimerDxe: Fix race condition in SetTimerPeriod()
https://bugzilla.tianocore.org/show_bug.cgi?id=182

The function TimerDriverSetTimerPeriod() disables the HPET timer
while the HPET timer HW is reprogrammed with a new timer period.
However, the MMIO write to disable the HPET timer HW can be
delayed and an HPET timer interrupt may be processed in the middle
of reprogramming the HPET timer HW and this may produced unexpected
results.

The fix is to raise TPL to TPL_HIGH_LEVEL in
TimerDriverSetTimerPeriod() during the time the HPET timer HW is
reprogrammed.  This guarantees that no timer interrupts are
processed during reprogramming.

The TimerDriverGenerateSoftInterrupt() function in this same
driver also raises TPL to TPL_HIGH_LEVEL, so this fix matches
the logic that is already used in another function for the same
reason.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-10-27 21:46:42 -07:00
..
8254TimerDxe PcAtChipsetPkg: Fix typos in comments 2016-07-11 10:29:47 +08:00
8259InterruptControllerDxe PcAtChipsetPkg: Convert all .uni files to utf-8 2015-12-15 04:57:25 +00:00
Bus/Pci/IdeControllerDxe PcAtChipsetPkg: Convert all .uni files to utf-8 2015-12-15 04:57:25 +00:00
HpetTimerDxe PcAtChipsetPkg/HpetTimerDxe: Fix race condition in SetTimerPeriod() 2016-10-27 21:46:42 -07:00
Include
IsaAcpiDxe PcAtChipsetPkg: Convert all .uni files to utf-8 2015-12-15 04:57:25 +00:00
Library PcAtChipsetPkg AcpiTimerLib: Clear bits [31:24] after reading by IoRead32() 2016-10-11 13:02:43 +08:00
PcatRealTimeClockRuntimeDxe PcAtChipsetPkg/PcRtc: Fix a NULL pointer deference issue 2016-07-27 10:27:16 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt
PcAtChipsetPkg.dec PcAtChipsetPkg: Add two PCDs for Reset Control Register and Value 2016-06-28 10:08:58 +08:00
PcAtChipsetPkg.dsc PcAtChipsetPkg: Remove KbcResetDxe 2016-09-02 10:07:17 +08:00
PcAtChipsetPkg.uni PcAtChipsetPkg: Add two PCDs for Reset Control Register and Value 2016-06-28 10:08:58 +08:00
PcAtChipsetPkgExtra.uni PcAtChipsetPkg: Convert all .uni files to utf-8 2015-12-15 04:57:25 +00:00