dev,arch-x86: Added softstrobe mode to intel8254 timer (#1447)

This PR should fix the #1195
This commit is contained in:
Harshil Patel
2024-08-19 12:21:31 -07:00
committed by GitHub
parent 7413d3217c
commit ce4c2c6495

View File

@@ -210,8 +210,10 @@ Intel8254Timer::Counter::setRW(int rw_val)
void
Intel8254Timer::Counter::setMode(int mode_val)
{
if (mode_val == SoftwareStrobe)
warn_once("SoftwareStrobe mode is used and it is not well tested\n");
if (mode_val != InitTc && mode_val != RateGen &&
mode_val != SquareWave)
mode_val != SquareWave && mode_val != SoftwareStrobe)
panic("PIT mode %#x is not implemented: \n", mode_val);
mode = mode_val;
@@ -292,6 +294,7 @@ Intel8254Timer::Counter::CounterEvent::process()
break;
case RateGen:
case SquareWave:
case SoftwareStrobe:
setTo(counter->period);
break;
default: