mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Oops, missing files
svn path=/trunk/; revision=1705
This commit is contained in:
parent
6fbeba1e7c
commit
58fc2c8cf8
3 changed files with 69 additions and 2 deletions
|
@ -18,7 +18,8 @@ OBJECTS_KE_I386 := \
|
|||
ke/i386/idt.o \
|
||||
ke/i386/ldt.o \
|
||||
ke/i386/brkpoint.o \
|
||||
ke/i386/kernel.o
|
||||
ke/i386/kernel.o \
|
||||
ke/i386/fpu.o
|
||||
|
||||
OBJECTS_MM_I386 := \
|
||||
mm/i386/memsafe.o \
|
||||
|
|
66
reactos/ntoskrnl/ke/i386/fpu.c
Normal file
66
reactos/ntoskrnl/ke/i386/fpu.c
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* ReactOS kernel
|
||||
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/*
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: ntoskrnl/ke/i386/fpu.c
|
||||
* PURPOSE: Handles the FPU
|
||||
* PROGRAMMER: David Welch (welch@mcmail.com)
|
||||
* UPDATE HISTORY:
|
||||
* Created 22/05/98
|
||||
*/
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
static ULONG HardwareMathSupport;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
VOID
|
||||
KiCheckFPU(VOID)
|
||||
{
|
||||
unsigned short int status;
|
||||
int cr0;
|
||||
|
||||
HardwareMathSupport = 0;
|
||||
|
||||
__asm__("clts\n\t");
|
||||
__asm__("fninit\n\t");
|
||||
__asm__("fstsw %0\n\t" : "=a" (status));
|
||||
if (status != 0)
|
||||
{
|
||||
__asm__("movl %%cr0, %0\n\t" : "=a" (cr0));
|
||||
cr0 = cr0 | 0x4;
|
||||
__asm__("movl %0, %%cr0\n\t" :
|
||||
: "a" (cr0));
|
||||
DbgPrint("No FPU detected\n");
|
||||
return;
|
||||
}
|
||||
/* FIXME: Do fsetpm */
|
||||
HardwareMathSupport = 1;
|
||||
}
|
|
@ -31,7 +31,7 @@
|
|||
#include <internal/ke.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/ps.h>
|
||||
#include <internal/arch/fpu.h>
|
||||
#include <internal/i386/fpu.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
Loading…
Reference in a new issue