diff options
author | peter <peter@FreeBSD.org> | 1997-09-21 15:03:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-09-21 15:03:59 +0000 |
commit | aab3d0a47854b3b263f0dca21d8393aaa8e2a94d (patch) | |
tree | 8ffc4b981552e3e14a812ac68d386658a0d1bfb6 /sys/amd64/include | |
parent | 2f99a3221a4184f53b9eaca11bd32f7811c1862e (diff) | |
download | FreeBSD-src-aab3d0a47854b3b263f0dca21d8393aaa8e2a94d.zip FreeBSD-src-aab3d0a47854b3b263f0dca21d8393aaa8e2a94d.tar.gz |
Implement the parts needed for VM86 under SMP.
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/mptable.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index 06a5e96..0a55e81 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp_machdep.c,v 1.52 1997/09/07 22:03:59 fsmp Exp $ + * $Id: mp_machdep.c,v 1.53 1997/09/21 05:49:58 dyson Exp $ */ #include "opt_smp.h" @@ -247,8 +247,9 @@ extern pt_entry_t *KPTphys; /* Virtual address of per-cpu common_tss */ extern struct i386tss common_tss; #ifdef VM86 -extern u_int private_tss; /* flag indicating private tss */ extern struct segment_descriptor common_tssd; +extern u_int private_tss; /* flag indicating private tss */ +extern u_int my_tr; #endif /* VM86 */ /* IdlePTD per cpu */ @@ -403,7 +404,10 @@ mp_announce(void) void init_secondary(void) { - int gsel_tss, slot; + int gsel_tss; +#ifndef VM86 + u_int my_tr; +#endif r_gdt.rd_limit = sizeof(gdt[0]) * (NGDT + NCPU) - 1; r_gdt.rd_base = (int) gdt; @@ -411,14 +415,14 @@ init_secondary(void) lidt(&r_idt); lldt(_default_ldt); - slot = NGDT + cpuid; - gsel_tss = GSEL(slot, SEL_KPL); - gdt[slot].sd.sd_type = SDT_SYS386TSS; + my_tr = NGDT + cpuid; + gsel_tss = GSEL(my_tr, SEL_KPL); + gdt[my_tr].sd.sd_type = SDT_SYS386TSS; common_tss.tss_esp0 = 0; /* not used until after switch */ common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL); common_tss.tss_ioopt = (sizeof common_tss) << 16; #ifdef VM86 - common_tssd = gdt[slot].sd; + common_tssd = gdt[my_tr].sd; private_tss = 0; #endif /* VM86 */ ltr(gsel_tss); |