mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
5025be3fc1
commit
0cdda8d6f0
|
@ -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"));
|
||||
|
|
Loading…
Reference in New Issue