internal HalClockApic(Apic apic, RTClockApic rtClock, PMClock pmClock) { this.apic = apic; this.rtClock = rtClock; this.pmClock = pmClock; this.hpetClock = null; this.spinLock = new SpinLock(SpinLock.Types.MpHalClock); }
internal void SwitchToHpetClock(HpetClock hc) { // Change rt clock interrupt frequency to appropriate // rate for HPET main clock. rtClock.SetFrequency(HpetClock.UpdateFrequency(hc.Hpet)); hpetClock = hc; DebugStub.Print("Hal switching to HpetClock.\n"); }
internal HalClockApic(Apic apic, RTClockApic rtClock, PMClock /* ! */ pmClock) { this.apic = apic; this.rtClock = rtClock; this.pmClock = pmClock; this.hpetClock = null; this.tscSnapshot = 0; this.ticksSnapshot = 0; int ticksPerKernelTick = (int)(Processor.CyclesPerSecond / 10000000); this.tickScale = (1 << tickRoll) / ticksPerKernelTick; lastKernelTicks = InternalGetKernelTicks(); }
internal void SwitchToHpetClock(HpetClock hc) { // Change rt clock interrupt frequency to appropriate // rate for HPET main clock. bool en = Processor.DisableInterrupts(); this.AcquireLock(); try { rtClock.SetFrequency(HpetClock.UpdateFrequency(hc.Hpet)); hpetClock = hc; } finally { this.ReleaseLock(); Processor.RestoreInterrupts(en); } DebugStub.Print("Hal switching to HpetClock.\n"); }