x86_64 mptable - maximum lapic id is 64
authorAlex Hornung <alex@alexhornung.com>
Sun, 29 Jul 2012 12:00:53 +0000 (12:00 +0000)
committerAlex Hornung <alex@alexhornung.com>
Sun, 29 Jul 2012 15:10:39 +0000 (15:10 +0000)
 * In x86_64, lapic ids with HT can be up to 64, not 32 as in i386.

Reported-by: Mihai Carabas, Francois Tigeot
sys/platform/pc64/x86_64/mptable.c

index cddb584..92eb052 100644 (file)
@@ -658,10 +658,10 @@ mptable_lapic_pass1_callback(void *xarg, const void *pos, int type)
                return 0;
 
        arg->cpu_count++;
-       if (ent->apic_id < 32) {
-               arg->ht_apicid_mask |= 1 << ent->apic_id;
+       if (ent->apic_id < 64) {
+               arg->ht_apicid_mask |= 1UL << ent->apic_id;
        } else if (arg->ht_fixup) {
-               kprintf("MPTABLE: lapic id > 32, disable HTT fixup\n");
+               kprintf("MPTABLE: lapic id > 64, disable HTT fixup\n");
                arg->ht_fixup = 0;
        }
        return 0;