mirror of
https://github.com/reactos/reactos.git
synced 2025-07-25 10:53:38 +00:00
Moved microkernel to the architecture specific directory
svn path=/trunk/; revision=1704
This commit is contained in:
parent
2a613a30c4
commit
6fbeba1e7c
7 changed files with 99 additions and 63 deletions
|
@ -1,4 +1,4 @@
|
||||||
# $Id: Makefile,v 1.23 2001/03/15 23:41:31 dwelch Exp $
|
# $Id: Makefile,v 1.24 2001/03/16 23:04:59 dwelch Exp $
|
||||||
#
|
#
|
||||||
# ReactOS Operating System
|
# ReactOS Operating System
|
||||||
#
|
#
|
||||||
|
@ -94,7 +94,6 @@ OBJECTS_KE = \
|
||||||
ke/dpc.o \
|
ke/dpc.o \
|
||||||
ke/error.o \
|
ke/error.o \
|
||||||
ke/event.o \
|
ke/event.o \
|
||||||
ke/kernel.o \
|
|
||||||
ke/kqueue.o \
|
ke/kqueue.o \
|
||||||
ke/main.o \
|
ke/main.o \
|
||||||
ke/mutex.o \
|
ke/mutex.o \
|
||||||
|
|
|
@ -17,7 +17,8 @@ OBJECTS_KE_I386 := \
|
||||||
ke/i386/gdt.o \
|
ke/i386/gdt.o \
|
||||||
ke/i386/idt.o \
|
ke/i386/idt.o \
|
||||||
ke/i386/ldt.o \
|
ke/i386/ldt.o \
|
||||||
ke/i386/brkpoint.o
|
ke/i386/brkpoint.o \
|
||||||
|
ke/i386/kernel.o
|
||||||
|
|
||||||
OBJECTS_MM_I386 := \
|
OBJECTS_MM_I386 := \
|
||||||
mm/i386/memsafe.o \
|
mm/i386/memsafe.o \
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: bug.c,v 1.16 2001/03/14 00:21:22 dwelch Exp $
|
/* $Id: bug.c,v 1.17 2001/03/16 23:04:59 dwelch Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/ke/bug.c
|
* FILE: ntoskrnl/ke/bug.c
|
||||||
|
@ -59,26 +59,26 @@ KeDeregisterBugCheckCallback (PKBUGCHECK_CALLBACK_RECORD CallbackRecord)
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN STDCALL
|
BOOLEAN STDCALL
|
||||||
KeRegisterBugCheckCallback (PKBUGCHECK_CALLBACK_RECORD CallbackRecord,
|
KeRegisterBugCheckCallback (PKBUGCHECK_CALLBACK_RECORD CallbackRecord,
|
||||||
PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine,
|
PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine,
|
||||||
PVOID Buffer,
|
PVOID Buffer,
|
||||||
ULONG Length,
|
ULONG Length,
|
||||||
PUCHAR Component)
|
PUCHAR Component)
|
||||||
{
|
{
|
||||||
InsertTailList(&BugcheckCallbackListHead,&CallbackRecord->Entry);
|
InsertTailList(&BugcheckCallbackListHead, &CallbackRecord->Entry);
|
||||||
CallbackRecord->Length=Length;
|
CallbackRecord->Length = Length;
|
||||||
CallbackRecord->Buffer=Buffer;
|
CallbackRecord->Buffer = Buffer;
|
||||||
CallbackRecord->Component=Component;
|
CallbackRecord->Component = Component;
|
||||||
CallbackRecord->CallbackRoutine=CallbackRoutine;
|
CallbackRecord->CallbackRoutine = CallbackRoutine;
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
KeBugCheckEx (ULONG BugCheckCode,
|
KeBugCheckEx (ULONG BugCheckCode,
|
||||||
ULONG BugCheckParameter1,
|
ULONG BugCheckParameter1,
|
||||||
ULONG BugCheckParameter2,
|
ULONG BugCheckParameter2,
|
||||||
ULONG BugCheckParameter3,
|
ULONG BugCheckParameter3,
|
||||||
ULONG BugCheckParameter4)
|
ULONG BugCheckParameter4)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Brings the system down in a controlled manner when an
|
* FUNCTION: Brings the system down in a controlled manner when an
|
||||||
* inconsistency that might otherwise cause corruption has been detected
|
* inconsistency that might otherwise cause corruption has been detected
|
||||||
|
@ -119,7 +119,7 @@ KeBugCheckEx (ULONG BugCheckCode,
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
KeBugCheck (ULONG BugCheckCode)
|
KeBugCheck (ULONG BugCheckCode)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: Brings the system down in a controlled manner when an
|
* FUNCTION: Brings the system down in a controlled manner when an
|
||||||
* inconsistency that might otherwise cause corruption has been detected
|
* inconsistency that might otherwise cause corruption has been detected
|
||||||
|
|
|
@ -16,9 +16,8 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: catch.c,v 1.10 2001/03/16 18:11:22 dwelch Exp $
|
/* $Id: catch.c,v 1.11 2001/03/16 23:04:59 dwelch Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/ke/catch.c
|
* FILE: ntoskrnl/ke/catch.c
|
||||||
* PURPOSE: Exception handling
|
* PURPOSE: Exception handling
|
||||||
|
|
|
@ -1,5 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* 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
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/ke/kernel.c
|
* FILE: ntoskrnl/ke/kernel.c
|
||||||
* PURPOSE: Initializes the kernel
|
* PURPOSE: Initializes the kernel
|
||||||
|
@ -14,40 +31,15 @@
|
||||||
#include <internal/ke.h>
|
#include <internal/ke.h>
|
||||||
#include <internal/mm.h>
|
#include <internal/mm.h>
|
||||||
#include <internal/ps.h>
|
#include <internal/ps.h>
|
||||||
|
#include <internal/arch/fpu.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <internal/debug.h>
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
|
||||||
|
|
||||||
static ULONG HardwareMathSupport;
|
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
VOID KiCheckFPU(VOID)
|
VOID
|
||||||
{
|
KeInit1(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;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID KeInit1(VOID)
|
|
||||||
{
|
{
|
||||||
KiCheckFPU();
|
KiCheckFPU();
|
||||||
|
|
||||||
|
@ -55,7 +47,8 @@ VOID KeInit1(VOID)
|
||||||
KeInitInterrupts ();
|
KeInitInterrupts ();
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID KeInit2(VOID)
|
VOID
|
||||||
|
KeInit2(VOID)
|
||||||
{
|
{
|
||||||
PVOID PcrPage;
|
PVOID PcrPage;
|
||||||
|
|
||||||
|
@ -80,3 +73,9 @@ VOID KeInit2(VOID)
|
||||||
(ULONG)PcrPage);
|
(ULONG)PcrPage);
|
||||||
memset((PVOID)KPCR_BASE, 0, 4096);
|
memset((PVOID)KPCR_BASE, 0, 4096);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,28 @@
|
||||||
/* $Id: process.c,v 1.6 2000/12/23 02:37:40 dwelch Exp $
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
/* $Id: process.c,v 1.7 2001/03/16 23:04:59 dwelch Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/ke/process.c
|
* FILE: ntoskrnl/ke/process.c
|
||||||
* PURPOSE: Microkernel process management
|
* PURPOSE: Microkernel process management
|
||||||
* PROGRAMMER: David Welch (welch@cwcom.net)
|
* PROGRAMMER: David Welch (welch@cwcom.net)
|
||||||
|
* PORTABILITY: No.
|
||||||
* UPDATE HISTORY:
|
* UPDATE HISTORY:
|
||||||
* Created 22/05/98
|
* Created 22/05/98
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,23 @@
|
||||||
/* $Id: sem.c,v 1.7 2000/06/29 23:35:38 dwelch Exp $
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
/* $Id: sem.c,v 1.8 2001/03/16 23:04:59 dwelch Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/ke/sem.c
|
* FILE: ntoskrnl/ke/sem.c
|
||||||
* PURPOSE: Implements kernel semaphores
|
* PURPOSE: Implements kernel semaphores
|
||||||
|
@ -20,9 +37,10 @@
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
VOID STDCALL KeInitializeSemaphore (PKSEMAPHORE Semaphore,
|
VOID STDCALL
|
||||||
LONG Count,
|
KeInitializeSemaphore (PKSEMAPHORE Semaphore,
|
||||||
LONG Limit)
|
LONG Count,
|
||||||
|
LONG Limit)
|
||||||
{
|
{
|
||||||
KeInitializeDispatcherHeader(&Semaphore->Header,
|
KeInitializeDispatcherHeader(&Semaphore->Header,
|
||||||
InternalSemaphoreType,
|
InternalSemaphoreType,
|
||||||
|
@ -31,15 +49,17 @@ VOID STDCALL KeInitializeSemaphore (PKSEMAPHORE Semaphore,
|
||||||
Semaphore->Limit=Limit;
|
Semaphore->Limit=Limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
LONG STDCALL KeReadStateSemaphore (PKSEMAPHORE Semaphore)
|
LONG STDCALL
|
||||||
|
KeReadStateSemaphore (PKSEMAPHORE Semaphore)
|
||||||
{
|
{
|
||||||
return(Semaphore->Header.SignalState);
|
return(Semaphore->Header.SignalState);
|
||||||
}
|
}
|
||||||
|
|
||||||
LONG STDCALL KeReleaseSemaphore (PKSEMAPHORE Semaphore,
|
LONG STDCALL
|
||||||
KPRIORITY Increment,
|
KeReleaseSemaphore (PKSEMAPHORE Semaphore,
|
||||||
LONG Adjustment,
|
KPRIORITY Increment,
|
||||||
BOOLEAN Wait)
|
LONG Adjustment,
|
||||||
|
BOOLEAN Wait)
|
||||||
/*
|
/*
|
||||||
* FUNCTION: KeReleaseSemaphore releases a given semaphore object. This
|
* FUNCTION: KeReleaseSemaphore releases a given semaphore object. This
|
||||||
* routine supplies a runtime priority boost for waiting threads. If this
|
* routine supplies a runtime priority boost for waiting threads. If this
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue