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: --- 21 unchanged lines hidden (view full) --- 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 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/i386/isa/npx.c 117870 2003-07-22 08:11:17Z peter $"); |
39 40#include "opt_cpu.h" 41#include "opt_debug_npx.h" 42#include "opt_isa.h" |
43#include "opt_npx.h" 44 45#include <sys/param.h> 46#include <sys/systm.h> 47#include <sys/bus.h> 48#include <sys/kernel.h> 49#include <sys/lock.h> 50#include <sys/malloc.h> --- 49 unchanged lines hidden (view full) --- 100/* 101 * 387 and 287 Numeric Coprocessor Extension (NPX) Driver. 102 */ 103 104/* Configuration flags. */ 105#define NPX_DISABLE_I586_OPTIMIZED_BCOPY (1 << 0) 106#define NPX_DISABLE_I586_OPTIMIZED_BZERO (1 << 1) 107#define NPX_DISABLE_I586_OPTIMIZED_COPYIO (1 << 2) |
108 109#if defined(__GNUC__) && !defined(lint) 110 111#define fldcw(addr) __asm("fldcw %0" : : "m" (*(addr))) 112#define fnclex() __asm("fnclex") 113#define fninit() __asm("fninit") 114#define fnsave(addr) __asm __volatile("fnsave %0" : "=m" (*(addr))) 115#define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) --- 347 unchanged lines hidden (view full) --- 463 if (resource_int_value("npx", 0, "flags", &flags) != 0) 464 flags = 0; 465 466 if (flags) 467 device_printf(dev, "flags 0x%x ", flags); 468 if (npx_irq13) { 469 device_printf(dev, "using IRQ 13 interface\n"); 470 } else { |
471 if (npx_ex16) |
472 device_printf(dev, "INT 16 interface\n"); |
473 else 474 device_printf(dev, "WARNING: no FPU!\n"); |
475 } 476 npxinit(__INITIAL_NPXCW__); 477 478 if (npx_cleanstate_ready == 0) { 479 s = intr_disable(); 480 stop_emulating(); 481 fpusave(&npx_cleanstate); 482 start_emulating(); --- 636 unchanged lines hidden --- |