From ce4c2c649566d57c7b5c78d29f2199880b9d5a4c Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 19 Aug 2024 12:21:31 -0700 Subject: [PATCH] dev,arch-x86: Added softstrobe mode to intel8254 timer (#1447) This PR should fix the #1195 --- src/dev/intel_8254_timer.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dev/intel_8254_timer.cc b/src/dev/intel_8254_timer.cc index df9b4b3d4e..548de0dd1e 100644 --- a/src/dev/intel_8254_timer.cc +++ b/src/dev/intel_8254_timer.cc @@ -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: