extern BOOLEAN FrLdrBootType;
FrLdrBootType = TRUE;
- /* Initialize registry */
- RegInitializeRegistry();
-
/* Detect hardware */
UiDrawStatusText("Detecting hardware...");
-- LoaderBlock.ArchExtra = (ULONG)MachHwDetect();
++ LoaderBlock.ArchExtra = (ULONG_PTR)MachHwDetect();
UiDrawStatusText("");
/* set boot device */
{
if (strcmp(Media, "x") == 0)
{
- if (!LoadDriver(SourcePath, DriverName))
+ if (!FrLdrLoadDriver((PCHAR)DriverName,0))
++ {
++ DbgPrint((DPRINT_WARNING, "could not load %s, %s\n", SourcePath, DriverName));
return;
++ }
}
}
} while (InfFindNextLine(&InfContext, &InfContext));
*lpNumberOfBytesWritten = 0;
}
-- if (IsConsoleHandle(hFile))
+ hFile = TranslateStdHandle(hFile);
+
++ if (IsConsoleHandle((ULONG_PTR)hFile))
{
return WriteConsoleA(hFile,
lpBuffer,
/* FUNCTIONS *****************************************************************/
-- switch ((ULONG)hHandle)
+ HANDLE FASTCALL
+ TranslateStdHandle(HANDLE hHandle)
+ {
+ PRTL_USER_PROCESS_PARAMETERS Ppb = NtCurrentPeb()->ProcessParameters;
+
+++ switch ((ULONG_PTR)hHandle)
+ {
+ case STD_INPUT_HANDLE: return Ppb->StandardInput;
+ case STD_OUTPUT_HANDLE: return Ppb->StandardOutput;
+ case STD_ERROR_HANDLE: return Ppb->StandardError;
+ }
+
+ return hHandle;
+ }
+
/*
* @implemented
*/
DISPATCHER_HEADER Header;
LIST_ENTRY ProfileListHead;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
--- ULONG DirectoryTableBase;
--- ULONG Unused0;
+++ ULONG_PTR DirectoryTableBase;
+++ ULONG_PTR Unused0;
#else
- LARGE_INTEGER DirectoryTableBase;
-- ULONG DirectoryTableBase[2];
+++ ULONG_PTR DirectoryTableBase[2];
#endif
#if defined(_M_IX86)
KGDTENTRY LdtDescriptor;
DWORD AclBytesFree;
} ACL_SIZE_INFORMATION;
++#ifndef _LDT_ENTRY_DEFINED
++#define _LDT_ENTRY_DEFINED
++typedef struct _LDT_ENTRY
++{
++ USHORT LimitLow;
++ USHORT BaseLow;
++ union
++ {
++ struct
++ {
++ UCHAR BaseMid;
++ UCHAR Flags1;
++ UCHAR Flags2;
++ UCHAR BaseHi;
++ } Bytes;
++ struct
++ {
++ ULONG BaseMid:8;
++ ULONG Type:5;
++ ULONG Dpl:2;
++ ULONG Pres:1;
++ ULONG LimitHi:4;
++ ULONG Sys:1;
++ ULONG Reserved_0:1;
++ ULONG Default_Big:1;
++ ULONG Granularity:1;
++ ULONG BaseHi:8;
++ } Bits;
++ } HighWord;
++} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
++#endif
++
/* FIXME: add more machines */
- #if defined(__i386__) && !defined(__PowerPC__)
+ #if defined(_X86_) && !defined(__PowerPC__)
#define SIZE_OF_80387_REGISTERS 80
#define CONTEXT_i386 0x10000
#define CONTEXT_i486 0x10000
--- /dev/null
--- /dev/null
- STUB(IoEnumerateRegisteredFiltersList)
++
+++
++#define STUB(x) void x() {}
++
++STUB(KdpEnableSafeMem)
++STUB(KfLowerIrql)
++STUB(KeRaiseIrql)
++STUB(KeLowerIrql)
++STUB(KeRaiseIrqlToSynchLevel)
++STUB(KeRaiseIrqlToDpcLevel)
++STUB(KiIdleLoop)
++STUB(KeGetCurrentIrql)
++STUB(KeAcquireInStackQueuedSpinLockRaiseToSynch)
++STUB(KeNumberProcessors)
++STUB(KeBugcheckCallbackListHead)
++STUB(ExpInterlockedPushEntrySList)
++STUB(NtContinue)
++STUB(KeActiveProcessors)
++STUB(KeDisableInterrupts)
++STUB(KiSwapContext)
++STUB(KeContextToTrapFrame)
++STUB(KiDispatchException)
++STUB(MiGetUserPageDirectoryCount)
++STUB(MmStats)
++STUB(ExAcquireResourceLock)
++STUB(ExReleaseResourceLock)
++STUB(MiNonPagedPoolLength)
++STUB(MiNonPagedPoolStart)
++STUB(KiInitializeUserApc)
++STUB(KiComputeTimerTableIndex)
++STUB(KeBugcheckReasonCallbackListHead)
++STUB(BugCheckCallbackLock)
++STUB(NtCallbackReturn)
++STUB(NtRaiseException)
++STUB(NtSetLdtEntries)
++STUB(NtVdmControl)
++STUB(KiSwapProcess)
++STUB(KeGetCurrentProcessorNumber)
++STUB(Ke386InitThreadWithContext)
++STUB(ExpInterlockedPopEntrySList)
++STUB(ExAllocateFromNPagedLookasideList)
++STUB(RtlGetCallersAddress)
++STUB(RtlCompareMemory)
++STUB(ExpEnvironmentLock)
++STUB(ExpFirmwareTableProviderListHead)
++STUB(ExInterlockedInsertTailList)
++STUB(ExInterlockedRemoveHeadList)
++STUB(ExInterlockedAddLargeStatistic)
++STUB(CmpInitializeMachineDependentConfiguration)
++STUB(ExpFirmwareTableResource)
++STUB(MmNumberOfPhysicalPages)
++STUB(MmMapLockedPage)
++STUB(PsThreadType)
++STUB(ExfInterlockedCompareExchange64)
++STUB(ExInterlockedInsertHeadList)
++STUB(IoCompletionType)
++STUB(IoCompletionPacketLookaside)
++STUB(CancelSpinLock)
++STUB(KdbpCliInit)
++STUB(KeDisconnectInterrupt)
++STUB(KeInitializeInterrupt)
++STUB(MiFreeDescriptor)
++STUB(MmPfnDatabase)
++STUB(MmHighestPhysicalPage)
++STUB(MiFreeDescriptorOrg)
++STUB(ExEventObjectType)
++STUB(KeRosDumpStackFrames)
++STUB(RtlWalkFrameChain)
++STUB(ExSystemLookasideListHead)
++STUB(PspGetOrSetContextKernelRoutine)
++STUB(KeConnectInterrupt)
++STUB(KeRaiseUserException)
++STUB(_ExSemaphoreObjectType)
++STUB(KeFeatureBits)
++STUB(KiSystemService)
++STUB(KdpGdbStubInit)
++STUB(KdbpGetCommandLineSettings)
++STUB(KdbpSafeReadMemory)
++STUB(RtlFillMemoryUlong)
++STUB(RtlCaptureContext)
++STUB(RtlpGetExceptionAddress)
++STUB(RtlDispatchException)
++STUB(DbgkDebugObjectType)
++STUB(KdbEnterDebuggerException)
++STUB(KdbpCliModuleLoaded)
++STUB(RtlUnwind)
++STUB(RtlInitializeContext)
++STUB(DbgCommandString)
++STUB(ExAcquireRundownProtection)
++STUB(ExAcquireRundownProtectionCacheAware)
++STUB(ExAcquireRundownProtectionCacheAwareEx)
++STUB(ExAcquireRundownProtectionEx)
++STUB(ExAllocateFromPagedLookasideList)
++STUB(ExEnterCriticalRegionAndAcquireResourceShared)
++STUB(ExEnterCriticalRegionAndAcquireSharedWaitForExclusive)
++STUB(ExFreeToPagedLookasideList)
++STUB(ExInitializeRundownProtection)
++STUB(ExInterlockedAddLargeInteger)
++STUB(ExInterlockedAddUlong)
++STUB(ExInterlockedPopEntryList)
++STUB(ExInterlockedPushEntryList)
++STUB(ExQueryDepthSList)
++STUB(ExRaiseException)
++STUB(ExRaiseStatus)
++STUB(ExReInitializeRundownProtection)
++STUB(ExReInitializeRundownProtectionCacheAware)
++STUB(ExReleaseRundownProtection)
++STUB(ExReleaseRundownProtectionCacheAware)
++STUB(ExReleaseRundownProtectionCacheAwareEx)
++STUB(ExReleaseRundownProtectionEx)
++STUB(ExRundownCompleted)
++STUB(ExRundownCompletedCacheAware)
++STUB(ExSemaphoreObjectType)
++STUB(ExWaitForRundownProtectionRelease)
++STUB(ExWaitForRundownProtectionReleaseCacheAware)
++STUB(ExpInterlockedFlushSList)
++STUB(FsRtlAddBaseMcbEntry)
++STUB(FsRtlGetNextBaseMcbEntry)
++STUB(FsRtlInitializeBaseMcb)
++STUB(FsRtlLegalAnsiCharacterArray)
++STUB(FsRtlLookupBaseMcbEntry)
++STUB(FsRtlLookupLastBaseMcbEntry)
++STUB(FsRtlLookupLastBaseMcbEntryAndIndex)
++STUB(FsRtlNumberOfRunsInBaseMcb)
++STUB(FsRtlRemoveBaseMcbEntry)
++STUB(FsRtlResetBaseMcb)
++STUB(FsRtlSplitBaseMcb)
++STUB(FsRtlTruncateBaseMcb)
++STUB(FsRtlUninitializeBaseMcb)
++STUB(HalDispatchTable)
++STUB(HeadlessDispatch)
++STUB(InitializeSListHead)
- STUB(IoGetPagingIoPriority)
++STUB(IoFileObjectType)
++STUB(IoForwardAndCatchIrp)
- STUB(KdRefreshDebuggerNotPresent)
- STUB(KeAcquireInStackQueuedSpinLockForDpc)
++STUB(IoIs32bitProcess)
++STUB(IoTranslateBusAddress)
++STUB(IoWMIDeviceObjectToProviderId)
++STUB(KdDebuggerEnabled)
++STUB(KdDebuggerNotPresent)
- STUB(KeAcquireSpinLockForDpc)
++STUB(KeAcquireQueuedSpinLock)
+++STUB(_imp__KeAcquireQueuedSpinLock)
+++STUB(_imp__KeReleaseQueuedSpinLock)
++STUB(KeAcquireQueuedSpinLockRaiseToSynch)
- STUB(KeDeregisterNmiCallback)
++STUB(KeAcquireSpinLockRaiseToDpc)
++STUB(KeAcquireSpinLockRaiseToSynch)
- STUB(KeInitializeCrashDumpHeader)
++STUB(KeEnterCriticalRegion)
++STUB(KeEnterGuardedRegion)
++STUB(KeExpandKernelStackAndCallout)
++STUB(KeFlushEntireTb)
++STUB(KeGenericCallDpc)
++STUB(KeGetRecommendedSharedDataAlignment)
- STUB(KeRegisterNmiCallback)
- STUB(KeReleaseInStackQueuedSpinLockForDpc)
++STUB(KeInvalidateAllCaches)
++STUB(KeIsWaitListEmpty)
++STUB(KeLastBranchMSR)
++STUB(KeLeaveCriticalRegion)
++STUB(KeLeaveGuardedRegion)
++STUB(KeQueryActiveProcessors)
++STUB(KeQueryMultiThreadProcessorSet)
++STUB(KeQueryPrcbAddress)
++STUB(KeReadStateMutex)
- STUB(KeReleaseSpinLockForDpc)
++STUB(KeReleaseQueuedSpinLock)
++STUB(KeReleaseSpinLock)
- STUB(KeTestSpinLock)
++STUB(KeRestoreFloatingPointState)
++STUB(KeSaveFloatingPointState)
++STUB(KeSaveStateForHibernate)
++STUB(KeSetDmaIoCoherency)
++STUB(KeSignalCallDpcDone)
++STUB(KeSignalCallDpcSynchronize)
++STUB(KeSynchronizeExecution)
- STUB(MmAllocatePagesForMdlEx)
++STUB(KeTryToAcquireQueuedSpinLock)
++STUB(KeTryToAcquireQueuedSpinLockRaiseToSynch)
++STUB(KeUpdateRunTime)
++STUB(KeUpdateSystemTime)
++STUB(KeUserModeCallback)
++STUB(KeWaitForMutexObject)
++STUB(KfRaiseIrql)
++STUB(KiBugCheckData)
++STUB(KiCpuId)
++STUB(MmCommitSessionMappedView)
++STUB(MmCreateMirror)
++STUB(MmIsIoSpaceActive)
++STUB(MmLockPagableImageSection)
++STUB(NlsOemLeadByteInfo)
++STUB(ObDeleteCapturedInsertInfo)
++STUB(ObSetHandleAttributes)
++STUB(PfxFindPrefix)
++STUB(PfxInitialize)
++STUB(PfxInsertPrefix)
++STUB(PfxRemovePrefix)
++STUB(PoCancelDeviceNotify)
++STUB(PoRegisterDeviceNotify)
++STUB(PoRequestShutdownEvent)
++STUB(PoSetHiberRange)
++STUB(PoShutdownBugCheck)
++STUB(PsGetCurrentProcess)
++STUB(PsGetCurrentProcessWow64Process)
++STUB(PsGetCurrentThread)
++STUB(PsGetCurrentThreadProcess)
++STUB(PsGetCurrentThreadProcessId)
++STUB(PsGetCurrentThreadTeb)
++STUB(PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion)
++STUB(PsGetProcessSessionIdEx)
++STUB(PsGetProcessWow64Process)
++STUB(PsIsSystemProcess)
++STUB(PsProcessType)
++STUB(PsWrapApcWow64Thread)
++STUB(RtlAnsiStringToUnicodeSize)
++STUB(RtlCompareMemoryUlong)
++STUB(RtlCopyMemory)
++STUB(RtlCopyMemoryNonTemporal)
++STUB(RtlFillMemory)
++STUB(RtlLookupFunctionEntry)
++STUB(RtlMoveMemory)
++STUB(RtlOemStringToUnicodeSize)
++STUB(RtlPcToFileHeader)
++STUB(RtlPrefetchMemoryNonTemporal)
++STUB(RtlRestoreContext)
++STUB(RtlTraceDatabaseAdd)
++STUB(RtlTraceDatabaseCreate)
++STUB(RtlTraceDatabaseDestroy)
++STUB(RtlTraceDatabaseEnumerate)
++STUB(RtlTraceDatabaseFind)
++STUB(RtlTraceDatabaseLock)
++STUB(RtlTraceDatabaseUnlock)
++STUB(RtlTraceDatabaseValidate)
++STUB(RtlUnicodeStringToAnsiSize)
++STUB(RtlUnicodeStringToOemSize)
++STUB(RtlUnwindEx)
++STUB(RtlVirtualUnwind)
++STUB(RtlZeroMemory)
++STUB(SeReportSecurityEvent)
++STUB(SeSetAuditParameter)
++STUB(SeTokenObjectType)
++STUB(VfFailDeviceNode)
++STUB(VfFailDriver)
++STUB(VfFailSystemBIOS)
++STUB(VfIsVerificationEnabled)
++STUB(WmiFlushTrace)
++STUB(WmiGetClock)
++STUB(WmiQueryTrace)
++STUB(WmiQueryTraceInformation)
++STUB(WmiStartTrace)
++STUB(WmiStopTrace)
++STUB(WmiTraceFastEvent)
++STUB(WmiTraceMessage)
++STUB(WmiTraceMessageVa)
++STUB(WmiUpdateTrace)
++STUB(XIPDispatch)
++STUB(__C_specific_handler)
++STUB(__misaligned_access)
++STUB(_local_unwind)
++STUB(_setjmp)
++STUB(_setjmpex)
++STUB(longjmp)
++STUB(KfReleaseSpinLock)
++STUB(KeAcquireInStackQueuedSpinLock)
++STUB(KeReleaseInStackQueuedSpinLock)
++STUB(KfAcquireSpinLock)
++STUB(KiSaveProcessorControlState)
++STUB(KeProcessorArchitecture)
++STUB(KeProcessorLevel)
++STUB(KeProcessorRevision)
++STUB(RtlpGetStackLimits)
++STUB(KeSwitchKernelStack)
MmCreateProcessAddressSpace(
IN ULONG MinWs,
IN PEPROCESS Dest,
- IN PLARGE_INTEGER DirectoryTableBase
-- IN PULONG DirectoryTableBase
+++ IN PULONG_PTR DirectoryTableBase
);
NTSTATUS
NTAPI
MmInitializeHandBuiltProcess(
IN PEPROCESS Process,
- IN PLARGE_INTEGER DirectoryTableBase
-- IN PULONG DirectoryTableBase
+++ IN PULONG_PTR DirectoryTableBase
);
// We are very lazy on ARM -- we just import intrinsics
// Question: Why wasn't this done for x86 too? (see fastintrlck.asm)
//
- #define InterlockedDecrement _InterlockedDecrement
- #define InterlockedIncrement _InterlockedIncrement
- #define InterlockedCompareExchange _InterlockedCompareExchange
- #define InterlockedExchange _InterlockedExchange
- #define InterlockedExchangeAdd _InterlockedExchangeAdd
+ #define InterlockedDecrement _InterlockedDecrement
+ #define InterlockedDecrement16 _InterlockedDecrement16
+ #define InterlockedIncrement _InterlockedIncrement
+ #define InterlockedIncrement16 _InterlockedIncrement16
+ #define InterlockedCompareExchange _InterlockedCompareExchange
+ #define InterlockedCompareExchange16 _InterlockedCompareExchange16
+ #define InterlockedCompareExchange64 _InterlockedCompareExchange64
+ #define InterlockedExchange _InterlockedExchange
+ #define InterlockedExchangeAdd _InterlockedExchangeAdd
#include "ke.h"
++#ifdef _M_AMD64
++#include "amd64/mm.h"
++#else
#include "i386/mm.h"
#include "i386/fpu.h"
#include "i386/v86m.h"
SavedStackLimit = Thread->Tcb.StackLimit;
SavedKernelStack = Thread->Tcb.KernelStack;
Thread->Tcb.InitialStack = Thread->Tcb.StackBase = (char*)KdbStack + KDB_STACK_SIZE;
-- Thread->Tcb.StackLimit = (ULONG)KdbStack;
++ Thread->Tcb.StackLimit = (ULONG_PTR)KdbStack;
Thread->Tcb.KernelStack = (char*)KdbStack + KDB_STACK_SIZE;
- /*KdbpPrint("Switching to KDB stack 0x%08x-0x%08x\n", Thread->Tcb.StackLimit, Thread->Tcb.StackBase);*/
+ /*KdbpPrint("Switching to KDB stack 0x%08x-0x%08x (Current Stack is 0x%08x)\n", Thread->Tcb.StackLimit, Thread->Tcb.StackBase, Esp);*/
- KdbpStackSwitchAndCall(Thread->Tcb.KernelStack, KdbpCallMainLoop);
+ KdbpStackSwitchAndCall(KdbStack + KDB_STACK_SIZE - sizeof(ULONG), KdbpCallMainLoop);
Thread->Tcb.InitialStack = SavedInitialStack;
Thread->Tcb.StackBase = SavedStackBase;
/* GLOBALS *******************************************************************/
++/* Function pointer for early debug prints */
++ULONG (*FrLdrDbgPrint)(const char *Format, ...);
++
/* FreeLDR Loader Data */
PROS_LOADER_PARAMETER_BLOCK KeRosLoaderBlock;
- BOOLEAN AcpiTableDetected;
+ BOOLEAN AcpiTableDetected = FALSE;
ADDRESS_RANGE KeMemoryMap[64];
ULONG KeMemoryMapRangeCount;
--- /dev/null
--- /dev/null
- IN PLARGE_INTEGER DirectoryTableBase)
++/*
++ * COPYRIGHT: See COPYING in the top level directory
++ * PROJECT: ReactOS kernel
++ * FILE: ntoskrnl/mm/i386/page.c
++ * PURPOSE: Low level memory managment manipulation
++ *
++ * PROGRAMMERS: David Welch (welch@cwcom.net)
++ */
++
++/* INCLUDES ***************************************************************/
++
++#include <ntoskrnl.h>
++#define NDEBUG
++#include <internal/debug.h>
++
++#if defined (ALLOC_PRAGMA)
++#pragma alloc_text(INIT, MmInitGlobalKernelPageDirectory)
++#pragma alloc_text(INIT, MiInitPageDirectoryMap)
++#endif
++
++
++/* GLOBALS *****************************************************************/
++
++
++
++/* FUNCTIONS ***************************************************************/
++
++BOOLEAN MmUnmapPageTable(PULONG Pt);
++
++ULONG_PTR
++NTAPI
++MiFlushTlbIpiRoutine(ULONG_PTR Address)
++{
++ UNIMPLEMENTED;
++ return 0;
++}
++
++VOID
++MiFlushTlb(PULONG Pt, PVOID Address)
++{
++ UNIMPLEMENTED;
++}
++
++
++
++PULONG_PTR
++MmGetPageDirectory(VOID)
++{
++ return (PULONG_PTR)__readcr3();
++}
++
++static ULONG
++ProtectToPTE(ULONG flProtect)
++{
++
++}
++
++NTSTATUS
++NTAPI
++Mmi386ReleaseMmInfo(PEPROCESS Process)
++{
++ UNIMPLEMENTED;
++ return STATUS_UNSUCCESSFUL;
++}
++
++NTSTATUS
++NTAPI
++MmInitializeHandBuiltProcess(IN PEPROCESS Process,
- IN PLARGE_INTEGER DirectoryTableBase)
+++ IN PULONG_PTR DirectoryTableBase)
++{
++ UNIMPLEMENTED;
++ return STATUS_UNSUCCESSFUL;
++}
++
++BOOLEAN
++STDCALL
++MmCreateProcessAddressSpace(IN ULONG MinWs,
++ IN PEPROCESS Process,
+++ IN PULONG_PTR DirectoryTableBase)
++{
++ UNIMPLEMENTED;
++ return 0;
++}
++
++VOID
++NTAPI
++MmDeletePageTable(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++}
++
++VOID
++NTAPI
++MmFreePageTable(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++}
++
++BOOLEAN MmUnmapPageTable(PULONG Pt)
++{
++ UNIMPLEMENTED;
++ return FALSE;
++}
++
++PFN_TYPE
++NTAPI
++MmGetPfnForProcess(PEPROCESS Process,
++ PVOID Address)
++{
++ UNIMPLEMENTED;
++ return 0;
++}
++
++VOID
++NTAPI
++MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_TYPE Page)
++{
++ UNIMPLEMENTED;
++}
++
++VOID
++NTAPI
++MmRawDeleteVirtualMapping(PVOID Address)
++{
++ UNIMPLEMENTED;
++}
++
++VOID
++NTAPI
++MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
++ BOOLEAN* WasDirty, PPFN_TYPE Page)
++{
++ UNIMPLEMENTED;
++}
++
++VOID
++NTAPI
++MmDeletePageFileMapping(PEPROCESS Process, PVOID Address,
++ SWAPENTRY* SwapEntry)
++{
++ UNIMPLEMENTED;
++}
++
++BOOLEAN
++Mmi386MakeKernelPageTableGlobal(PVOID PAddress)
++{
++ UNIMPLEMENTED;
++ return FALSE;
++}
++
++BOOLEAN
++NTAPI
++MmIsDirtyPage(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++ return FALSE;
++}
++
++BOOLEAN
++NTAPI
++MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++ return 0;
++}
++
++VOID
++NTAPI
++MmSetCleanPage(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++}
++
++VOID
++NTAPI
++MmSetDirtyPage(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++}
++
++VOID
++NTAPI
++MmEnableVirtualMapping(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++}
++
++BOOLEAN
++NTAPI
++MmIsPagePresent(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++ return 0;
++}
++
++BOOLEAN
++NTAPI
++MmIsPageSwapEntry(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++ return 0;
++}
++
++NTSTATUS
++NTAPI
++MmCreateVirtualMappingForKernel(PVOID Address,
++ ULONG flProtect,
++ PPFN_TYPE Pages,
++ ULONG PageCount)
++{
++ UNIMPLEMENTED;
++ return STATUS_UNSUCCESSFUL;
++}
++
++NTSTATUS
++NTAPI
++MmCreatePageFileMapping(PEPROCESS Process,
++ PVOID Address,
++ SWAPENTRY SwapEntry)
++{
++ UNIMPLEMENTED;
++ return STATUS_UNSUCCESSFUL;
++}
++
++
++NTSTATUS
++NTAPI
++MmCreateVirtualMappingUnsafe(PEPROCESS Process,
++ PVOID Address,
++ ULONG flProtect,
++ PPFN_TYPE Pages,
++ ULONG PageCount)
++{
++ UNIMPLEMENTED;
++ return STATUS_UNSUCCESSFUL;
++}
++
++NTSTATUS
++NTAPI
++MmCreateVirtualMapping(PEPROCESS Process,
++ PVOID Address,
++ ULONG flProtect,
++ PPFN_TYPE Pages,
++ ULONG PageCount)
++{
++ UNIMPLEMENTED;
++ return STATUS_UNSUCCESSFUL;
++}
++
++ULONG
++NTAPI
++MmGetPageProtect(PEPROCESS Process, PVOID Address)
++{
++ UNIMPLEMENTED;
++ return 0;
++}
++
++VOID
++NTAPI
++MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
++{
++ UNIMPLEMENTED;
++}
++
++/*
++ * @implemented
++ */
++PHYSICAL_ADDRESS STDCALL
++MmGetPhysicalAddress(PVOID vaddr)
++{
++ PHYSICAL_ADDRESS ret = {{0}};
++ UNIMPLEMENTED;
++ return ret;
++}
++
++PVOID
++NTAPI
++MmCreateHyperspaceMapping(PFN_TYPE Page)
++{
++ UNIMPLEMENTED;
++ return NULL;
++}
++
++PFN_TYPE
++NTAPI
++MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage)
++{
++ UNIMPLEMENTED;
++ return 0;
++}
++
++PFN_TYPE
++NTAPI
++MmDeleteHyperspaceMapping(PVOID Address)
++{
++ UNIMPLEMENTED;
++ return 0;
++}
++
++VOID
++NTAPI
++MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size)
++{
++ UNIMPLEMENTED;
++}
++
++VOID
++INIT_FUNCTION
++NTAPI
++MmInitGlobalKernelPageDirectory(VOID)
++{
++ UNIMPLEMENTED;
++}
++
++VOID
++INIT_FUNCTION
++NTAPI
++MiInitPageDirectoryMap(VOID)
++{
++ UNIMPLEMENTED;
++}
++
++/* EOF */
NTSTATUS
NTAPI
MmInitializeHandBuiltProcess(IN PEPROCESS Process,
- IN PLARGE_INTEGER DirectoryTableBase)
-- IN PULONG DirectoryTableBase)
+++ IN PULONG_PTR DirectoryTableBase)
{
/* Share the directory base with the idle process */
- *DirectoryTableBase = PsGetCurrentProcess()->Pcb.DirectoryTableBase;
-
+ DirectoryTableBase[0] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[0];
+ DirectoryTableBase[1] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[1];
+
/* Initialize the Addresss Space */
KeInitializeGuardedMutex(&Process->AddressCreationLock);
Process->VadRoot.BalancedRoot.u1.Parent = NULL;
STDCALL
MmCreateProcessAddressSpace(IN ULONG MinWs,
IN PEPROCESS Process,
- IN PLARGE_INTEGER DirectoryTableBase)
+ IN PULONG DirectoryTableBase)
{
- NTSTATUS Status;
- ULONG i, j;
- PFN_TYPE Pfn[2];
- PULONG PageDirectory;
-
- DPRINT("MmCopyMmInfo(Src %x, Dest %x)\n", MinWs, Process);
-
- for (i = 0; i < 2; i++)
- {
- Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn[i]);
- if (!NT_SUCCESS(Status))
- {
- for (j = 0; j < i; j++)
- {
- MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn[j]);
- }
-
- return FALSE;
- }
- }
-
- PageDirectory = MmCreateHyperspaceMapping(Pfn[0]);
-
- memcpy(PageDirectory + ADDR_TO_PDE_OFFSET(MmSystemRangeStart),
- MmGlobalKernelPageDirectory + ADDR_TO_PDE_OFFSET(MmSystemRangeStart),
- (1024 - ADDR_TO_PDE_OFFSET(MmSystemRangeStart)) * sizeof(ULONG));
-
- DPRINT("Addr %x\n",ADDR_TO_PDE_OFFSET(PAGETABLE_MAP));
- PageDirectory[ADDR_TO_PDE_OFFSET(PAGETABLE_MAP)] = PFN_TO_PTE(Pfn[0]) | PA_PRESENT | PA_READWRITE;
- PageDirectory[ADDR_TO_PDE_OFFSET(HYPERSPACE)] = PFN_TO_PTE(Pfn[1]) | PA_PRESENT | PA_READWRITE;
-
- MmDeleteHyperspaceMapping(PageDirectory);
-
- DirectoryTableBase->QuadPart = PFN_TO_PTE(Pfn[0]);
- DPRINT("Finished MmCopyMmInfo(): %I64x\n", DirectoryTableBase->QuadPart);
- return TRUE;
+ NTSTATUS Status;
+ ULONG i, j;
+ PFN_TYPE Pfn[2];
-- PULONG PageDirectory;
+++ PULONG_PTR PageDirectory;
+
+ DPRINT("MmCopyMmInfo(Src %x, Dest %x)\n", MinWs, Process);
+
+ for (i = 0; i < 2; i++)
+ {
+ Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn[i]);
+ if (!NT_SUCCESS(Status))
+ {
+ for (j = 0; j < i; j++)
+ {
+ MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn[j]);
+ }
+
+ return FALSE;
+ }
+ }
+
+ PageDirectory = MmCreateHyperspaceMapping(Pfn[0]);
+
+ memcpy(PageDirectory + ADDR_TO_PDE_OFFSET(MmSystemRangeStart),
+ MmGlobalKernelPageDirectory + ADDR_TO_PDE_OFFSET(MmSystemRangeStart),
+ (1024 - ADDR_TO_PDE_OFFSET(MmSystemRangeStart)) * sizeof(ULONG));
+
+ DPRINT("Addr %x\n",ADDR_TO_PDE_OFFSET(PAGETABLE_MAP));
+ PageDirectory[ADDR_TO_PDE_OFFSET(PAGETABLE_MAP)] = PFN_TO_PTE(Pfn[0]) | PA_PRESENT | PA_READWRITE;
+ PageDirectory[ADDR_TO_PDE_OFFSET(HYPERSPACE)] = PFN_TO_PTE(Pfn[1]) | PA_PRESENT | PA_READWRITE;
+
+ MmDeleteHyperspaceMapping(PageDirectory);
+
+ DirectoryTableBase[0] = PFN_TO_PTE(Pfn[0]);
+ DirectoryTableBase[1] = 0;
+ DPRINT("Finished MmCopyMmInfo(): 0x%x\n", DirectoryTableBase[0]);
+ return TRUE;
}
VOID
MmInit1(VOID)
{
PLDR_DATA_TABLE_ENTRY LdrEntry;
- LARGE_INTEGER Dummy;
-- ULONG Dummy[2];
+++ ULONG_PTR Dummy[2];
/* Dump memory descriptors */
if (MiDbgEnableMdDump) MiDbgDumpMemoryDescriptors();
/* Set the page directory */
- PsGetCurrentProcess()->Pcb.DirectoryTableBase.QuadPart = (ULONG_PTR)MmGetPageDirectory();
-- PsGetCurrentProcess()->Pcb.DirectoryTableBase[0] = (ULONG)MmGetPageDirectory();
+++ PsGetCurrentProcess()->Pcb.DirectoryTableBase[0] = (ULONG_PTR)MmGetPageDirectory();
/* Get the size of FreeLDR's image allocations */
MmBootImageSize = KeLoaderBlock->Extension->LoaderPagesSpanned;
--- /dev/null
--- /dev/null
- <file>strtok.c</file>
++<?xml version="1.0"?>
++<!DOCTYPE module SYSTEM "../tools/rbuild/project.dtd">
++<module name="ntoskrnl" type="kernel" installbase="system32" installname="ntoskrnl.exe" baseaddress="0xfffff80000800000" entrypoint="KiSystemStartup" allowwarnings="true">
++ <bootstrap installbase="$(CDOUTPUT)" />
++ <importlibrary definition="ntoskrnl_$(ARCH).def" />
++ <define name="_DISABLE_TIDENTS" />
++ <define name="__NTOSKRNL__" />
++ <define name="_NTOSKRNL_" />
++ <define name="_NTSYSTEM_" />
++ <define name="__NO_CTYPE_INLINES" />
++ <define name="WIN9X_COMPAT_SPINLOCK" />
++ <define name="_IN_KERNEL_" />
++ <if property="_WINKD_" value="1">
++ <define name="_WINKD_" />
++ </if>
++ <if property="_ELF_" value="1">
++ <define name="_ELF_" />
++ </if>
++ <include base="cmlib">.</include>
++ <include base="ntoskrnl">include</include>
++ <include base="ntoskrnl" root="intermediate"></include>
++ <include base="ntoskrnl" root="intermediate">include</include>
++ <include base="ntoskrnl" root="intermediate">include/internal</include>
++ <include base="ReactOS">include/reactos/drivers</include>
++ <library>csq</library>
++ <library>hal</library>
++ <library>pseh</library>
++ <library>cmlib</library>
++ <library>rtl</library>
++ <library>rossym</library>
++ <library>libcntpr</library>
++ <library>kdcom</library>
++ <library>bootvid</library>
++ <library>wdmguid</library>
++ <dependency>bugcodes</dependency>
++ <directory name="include">
++ <pch>ntoskrnl.h</pch>
++ </directory>
++ <file>amd64stubs.c</file>
++ <directory name="ke">
++ <if property="ARCH" value="i386">
++ <directory name="i386">
++ <file first="true">boot.S</file>
++ <file>abios.c</file>
++ <file>cpu.c</file>
++ <file>ctxswitch.S</file>
++ <file>exp.c</file>
++ <file>irqobj.c</file>
++ <file>kiinit.c</file>
++ <file>ldt.c</file>
++ <file>mtrr.c</file>
++ <file>patpge.c</file>
++ <file>systimer.S</file>
++ <file>thrdini.c</file>
++ <file>trap.s</file>
++ <file>usercall_asm.S</file>
++ <file>usercall.c</file>
++ <file>v86vdm.c</file>
++ <file>v86m_sup.S</file>
++ </directory>
++ </if>
++ <if property="ARCH" value="arm">
++ <directory name="arm">
++ <file first="true">boot.s</file>
++ <file>cpu.c</file>
++ <file>ctxswtch.s</file>
++ <file>exp.c</file>
++ <file>kiinit.c</file>
++ <file>stubs_asm.s</file>
++ <file>thrdini.c</file>
++ <file>time.c</file>
++ <file>trap.s</file>
++ <file>trapc.c</file>
++ <file>usercall.c</file>
++ </directory>
++ </if>
++ <if property="ARCH" value="powerpc">
++ <directory name="powerpc">
++ <file first="true">main_asm.S</file>
++ <file>cpu.c</file>
++ <file>exp.c</file>
++ <file>kiinit.c</file>
++ <file>ppc_irq.c</file>
++ <file>stubs.c</file>
++ <file>systimer.c</file>
++ <file>thrdini.c</file>
++ <file>ctxswitch.c</file>
++ <file>ctxhelp.S</file>
++ </directory>
++ </if>
++ <if property="ARCH" value="amd64">
++ <directory name="amd64">
++ <file first="true">boot.S</file>
++ <file>kiinit.c</file>
++ </directory>
++ </if>
++ <file>apc.c</file>
++ <file>balmgr.c</file>
++ <file>bug.c</file>
++ <file>clock.c</file>
++ <file>config.c</file>
++ <file>devqueue.c</file>
++ <file>dpc.c</file>
++ <file>eventobj.c</file>
++ <file>except.c</file>
++ <file>freeldr.c</file>
++ <file>gate.c</file>
++ <file>gmutex.c</file>
++ <file>ipi.c</file>
++ <file>krnlinit.c</file>
++ <file>mutex.c</file>
++ <file>procobj.c</file>
++ <file>profobj.c</file>
++ <file>queue.c</file>
++ <file>semphobj.c</file>
++ <file>spinlock.c</file>
++ <file>thrdschd.c</file>
++ <file>thrdobj.c</file>
++ <file>timerobj.c</file>
++ <file>wait.c</file>
++ </directory>
++ <directory name="cc">
++ <file>cacheman.c</file>
++ <file>copy.c</file>
++ <file>fs.c</file>
++ <file>mdl.c</file>
++ <file>pin.c</file>
++ <file>view.c</file>
++ </directory>
++ <directory name="config">
++ <if property="ARCH" value="i386">
++ <directory name="i386">
++ <file>cmhardwr.c</file>
++ </directory>
++ </if>
++ <if property="ARCH" value="arm">
++ <directory name="arm">
++ <file>cmhardwr.c</file>
++ </directory>
++ </if>
++ <if property="ARCH" value="powerpc">
++ <directory name="powerpc">
++ <file>cmhardwr.c</file>
++ </directory>
++ </if>
++ <file>cmalloc.c</file>
++ <file>cmapi.c</file>
++ <file>cmboot.c</file>
++ <file>cmcheck.c</file>
++ <file>cmcontrl.c</file>
++ <file>cmconfig.c</file>
++ <file>cmdata.c</file>
++ <file>cmdelay.c</file>
++ <file>cmindex.c</file>
++ <file>cminit.c</file>
++ <file>cmhook.c</file>
++ <file>cmkcbncb.c</file>
++ <file>cmkeydel.c</file>
++ <file>cmlazy.c</file>
++ <file>cmmapvw.c</file>
++ <file>cmname.c</file>
++ <file>cmparse.c</file>
++ <file>cmse.c</file>
++ <file>cmsecach.c</file>
++ <file>cmsysini.c</file>
++ <file>cmvalue.c</file>
++ <file>cmvalche.c</file>
++ <file>cmwraprs.c</file>
++ <file>ntapi.c</file>
++ </directory>
++ <directory name="dbgk">
++ <file>dbgkutil.c</file>
++ <file>dbgkobj.c</file>
++ </directory>
++ <directory name="ex" root="intermediate">
++ <file>zw.S</file>
++ </directory>
++ <directory name="ex">
++ <if property="ARCH" value="i386">
++ <directory name="i386">
++ <file>interlck_asm.S</file>
++ <file>fastinterlck_asm.S</file>
++ <file>ioport.S</file>
++ </directory>
++ </if>
++ <file>atom.c</file>
++ <file>callback.c</file>
++ <file>dbgctrl.c</file>
++ <file>efi.c</file>
++ <file>event.c</file>
++ <file>evtpair.c</file>
++ <file>exintrin.c</file>
++ <file>fastinterlck.c</file>
++ <file>fmutex.c</file>
++ <file>handle.c</file>
++ <file>harderr.c</file>
++ <file>hdlsterm.c</file>
++ <file>init.c</file>
++ <file>keyedevt.c</file>
++ <file>locale.c</file>
++ <file>lookas.c</file>
++ <file>mutant.c</file>
++ <file>pushlock.c</file>
++ <file>profile.c</file>
++ <file>resource.c</file>
++ <file>rundown.c</file>
++ <file>sem.c</file>
++ <file>shutdown.c</file>
++ <file>sysinfo.c</file>
++ <file>time.c</file>
++ <file>timer.c</file>
++ <file>uuid.c</file>
++ <file>win32k.c</file>
++ <file>work.c</file>
++ <file>xipdisp.c</file>
++ <file>zone.c</file>
++ </directory>
++ <directory name="fsrtl">
++ <file>dbcsname.c</file>
++ <file>fastio.c</file>
++ <file>faulttol.c</file>
++ <file>filelock.c</file>
++ <file>filter.c</file>
++ <file>filtrctx.c</file>
++ <file>fsfilter.c</file>
++ <file>fsrtlpc.c</file>
++ <file>largemcb.c</file>
++ <file>name.c</file>
++ <file>notify.c</file>
++ <file>oplock.c</file>
++ <file>pnp.c</file>
++ <file>stackovf.c</file>
++ <file>tunnel.c</file>
++ <file>unc.c</file>
++ </directory>
++ <directory name="fstub">
++ <file>disksup.c</file>
++ <file>fstubex.c</file>
++ <file>halstub.c</file>
++ </directory>
++ <directory name="inbv">
++ <file>inbv.c</file>
++ </directory>
++ <directory name="io">
++ <directory name="iomgr">
++ <file>adapter.c</file>
++ <file>arcname.c</file>
++ <file>bootlog.c</file>
++ <file>controller.c</file>
++ <file>device.c</file>
++ <file>deviface.c</file>
++ <file>driver.c</file>
++ <file>drvrlist.c</file>
++ <file>error.c</file>
++ <file>file.c</file>
++ <file>iocomp.c</file>
++ <file>ioevent.c</file>
++ <file>iofunc.c</file>
++ <file>iomdl.c</file>
++ <file>iomgr.c</file>
++ <file>iorsrce.c</file>
++ <file>iotimer.c</file>
++ <file>iowork.c</file>
++ <file>irp.c</file>
++ <file>irq.c</file>
++ <file>ramdisk.c</file>
++ <file>rawfs.c</file>
++ <file>remlock.c</file>
++ <file>util.c</file>
++ <file>symlink.c</file>
++ <file>volume.c</file>
++ </directory>
++ <directory name="pnpmgr">
++ <file>plugplay.c</file>
++ <file>pnpdma.c</file>
++ <file>pnpmgr.c</file>
++ <file>pnpnotify.c</file>
++ <file>pnpreport.c</file>
++ <file>pnproot.c</file>
++ </directory>
++ </directory>
++ <if property="_WINKD_" value="0">
++ <directory name="kdbg">
++ <if property="ARCH" value="i386">
++ <directory name="i386">
++ <if property="KDBG" value="1">
++ <group>
++ <file>i386-dis.c</file>
++ <file>kdb_help.S</file>
++ <file>longjmp.S</file>
++ <file>setjmp.S</file>
++ </group>
++ </if>
++ </directory>
++ </if>
++ <if property="KDBG" value="1">
++ <!-- file>kdb.c</file -->
++ <!-- file>kdb_cli.c</file -->
++ <!-- file>kdb_expr.c</file -->
++ <file>kdb_keyboard.c</file>
++ <file>kdb_serial.c</file>
++ </if>
++ <if property="DBG_OR_KDBG" value="true">
++ <file>kdb_symbols.c</file>
++ </if>
++ </directory>
++ <directory name="kd">
++ <directory name="wrappers">
++ <file>bochs.c</file>
++ <if property="ARCH" value="i386">
++ <file>gdbstub.c</file>
++ </if>
++ <if property="ARCH" value="powerpc">
++ <file>gdbstub_powerpc.c</file>
++ </if>
++ <file>kdbg.c</file>
++ </directory>
++ <file>kdinit.c</file>
++ <file>kdio.c</file>
++ <file>kdmain.c</file>
++ </directory>
++ </if>
++ <if property="_WINKD_" value ="1">
++ <directory name="kd64">
++ <file>kdapi.c</file>
++ <file>kdbreak.c</file>
++ <file>kddata.c</file>
++ <file>kdinit.c</file>
++ <file>kdlock.c</file>
++ <file>kdprint.c</file>
++ <file>kdtrap.c</file>
++ </directory>
++ </if>
++ <directory name="lpc">
++ <file>close.c</file>
++ <file>complete.c</file>
++ <file>connect.c</file>
++ <file>create.c</file>
++ <file>listen.c</file>
++ <file>port.c</file>
++ <file>reply.c</file>
++ <file>send.c</file>
++ </directory>
++ <directory name="mm">
++ <if property="ARCH" value="i386">
++ <directory name="i386">
++ <file>page.c</file>
++ </directory>
++ </if>
++ <if property="ARCH" value="arm">
++ <directory name="arm">
++ <file>stubs.c</file>
++ </directory>
++ </if>
++ <if property="ARCH" value="powerpc">
++ <directory name="powerpc">
++ <file>pfault.c</file>
++ <file>page.c</file>
++ </directory>
++ </if>
++ <if property="ARCH" value="amd64">
++ <directory name="amd64">
++ <file>page.c</file>
++ </directory>
++ </if>
++ <file>anonmem.c</file>
++ <file>aspace.c</file>
++ <file>balance.c</file>
++ <file>cont.c</file>
++ <file>drvlck.c</file>
++ <file>freelist.c</file>
++ <file>iospace.c</file>
++ <file>kmap.c</file>
++ <file>marea.c</file>
++ <file>mdlsup.c</file>
++ <file>mm.c</file>
++ <file>mminit.c</file>
++ <file>mpw.c</file>
++ <file>ncache.c</file>
++ <file>npool.c</file>
++ <file>pagefile.c</file>
++ <file>pageop.c</file>
++ <file>pager.c</file>
++ <file>pagfault.c</file>
++ <file>paging.c</file>
++ <file>pe.c</file>
++ <file>physical.c</file>
++ <file>pool.c</file>
++ <file>ppool.c</file>
++ <file>procsup.c</file>
++ <file>region.c</file>
++ <file>rmap.c</file>
++ <file>section.c</file>
++ <file>sysldr.c</file>
++ <file>verifier.c</file>
++ <file>virtual.c</file>
++ <file>wset.c</file>
++ <if property="_ELF_" value="1">
++ <file>elf32.c</file>
++ <file>elf64.c</file>
++ </if>
++ </directory>
++ <directory name="ob">
++ <file>obdir.c</file>
++ <file>obinit.c</file>
++ <file>obhandle.c</file>
++ <file>obname.c</file>
++ <file>oblife.c</file>
++ <file>obref.c</file>
++ <file>obsdcach.c</file>
++ <file>obsecure.c</file>
++ <file>oblink.c</file>
++ <file>obwait.c</file>
++ </directory>
++ <directory name="po">
++ <file>power.c</file>
++ <file>events.c</file>
++ </directory>
++ <directory name="ps">
++ <if property="ARCH" value="i386">
++ <directory name="i386">
++ <file>psctx.c</file>
++ </directory>
++ </if>
++ <if property="ARCH" value="arm">
++ <directory name="arm">
++ <file>psctx.c</file>
++ </directory>
++ </if>
++ <file>debug.c</file>
++ <file>job.c</file>
++ <file>kill.c</file>
++ <file>psnotify.c</file>
++ <file>process.c</file>
++ <file>psmgr.c</file>
++ <file>query.c</file>
++ <file>quota.c</file>
++ <file>security.c</file>
++ <file>state.c</file>
++ <file>thread.c</file>
++ <file>win32.c</file>
++ </directory>
++ <directory name="rtl">
++ <if property="ARCH" value="arm">
++ <directory name="arm">
++ <file>rtlexcpt.c</file>
++ </directory>
++ </if>
++ <file>libsupp.c</file>
++ <file>misc.c</file>
++ </directory>
++ <directory name="se">
++ <file>access.c</file>
++ <file>acl.c</file>
++ <file>audit.c</file>
++ <file>lsa.c</file>
++ <file>priv.c</file>
++ <file>sd.c</file>
++ <file>semgr.c</file>
++ <file>sid.c</file>
++ <file>token.c</file>
++ </directory>
++ <directory name="vdm">
++ <if property="ARCH" value="i386">
++ <file>vdmmain.c</file>
++ <file>vdmexec.c</file>
++ </if>
++ </directory>
++ <directory name="wmi">
++ <file>wmi.c</file>
++ </directory>
++ <file>ntoskrnl.rc</file>
++ <linkerscript>ntoskrnl_$(ARCH).lnk</linkerscript>
++</module>
++
/* FIXME should get timeout from
* HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
- Status = co_MsqSendMessage(((PW32THREAD)Hook->Thread->Tcb.Win32Thread)->MessageQueue, (HWND)(INT_PTR) Code, HookId,
- wParam, lParam, 5000, TRUE, TRUE, &uResult);
+ Status = co_MsqSendMessage(((PW32THREAD)Hook->Thread->Tcb.Win32Thread)->MessageQueue,
-- (HWND) Code,
+++ (HWND)(UINT_PTR)Code,
+ Hook->HookId,
+ wParam,
+ lParam,
+ 5000,
+ TRUE,
+ MSQ_ISHOOK,
+ &uResult);
return NT_SUCCESS(Status) ? uResult : 0;
}