From 0cdda8d6f0b48bb1f998c1e7487877331c5cae8c Mon Sep 17 00:00:00 2001 From: mdkinney Date: Fri, 2 Sep 2011 15:30:54 +0000 Subject: 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 --- PcAtChipsetPkg/HpetTimerDxe/HpetTimer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'PcAtChipsetPkg') 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")); -- cgit v1.2.3