[zion] Move more initialization into the ApicTimer class.

This commit is contained in:
Drew Galbraith 2023-08-01 21:48:20 -07:00
parent d99624daf6
commit f8de60e2dd
3 changed files with 12 additions and 11 deletions

View file

@ -11,12 +11,6 @@ class ApicTimer {
// after implementing HPET.
void Calibrate();
void WaitCalibration() {
while (calculated_frequency_ == 0) {
asm("hlt;");
}
}
private:
struct Calibration {
uint32_t initial_measurement = 0;
@ -29,6 +23,12 @@ class ApicTimer {
ApicTimer() {}
void StartCalibration();
void FinishCalibration();
void WaitCalibration() {
while (calculated_frequency_ == 0) {
asm("hlt;");
}
}
};
extern ApicTimer* gApicTimer;