Moved microkernel to the architecture specific directory

svn path=/trunk/; revision=1704
This commit is contained in:
David Welch 2001-03-16 23:05:00 +00:00
parent 2a613a30c4
commit 6fbeba1e7c
7 changed files with 99 additions and 63 deletions

View file

@ -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
#
@ -94,7 +94,6 @@ OBJECTS_KE = \
ke/dpc.o \
ke/error.o \
ke/event.o \
ke/kernel.o \
ke/kqueue.o \
ke/main.o \
ke/mutex.o \

View file

@ -17,7 +17,8 @@ OBJECTS_KE_I386 := \
ke/i386/gdt.o \
ke/i386/idt.o \
ke/i386/ldt.o \
ke/i386/brkpoint.o
ke/i386/brkpoint.o \
ke/i386/kernel.o
OBJECTS_MM_I386 := \
mm/i386/memsafe.o \

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* 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
* FILE: ntoskrnl/ke/bug.c
@ -59,26 +59,26 @@ KeDeregisterBugCheckCallback (PKBUGCHECK_CALLBACK_RECORD CallbackRecord)
}
BOOLEAN STDCALL
KeRegisterBugCheckCallback (PKBUGCHECK_CALLBACK_RECORD CallbackRecord,
KeRegisterBugCheckCallback (PKBUGCHECK_CALLBACK_RECORD CallbackRecord,
PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine,
PVOID Buffer,
ULONG Length,
PUCHAR Component)
PVOID Buffer,
ULONG Length,
PUCHAR Component)
{
InsertTailList(&BugcheckCallbackListHead,&CallbackRecord->Entry);
CallbackRecord->Length=Length;
CallbackRecord->Buffer=Buffer;
CallbackRecord->Component=Component;
CallbackRecord->CallbackRoutine=CallbackRoutine;
InsertTailList(&BugcheckCallbackListHead, &CallbackRecord->Entry);
CallbackRecord->Length = Length;
CallbackRecord->Buffer = Buffer;
CallbackRecord->Component = Component;
CallbackRecord->CallbackRoutine = CallbackRoutine;
return(TRUE);
}
VOID STDCALL
KeBugCheckEx (ULONG BugCheckCode,
ULONG BugCheckParameter1,
ULONG BugCheckParameter2,
ULONG BugCheckParameter3,
ULONG BugCheckParameter4)
KeBugCheckEx (ULONG BugCheckCode,
ULONG BugCheckParameter1,
ULONG BugCheckParameter2,
ULONG BugCheckParameter3,
ULONG BugCheckParameter4)
/*
* FUNCTION: Brings the system down in a controlled manner when an
* inconsistency that might otherwise cause corruption has been detected
@ -119,7 +119,7 @@ KeBugCheckEx (ULONG BugCheckCode,
}
VOID STDCALL
KeBugCheck (ULONG BugCheckCode)
KeBugCheck (ULONG BugCheckCode)
/*
* FUNCTION: Brings the system down in a controlled manner when an
* inconsistency that might otherwise cause corruption has been detected

View file

@ -16,9 +16,8 @@
* along with this program; if not, write to the Free Software
* 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
* FILE: ntoskrnl/ke/catch.c
* PURPOSE: Exception handling

View file

@ -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
* FILE: ntoskrnl/ke/kernel.c
* PURPOSE: Initializes the kernel
@ -14,40 +31,15 @@
#include <internal/ke.h>
#include <internal/mm.h>
#include <internal/ps.h>
#include <internal/arch/fpu.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;
}
VOID KeInit1(VOID)
VOID
KeInit1(VOID)
{
KiCheckFPU();
@ -55,7 +47,8 @@ VOID KeInit1(VOID)
KeInitInterrupts ();
}
VOID KeInit2(VOID)
VOID
KeInit2(VOID)
{
PVOID PcrPage;
@ -80,3 +73,9 @@ VOID KeInit2(VOID)
(ULONG)PcrPage);
memset((PVOID)KPCR_BASE, 0, 4096);
}

View file

@ -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
* FILE: ntoskrnl/ke/process.c
* PURPOSE: Microkernel process management
* PROGRAMMER: David Welch (welch@cwcom.net)
* PORTABILITY: No.
* UPDATE HISTORY:
* Created 22/05/98
*/

View file

@ -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
* FILE: ntoskrnl/ke/sem.c
* PURPOSE: Implements kernel semaphores
@ -20,9 +37,10 @@
/* FUNCTIONS *****************************************************************/
VOID STDCALL KeInitializeSemaphore (PKSEMAPHORE Semaphore,
LONG Count,
LONG Limit)
VOID STDCALL
KeInitializeSemaphore (PKSEMAPHORE Semaphore,
LONG Count,
LONG Limit)
{
KeInitializeDispatcherHeader(&Semaphore->Header,
InternalSemaphoreType,
@ -31,15 +49,17 @@ VOID STDCALL KeInitializeSemaphore (PKSEMAPHORE Semaphore,
Semaphore->Limit=Limit;
}
LONG STDCALL KeReadStateSemaphore (PKSEMAPHORE Semaphore)
LONG STDCALL
KeReadStateSemaphore (PKSEMAPHORE Semaphore)
{
return(Semaphore->Header.SignalState);
}
LONG STDCALL KeReleaseSemaphore (PKSEMAPHORE Semaphore,
KPRIORITY Increment,
LONG Adjustment,
BOOLEAN Wait)
LONG STDCALL
KeReleaseSemaphore (PKSEMAPHORE Semaphore,
KPRIORITY Increment,
LONG Adjustment,
BOOLEAN Wait)
/*
* FUNCTION: KeReleaseSemaphore releases a given semaphore object. This
* routine supplies a runtime priority boost for waiting threads. If this