Deleted Added
full compact
swtch.s (46548) swtch.s (47081)
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * $Id: swtch.s,v 1.79 1999/04/28 01:03:25 luoqi Exp $
36 * $Id: swtch.s,v 1.80 1999/05/06 09:44:49 bde Exp $
37 */
38
39#include "npx.h"
40#include "opt_user_ldt.h"
41#include "opt_vm86.h"
42
43#include <sys/rtprio.h>
44

--- 232 unchanged lines hidden (view full) ---

277 /* update common_tss.tss_esp0 pointer */
278 movl %ecx, _common_tss + TSS_ESP0
279
280#ifdef VM86
281 movl _cpuid, %esi
282 btrl %esi, _private_tss
283 jae 1f
284
37 */
38
39#include "npx.h"
40#include "opt_user_ldt.h"
41#include "opt_vm86.h"
42
43#include <sys/rtprio.h>
44

--- 232 unchanged lines hidden (view full) ---

277 /* update common_tss.tss_esp0 pointer */
278 movl %ecx, _common_tss + TSS_ESP0
279
280#ifdef VM86
281 movl _cpuid, %esi
282 btrl %esi, _private_tss
283 jae 1f
284
285 movl $GPROC0_SEL, %esi
286 movl $gd_common_tssd, %edi
287 addl %fs:0, %edi
288
289 /* move correct tss descriptor into GDT slot, then reload tr */
285 movl $gd_common_tssd, %edi
286 addl %fs:0, %edi
287
288 /* move correct tss descriptor into GDT slot, then reload tr */
290 leal _gdt(,%esi,8), %ebx /* entry in GDT */
289 movl _tss_gdt, %ebx /* entry in GDT */
291 movl 0(%edi), %eax
292 movl %eax, 0(%ebx)
293 movl 4(%edi), %eax
294 movl %eax, 4(%ebx)
290 movl 0(%edi), %eax
291 movl %eax, 0(%ebx)
292 movl 4(%edi), %eax
293 movl %eax, 4(%ebx)
295 shll $3, %esi /* GSEL(entry, SEL_KPL) */
294 movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
296 ltr %si
2971:
298#endif /* VM86 */
299
300 sti
301
302 /*
303 * XXX callers of cpu_switch() do a bogus splclock(). Locking should

--- 94 unchanged lines hidden (view full) ---

398 /* update common_tss.tss_esp0 pointer */
399 movl %esp, _common_tss + TSS_ESP0
400
401#ifdef VM86
402 movl $0, %esi
403 btrl %esi, _private_tss
404 jae 1f
405
295 ltr %si
2961:
297#endif /* VM86 */
298
299 sti
300
301 /*
302 * XXX callers of cpu_switch() do a bogus splclock(). Locking should

--- 94 unchanged lines hidden (view full) ---

397 /* update common_tss.tss_esp0 pointer */
398 movl %esp, _common_tss + TSS_ESP0
399
400#ifdef VM86
401 movl $0, %esi
402 btrl %esi, _private_tss
403 jae 1f
404
406 movl $GPROC0_SEL, %esi
407 movl $_common_tssd, %edi
408
409 /* move correct tss descriptor into GDT slot, then reload tr */
405 movl $_common_tssd, %edi
406
407 /* move correct tss descriptor into GDT slot, then reload tr */
410 leal _gdt(,%esi,8), %ebx /* entry in GDT */
408 movl _tss_gdt, %ebx /* entry in GDT */
411 movl 0(%edi), %eax
412 movl %eax, 0(%ebx)
413 movl 4(%edi), %eax
414 movl %eax, 4(%ebx)
409 movl 0(%edi), %eax
410 movl %eax, 0(%ebx)
411 movl 4(%edi), %eax
412 movl %eax, 4(%ebx)
415 shll $3, %esi /* GSEL(entry, SEL_KPL) */
413 movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
416 ltr %si
4171:
418#endif /* VM86 */
419
420 sti
421
422 /*
423 * XXX callers of cpu_switch() do a bogus splclock(). Locking should

--- 236 unchanged lines hidden (view full) ---

660 jae 3f
661#ifdef SMP
662 movl $gd_common_tssd, %edi
663 addl %fs:0, %edi
664#else
665 movl $_common_tssd, %edi
666#endif
6672:
414 ltr %si
4151:
416#endif /* VM86 */
417
418 sti
419
420 /*
421 * XXX callers of cpu_switch() do a bogus splclock(). Locking should

--- 236 unchanged lines hidden (view full) ---

658 jae 3f
659#ifdef SMP
660 movl $gd_common_tssd, %edi
661 addl %fs:0, %edi
662#else
663 movl $_common_tssd, %edi
664#endif
6652:
668 movl $GPROC0_SEL, %esi
669 /* move correct tss descriptor into GDT slot, then reload tr */
666 /* move correct tss descriptor into GDT slot, then reload tr */
670 leal _gdt(,%esi,8), %ebx /* entry in GDT */
667 movl _tss_gdt, %ebx /* entry in GDT */
671 movl 0(%edi), %eax
672 movl %eax, 0(%ebx)
673 movl 4(%edi), %eax
674 movl %eax, 4(%ebx)
668 movl 0(%edi), %eax
669 movl %eax, 0(%ebx)
670 movl 4(%edi), %eax
671 movl %eax, 4(%ebx)
675 shll $3, %esi /* GSEL(entry, SEL_KPL) */
672 movl $GPROC0_SEL*8, %esi /* GSEL(entry, SEL_KPL) */
676 ltr %si
6773:
678#endif /* VM86 */
679 movl P_VMSPACE(%ecx), %ebx
680#ifdef SMP
681 movl _cpuid, %eax
682#else
683 xorl %eax, %eax

--- 138 unchanged lines hidden ---
673 ltr %si
6743:
675#endif /* VM86 */
676 movl P_VMSPACE(%ecx), %ebx
677#ifdef SMP
678 movl _cpuid, %eax
679#else
680 xorl %eax, %eax

--- 138 unchanged lines hidden ---