npx.c (37101) | npx.c (40565) |
---|---|
1/*- 2 * Copyright (c) 1990 William Jolitz. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 | 1/*- 2 * Copyright (c) 1990 William Jolitz. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 |
35 * $Id: npx.c,v 1.60 1998/04/19 15:39:26 bde Exp $ | 35 * $Id: npx.c,v 1.61 1998/06/21 18:02:39 bde Exp $ |
36 */ 37 38#include "npx.h" 39#if NNPX > 0 40 41#include "opt_debug_npx.h" 42#include "opt_math_emulate.h" 43 --- 46 unchanged lines hidden (view full) --- 90extern void (*ovbcopy_vector) __P((const void *from, void *to, size_t len)); 91extern int (*copyin_vector) __P((const void *udaddr, void *kaddr, size_t len)); 92extern int (*copyout_vector) __P((const void *kaddr, void *udaddr, size_t len)); 93 94void i586_bcopy __P((const void *from, void *to, size_t len)); 95void i586_bzero __P((void *buf, size_t len)); 96int i586_copyin __P((const void *udaddr, void *kaddr, size_t len)); 97int i586_copyout __P((const void *kaddr, void *udaddr, size_t len)); | 36 */ 37 38#include "npx.h" 39#if NNPX > 0 40 41#include "opt_debug_npx.h" 42#include "opt_math_emulate.h" 43 --- 46 unchanged lines hidden (view full) --- 90extern void (*ovbcopy_vector) __P((const void *from, void *to, size_t len)); 91extern int (*copyin_vector) __P((const void *udaddr, void *kaddr, size_t len)); 92extern int (*copyout_vector) __P((const void *kaddr, void *udaddr, size_t len)); 93 94void i586_bcopy __P((const void *from, void *to, size_t len)); 95void i586_bzero __P((void *buf, size_t len)); 96int i586_copyin __P((const void *udaddr, void *kaddr, size_t len)); 97int i586_copyout __P((const void *kaddr, void *udaddr, size_t len)); |
98ointhand2_t npxintr; |
|
98 99#ifdef __GNUC__ 100 101#define fldcw(addr) __asm("fldcw %0" : : "m" (*(addr))) 102#define fnclex() __asm("fnclex") 103#define fninit() __asm("fninit") 104#define fnop() __asm("fnop") 105#define fnsave(addr) __asm __volatile("fnsave %0" : "=m" (*(addr))) --- 273 unchanged lines hidden (view full) --- 379 380/* 381 * Attach routine - announce which it is, and wire into system 382 */ 383int 384npxattach(dvp) 385 struct isa_device *dvp; 386{ | 99 100#ifdef __GNUC__ 101 102#define fldcw(addr) __asm("fldcw %0" : : "m" (*(addr))) 103#define fnclex() __asm("fnclex") 104#define fninit() __asm("fninit") 105#define fnop() __asm("fnop") 106#define fnsave(addr) __asm __volatile("fnsave %0" : "=m" (*(addr))) --- 273 unchanged lines hidden (view full) --- 380 381/* 382 * Attach routine - announce which it is, and wire into system 383 */ 384int 385npxattach(dvp) 386 struct isa_device *dvp; 387{ |
388 dvp->id_ointr = npxintr; 389 |
|
387 /* The caller has printed "irq 13" for the npx_irq13 case. */ 388 if (!npx_irq13) { 389 printf("npx%d: ", dvp->id_unit); 390 if (npx_ex16) 391 printf("INT 16 interface\n"); 392#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE) 393 else if (npx_exists) { 394 printf("error reporting broken; using 387 emulator\n"); --- 297 unchanged lines hidden --- | 390 /* The caller has printed "irq 13" for the npx_irq13 case. */ 391 if (!npx_irq13) { 392 printf("npx%d: ", dvp->id_unit); 393 if (npx_ex16) 394 printf("INT 16 interface\n"); 395#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE) 396 else if (npx_exists) { 397 printf("error reporting broken; using 387 emulator\n"); --- 297 unchanged lines hidden --- |