APIC IDs may not be consecutive and start from zero, so we cannot really use it
as a direct index into cpus. Record apicid in struct cpu and have cpunum() look for it. Replace cpu->id with cpunum() everywhere, and replace cpu->id with cpu->apicid. Thanks to Xi Wang.
This commit is contained in:
parent
37939f24c2
commit
ae15515d80
6 changed files with 26 additions and 18 deletions
|
|
@ -110,7 +110,7 @@ panic(char *s)
|
|||
|
||||
cli();
|
||||
cons.locking = 0;
|
||||
cprintf("cpu%d: panic: ", cpu->id);
|
||||
cprintf("cpu with apicid %d: panic: ", cpu->apicid);
|
||||
cprintf(s);
|
||||
cprintf("\n");
|
||||
getcallerpcs(&s, pcs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue