kernel: waitdebugger on lapictimerset if apic->div == 0

This commit is contained in:
Giacomo Tesio 2016-12-26 01:55:19 +01:00
parent 71ea62eb5b
commit 0bbd79e0a5
1 changed files with 4 additions and 0 deletions

View File

@ -419,6 +419,10 @@ lapictimerset(uint64_t next)
period = apic->max;
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 /= apic->div;