Use #ifdef DEV_NPX from opt_npx.h instead of #if NNPX > 0 from npx.h
This commit is contained in:
parent
2c170dd2dd
commit
558226eae7
@ -36,7 +36,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_user_ldt.h"
|
||||
|
||||
#include <sys/rtprio.h>
|
||||
@ -140,7 +140,7 @@ ENTRY(cpu_switch)
|
||||
/* XXX FIXME: we should be saving the local APIC TPR */
|
||||
#endif /* SMP */
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* have we used fp, and need a save? */
|
||||
cmpl %ecx,PCPU(NPXPROC)
|
||||
jne 1f
|
||||
@ -149,7 +149,7 @@ ENTRY(cpu_switch)
|
||||
call _npxsave /* do it in a big C function */
|
||||
popl %eax
|
||||
1:
|
||||
#endif /* NNPX > 0 */
|
||||
#endif /* DEV_NPX */
|
||||
|
||||
/* save is done, now choose a new process */
|
||||
sw1:
|
||||
@ -358,7 +358,7 @@ ENTRY(savectx)
|
||||
movl %edi,PCB_EDI(%ecx)
|
||||
movl %gs,PCB_GS(%ecx)
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/*
|
||||
* If npxproc == NULL, then the npx h/w state is irrelevant and the
|
||||
* state had better already be in the pcb. This is true for forks
|
||||
@ -391,7 +391,7 @@ ENTRY(savectx)
|
||||
pushl %eax
|
||||
call _bcopy
|
||||
addl $12,%esp
|
||||
#endif /* NNPX > 0 */
|
||||
#endif /* DEV_NPX */
|
||||
|
||||
1:
|
||||
ret
|
||||
|
@ -33,7 +33,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
#include <machine/asmacros.h>
|
||||
#include <sys/ipl.h>
|
||||
@ -151,7 +151,7 @@ IDTVEC(rsvd)
|
||||
pushl $0; TRAP(T_RESERVED)
|
||||
|
||||
IDTVEC(fpu)
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/*
|
||||
* Handle like an interrupt (except for accounting) so that we can
|
||||
* call npx_intr to clear the error. It would be better to handle
|
||||
@ -182,9 +182,9 @@ IDTVEC(fpu)
|
||||
incb PCPU(INTR_NESTING_LEVEL)
|
||||
MEXITCOUNT
|
||||
jmp _doreti
|
||||
#else /* NNPX > 0 */
|
||||
#else /* DEV_NPX */
|
||||
pushl $0; TRAP(T_ARITHTRAP)
|
||||
#endif /* NNPX > 0 */
|
||||
#endif /* DEV_NPX */
|
||||
|
||||
IDTVEC(align)
|
||||
TRAP(T_ALIGNFLT)
|
||||
|
@ -33,7 +33,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
#include <machine/asmacros.h>
|
||||
#include <sys/ipl.h>
|
||||
@ -151,7 +151,7 @@ IDTVEC(rsvd)
|
||||
pushl $0; TRAP(T_RESERVED)
|
||||
|
||||
IDTVEC(fpu)
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/*
|
||||
* Handle like an interrupt (except for accounting) so that we can
|
||||
* call npx_intr to clear the error. It would be better to handle
|
||||
@ -182,9 +182,9 @@ IDTVEC(fpu)
|
||||
incb PCPU(INTR_NESTING_LEVEL)
|
||||
MEXITCOUNT
|
||||
jmp _doreti
|
||||
#else /* NNPX > 0 */
|
||||
#else /* DEV_NPX */
|
||||
pushl $0; TRAP(T_ARITHTRAP)
|
||||
#endif /* NNPX > 0 */
|
||||
#endif /* DEV_NPX */
|
||||
|
||||
IDTVEC(align)
|
||||
TRAP(T_ALIGNFLT)
|
||||
|
@ -38,7 +38,6 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
#include "apm.h"
|
||||
#include "npx.h"
|
||||
#include "opt_atalk.h"
|
||||
#include "opt_compat.h"
|
||||
#include "opt_cpu.h"
|
||||
@ -47,6 +46,7 @@
|
||||
#include "opt_ipx.h"
|
||||
#include "opt_maxmem.h"
|
||||
#include "opt_msgbuf.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_perfmon.h"
|
||||
#include "opt_user_ldt.h"
|
||||
#include "opt_userconfig.h"
|
||||
@ -1097,7 +1097,7 @@ setregs(p, entry, stack, ps_strings)
|
||||
*/
|
||||
load_cr0(rcr0() | CR0_MP | CR0_TS);
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* Initialize the npx (if any) for the current process. */
|
||||
npxinit(__INITIAL_NPXCW__);
|
||||
#endif
|
||||
|
@ -33,7 +33,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
#include <machine/asmacros.h>
|
||||
#include <machine/cputypes.h>
|
||||
@ -60,7 +60,7 @@ _copyout_vector:
|
||||
.globl _ovbcopy_vector
|
||||
_ovbcopy_vector:
|
||||
.long _generic_bcopy
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
kernel_fpu_lock:
|
||||
.byte 0xfe
|
||||
.space 3
|
||||
@ -191,7 +191,7 @@ do0:
|
||||
ret
|
||||
#endif
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_bzero)
|
||||
movl 4(%esp),%edx
|
||||
movl 8(%esp),%ecx
|
||||
@ -331,7 +331,7 @@ intreg_i586_bzero:
|
||||
stosb
|
||||
popl %edi
|
||||
ret
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
ENTRY(i686_pagezero)
|
||||
pushl %edi
|
||||
@ -483,7 +483,7 @@ ENTRY(generic_bcopy)
|
||||
cld
|
||||
ret
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_bcopy)
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
@ -619,7 +619,7 @@ small_i586_bcopy:
|
||||
popl %esi
|
||||
cld
|
||||
ret
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
/*
|
||||
* Note: memcpy does not support overlapping copies
|
||||
@ -758,7 +758,7 @@ ENTRY(generic_copyout)
|
||||
/* bcopy(%esi, %edi, %ebx) */
|
||||
movl %ebx,%ecx
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ALIGN_TEXT
|
||||
slow_copyout:
|
||||
#endif
|
||||
@ -790,7 +790,7 @@ copyout_fault:
|
||||
movl $EFAULT,%eax
|
||||
ret
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_copyout)
|
||||
/*
|
||||
* Duplicated from generic_copyout. Could be done a bit better.
|
||||
@ -842,7 +842,7 @@ ENTRY(i586_copyout)
|
||||
call _fastmove
|
||||
addl $4,%esp
|
||||
jmp done_copyout
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
/*
|
||||
* copyin(from_user, to_kernel, len) - MP SAFE
|
||||
@ -869,7 +869,7 @@ ENTRY(generic_copyin)
|
||||
cmpl $VM_MAXUSER_ADDRESS,%edx
|
||||
ja copyin_fault
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ALIGN_TEXT
|
||||
slow_copyin:
|
||||
#endif
|
||||
@ -883,7 +883,7 @@ slow_copyin:
|
||||
rep
|
||||
movsb
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ALIGN_TEXT
|
||||
done_copyin:
|
||||
#endif
|
||||
@ -903,7 +903,7 @@ copyin_fault:
|
||||
movl $EFAULT,%eax
|
||||
ret
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_copyin)
|
||||
/*
|
||||
* Duplicated from generic_copyin. Could be done a bit better.
|
||||
@ -936,9 +936,9 @@ ENTRY(i586_copyin)
|
||||
call _fastmove
|
||||
addl $8,%esp
|
||||
jmp done_copyin
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
/* fastmove(src, dst, len)
|
||||
src in %esi
|
||||
dst in %edi
|
||||
@ -1124,7 +1124,7 @@ fastmove_tail_fault:
|
||||
movl $0,PCB_ONFAULT(%edx)
|
||||
movl $EFAULT,%eax
|
||||
ret
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
/*
|
||||
* fu{byte,sword,word} - MP SAFE
|
||||
|
@ -33,7 +33,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
#include <machine/asmacros.h>
|
||||
#include <machine/cputypes.h>
|
||||
@ -60,7 +60,7 @@ _copyout_vector:
|
||||
.globl _ovbcopy_vector
|
||||
_ovbcopy_vector:
|
||||
.long _generic_bcopy
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
kernel_fpu_lock:
|
||||
.byte 0xfe
|
||||
.space 3
|
||||
@ -191,7 +191,7 @@ do0:
|
||||
ret
|
||||
#endif
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_bzero)
|
||||
movl 4(%esp),%edx
|
||||
movl 8(%esp),%ecx
|
||||
@ -331,7 +331,7 @@ intreg_i586_bzero:
|
||||
stosb
|
||||
popl %edi
|
||||
ret
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
ENTRY(i686_pagezero)
|
||||
pushl %edi
|
||||
@ -483,7 +483,7 @@ ENTRY(generic_bcopy)
|
||||
cld
|
||||
ret
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_bcopy)
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
@ -619,7 +619,7 @@ small_i586_bcopy:
|
||||
popl %esi
|
||||
cld
|
||||
ret
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
/*
|
||||
* Note: memcpy does not support overlapping copies
|
||||
@ -758,7 +758,7 @@ ENTRY(generic_copyout)
|
||||
/* bcopy(%esi, %edi, %ebx) */
|
||||
movl %ebx,%ecx
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ALIGN_TEXT
|
||||
slow_copyout:
|
||||
#endif
|
||||
@ -790,7 +790,7 @@ copyout_fault:
|
||||
movl $EFAULT,%eax
|
||||
ret
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_copyout)
|
||||
/*
|
||||
* Duplicated from generic_copyout. Could be done a bit better.
|
||||
@ -842,7 +842,7 @@ ENTRY(i586_copyout)
|
||||
call _fastmove
|
||||
addl $4,%esp
|
||||
jmp done_copyout
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
/*
|
||||
* copyin(from_user, to_kernel, len) - MP SAFE
|
||||
@ -869,7 +869,7 @@ ENTRY(generic_copyin)
|
||||
cmpl $VM_MAXUSER_ADDRESS,%edx
|
||||
ja copyin_fault
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ALIGN_TEXT
|
||||
slow_copyin:
|
||||
#endif
|
||||
@ -883,7 +883,7 @@ slow_copyin:
|
||||
rep
|
||||
movsb
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ALIGN_TEXT
|
||||
done_copyin:
|
||||
#endif
|
||||
@ -903,7 +903,7 @@ copyin_fault:
|
||||
movl $EFAULT,%eax
|
||||
ret
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_copyin)
|
||||
/*
|
||||
* Duplicated from generic_copyin. Could be done a bit better.
|
||||
@ -936,9 +936,9 @@ ENTRY(i586_copyin)
|
||||
call _fastmove
|
||||
addl $8,%esp
|
||||
jmp done_copyin
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
/* fastmove(src, dst, len)
|
||||
src in %esi
|
||||
dst in %edi
|
||||
@ -1124,7 +1124,7 @@ fastmove_tail_fault:
|
||||
movl $0,PCB_ONFAULT(%edx)
|
||||
movl $EFAULT,%eax
|
||||
ret
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
/*
|
||||
* fu{byte,sword,word} - MP SAFE
|
||||
|
@ -36,7 +36,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_user_ldt.h"
|
||||
|
||||
#include <sys/rtprio.h>
|
||||
@ -140,7 +140,7 @@ ENTRY(cpu_switch)
|
||||
/* XXX FIXME: we should be saving the local APIC TPR */
|
||||
#endif /* SMP */
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* have we used fp, and need a save? */
|
||||
cmpl %ecx,PCPU(NPXPROC)
|
||||
jne 1f
|
||||
@ -149,7 +149,7 @@ ENTRY(cpu_switch)
|
||||
call _npxsave /* do it in a big C function */
|
||||
popl %eax
|
||||
1:
|
||||
#endif /* NNPX > 0 */
|
||||
#endif /* DEV_NPX */
|
||||
|
||||
/* save is done, now choose a new process */
|
||||
sw1:
|
||||
@ -358,7 +358,7 @@ ENTRY(savectx)
|
||||
movl %edi,PCB_EDI(%ecx)
|
||||
movl %gs,PCB_GS(%ecx)
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/*
|
||||
* If npxproc == NULL, then the npx h/w state is irrelevant and the
|
||||
* state had better already be in the pcb. This is true for forks
|
||||
@ -391,7 +391,7 @@ ENTRY(savectx)
|
||||
pushl %eax
|
||||
call _bcopy
|
||||
addl $12,%esp
|
||||
#endif /* NNPX > 0 */
|
||||
#endif /* DEV_NPX */
|
||||
|
||||
1:
|
||||
ret
|
||||
|
@ -42,10 +42,11 @@
|
||||
* 386 Trap and System call handling
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "opt_cpu.h"
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_clock.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_trap.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -98,7 +99,6 @@
|
||||
#include <ddb/ddb.h>
|
||||
|
||||
#include "isa.h"
|
||||
#include "npx.h"
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@ -409,7 +409,7 @@ trap(frame)
|
||||
break;
|
||||
|
||||
case T_DNA:
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* transparent fault (due to context switch "late") */
|
||||
if (npxdna())
|
||||
goto out;
|
||||
@ -443,7 +443,7 @@ trap(frame)
|
||||
goto out;
|
||||
|
||||
case T_DNA:
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/*
|
||||
* The kernel is apparently using npx for copying.
|
||||
* XXX this should be fatal unless the kernel has
|
||||
|
@ -41,7 +41,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_user_ldt.h"
|
||||
#ifdef PC98
|
||||
#include "opt_pc98.h"
|
||||
@ -141,7 +141,7 @@ cpu_fork(p1, p2, flags)
|
||||
return;
|
||||
}
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* Ensure that p1's pcb is up to date. */
|
||||
if (PCPU_GET(npxproc) == p1)
|
||||
npxsave(&p1->p_addr->u_pcb.pcb_savefpu);
|
||||
@ -234,9 +234,9 @@ cpu_exit(p)
|
||||
{
|
||||
struct pcb *pcb = &p->p_addr->u_pcb;
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
npxexit(p);
|
||||
#endif /* NNPX */
|
||||
#endif
|
||||
if (pcb->pcb_ext != 0) {
|
||||
/*
|
||||
* XXX do we need to move the TSS off the allocated pages
|
||||
|
@ -193,6 +193,9 @@ OLTR_NO_BULLSEYE_MAC opt_oltr.h
|
||||
# Defaults to NDGB*16.
|
||||
NDGBPORTS opt_dgb.h
|
||||
|
||||
# NPX options
|
||||
DEV_NPX opt_npx.h
|
||||
|
||||
# -------------------------------
|
||||
# EOF
|
||||
# -------------------------------
|
||||
|
@ -196,6 +196,9 @@ EPSON_BOUNCEDMA opt_pc98.h
|
||||
EPSON_MEMWIN opt_pc98.h
|
||||
LINE30 opt_syscons.h
|
||||
|
||||
# NPX options
|
||||
DEV_NPX opt_npx.h
|
||||
|
||||
# -------------------------------
|
||||
# EOF
|
||||
# -------------------------------
|
||||
|
@ -33,7 +33,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
#include <machine/asmacros.h>
|
||||
#include <sys/ipl.h>
|
||||
@ -151,7 +151,7 @@ IDTVEC(rsvd)
|
||||
pushl $0; TRAP(T_RESERVED)
|
||||
|
||||
IDTVEC(fpu)
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/*
|
||||
* Handle like an interrupt (except for accounting) so that we can
|
||||
* call npx_intr to clear the error. It would be better to handle
|
||||
@ -182,9 +182,9 @@ IDTVEC(fpu)
|
||||
incb PCPU(INTR_NESTING_LEVEL)
|
||||
MEXITCOUNT
|
||||
jmp _doreti
|
||||
#else /* NNPX > 0 */
|
||||
#else /* DEV_NPX */
|
||||
pushl $0; TRAP(T_ARITHTRAP)
|
||||
#endif /* NNPX > 0 */
|
||||
#endif /* DEV_NPX */
|
||||
|
||||
IDTVEC(align)
|
||||
TRAP(T_ALIGNFLT)
|
||||
|
@ -38,7 +38,6 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
#include "apm.h"
|
||||
#include "npx.h"
|
||||
#include "opt_atalk.h"
|
||||
#include "opt_compat.h"
|
||||
#include "opt_cpu.h"
|
||||
@ -47,6 +46,7 @@
|
||||
#include "opt_ipx.h"
|
||||
#include "opt_maxmem.h"
|
||||
#include "opt_msgbuf.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_perfmon.h"
|
||||
#include "opt_user_ldt.h"
|
||||
#include "opt_userconfig.h"
|
||||
@ -1097,7 +1097,7 @@ setregs(p, entry, stack, ps_strings)
|
||||
*/
|
||||
load_cr0(rcr0() | CR0_MP | CR0_TS);
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* Initialize the npx (if any) for the current process. */
|
||||
npxinit(__INITIAL_NPXCW__);
|
||||
#endif
|
||||
|
@ -33,7 +33,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
#include <machine/asmacros.h>
|
||||
#include <machine/cputypes.h>
|
||||
@ -60,7 +60,7 @@ _copyout_vector:
|
||||
.globl _ovbcopy_vector
|
||||
_ovbcopy_vector:
|
||||
.long _generic_bcopy
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
kernel_fpu_lock:
|
||||
.byte 0xfe
|
||||
.space 3
|
||||
@ -191,7 +191,7 @@ do0:
|
||||
ret
|
||||
#endif
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_bzero)
|
||||
movl 4(%esp),%edx
|
||||
movl 8(%esp),%ecx
|
||||
@ -331,7 +331,7 @@ intreg_i586_bzero:
|
||||
stosb
|
||||
popl %edi
|
||||
ret
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
ENTRY(i686_pagezero)
|
||||
pushl %edi
|
||||
@ -483,7 +483,7 @@ ENTRY(generic_bcopy)
|
||||
cld
|
||||
ret
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_bcopy)
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
@ -619,7 +619,7 @@ small_i586_bcopy:
|
||||
popl %esi
|
||||
cld
|
||||
ret
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
/*
|
||||
* Note: memcpy does not support overlapping copies
|
||||
@ -758,7 +758,7 @@ ENTRY(generic_copyout)
|
||||
/* bcopy(%esi, %edi, %ebx) */
|
||||
movl %ebx,%ecx
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ALIGN_TEXT
|
||||
slow_copyout:
|
||||
#endif
|
||||
@ -790,7 +790,7 @@ copyout_fault:
|
||||
movl $EFAULT,%eax
|
||||
ret
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_copyout)
|
||||
/*
|
||||
* Duplicated from generic_copyout. Could be done a bit better.
|
||||
@ -842,7 +842,7 @@ ENTRY(i586_copyout)
|
||||
call _fastmove
|
||||
addl $4,%esp
|
||||
jmp done_copyout
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
/*
|
||||
* copyin(from_user, to_kernel, len) - MP SAFE
|
||||
@ -869,7 +869,7 @@ ENTRY(generic_copyin)
|
||||
cmpl $VM_MAXUSER_ADDRESS,%edx
|
||||
ja copyin_fault
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ALIGN_TEXT
|
||||
slow_copyin:
|
||||
#endif
|
||||
@ -883,7 +883,7 @@ slow_copyin:
|
||||
rep
|
||||
movsb
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ALIGN_TEXT
|
||||
done_copyin:
|
||||
#endif
|
||||
@ -903,7 +903,7 @@ copyin_fault:
|
||||
movl $EFAULT,%eax
|
||||
ret
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
ENTRY(i586_copyin)
|
||||
/*
|
||||
* Duplicated from generic_copyin. Could be done a bit better.
|
||||
@ -936,9 +936,9 @@ ENTRY(i586_copyin)
|
||||
call _fastmove
|
||||
addl $8,%esp
|
||||
jmp done_copyin
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
#if defined(I586_CPU) && NNPX > 0
|
||||
#if defined(I586_CPU) && defined(DEV_NPX)
|
||||
/* fastmove(src, dst, len)
|
||||
src in %esi
|
||||
dst in %edi
|
||||
@ -1124,7 +1124,7 @@ fastmove_tail_fault:
|
||||
movl $0,PCB_ONFAULT(%edx)
|
||||
movl $EFAULT,%eax
|
||||
ret
|
||||
#endif /* I586_CPU && NNPX > 0 */
|
||||
#endif /* I586_CPU && defined(DEV_NPX) */
|
||||
|
||||
/*
|
||||
* fu{byte,sword,word} - MP SAFE
|
||||
|
@ -36,7 +36,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_user_ldt.h"
|
||||
|
||||
#include <sys/rtprio.h>
|
||||
@ -140,7 +140,7 @@ ENTRY(cpu_switch)
|
||||
/* XXX FIXME: we should be saving the local APIC TPR */
|
||||
#endif /* SMP */
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* have we used fp, and need a save? */
|
||||
cmpl %ecx,PCPU(NPXPROC)
|
||||
jne 1f
|
||||
@ -149,7 +149,7 @@ ENTRY(cpu_switch)
|
||||
call _npxsave /* do it in a big C function */
|
||||
popl %eax
|
||||
1:
|
||||
#endif /* NNPX > 0 */
|
||||
#endif /* DEV_NPX */
|
||||
|
||||
/* save is done, now choose a new process */
|
||||
sw1:
|
||||
@ -358,7 +358,7 @@ ENTRY(savectx)
|
||||
movl %edi,PCB_EDI(%ecx)
|
||||
movl %gs,PCB_GS(%ecx)
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/*
|
||||
* If npxproc == NULL, then the npx h/w state is irrelevant and the
|
||||
* state had better already be in the pcb. This is true for forks
|
||||
@ -391,7 +391,7 @@ ENTRY(savectx)
|
||||
pushl %eax
|
||||
call _bcopy
|
||||
addl $12,%esp
|
||||
#endif /* NNPX > 0 */
|
||||
#endif /* DEV_NPX */
|
||||
|
||||
1:
|
||||
ret
|
||||
|
@ -42,10 +42,11 @@
|
||||
* 386 Trap and System call handling
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "opt_cpu.h"
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_clock.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_trap.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -98,7 +99,6 @@
|
||||
#include <ddb/ddb.h>
|
||||
|
||||
#include "isa.h"
|
||||
#include "npx.h"
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@ -409,7 +409,7 @@ trap(frame)
|
||||
break;
|
||||
|
||||
case T_DNA:
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* transparent fault (due to context switch "late") */
|
||||
if (npxdna())
|
||||
goto out;
|
||||
@ -443,7 +443,7 @@ trap(frame)
|
||||
goto out;
|
||||
|
||||
case T_DNA:
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/*
|
||||
* The kernel is apparently using npx for copying.
|
||||
* XXX this should be fatal unless the kernel has
|
||||
|
@ -26,7 +26,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
#include <machine/asmacros.h> /* miscellaneous asm macros */
|
||||
#include <machine/trap.h>
|
||||
@ -64,7 +64,7 @@ ENTRY(vm86_bioscall)
|
||||
pushl %edi
|
||||
pushl %gs
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
movl PCPU(CURPROC),%ecx
|
||||
cmpl %ecx,PCPU(NPXPROC) /* do we need to save fp? */
|
||||
jne 1f
|
||||
|
@ -41,7 +41,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_user_ldt.h"
|
||||
#ifdef PC98
|
||||
#include "opt_pc98.h"
|
||||
@ -141,7 +141,7 @@ cpu_fork(p1, p2, flags)
|
||||
return;
|
||||
}
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* Ensure that p1's pcb is up to date. */
|
||||
if (PCPU_GET(npxproc) == p1)
|
||||
npxsave(&p1->p_addr->u_pcb.pcb_savefpu);
|
||||
@ -234,9 +234,9 @@ cpu_exit(p)
|
||||
{
|
||||
struct pcb *pcb = &p->p_addr->u_pcb;
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
npxexit(p);
|
||||
#endif /* NNPX */
|
||||
#endif
|
||||
if (pcb->pcb_ext != 0) {
|
||||
/*
|
||||
* XXX do we need to move the TSS off the allocated pages
|
||||
|
@ -42,10 +42,11 @@
|
||||
* 386 Trap and System call handling
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "opt_cpu.h"
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_clock.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_trap.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -98,7 +99,6 @@
|
||||
#include <ddb/ddb.h>
|
||||
|
||||
#include "isa.h"
|
||||
#include "npx.h"
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@ -409,7 +409,7 @@ trap(frame)
|
||||
break;
|
||||
|
||||
case T_DNA:
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* transparent fault (due to context switch "late") */
|
||||
if (npxdna())
|
||||
goto out;
|
||||
@ -443,7 +443,7 @@ trap(frame)
|
||||
goto out;
|
||||
|
||||
case T_DNA:
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/*
|
||||
* The kernel is apparently using npx for copying.
|
||||
* XXX this should be fatal unless the kernel has
|
||||
|
@ -39,7 +39,6 @@
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
#include "npx.h"
|
||||
#include "opt_atalk.h"
|
||||
#include "opt_compat.h"
|
||||
#include "opt_cpu.h"
|
||||
@ -48,6 +47,7 @@
|
||||
#include "opt_ipx.h"
|
||||
#include "opt_maxmem.h"
|
||||
#include "opt_msgbuf.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_perfmon.h"
|
||||
#include "opt_user_ldt.h"
|
||||
#include "opt_userconfig.h"
|
||||
@ -1111,7 +1111,7 @@ setregs(p, entry, stack, ps_strings)
|
||||
*/
|
||||
load_cr0(rcr0() | CR0_MP | CR0_TS);
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* Initialize the npx (if any) for the current process. */
|
||||
npxinit(__INITIAL_NPXCW__);
|
||||
#endif
|
||||
@ -1455,7 +1455,7 @@ getmemsize(int first)
|
||||
int pa_indx;
|
||||
int pg_n;
|
||||
int speculative_mprobe;
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
int msize;
|
||||
#endif
|
||||
unsigned under16;
|
||||
@ -1497,7 +1497,7 @@ getmemsize(int first)
|
||||
speculative_mprobe = FALSE;
|
||||
#endif
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
if (resource_int_value("npx", 0, "msize", &msize) == 0) {
|
||||
if (msize != 0) {
|
||||
Maxmem = msize / 4;
|
||||
|
@ -39,7 +39,6 @@
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
#include "npx.h"
|
||||
#include "opt_atalk.h"
|
||||
#include "opt_compat.h"
|
||||
#include "opt_cpu.h"
|
||||
@ -48,6 +47,7 @@
|
||||
#include "opt_ipx.h"
|
||||
#include "opt_maxmem.h"
|
||||
#include "opt_msgbuf.h"
|
||||
#include "opt_npx.h"
|
||||
#include "opt_perfmon.h"
|
||||
#include "opt_user_ldt.h"
|
||||
#include "opt_userconfig.h"
|
||||
@ -1111,7 +1111,7 @@ setregs(p, entry, stack, ps_strings)
|
||||
*/
|
||||
load_cr0(rcr0() | CR0_MP | CR0_TS);
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
/* Initialize the npx (if any) for the current process. */
|
||||
npxinit(__INITIAL_NPXCW__);
|
||||
#endif
|
||||
@ -1455,7 +1455,7 @@ getmemsize(int first)
|
||||
int pa_indx;
|
||||
int pg_n;
|
||||
int speculative_mprobe;
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
int msize;
|
||||
#endif
|
||||
unsigned under16;
|
||||
@ -1497,7 +1497,7 @@ getmemsize(int first)
|
||||
speculative_mprobe = FALSE;
|
||||
#endif
|
||||
|
||||
#if NNPX > 0
|
||||
#ifdef DEV_NPX
|
||||
if (resource_int_value("npx", 0, "msize", &msize) == 0) {
|
||||
if (msize != 0) {
|
||||
Maxmem = msize / 4;
|
||||
|
Loading…
Reference in New Issue
Block a user