mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
some changes to support loading actual drivers
svn path=/trunk/; revision=2123
This commit is contained in:
parent
5d5aba0812
commit
fe1d0d581a
4 changed files with 28 additions and 18 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: timer.c,v 1.45 2001/04/17 23:39:25 dwelch Exp $
|
/* $Id: timer.c,v 1.46 2001/07/30 03:05:29 rex Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -57,7 +57,7 @@ static unsigned long long system_time = 0;
|
||||||
/*
|
/*
|
||||||
* Number of timer interrupts since initialisation
|
* Number of timer interrupts since initialisation
|
||||||
*/
|
*/
|
||||||
volatile ULONGLONG KiTimerTicks;
|
volatile ULONGLONG KeTickCount;
|
||||||
volatile ULONG KiRawTicks = 0;
|
volatile ULONG KiRawTicks = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -350,7 +350,7 @@ KeQueryTickCount (PLARGE_INTEGER TickCount)
|
||||||
* TickCount (OUT) = Points to storage for the number of ticks
|
* TickCount (OUT) = Points to storage for the number of ticks
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
TickCount->QuadPart = KiTimerTicks;
|
TickCount->QuadPart = KeTickCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC VOID
|
STATIC VOID
|
||||||
|
@ -431,7 +431,7 @@ KiUpdateSystemTime (KIRQL oldIrql, ULONG Eip)
|
||||||
/*
|
/*
|
||||||
* Increment the number of timers ticks
|
* Increment the number of timers ticks
|
||||||
*/
|
*/
|
||||||
KiTimerTicks++;
|
KeTickCount++;
|
||||||
system_time = system_time + CLOCK_INCREMENT;
|
system_time = system_time + CLOCK_INCREMENT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: loader.c,v 1.83 2001/06/16 14:08:33 ekohl Exp $
|
/* $Id: loader.c,v 1.84 2001/07/30 03:05:30 rex Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
/* MACROS ********************************************************************/
|
/* MACROS ********************************************************************/
|
||||||
|
|
||||||
|
#define KERNEL_MODULE_NAME L"ntoskrnl.exe"
|
||||||
#define MODULE_ROOT_NAME L"\\Modules\\"
|
#define MODULE_ROOT_NAME L"\\Modules\\"
|
||||||
#define FILESYSTEM_ROOT_NAME L"\\FileSystem\\"
|
#define FILESYSTEM_ROOT_NAME L"\\FileSystem\\"
|
||||||
|
|
||||||
|
@ -131,7 +132,7 @@ LdrInit1(VOID)
|
||||||
NtoskrnlTextSection.Base = KERNEL_BASE;
|
NtoskrnlTextSection.Base = KERNEL_BASE;
|
||||||
NtoskrnlTextSection.Length = SectionList[0].Misc.VirtualSize +
|
NtoskrnlTextSection.Length = SectionList[0].Misc.VirtualSize +
|
||||||
SectionList[0].VirtualAddress;
|
SectionList[0].VirtualAddress;
|
||||||
NtoskrnlTextSection.Name = L"ntoskrnl.exe";
|
NtoskrnlTextSection.Name = KERNEL_MODULE_NAME;
|
||||||
NtoskrnlTextSection.SymbolsBase = NULL;
|
NtoskrnlTextSection.SymbolsBase = NULL;
|
||||||
NtoskrnlTextSection.SymbolsLength = 0;
|
NtoskrnlTextSection.SymbolsLength = 0;
|
||||||
InsertTailList(&ModuleTextListHead, &NtoskrnlTextSection.ListEntry);
|
InsertTailList(&ModuleTextListHead, &NtoskrnlTextSection.ListEntry);
|
||||||
|
@ -195,7 +196,7 @@ VOID LdrInitModuleManagement(VOID)
|
||||||
|
|
||||||
/* Add module entry for NTOSKRNL */
|
/* Add module entry for NTOSKRNL */
|
||||||
wcscpy(NameBuffer, MODULE_ROOT_NAME);
|
wcscpy(NameBuffer, MODULE_ROOT_NAME);
|
||||||
wcscat(NameBuffer, L"ntoskrnl.exe");
|
wcscat(NameBuffer, KERNEL_MODULE_NAME);
|
||||||
RtlInitUnicodeString (&ModuleName, NameBuffer);
|
RtlInitUnicodeString (&ModuleName, NameBuffer);
|
||||||
DPRINT("Kernel's Module name is: %wZ\n", &ModuleName);
|
DPRINT("Kernel's Module name is: %wZ\n", &ModuleName);
|
||||||
|
|
||||||
|
@ -223,7 +224,7 @@ VOID LdrInitModuleManagement(VOID)
|
||||||
InsertTailList(&ModuleListHead,
|
InsertTailList(&ModuleListHead,
|
||||||
&ModuleObject->ListEntry);
|
&ModuleObject->ListEntry);
|
||||||
RtlCreateUnicodeString(&ModuleObject->FullName,
|
RtlCreateUnicodeString(&ModuleObject->FullName,
|
||||||
L"ntoskrnl.exe");
|
KERNEL_MODULE_NAME);
|
||||||
LdrpBuildModuleBaseName(&ModuleObject->BaseName,
|
LdrpBuildModuleBaseName(&ModuleObject->BaseName,
|
||||||
&ModuleObject->FullName);
|
&ModuleObject->FullName);
|
||||||
|
|
||||||
|
@ -788,7 +789,7 @@ VOID LdrLoadAutoConfigDrivers (VOID)
|
||||||
/* Load symbols for ntoskrnl.exe and hal.dll because \SystemRoot
|
/* Load symbols for ntoskrnl.exe and hal.dll because \SystemRoot
|
||||||
is created after their module entries */
|
is created after their module entries */
|
||||||
|
|
||||||
RtlInitUnicodeString(&ModuleName, L"ntoskrnl.exe");
|
RtlInitUnicodeString(&ModuleName, KERNEL_MODULE_NAME);
|
||||||
|
|
||||||
Status = LdrpFindModuleObject(&ModuleName, &ModuleObject);
|
Status = LdrpFindModuleObject(&ModuleName, &ModuleObject);
|
||||||
if (NT_SUCCESS(Status)) {
|
if (NT_SUCCESS(Status)) {
|
||||||
|
@ -1570,13 +1571,22 @@ LdrPEProcessModule(PVOID ModuleLoadBase,
|
||||||
pName = (PCHAR) DriverBase +
|
pName = (PCHAR) DriverBase +
|
||||||
ImportModuleDirectory->dwRVAModuleName;
|
ImportModuleDirectory->dwRVAModuleName;
|
||||||
wcscpy(NameBuffer, MODULE_ROOT_NAME);
|
wcscpy(NameBuffer, MODULE_ROOT_NAME);
|
||||||
for (Idx = 0; NameBuffer[Idx] != 0; Idx++)
|
/*FIXME: (RJJ) hack: if HAL is needed for import, substitute the kernel */
|
||||||
;
|
/* this is necessary until we break the hal out of the kernel */
|
||||||
for (Idx2 = 0; pName[Idx2] != '\0'; Idx2++)
|
if (_stricmp (pName, "HAL.dll") == 0)
|
||||||
{
|
{
|
||||||
NameBuffer[Idx + Idx2] = (WCHAR) pName[Idx2];
|
wcscat (NameBuffer, KERNEL_MODULE_NAME);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (Idx = 0; NameBuffer[Idx] != 0; Idx++)
|
||||||
|
;
|
||||||
|
for (Idx2 = 0; pName[Idx2] != '\0'; Idx2++)
|
||||||
|
{
|
||||||
|
NameBuffer[Idx + Idx2] = (WCHAR) pName[Idx2];
|
||||||
|
}
|
||||||
|
NameBuffer[Idx + Idx2] = 0;
|
||||||
}
|
}
|
||||||
NameBuffer[Idx + Idx2] = 0;
|
|
||||||
RtlInitUnicodeString (&ModuleName, NameBuffer);
|
RtlInitUnicodeString (&ModuleName, NameBuffer);
|
||||||
DPRINT("Import module: %wZ\n", &ModuleName);
|
DPRINT("Import module: %wZ\n", &ModuleName);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; $Id: ntoskrnl.def,v 1.111 2001/07/12 17:17:07 ekohl Exp $
|
; $Id: ntoskrnl.def,v 1.112 2001/07/30 03:05:29 rex Exp $
|
||||||
;
|
;
|
||||||
; reactos/ntoskrnl/ntoskrnl.def
|
; reactos/ntoskrnl/ntoskrnl.def
|
||||||
;
|
;
|
||||||
|
@ -405,7 +405,7 @@ KeSetTimerEx@20
|
||||||
;@KeSetTimeUpdateNotifyRoutine
|
;@KeSetTimeUpdateNotifyRoutine
|
||||||
KeSynchronizeExecution@12
|
KeSynchronizeExecution@12
|
||||||
;KeTerminateThread
|
;KeTerminateThread
|
||||||
;KeTickCount DATA
|
KeTickCount DATA
|
||||||
;KeUpdateRunTime
|
;KeUpdateRunTime
|
||||||
;KeUserModeCallback
|
;KeUserModeCallback
|
||||||
KeWaitForMultipleObjects@32
|
KeWaitForMultipleObjects@32
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; $Id: ntoskrnl.edf,v 1.97 2001/07/12 17:17:07 ekohl Exp $
|
; $Id: ntoskrnl.edf,v 1.98 2001/07/30 03:05:29 rex Exp $
|
||||||
;
|
;
|
||||||
; reactos/ntoskrnl/ntoskrnl.def
|
; reactos/ntoskrnl/ntoskrnl.def
|
||||||
;
|
;
|
||||||
|
@ -405,7 +405,7 @@ KeSetTimerEx=KeSetTimerEx@20
|
||||||
;KeSetTimeUpdateNotifyRoutine
|
;KeSetTimeUpdateNotifyRoutine
|
||||||
KeSynchronizeExecution=KeSynchronizeExecution@12
|
KeSynchronizeExecution=KeSynchronizeExecution@12
|
||||||
;KeTerminateThread
|
;KeTerminateThread
|
||||||
;KeTickCount DATA
|
KeTickCount DATA
|
||||||
;KeUpdateRunTime
|
;KeUpdateRunTime
|
||||||
;KeUserModeCallback
|
;KeUserModeCallback
|
||||||
KeWaitForMultipleObjects=KeWaitForMultipleObjects@32
|
KeWaitForMultipleObjects=KeWaitForMultipleObjects@32
|
||||||
|
|
Loading…
Reference in a new issue