Unbreak VESA on SMP.
This commit is contained in:
parent
2ee16532b6
commit
0f0fe5a4c5
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: swtch.s,v 1.79 1999/04/28 01:03:25 luoqi Exp $
|
||||
* $Id: swtch.s,v 1.80 1999/05/06 09:44:49 bde Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -282,17 +282,16 @@ _idle:
|
||||
btrl %esi, _private_tss
|
||||
jae 1f
|
||||
|
||||
movl $GPROC0_SEL, %esi
|
||||
movl $gd_common_tssd, %edi
|
||||
addl %fs:0, %edi
|
||||
|
||||
/* move correct tss descriptor into GDT slot, then reload tr */
|
||||
leal _gdt(,%esi,8), %ebx /* entry in GDT */
|
||||
movl _tss_gdt, %ebx /* entry in GDT */
|
||||
movl 0(%edi), %eax
|
||||
movl %eax, 0(%ebx)
|
||||
movl 4(%edi), %eax
|
||||
movl %eax, 4(%ebx)
|
||||
shll $3, %esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
1:
|
||||
#endif /* VM86 */
|
||||
@ -403,16 +402,15 @@ idle_loop:
|
||||
btrl %esi, _private_tss
|
||||
jae 1f
|
||||
|
||||
movl $GPROC0_SEL, %esi
|
||||
movl $_common_tssd, %edi
|
||||
|
||||
/* move correct tss descriptor into GDT slot, then reload tr */
|
||||
leal _gdt(,%esi,8), %ebx /* entry in GDT */
|
||||
movl _tss_gdt, %ebx /* entry in GDT */
|
||||
movl 0(%edi), %eax
|
||||
movl %eax, 0(%ebx)
|
||||
movl 4(%edi), %eax
|
||||
movl %eax, 4(%ebx)
|
||||
shll $3, %esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
1:
|
||||
#endif /* VM86 */
|
||||
@ -665,14 +663,13 @@ swtch_com:
|
||||
movl $_common_tssd, %edi
|
||||
#endif
|
||||
2:
|
||||
movl $GPROC0_SEL, %esi
|
||||
/* move correct tss descriptor into GDT slot, then reload tr */
|
||||
leal _gdt(,%esi,8), %ebx /* entry in GDT */
|
||||
movl _tss_gdt, %ebx /* entry in GDT */
|
||||
movl 0(%edi), %eax
|
||||
movl %eax, 0(%ebx)
|
||||
movl 4(%edi), %eax
|
||||
movl %eax, 4(%ebx)
|
||||
shll $3, %esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
3:
|
||||
#endif /* VM86 */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
|
||||
* $Id: genassym.c,v 1.67 1999/05/11 16:04:39 luoqi Exp $
|
||||
* $Id: genassym.c,v 1.68 1999/05/12 21:30:49 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "opt_vm86.h"
|
||||
@ -203,6 +203,7 @@ main()
|
||||
printf("#define\tGD_SWITCHTICKS %#x\n", OS(globaldata, gd_switchticks));
|
||||
#ifdef VM86
|
||||
printf("#define\tGD_COMMON_TSSD %#x\n", OS(globaldata, gd_common_tssd));
|
||||
printf("#define\tGD_TSS_GDT %#x\n", OS(globaldata, gd_tss_gdt));
|
||||
#endif
|
||||
#ifdef USER_LDT
|
||||
printf("#define\tGD_CURRENTLDT %#x\n", OS(globaldata, gd_currentldt));
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.333 1999/05/06 00:38:41 luoqi Exp $
|
||||
* $Id: machdep.c,v 1.334 1999/05/06 00:54:44 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -904,7 +904,7 @@ struct region_descriptor r_gdt, r_idt;
|
||||
|
||||
#ifdef VM86
|
||||
#ifndef SMP
|
||||
extern struct segment_descriptor common_tssd;
|
||||
extern struct segment_descriptor common_tssd, *tss_gdt;
|
||||
#endif
|
||||
int private_tss; /* flag indicating private tss */
|
||||
#endif /* VM86 */
|
||||
@ -1297,7 +1297,8 @@ init386(first)
|
||||
ltr(gsel_tss);
|
||||
#ifdef VM86
|
||||
private_tss = 0;
|
||||
common_tssd = gdt[GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
|
||||
dblfault_tss.tss_esp = dblfault_tss.tss_esp0 = dblfault_tss.tss_esp1 =
|
||||
|
@ -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.99 1999/04/30 22:09:40 msmith Exp $
|
||||
* $Id: mp_machdep.c,v 1.100 1999/05/08 17:48:22 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -483,7 +483,8 @@ init_secondary(void)
|
||||
common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
|
||||
common_tss.tss_ioopt = (sizeof common_tss) << 16;
|
||||
#ifdef VM86
|
||||
common_tssd = gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
ltr(gsel_tss);
|
||||
|
||||
|
@ -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.99 1999/04/30 22:09:40 msmith Exp $
|
||||
* $Id: mp_machdep.c,v 1.100 1999/05/08 17:48:22 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -483,7 +483,8 @@ init_secondary(void)
|
||||
common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
|
||||
common_tss.tss_ioopt = (sizeof common_tss) << 16;
|
||||
#ifdef VM86
|
||||
common_tssd = gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
ltr(gsel_tss);
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: swtch.s,v 1.79 1999/04/28 01:03:25 luoqi Exp $
|
||||
* $Id: swtch.s,v 1.80 1999/05/06 09:44:49 bde Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -282,17 +282,16 @@ _idle:
|
||||
btrl %esi, _private_tss
|
||||
jae 1f
|
||||
|
||||
movl $GPROC0_SEL, %esi
|
||||
movl $gd_common_tssd, %edi
|
||||
addl %fs:0, %edi
|
||||
|
||||
/* move correct tss descriptor into GDT slot, then reload tr */
|
||||
leal _gdt(,%esi,8), %ebx /* entry in GDT */
|
||||
movl _tss_gdt, %ebx /* entry in GDT */
|
||||
movl 0(%edi), %eax
|
||||
movl %eax, 0(%ebx)
|
||||
movl 4(%edi), %eax
|
||||
movl %eax, 4(%ebx)
|
||||
shll $3, %esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
1:
|
||||
#endif /* VM86 */
|
||||
@ -403,16 +402,15 @@ idle_loop:
|
||||
btrl %esi, _private_tss
|
||||
jae 1f
|
||||
|
||||
movl $GPROC0_SEL, %esi
|
||||
movl $_common_tssd, %edi
|
||||
|
||||
/* move correct tss descriptor into GDT slot, then reload tr */
|
||||
leal _gdt(,%esi,8), %ebx /* entry in GDT */
|
||||
movl _tss_gdt, %ebx /* entry in GDT */
|
||||
movl 0(%edi), %eax
|
||||
movl %eax, 0(%ebx)
|
||||
movl 4(%edi), %eax
|
||||
movl %eax, 4(%ebx)
|
||||
shll $3, %esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
1:
|
||||
#endif /* VM86 */
|
||||
@ -665,14 +663,13 @@ swtch_com:
|
||||
movl $_common_tssd, %edi
|
||||
#endif
|
||||
2:
|
||||
movl $GPROC0_SEL, %esi
|
||||
/* move correct tss descriptor into GDT slot, then reload tr */
|
||||
leal _gdt(,%esi,8), %ebx /* entry in GDT */
|
||||
movl _tss_gdt, %ebx /* entry in GDT */
|
||||
movl 0(%edi), %eax
|
||||
movl %eax, 0(%ebx)
|
||||
movl 4(%edi), %eax
|
||||
movl %eax, 4(%ebx)
|
||||
shll $3, %esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
3:
|
||||
#endif /* VM86 */
|
||||
|
@ -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.99 1999/04/30 22:09:40 msmith Exp $
|
||||
* $Id: mp_machdep.c,v 1.100 1999/05/08 17:48:22 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -483,7 +483,8 @@ init_secondary(void)
|
||||
common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
|
||||
common_tss.tss_ioopt = (sizeof common_tss) << 16;
|
||||
#ifdef VM86
|
||||
common_tssd = gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
ltr(gsel_tss);
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: globaldata.h,v 1.7 1999/02/22 15:13:34 bde Exp $
|
||||
* $Id: globaldata.h,v 1.8 1999/04/28 01:04:00 luoqi Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -48,6 +48,7 @@ struct globaldata {
|
||||
int gd_switchticks;
|
||||
#ifdef VM86
|
||||
struct segment_descriptor gd_common_tssd;
|
||||
struct segment_descriptor *gd_tss_gdt;
|
||||
#endif
|
||||
#ifdef USER_LDT
|
||||
int gd_currentldt;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
|
||||
* $Id: genassym.c,v 1.67 1999/05/11 16:04:39 luoqi Exp $
|
||||
* $Id: genassym.c,v 1.68 1999/05/12 21:30:49 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "opt_vm86.h"
|
||||
@ -203,6 +203,7 @@ main()
|
||||
printf("#define\tGD_SWITCHTICKS %#x\n", OS(globaldata, gd_switchticks));
|
||||
#ifdef VM86
|
||||
printf("#define\tGD_COMMON_TSSD %#x\n", OS(globaldata, gd_common_tssd));
|
||||
printf("#define\tGD_TSS_GDT %#x\n", OS(globaldata, gd_tss_gdt));
|
||||
#endif
|
||||
#ifdef USER_LDT
|
||||
printf("#define\tGD_CURRENTLDT %#x\n", OS(globaldata, gd_currentldt));
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: globals.s,v 1.9 1999/02/22 15:13:34 bde Exp $
|
||||
* $Id: globals.s,v 1.10 1999/04/28 01:03:19 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "opt_vm86.h"
|
||||
@ -72,8 +72,9 @@ globaldata:
|
||||
.set gd_switchticks,globaldata + GD_SWITCHTICKS
|
||||
|
||||
#ifdef VM86
|
||||
.globl gd_common_tssd
|
||||
.globl gd_common_tssd, gd_tss_gdt
|
||||
.set gd_common_tssd,globaldata + GD_COMMON_TSSD
|
||||
.set gd_tss_gdt,globaldata + GD_TSS_GDT
|
||||
#endif
|
||||
|
||||
#ifdef USER_LDT
|
||||
@ -92,8 +93,9 @@ globaldata:
|
||||
.set _switchticks,globaldata + GD_SWITCHTICKS
|
||||
|
||||
#ifdef VM86
|
||||
.globl _common_tssd
|
||||
.globl _common_tssd, _tss_gdt
|
||||
.set _common_tssd,globaldata + GD_COMMON_TSSD
|
||||
.set _tss_gdt,globaldata + GD_TSS_GDT
|
||||
#endif
|
||||
|
||||
#ifdef USER_LDT
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.333 1999/05/06 00:38:41 luoqi Exp $
|
||||
* $Id: machdep.c,v 1.334 1999/05/06 00:54:44 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -904,7 +904,7 @@ struct region_descriptor r_gdt, r_idt;
|
||||
|
||||
#ifdef VM86
|
||||
#ifndef SMP
|
||||
extern struct segment_descriptor common_tssd;
|
||||
extern struct segment_descriptor common_tssd, *tss_gdt;
|
||||
#endif
|
||||
int private_tss; /* flag indicating private tss */
|
||||
#endif /* VM86 */
|
||||
@ -1297,7 +1297,8 @@ init386(first)
|
||||
ltr(gsel_tss);
|
||||
#ifdef VM86
|
||||
private_tss = 0;
|
||||
common_tssd = gdt[GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
|
||||
dblfault_tss.tss_esp = dblfault_tss.tss_esp0 = dblfault_tss.tss_esp1 =
|
||||
|
@ -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.99 1999/04/30 22:09:40 msmith Exp $
|
||||
* $Id: mp_machdep.c,v 1.100 1999/05/08 17:48:22 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -483,7 +483,8 @@ init_secondary(void)
|
||||
common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
|
||||
common_tss.tss_ioopt = (sizeof common_tss) << 16;
|
||||
#ifdef VM86
|
||||
common_tssd = gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
ltr(gsel_tss);
|
||||
|
||||
|
@ -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.99 1999/04/30 22:09:40 msmith Exp $
|
||||
* $Id: mp_machdep.c,v 1.100 1999/05/08 17:48:22 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -483,7 +483,8 @@ init_secondary(void)
|
||||
common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
|
||||
common_tss.tss_ioopt = (sizeof common_tss) << 16;
|
||||
#ifdef VM86
|
||||
common_tssd = gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
ltr(gsel_tss);
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: swtch.s,v 1.79 1999/04/28 01:03:25 luoqi Exp $
|
||||
* $Id: swtch.s,v 1.80 1999/05/06 09:44:49 bde Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -282,17 +282,16 @@ _idle:
|
||||
btrl %esi, _private_tss
|
||||
jae 1f
|
||||
|
||||
movl $GPROC0_SEL, %esi
|
||||
movl $gd_common_tssd, %edi
|
||||
addl %fs:0, %edi
|
||||
|
||||
/* move correct tss descriptor into GDT slot, then reload tr */
|
||||
leal _gdt(,%esi,8), %ebx /* entry in GDT */
|
||||
movl _tss_gdt, %ebx /* entry in GDT */
|
||||
movl 0(%edi), %eax
|
||||
movl %eax, 0(%ebx)
|
||||
movl 4(%edi), %eax
|
||||
movl %eax, 4(%ebx)
|
||||
shll $3, %esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
1:
|
||||
#endif /* VM86 */
|
||||
@ -403,16 +402,15 @@ idle_loop:
|
||||
btrl %esi, _private_tss
|
||||
jae 1f
|
||||
|
||||
movl $GPROC0_SEL, %esi
|
||||
movl $_common_tssd, %edi
|
||||
|
||||
/* move correct tss descriptor into GDT slot, then reload tr */
|
||||
leal _gdt(,%esi,8), %ebx /* entry in GDT */
|
||||
movl _tss_gdt, %ebx /* entry in GDT */
|
||||
movl 0(%edi), %eax
|
||||
movl %eax, 0(%ebx)
|
||||
movl 4(%edi), %eax
|
||||
movl %eax, 4(%ebx)
|
||||
shll $3, %esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
1:
|
||||
#endif /* VM86 */
|
||||
@ -665,14 +663,13 @@ swtch_com:
|
||||
movl $_common_tssd, %edi
|
||||
#endif
|
||||
2:
|
||||
movl $GPROC0_SEL, %esi
|
||||
/* move correct tss descriptor into GDT slot, then reload tr */
|
||||
leal _gdt(,%esi,8), %ebx /* entry in GDT */
|
||||
movl _tss_gdt, %ebx /* entry in GDT */
|
||||
movl 0(%edi), %eax
|
||||
movl %eax, 0(%ebx)
|
||||
movl 4(%edi), %eax
|
||||
movl %eax, 4(%ebx)
|
||||
shll $3, %esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
3:
|
||||
#endif /* VM86 */
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: vm86.c,v 1.23 1999/03/18 18:43:03 jlemon Exp $
|
||||
* $Id: vm86.c,v 1.24 1999/04/28 01:03:27 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "opt_vm86.h"
|
||||
@ -49,9 +49,6 @@
|
||||
#include <machine/specialreg.h>
|
||||
|
||||
extern int i386_extend_pcb __P((struct proc *));
|
||||
#ifndef SMP
|
||||
extern struct segment_descriptor common_tssd;
|
||||
#endif
|
||||
extern int vm86paddr, vm86pa;
|
||||
extern struct pcb *vm86pcb;
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: vm86bios.s,v 1.11 1999/05/11 16:04:40 luoqi Exp $
|
||||
* $Id: vm86bios.s,v 1.12 1999/05/12 21:30:51 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "opt_vm86.h"
|
||||
@ -98,8 +98,7 @@ ENTRY(vm86_bioscall)
|
||||
pushl %eax /* save curpcb */
|
||||
movl %edx,_curpcb /* set curpcb to vm86pcb */
|
||||
|
||||
movl $GPROC0_SEL,%esi
|
||||
leal _gdt(,%esi,8),%ebx /* entry in GDT */
|
||||
movl _tss_gdt,%ebx /* entry in GDT */
|
||||
movl 0(%ebx),%eax
|
||||
movl %eax,SCR_TSS0(%edx) /* save first word */
|
||||
movl 4(%ebx),%eax
|
||||
@ -111,7 +110,7 @@ ENTRY(vm86_bioscall)
|
||||
movl %eax,0(%ebx)
|
||||
movl 4(%edi),%eax
|
||||
movl %eax,4(%ebx)
|
||||
shll $3,%esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8,%esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
|
||||
movl %cr3,%eax
|
||||
@ -176,13 +175,12 @@ ENTRY(vm86_biosret)
|
||||
|
||||
movl $0,_in_vm86call /* reset trapflag */
|
||||
|
||||
movl $GPROC0_SEL,%esi
|
||||
leal _gdt(,%esi,8),%ebx /* entry in GDT */
|
||||
movl _tss_gdt,%ebx /* entry in GDT */
|
||||
movl SCR_TSS0(%edx),%eax
|
||||
movl %eax,0(%ebx) /* restore first word */
|
||||
movl SCR_TSS1(%edx),%eax
|
||||
movl %eax,4(%ebx) /* restore second word */
|
||||
shll $3,%esi /* GSEL(entry, SEL_KPL) */
|
||||
movl $GPROC0_SEL*8,%esi /* GSEL(entry, SEL_KPL) */
|
||||
ltr %si
|
||||
|
||||
popl _curpcb /* restore curpcb/curproc */
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: asnames.h,v 1.33 1999/05/06 09:44:52 bde Exp $
|
||||
* $Id: asnames.h,v 1.34 1999/05/09 19:01:47 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_ASNAMES_H_
|
||||
@ -400,6 +400,7 @@
|
||||
#define _ss_eflags FS(ss_eflags)
|
||||
#define _switchticks FS(switchticks)
|
||||
#define _switchtime FS(switchtime)
|
||||
#define _tss_gdt FS(tss_gdt)
|
||||
#define _idlestack FS(idlestack)
|
||||
#define _idlestack_top FS(idlestack_top)
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: globaldata.h,v 1.7 1999/02/22 15:13:34 bde Exp $
|
||||
* $Id: globaldata.h,v 1.8 1999/04/28 01:04:00 luoqi Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -48,6 +48,7 @@ struct globaldata {
|
||||
int gd_switchticks;
|
||||
#ifdef VM86
|
||||
struct segment_descriptor gd_common_tssd;
|
||||
struct segment_descriptor *gd_tss_gdt;
|
||||
#endif
|
||||
#ifdef USER_LDT
|
||||
int gd_currentldt;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: globals.h,v 1.1 1999/04/28 01:04:01 luoqi Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_GLOBALS_H_
|
||||
@ -90,6 +90,7 @@
|
||||
|
||||
#ifdef VM86
|
||||
#define common_tssd GLOBAL_LVALUE(common_tssd, struct segment_descriptor)
|
||||
#define tss_gdt GLOBAL_LVALUE(tss_gdt, struct segment_descriptor *)
|
||||
#endif
|
||||
|
||||
#ifdef USER_LDT
|
||||
@ -120,6 +121,7 @@ GLOBAL_FUNC(switchticks)
|
||||
|
||||
#ifdef VM86
|
||||
GLOBAL_FUNC(common_tssd)
|
||||
GLOBAL_FUNC(tss_gdt)
|
||||
#endif
|
||||
|
||||
#ifdef USER_LDT
|
||||
|
@ -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.99 1999/04/30 22:09:40 msmith Exp $
|
||||
* $Id: mp_machdep.c,v 1.100 1999/05/08 17:48:22 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -483,7 +483,8 @@ init_secondary(void)
|
||||
common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
|
||||
common_tss.tss_ioopt = (sizeof common_tss) << 16;
|
||||
#ifdef VM86
|
||||
common_tssd = gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
ltr(gsel_tss);
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: globaldata.h,v 1.7 1999/02/22 15:13:34 bde Exp $
|
||||
* $Id: globaldata.h,v 1.8 1999/04/28 01:04:00 luoqi Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -48,6 +48,7 @@ struct globaldata {
|
||||
int gd_switchticks;
|
||||
#ifdef VM86
|
||||
struct segment_descriptor gd_common_tssd;
|
||||
struct segment_descriptor *gd_tss_gdt;
|
||||
#endif
|
||||
#ifdef USER_LDT
|
||||
int gd_currentldt;
|
||||
|
@ -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.99 1999/04/30 22:09:40 msmith Exp $
|
||||
* $Id: mp_machdep.c,v 1.100 1999/05/08 17:48:22 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
@ -483,7 +483,8 @@ init_secondary(void)
|
||||
common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
|
||||
common_tss.tss_ioopt = (sizeof common_tss) << 16;
|
||||
#ifdef VM86
|
||||
common_tssd = gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[myid * NGDT + GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
ltr(gsel_tss);
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.115 1999/05/06 00:39:00 luoqi Exp $
|
||||
* $Id: machdep.c,v 1.116 1999/05/06 00:54:54 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -917,7 +917,7 @@ struct region_descriptor r_gdt, r_idt;
|
||||
|
||||
#ifdef VM86
|
||||
#ifndef SMP
|
||||
extern struct segment_descriptor common_tssd;
|
||||
extern struct segment_descriptor common_tssd, *tss_gdt;
|
||||
#endif
|
||||
int private_tss; /* flag indicating private tss */
|
||||
#endif /* VM86 */
|
||||
@ -1317,7 +1317,8 @@ init386(first)
|
||||
ltr(gsel_tss);
|
||||
#ifdef VM86
|
||||
private_tss = 0;
|
||||
common_tssd = gdt[GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
|
||||
dblfault_tss.tss_esp = dblfault_tss.tss_esp0 = dblfault_tss.tss_esp1 =
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.115 1999/05/06 00:39:00 luoqi Exp $
|
||||
* $Id: machdep.c,v 1.116 1999/05/06 00:54:54 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -917,7 +917,7 @@ struct region_descriptor r_gdt, r_idt;
|
||||
|
||||
#ifdef VM86
|
||||
#ifndef SMP
|
||||
extern struct segment_descriptor common_tssd;
|
||||
extern struct segment_descriptor common_tssd, *tss_gdt;
|
||||
#endif
|
||||
int private_tss; /* flag indicating private tss */
|
||||
#endif /* VM86 */
|
||||
@ -1317,7 +1317,8 @@ init386(first)
|
||||
ltr(gsel_tss);
|
||||
#ifdef VM86
|
||||
private_tss = 0;
|
||||
common_tssd = gdt[GPROC0_SEL].sd;
|
||||
tss_gdt = &gdt[GPROC0_SEL].sd;
|
||||
common_tssd = *tss_gdt;
|
||||
#endif
|
||||
|
||||
dblfault_tss.tss_esp = dblfault_tss.tss_esp0 = dblfault_tss.tss_esp1 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user