summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2000-06-07 17:01:52 +0000
committeriwasaki <iwasaki@FreeBSD.org>2000-06-07 17:01:52 +0000
commit88e918b47416cfebf4458df15357766f184c17cb (patch)
treec89babea1828a0d9311f7c276d68b79674cec76b
parent3b62c472a01a68a303f7662a362a88f0b624be38 (diff)
downloadFreeBSD-src-88e918b47416cfebf4458df15357766f184c17cb.zip
FreeBSD-src-88e918b47416cfebf4458df15357766f184c17cb.tar.gz
Fix gdt pointer for the current cpu on SMP.
This will support power-off only. Fix for suspend/resume will come later. Also, MFC on this is shceduled on next week. Submitted by: sumitani@bd2.hnes.nec.co.jp Reviewed by: jlemon
-rw-r--r--sys/amd64/amd64/bios.c2
-rw-r--r--sys/i386/i386/bios.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c
index 541bd3f..687a792 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 541bd3f..687a792 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
OpenPOWER on IntegriCloud