From ae15515d80559ff95b315e3342c3baa00b87be1c Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Fri, 2 Sep 2016 08:31:13 -0400 Subject: 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. --- console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'console.c') diff --git a/console.c b/console.c index 298a6e7..d84c7ff 100644 --- a/console.c +++ b/console.c @@ -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); -- cgit v1.2.3