kernel: waitdebugger on lapictimerset if apic->div == 0
This commit is contained in:
parent
71ea62eb5b
commit
0bbd79e0a5
|
@ -419,6 +419,10 @@ lapictimerset(uint64_t next)
|
||||||
|
|
||||||
period = apic->max;
|
period = apic->max;
|
||||||
if(next != 0){
|
if(next != 0){
|
||||||
|
if(apic->div == 0){
|
||||||
|
print("lapictimerset: apic not ready, wait for gdb\n");
|
||||||
|
waitdebugger();
|
||||||
|
}
|
||||||
period = next - fastticks(nil); /* fastticks is just rdtsc() */
|
period = next - fastticks(nil); /* fastticks is just rdtsc() */
|
||||||
period /= apic->div;
|
period /= apic->div;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue