diff options
author | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-02 15:30:54 +0000 |
---|---|---|
committer | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-02 15:30:54 +0000 |
commit | 0cdda8d6f0b48bb1f998c1e7487877331c5cae8c (patch) | |
tree | 4813b7ce5a2834463039f7eb58f3bc65969b2fa7 | |
parent | 5025be3fc17bc3873e20fda0abb7ca2e7591261d (diff) | |
download | edk2-platforms-0cdda8d6f0b48bb1f998c1e7487877331c5cae8c.tar.xz |
Add generic HPET Timer DXE Driver and support libraries.
Minor update to logic to prevent writing a the read-only MSI Capability bit with 0 when HPET supports MSIs
Signed-off-by: mdkinney
Reviewed-by: li-elvin
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12272 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | PcAtChipsetPkg/HpetTimerDxe/HpetTimer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/PcAtChipsetPkg/HpetTimerDxe/HpetTimer.c b/PcAtChipsetPkg/HpetTimerDxe/HpetTimer.c index 025d504fc4..b38963157c 100644 --- a/PcAtChipsetPkg/HpetTimerDxe/HpetTimer.c +++ b/PcAtChipsetPkg/HpetTimerDxe/HpetTimer.c @@ -440,7 +440,7 @@ TimerDriverSetTimerPeriod ( // If TimerPeriod is 0, then mask HPET Timer interrupts
//
- if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0) {
+ if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0 && FeaturePcdGet (PcdHpetMsiEnable)) {
//
// Disable HPET MSI interrupt generation
//
@@ -498,7 +498,7 @@ TimerDriverSetTimerPeriod ( //
// Enable HPET Timer interrupt generation
//
- if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0) {
+ if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0 && FeaturePcdGet (PcdHpetMsiEnable)) {
//
// Enable HPET MSI Interrupt
//
@@ -789,7 +789,6 @@ TimerDriverInitialize ( // Set InterruptRoute field based in mTimerIrq
//
mTimerConfiguration.Uint64 = HpetRead (HPET_TIMER_CONFIGURATION_OFFSET + mTimerIndex * HPET_TIMER_STRIDE);
- mTimerConfiguration.Bits.MsiInterruptCapablity = 0;
mTimerConfiguration.Bits.LevelTriggeredInterrupt = 1;
mTimerConfiguration.Bits.InterruptRoute = mTimerIrq;
}
@@ -829,7 +828,7 @@ TimerDriverInitialize ( // Show state of enabled HPET timer
//
DEBUG_CODE (
- if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0) {
+ if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0 && FeaturePcdGet (PcdHpetMsiEnable)) {
DEBUG ((DEBUG_INFO, "HPET Interrupt Mode MSI\n"));
} else {
DEBUG ((DEBUG_INFO, "HPET Interrupt Mode I/O APIC\n"));
|