diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c index 541bd3f7afd5..687a7920f288 100644 --- a/sys/amd64/amd64/bios.c +++ b/sys/amd64/amd64/bios.c @@ -262,7 +262,7 @@ set_bios_selectors(struct bios_segments *seg, int flags) union descriptor *p_gdt; #ifdef SMP - p_gdt = &gdt[cpuid]; + p_gdt = &gdt[cpuid * NGDT]; #else p_gdt = gdt; #endif diff --git a/sys/i386/i386/bios.c b/sys/i386/i386/bios.c index 541bd3f7afd5..687a7920f288 100644 --- a/sys/i386/i386/bios.c +++ b/sys/i386/i386/bios.c @@ -262,7 +262,7 @@ set_bios_selectors(struct bios_segments *seg, int flags) union descriptor *p_gdt; #ifdef SMP - p_gdt = &gdt[cpuid]; + p_gdt = &gdt[cpuid * NGDT]; #else p_gdt = gdt; #endif