Replaced boot_param by LOADER_PARAMETER_BLOCK

Added missing dpc functions
Fixed some Ke macros

svn path=/trunk/; revision=1217
This commit is contained in:
Eric Kohl 2000-07-01 18:27:03 +00:00
parent 95f8770ae2
commit 6abd233802
19 changed files with 246 additions and 206 deletions

View file

@ -175,16 +175,6 @@ enum
OBJ_OPENIF = 0x10,
};
/*
* PURPOSE: DPC priorities
*/
enum
{
High,
Medium,
Low,
};
/*
* PURPOSE: Timer types
*/
@ -254,7 +244,7 @@ enum
#define CLOCK1_LEVEL 28 // Interval clock 1 level - Not used on x86
#define CLOCK2_LEVEL 28 // Interval clock 2 level
#define IPI_LEVEL 29 // Interprocessor interrupt level
#define POWER_LEVEL 30 // Power failure level
#define POWER_LEVEL 30 // Power failure level
#define HIGH_LEVEL 31 // Highest interrupt level
#define SYNCH_LEVEL (IPI_LEVEL-1) // synchronization level
#endif

View file

@ -1,4 +1,4 @@
/* $Id: halddk.h,v 1.2 2000/06/30 22:49:26 ekohl Exp $
/* $Id: halddk.h,v 1.3 2000/07/01 18:20:41 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -456,6 +456,13 @@ HalGetInterruptVector (
PKAFFINITY Affinity
);
BOOLEAN
STDCALL
HalInitSystem (
ULONG BootPhase,
PLOADER_PARAMETER_BLOCK LoaderBlock
);
VOID
STDCALL
HalInitializeProcessor (

View file

@ -1,9 +1,22 @@
#ifndef __INCLUDE_DDK_KEDEF_H
#define __INCLUDE_DDK_KEDEF_H
typedef enum _KINTERRUPT_MODE
{
LevelSensitive,
Latched,
} KINTERRUPT_MODE;
/*
* PURPOSE: DPC importance
*/
typedef enum _KDPC_IMPORTANCE
{
LowImportance,
MediumImportance,
HighImportance
} KDPC_IMPORTANCE;
typedef enum _EVENT_TYPE
{
NotificationEvent,
@ -39,3 +52,5 @@ typedef enum _KWAIT_REASON
WrKernel,
MaximumWaitReason,
} KWAIT_REASON;
#endif

View file

@ -4,15 +4,6 @@
/* KERNEL FUNCTIONS ********************************************************/
VOID
STDCALL
KeAttachProcess (
struct _EPROCESS* Process
);
VOID KeDrainApcQueue(VOID);
PKPROCESS KeGetCurrentProcess(VOID);
/*
* FUNCTION: Acquires a spinlock so the caller can synchronize access to
* data
@ -23,14 +14,26 @@ PKPROCESS KeGetCurrentProcess(VOID);
VOID
STDCALL
KeAcquireSpinLock (
PKSPIN_LOCK SpinLock,
PKIRQL OldIrql
IN PKSPIN_LOCK SpinLock,
OUT PKIRQL OldIrql
);
VOID
STDCALL
KeAcquireSpinLockAtDpcLevel (
PKSPIN_LOCK SpinLock
IN PKSPIN_LOCK SpinLock
);
KIRQL
FASTCALL
KeAcquireSpinLockRaiseToSynch (
IN PKSPIN_LOCK SpinLock
);
VOID
STDCALL
KeAttachProcess (
IN PEPROCESS Process
);
/*
@ -43,7 +46,7 @@ KeAcquireSpinLockAtDpcLevel (
VOID
STDCALL
KeBugCheck (
ULONG BugCheckCode
IN ULONG BugCheckCode
);
/*
@ -57,23 +60,23 @@ KeBugCheck (
VOID
STDCALL
KeBugCheckEx (
ULONG BugCheckCode,
ULONG BugCheckParameter1,
ULONG BugCheckParameter2,
ULONG BugCheckParameter3,
ULONG BugCheckParameter4
IN ULONG BugCheckCode,
IN ULONG BugCheckParameter1,
IN ULONG BugCheckParameter2,
IN ULONG BugCheckParameter3,
IN ULONG BugCheckParameter4
);
BOOLEAN
STDCALL
KeCancelTimer (
PKTIMER Timer
IN PKTIMER Timer
);
VOID
STDCALL
KeClearEvent (
PKEVENT Event
IN PKEVENT Event
);
NTSTATUS
@ -87,7 +90,7 @@ KeDelayExecutionThread (
BOOLEAN
STDCALL
KeDeregisterBugCheckCallback (
PKBUGCHECK_CALLBACK_RECORD CallbackRecord
IN PKBUGCHECK_CALLBACK_RECORD CallbackRecord
);
VOID
@ -102,7 +105,32 @@ KeEnterCriticalRegion (
VOID
);
VOID KeFlushIoBuffers(PMDL Mdl, BOOLEAN ReadOperation, BOOLEAN DmaOperation);
/*
* FUNCTION: Enters the kernel debugger
* ARGUMENTS:
* None
*/
VOID
STDCALL
KeEnterKernelDebugger (
VOID
);
/*
* VOID
* KeFlushIoBuffers (
* PMDL Mdl,
* BOOLEAN ReadOperation,
* BOOLEAN DmaOperation
* );
*/
#define KeFlushIoBuffers(Mdl,ReadOperation,DmaOperation)
VOID
STDCALL
KeFlushWriteBuffer (
VOID
);
KIRQL
STDCALL
@ -118,7 +146,13 @@ KeGetCurrentThread (
VOID
);
ULONG KeGetDcacheFillSize(VOID);
/*
* ULONG KeGetDcacheFillSize(VOID);
*
* FUNCTION:
* Returns the microprocessor's data cache-line boundary in bytes
*/
#define KeGetDcacheFillSize() 1L
ULONG
STDCALL
@ -278,6 +312,17 @@ KeRaiseIrql (
PKIRQL OldIrql
);
/*
* FUNCTION: Raises a user mode exception
* ARGUMENTS:
* ExceptionCode = Status code of the exception
*/
VOID
STDCALL
KeRaiseUserException (
IN NTSTATUS ExceptionCode
);
LONG
STDCALL
KeReadStateEvent (
@ -388,6 +433,13 @@ KeSetEvent (
BOOLEAN Wait
);
VOID
STDCALL
KeSetImportanceDpc (
IN PKDPC Dpc,
IN KDPC_IMPORTANCE Importance
);
KPRIORITY
STDCALL
KeSetPriorityThread (
@ -395,6 +447,13 @@ KeSetPriorityThread (
KPRIORITY Priority
);
VOID
STDCALL
KeSetTargetProcessorDpc (
IN PKDPC Dpc,
IN CCHAR Number
);
BOOLEAN
STDCALL
KeSetTimer (
@ -473,7 +532,7 @@ KeWaitForSingleObject (
* newlvl = IRQ level to set
* NOTE: This is for internal use only
*/
VOID KeSetCurrentIrql(KIRQL newlvl);
//VOID KeSetCurrentIrql(KIRQL newlvl);
// io permission map has a 8k size
@ -537,29 +596,6 @@ NTSTATUS KeI386ReleaseGdtSelectors(OUT PULONG SelArray,
NTSTATUS KeI386AllocateGdtSelectors(OUT PULONG SelArray,
IN ULONG NumOfSelectors);
/*
* FUNCTION: Raises a user mode exception
* ARGUMENTS:
* ExceptionCode = Status code of the exception
*/
VOID KeRaiseUserException(NTSTATUS ExceptionCode);
/*
* FUNCTION: Enters the kernel debugger
* ARGUMENTS:
* None
*/
VOID
STDCALL
KeEnterKernelDebugger (VOID);
VOID
STDCALL
KeFlushWriteBuffer (
VOID
);
KIRQL
FASTCALL
@ -567,12 +603,6 @@ KfAcquireSpinLock (
IN PKSPIN_LOCK SpinLock
);
KIRQL
FASTCALL
KeAcquireSpinLockRaiseToSynch (
IN PKSPIN_LOCK SpinLock
);
VOID
FASTCALL
KfLowerIrql (

View file

@ -209,10 +209,10 @@ struct _KDPC;
typedef VOID (*PKDEFERRED_ROUTINE)(struct _KDPC* Dpc, PVOID DeferredContext,
PVOID SystemArgument1, PVOID SystemArgument2);
typedef struct _KDPC
/*
* PURPOSE: Defines a delayed procedure call object
*/
typedef struct _KDPC
{
SHORT Type;
UCHAR Number;

View file

@ -1,4 +1,4 @@
/* $Id: display.c,v 1.6 2000/03/19 13:34:47 ekohl Exp $
/* $Id: display.c,v 1.7 2000/07/01 18:23:06 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -97,7 +97,7 @@ HalPutCharacter (CHAR Character)
/* PRIVATE FUNCTIONS ********************************************************/
VOID
HalInitializeDisplay (boot_param *bp)
HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock)
/*
* FUNCTION: Initalize the display
* ARGUMENTS:
@ -113,8 +113,8 @@ HalInitializeDisplay (boot_param *bp)
// VideoBuffer = HalMapPhysicalMemory (0xb8000, 2);
/* Set cursor position */
CursorX = bp->cursorx;
CursorY = bp->cursory;
CursorX = LoaderBlock->cursorx;
CursorY = LoaderBlock->cursory;
/* read screen size from the crtc */
/* FIXME: screen size should be read from the boot paramseters */

View file

@ -1,4 +1,4 @@
/* $Id: dma.c,v 1.6 2000/06/12 14:53:38 ekohl Exp $
/* $Id: dma.c,v 1.7 2000/07/01 18:23:06 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -159,12 +159,4 @@ HalReadDmaCounter (
UNIMPLEMENTED;
}
ULONG KeGetDcacheFillSize()
/*
* FUNCTION: Returns the microprocessor's data cache-line boundary in bytes
*/
{
return(1);
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: halinit.c,v 1.11 2000/04/09 15:58:13 ekohl Exp $
/* $Id: halinit.c,v 1.12 2000/07/01 18:23:06 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -24,13 +24,13 @@
BOOLEAN
STDCALL
HalInitSystem (
ULONG Phase,
boot_param *bp
ULONG BootPhase,
PLOADER_PARAMETER_BLOCK LoaderBlock
)
{
if (Phase == 0)
if (BootPhase == 0)
{
HalInitializeDisplay (bp);
HalInitializeDisplay (LoaderBlock);
HalpCalibrateStallExecution ();
KeInitExceptions ();
HalpInitIRQs ();

View file

@ -24,7 +24,7 @@ VOID Hal_bios32_probe(VOID);
*/
BOOLEAN Hal_bios32_is_service_present(ULONG service);
VOID HalInitializeDisplay (boot_param *bp);
VOID HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock);
VOID HalResetDisplay (VOID);
VOID
@ -37,12 +37,4 @@ VOID HalpCalibrateStallExecution(VOID);
VOID HalpDispatchInterrupt (ULONG irq);
VOID HalpInitIRQs (VOID);
BOOLEAN
STDCALL
HalInitSystem (
ULONG Phase,
boot_param *bp
);
#endif /* __INTERNAL_HAL_HAL_H */

View file

@ -19,8 +19,10 @@ BOOLEAN KeDispatcherObjectWake(DISPATCHER_HEADER* hdr);
VOID KiInterruptDispatch(ULONG irq);
VOID KiDispatchInterrupt(ULONG irq);
VOID KeDrainApcQueue(VOID);
VOID KeDrainDpcQueue(VOID);
VOID KeExpireTimers(VOID);
PKPROCESS KeGetCurrentProcess(VOID);
NTSTATUS KeAddThreadTimeout(PKTHREAD Thread, PLARGE_INTEGER Interval);
VOID KeInitializeDispatcherHeader(DISPATCHER_HEADER* Header, ULONG Type,
ULONG Size, ULONG SignalState);
@ -33,6 +35,16 @@ VOID KeCallApcsThread(VOID);
VOID KeRemoveAllWaitsThread(PETHREAD Thread, NTSTATUS WaitStatus);
PULONG KeGetStackTopThread(PETHREAD Thread);
/*
* FUNCTION: Sets the current irql without altering the current processor
* state
* ARGUMENTS:
* newlvl = IRQ level to set
* NOTE: This is for internal use only
*/
VOID KeSetCurrentIrql(KIRQL newlvl);
/* INITIALIZATION FUNCTIONS *************************************************/
VOID KeInitExceptions(VOID);

View file

@ -7,41 +7,6 @@
#ifndef __ASM__
typedef struct
{
/*
* Magic value (useless really)
*/
unsigned int magic;
/*
* Cursor position
*/
unsigned int cursorx;
unsigned int cursory;
/*
* Number of files (including the kernel) loaded
*/
unsigned int nr_files;
/*
* Range of physical memory being used by the system
*/
unsigned int start_mem;
unsigned int end_mem;
/*
* List of module lengths (terminated by a 0)
*/
unsigned int module_length[64];
/*
* Kernel parameter string
*/
char kernel_parameters[256];
} boot_param;
#include <ddk/ntddk.h>
#include <stdarg.h>
@ -78,7 +43,7 @@ VOID NtInit(VOID);
/*
* Initalization functions (called once by main())
*/
VOID MmInitSystem(ULONG Phase, boot_param* bp, ULONG LastKernelAddress);
VOID MmInitSystem(ULONG Phase, PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress);
VOID IoInit(VOID);
VOID ObInit(VOID);
VOID PsInit(VOID);
@ -86,7 +51,7 @@ VOID TstBegin(VOID);
VOID KeInit(VOID);
VOID CmInitializeRegistry(VOID);
VOID CmImportHive(PCHAR);
VOID KdInitSystem(ULONG Reserved, boot_param* BootParam);
VOID KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock);
#endif /* __ASM__ */

View file

@ -1,4 +1,4 @@
/* $Id: kdebug.c,v 1.11 2000/05/24 22:29:36 dwelch Exp $
/* $Id: kdebug.c,v 1.12 2000/07/01 18:25:00 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -64,8 +64,8 @@ PrintString (char* fmt,...)
VOID
KdInitSystem (
ULONG Reserved,
boot_param* BootParam
ULONG Reserved,
PLOADER_PARAMETER_BLOCK LoaderBlock
)
{
KD_PORT_INFORMATION PortInfo;
@ -81,7 +81,7 @@ KdInitSystem (
*/
/* check for 'DEBUGPORT' */
p1 = BootParam->kernel_parameters;
p1 = LoaderBlock->kernel_parameters;
while (p1 && (p2 = strchr (p1, '/')))
{
p2++;
@ -120,7 +120,7 @@ KdInitSystem (
}
/* check for 'BAUDRATE' */
p1 = BootParam->kernel_parameters;
p1 = LoaderBlock->kernel_parameters;
while (p1 && (p2 = strchr (p1, '/')))
{
p2++;
@ -143,7 +143,7 @@ KdInitSystem (
}
/* Check for 'DEBUG'. Dont' accept 'DEBUGPORT'!*/
p1 = BootParam->kernel_parameters;
p1 = LoaderBlock->kernel_parameters;
while (p1 && (p2 = strchr (p1, '/')))
{
p2++;
@ -159,7 +159,7 @@ KdInitSystem (
}
/* Check for 'NODEBUG' */
p1 = BootParam->kernel_parameters;
p1 = LoaderBlock->kernel_parameters;
while (p1 && (p2 = strchr (p1, '/')))
{
p2++;
@ -173,7 +173,7 @@ KdInitSystem (
}
/* Check for 'CRASHDEBUG' */
p1 = BootParam->kernel_parameters;
p1 = LoaderBlock->kernel_parameters;
while (p1 && (p2 = strchr (p1, '/')))
{
p2++;
@ -187,7 +187,7 @@ KdInitSystem (
}
/* Check for 'BREAK' */
p1 = BootParam->kernel_parameters;
p1 = LoaderBlock->kernel_parameters;
while (p1 && (p2 = strchr (p1, '/')))
{
p2++;

View file

@ -1,4 +1,4 @@
/* $Id: bug.c,v 1.11 2000/06/04 19:50:12 ekohl Exp $
/* $Id: bug.c,v 1.12 2000/07/01 18:26:10 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -26,6 +26,12 @@ VOID PsDumpThreads(VOID);
/* FUNCTIONS *****************************************************************/
VOID KeInitializeBugCheck(VOID)
{
InitializeListHead(&BugcheckCallbackListHead);
InBugCheck = 0;
}
BOOLEAN
STDCALL
KeDeregisterBugCheckCallback (
@ -35,12 +41,6 @@ KeDeregisterBugCheckCallback (
UNIMPLEMENTED;
}
VOID KeInitializeBugCheck(VOID)
{
InitializeListHead(&BugcheckCallbackListHead);
InBugCheck = 0;
}
VOID KeInitializeCallbackRecord(PKBUGCHECK_CALLBACK_RECORD CallbackRecord)
{
UNIMPLEMENTED;

View file

@ -1,4 +1,5 @@
/*
/* $Id: dpc.c,v 1.16 2000/07/01 18:26:10 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/dpc.c
@ -139,7 +140,7 @@ BOOLEAN STDCALL KeInsertQueueDpc (PKDPC Dpc,
assert(KeGetCurrentIrql()>=DISPATCH_LEVEL);
Dpc->Number=0;
Dpc->Importance=Medium;
Dpc->Importance=MediumImportance;
Dpc->SystemArgument1=SystemArgument1;
Dpc->SystemArgument2=SystemArgument2;
if (Dpc->Lock)
@ -158,6 +159,40 @@ BOOLEAN STDCALL KeInsertQueueDpc (PKDPC Dpc,
return(TRUE);
}
/*
* FUNCTION: Specifies the DPCs importance
* ARGUMENTS:
* Dpc = Initalizes DPC
* Importance = DPC importance
* RETURNS: None
*/
VOID
STDCALL
KeSetImportanceDpc (
IN PKDPC Dpc,
IN KDPC_IMPORTANCE Importance
)
{
Dpc->Importance = Importance;
}
/*
* FUNCTION: Specifies on which processor the DPC will run
* ARGUMENTS:
* Dpc = Initalizes DPC
* Number = Processor number
* RETURNS: None
*/
VOID
STDCALL
KeSetTargetProcessorDpc (
IN PKDPC Dpc,
IN CCHAR Number
)
{
UNIMPLEMENTED;
}
VOID KeInitDpc(VOID)
/*
* FUNCTION: Initialize DPC handling
@ -167,3 +202,4 @@ VOID KeInitDpc(VOID)
KeInitializeSpinLock(&DpcQueueLock);
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.49 2000/06/30 22:53:32 ekohl Exp $
/* $Id: main.c,v 1.50 2000/07/01 18:26:11 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -163,7 +163,8 @@ unsigned int old_idt[256][2];
//extern unsigned int idt[];
unsigned int old_idt_valid = 1;
void _main(boot_param* _bp)
void _main (PLOADER_PARAMETER_BLOCK LoaderBlock)
/*
* FUNCTION: Called by the boot loader to start the kernel
* ARGUMENTS:
@ -175,31 +176,31 @@ void _main(boot_param* _bp)
unsigned int i;
unsigned int start;
unsigned int start1;
boot_param bp;
unsigned int last_kernel_address;
// memset((void *)&edata,0,((int)&end)-((int)&edata));
/*
* Copy the parameters to a local buffer because lowmem will go away
*/
memcpy(&bp,_bp,sizeof(boot_param));
memcpy (&KeLoaderBlock,
LoaderBlock,
sizeof(LOADER_PARAMETER_BLOCK));
/*
* FIXME: Preliminary hack!!!!
* Initializes the kernel parameter line.
* This should be done by the boot loader.
*/
strcpy (bp.kernel_parameters, "/DEBUGPORT=SCREEN");
strcpy (KeLoaderBlock.kernel_parameters,
"/DEBUGPORT=SCREEN");
/*
* Initialization phase 0
*/
HalInitSystem (0, &bp);
HalInitSystem (0, &KeLoaderBlock);
HalDisplayString("Starting ReactOS "KERNEL_VERSION_STR" (Build "KERNEL_VERSION_BUILD_STR")\n");
start = KERNEL_BASE + PAGE_ROUND_UP(bp.module_length[0]);
start = KERNEL_BASE + PAGE_ROUND_UP(KeLoaderBlock.module_length[0]);
if (start < ((int)&end))
{
PrintString("start %x end %x\n",start,(int)&end);
@ -209,22 +210,22 @@ void _main(boot_param* _bp)
for(;;)
__asm__("hlt\n\t");
}
start1 = start+PAGE_ROUND_UP(bp.module_length[1]);
start1 = start+PAGE_ROUND_UP(KeLoaderBlock.module_length[1]);
last_kernel_address = KERNEL_BASE;
for (i=0; i<=bp.nr_files; i++)
for (i=0; i<=KeLoaderBlock.nr_files; i++)
{
last_kernel_address = last_kernel_address +
PAGE_ROUND_UP(bp.module_length[i]);
PAGE_ROUND_UP(KeLoaderBlock.module_length[i]);
}
DPRINT("MmInitSystem()\n");
MmInitSystem(0, &bp, last_kernel_address);
MmInitSystem(0, &KeLoaderBlock, last_kernel_address);
/*
* Initialize the kernel debugger
*/
KdInitSystem (0, &bp);
KdInitSystem (0, &KeLoaderBlock);
if (KdPollBreakIn ())
{
DbgBreakPointWithStatus (DBG_STATUS_CONTROL_C);
@ -237,9 +238,9 @@ void _main(boot_param* _bp)
DPRINT("Kernel Initialization Phase 1\n");
DPRINT("HalInitSystem()\n");
HalInitSystem (1, &bp);
HalInitSystem (1, &KeLoaderBlock);
DPRINT("MmInitSystem()\n");
MmInitSystem(1, &bp, 0);
MmInitSystem(1, &KeLoaderBlock, 0);
DPRINT("KeInit()\n");
KeInit();
@ -265,31 +266,31 @@ void _main(boot_param* _bp)
/*
* Initalize services loaded at boot time
*/
DPRINT1("%d files loaded\n",bp.nr_files);
DPRINT1("%d files loaded\n",KeLoaderBlock.nr_files);
/* Pass 1: load registry chunks passed in */
start = KERNEL_BASE + PAGE_ROUND_UP(bp.module_length[0]);
for (i = 1; i < bp.nr_files; i++)
start = KERNEL_BASE + PAGE_ROUND_UP(KeLoaderBlock.module_length[0]);
for (i = 1; i < KeLoaderBlock.nr_files; i++)
{
if (!strcmp ((PCHAR) start, "REGEDIT4"))
{
DPRINT1("process registry chunk at %08lx\n", start);
CmImportHive((PCHAR) start);
}
start = start + bp.module_length[i];
start = start + KeLoaderBlock.module_length[i];
}
/* Pass 2: process boot loaded drivers */
start = KERNEL_BASE + PAGE_ROUND_UP(bp.module_length[0]);
start1 = start + bp.module_length[1];
for (i=1;i<bp.nr_files;i++)
start = KERNEL_BASE + PAGE_ROUND_UP(KeLoaderBlock.module_length[0]);
start1 = start + KeLoaderBlock.module_length[1];
for (i=1;i<KeLoaderBlock.nr_files;i++)
{
if (strcmp ((PCHAR) start, "REGEDIT4"))
{
DPRINT1("process module at %08lx\n", start);
LdrProcessDriver((PVOID)start);
}
start = start + bp.module_length[i];
start = start + KeLoaderBlock.module_length[i];
}
/* Create the SystemRoot symbolic link */
@ -323,5 +324,4 @@ void _main(boot_param* _bp)
PsTerminateSystemThread(STATUS_SUCCESS);
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: mdl.c,v 1.18 2000/04/02 13:32:41 ea Exp $
/* $Id: mdl.c,v 1.19 2000/07/01 18:27:03 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -109,12 +109,6 @@ VOID MmPrepareMdlForReuse(PMDL Mdl)
UNIMPLEMENTED;
}
VOID KeFlushIoBuffers(PMDL Mdl, BOOLEAN ReadOperation, BOOLEAN DmaOperation)
{
/* NOP on the x86 */
/* See ntddk.h from Windows 98 DDK */
}
VOID MmBuildMdlFromPages(PMDL Mdl)
{
ULONG i;

View file

@ -1,4 +1,4 @@
/* $Id: mm.c,v 1.31 2000/06/25 03:59:15 dwelch Exp $
/* $Id: mm.c,v 1.32 2000/07/01 18:27:03 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top directory
* PROJECT: ReactOS kernel
@ -62,20 +62,20 @@ VOID MiShutdownMemoryManager(VOID)
{
}
VOID MmInitVirtualMemory(boot_param* bp, ULONG LastKernelAddress)
VOID MmInitVirtualMemory(PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress)
/*
* FUNCTION: Intialize the memory areas list
* ARGUMENTS:
* bp = Pointer to the boot parameters
* LoaderBlock = Pointer to the boot parameters
* kernel_len = Length of the kernel
*/
{
unsigned int kernel_len = bp->end_mem - bp->start_mem;
unsigned int kernel_len = LoaderBlock->end_mem - LoaderBlock->start_mem;
PVOID BaseAddress;
ULONG Length;
ULONG ParamLength = kernel_len;
DPRINT("MmInitVirtualMemory(%x)\n",bp);
DPRINT("MmInitVirtualMemory(%x)\n",LoaderBlock);
LastKernelAddress = PAGE_ROUND_UP(LastKernelAddress);
@ -229,7 +229,7 @@ MM_SYSTEM_SIZE STDCALL MmQuerySystemSize(VOID)
return(MmSystemSize);
}
void MmInitialize(boot_param* bp, ULONG LastKernelAddress)
void MmInitialize(PLOADER_PARAMETER_BLOCK LoaderBlock, ULONG LastKernelAddress)
/*
* FUNCTION: Initalize memory managment
*/
@ -239,7 +239,8 @@ void MmInitialize(boot_param* bp, ULONG LastKernelAddress)
int i;
unsigned int kernel_len;
DPRINT("MmInitialize(bp %x, LastKernelAddress %x)\n", bp,
DPRINT("MmInitialize(LoaderBlock %x, LastKernelAddress %x)\n",
LoaderBlock,
LastKernelAddress);
/*
@ -252,8 +253,8 @@ void MmInitialize(boot_param* bp, ULONG LastKernelAddress)
* (we assume the kernel occupies a continuous range of physical
* memory)
*/
first_krnl_phys_addr = bp->start_mem;
last_krnl_phys_addr = bp->end_mem;
first_krnl_phys_addr = LoaderBlock->start_mem;
last_krnl_phys_addr = LoaderBlock->end_mem;
DPRINT("first krnl %x\nlast krnl %x\n",first_krnl_phys_addr,
last_krnl_phys_addr);
@ -295,16 +296,20 @@ void MmInitialize(boot_param* bp, ULONG LastKernelAddress)
/*
* Intialize memory areas
*/
MmInitVirtualMemory(bp, LastKernelAddress);
MmInitVirtualMemory(LoaderBlock, LastKernelAddress);
}
VOID MmInitSystem (ULONG Phase, boot_param* bp, ULONG LastKernelAddress)
VOID MmInitSystem (
ULONG Phase,
PLOADER_PARAMETER_BLOCK LoaderBlock,
ULONG LastKernelAddress
)
{
if (Phase == 0)
{
/* Phase 0 Initialization */
MmInitializeKernelAddressSpace();
MmInitialize (bp, LastKernelAddress);
MmInitialize (LoaderBlock, LastKernelAddress);
}
else
{

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.def,v 1.77 2000/06/30 22:50:53 ekohl Exp $
; $Id: ntoskrnl.def,v 1.78 2000/07/01 18:22:14 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -340,7 +340,6 @@ KeEnterKernelDebugger@0
;KeFindConfigurationEntry
;KeFindConfigurationNextEntry
;KeFlushEntireTb
KeFlushIoBuffers
KeGetCurrentThread@0
KeGetPreviousMode@0
;KeI386AbiosCall
@ -410,12 +409,12 @@ KeSetBasePriorityThread@8
KeSetEvent@12
;KeSetEventBoostPriority
;KeSetIdealProcessorThread
;KeSetImportanceDpc
KeSetImportanceDpc@8
;KeSetKernelStackSwapEnable
KeSetPriorityThread@8
;KeSetProfileIrql
;KeSetSwapContextNotifyRoutine
;KeSetTargetProcessorDpc
KeSetTargetProcessorDpc@8
;KeSetThreadSelectNotifyRoutine
;KeSetTimeIncrement
KeSetTimer@16

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.edf,v 1.64 2000/06/30 22:50:53 ekohl Exp $
; $Id: ntoskrnl.edf,v 1.65 2000/07/01 18:22:14 ekohl Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -336,7 +336,10 @@ KeDetachProcess=KeDetachProcess@0
;KeDisconnectInterrupt
KeEnterCriticalRegion=KeEnterCriticalRegion@0
KeEnterKernelDebugger=KeEnterKernelDebugger@0
KeFlushIoBuffers
;KeFindConfigurationEntry
;KeFindConfigurationNextEntry
;KeFlushEntireTb
KeGetCurrentThread=KeGetCurrentThread@0
KeGetPreviousMode=KeGetPreviousMode@0
;KeI386AbiosCall
;KeI386AllocateGdtSelectors
@ -405,12 +408,12 @@ KeSetBasePriorityThread=KeSetBasePriorityThread@8
KeSetEvent=KeSetEvent@12
;KeSetEventBoostPriority
;KeSetIdealProcessorThread
;KeSetImportanceDpc
KeSetImportanceDpc=KeSetImportanceDpc@8
;KeSetKernelStackSwapEnable
KeSetPriorityThread=KeSetPriorityThread@8
;KeSetProfileIrql
;KeSetSwapContextNotifyRoutine
;KeSetTargetProcessorDpc
KeSetTargetProcessorDpc=KeSetTargetProcessorDpc@8
;KeSetThreadSelectNotifyRoutine
;KeSetTimeIncrement
KeSetTimer=KeSetTimer@16