Author: ion
Date: Sun Feb 18 10:21:03 2007
New Revision: 25833
URL:
http://svn.reactos.org/svn/reactos?rev=25833&view=rev
Log:
- Add EXCEPTION_RECORD64 and LIST_ENTRY64, KeTryToAcquireSpinLockAtDpcLevel,
BREAKPOINT_COMMAND_STRING, Ke386SetCr2, Ke386SetDr3, Ke386SetDr6.
- Remove non-kernel routines from kdfuncs.h and remove deprecated routines from ke.h.
- Implement KiRestoreProcessorControlState, KeFreezeExecution, KeThawExecution,
ExAcquireTimeRefreshLock, ExReleaseTimeRefreshLock.
- Rename ModuleLoadList to PsLoadedModuleList. Add PsNtosImageBase and set value in it.
- Add skeleton wdbgexts.h with what's needed until now, this is a PSDK header.
- Add kddll.h for KDCOM/1394/USB2.DLL prototypes.
- Add windbgkd.h with KD protocol definitions. Used to be an NT5 DDK header, but was
removed, so this goes into include\reactos.
Added:
branches/alex-kd-branch/reactos/include/psdk/wdbgexts.h
branches/alex-kd-branch/reactos/include/reactos/kddll.h
branches/alex-kd-branch/reactos/include/reactos/windbgkd.h
Modified:
branches/alex-kd-branch/reactos/include/ddk/winddk.h
branches/alex-kd-branch/reactos/include/ndk/kdfuncs.h
branches/alex-kd-branch/reactos/include/ndk/kdtypes.h
branches/alex-kd-branch/reactos/include/psdk/ntdef.h
branches/alex-kd-branch/reactos/ntoskrnl/ex/time.c
branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ex.h
branches/alex-kd-branch/reactos/ntoskrnl/include/internal/i386/intrin_i.h
branches/alex-kd-branch/reactos/ntoskrnl/include/internal/i386/ke.h
branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ke.h
branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ps.h
branches/alex-kd-branch/reactos/ntoskrnl/include/ntoskrnl.h
branches/alex-kd-branch/reactos/ntoskrnl/ke/bug.c
branches/alex-kd-branch/reactos/ntoskrnl/ke/i386/cpu.c
branches/alex-kd-branch/reactos/ntoskrnl/ldr/loader.c
branches/alex-kd-branch/reactos/ntoskrnl/mm/mm.c
branches/alex-kd-branch/reactos/ntoskrnl/mm/rpoolmgr.h
branches/alex-kd-branch/reactos/ntoskrnl/mm/verifier.c
Modified: branches/alex-kd-branch/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/include/…
==============================================================================
--- branches/alex-kd-branch/reactos/include/ddk/winddk.h (original)
+++ branches/alex-kd-branch/reactos/include/ddk/winddk.h Sun Feb 18 10:21:03 2007
@@ -634,6 +634,17 @@
IN struct _IRP *Irp,
IN PVOID MapRegisterBase,
IN PVOID Context);
+
+typedef struct _EXCEPTION_RECORD64
+{
+ NTSTATUS ExceptionCode;
+ ULONG ExceptionFlags;
+ ULONG64 ExceptionRecord;
+ ULONG64 ExceptionAddress;
+ ULONG NumberParameters;
+ ULONG __unusedAlignment;
+ ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
+} EXCEPTION_RECORD64, *PEXCEPTION_RECORD64;
typedef EXCEPTION_DISPOSITION
(DDKAPI *PEXCEPTION_ROUTINE)(
@@ -5423,6 +5434,13 @@
IN PKSPIN_LOCK SpinLock,
IN KIRQL NewIrql);
+NTKERNELAPI
+BOOLEAN
+FASTCALL
+KeTryToAcquireSpinLockAtDpcLevel(
+ IN OUT PKSPIN_LOCK SpinLock
+);
+
#define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock)
#define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock)
#define KeAcquireSpinLock(a,b) *(b) = KfAcquireSpinLock(a)
Modified: branches/alex-kd-branch/reactos/include/ndk/kdfuncs.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/include/…
==============================================================================
--- branches/alex-kd-branch/reactos/include/ndk/kdfuncs.h (original)
+++ branches/alex-kd-branch/reactos/include/ndk/kdfuncs.h Sun Feb 18 10:21:03 2007
@@ -28,29 +28,6 @@
#ifndef NTOS_MODE_USER
//
-// Port Functions
-//
-UCHAR
-NTAPI
-KdPollBreakIn(VOID);
-
-NTSTATUS
-NTAPI
-KdRestore(IN BOOLEAN DisableDbgPorts);
-
-NTSTATUS
-NTAPI
-KdSave(IN ULONG Unknown);
-
-#ifdef _ARC_
-NTSTATUS
-NTAPI
-KdDebuggerInitialize0(
- IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock
-);
-#endif
-
-//
// Debugger API
//
NTSTATUS
@@ -63,6 +40,12 @@
ULONG OutputBufferLength,
PULONG ReturnLength,
KPROCESSOR_MODE PreviousMode
+);
+
+BOOLEAN
+NTAPI
+KdPollBreakIn(
+ VOID
);
#endif
Modified: branches/alex-kd-branch/reactos/include/ndk/kdtypes.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/include/…
==============================================================================
--- branches/alex-kd-branch/reactos/include/ndk/kdtypes.h (original)
+++ branches/alex-kd-branch/reactos/include/ndk/kdtypes.h Sun Feb 18 10:21:03 2007
@@ -52,6 +52,7 @@
#define BREAKPOINT_PROMPT 2
#define BREAKPOINT_LOAD_SYMBOLS 3
#define BREAKPOINT_UNLOAD_SYMBOLS 4
+#define BREAKPOINT_COMMAND_STRING 5
//
// Debug Control Codes for NtSystemDebugcontrol
Modified: branches/alex-kd-branch/reactos/include/psdk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/include/…
==============================================================================
--- branches/alex-kd-branch/reactos/include/psdk/ntdef.h (original)
+++ branches/alex-kd-branch/reactos/include/psdk/ntdef.h Sun Feb 18 10:21:03 2007
@@ -89,6 +89,21 @@
PVOID SecurityQualityOfService;
} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
#endif
+
+typedef struct LIST_ENTRY32
+{
+ ULONG Flink;
+ ULONG Blink;
+} LIST_ENTRY32;
+typedef LIST_ENTRY32 *PLIST_ENTRY32;
+
+typedef struct LIST_ENTRY64
+{
+ ULONGLONG Flink;
+ ULONGLONG Blink;
+} LIST_ENTRY64;
+typedef LIST_ENTRY64 *PLIST_ENTRY64;
+
#define NOTHING
#define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
#define TYPE_ALIGNMENT( t ) FIELD_OFFSET( struct { char x; t test; }, test )
Added: branches/alex-kd-branch/reactos/include/psdk/wdbgexts.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/include/…
==============================================================================
--- branches/alex-kd-branch/reactos/include/psdk/wdbgexts.h (added)
+++ branches/alex-kd-branch/reactos/include/psdk/wdbgexts.h Sun Feb 18 10:21:03 2007
@@ -1,0 +1,185 @@
+#ifndef _WDBGEXTS_
+#define _WDBGEXTS_
+
+enum
+{
+ DBGKD_SIMULATION_NONE,
+ DBGKD_SIMULATION_EXDI
+};
+
+#define KD_SECONDARY_VERSION_DEFAULT 0
+#define KD_SECONDARY_VERSION_AMD64_OBSOLETE_CONTEXT_1 0
+#define KD_SECONDARY_VERSION_AMD64_OBSOLETE_CONTEXT_2 1
+#define KD_SECONDARY_VERSION_AMD64_CONTEXT 2
+#define CURRENT_KD_SECONDARY_VERSION KD_SECONDARY_VERSION_DEFAULT
+
+#define DBGKD_VERS_FLAG_MP 0x0001
+#define DBGKD_VERS_FLAG_DATA 0x0002
+#define DBGKD_VERS_FLAG_PTR64 0x0004
+#define DBGKD_VERS_FLAG_NOMM 0x0008
+#define DBGKD_VERS_FLAG_HSS 0x0010
+#define DBGKD_VERS_FLAG_PARTITIONS 0x0020
+
+#define KDBG_TAG TAG('G', 'B',
'D', 'K')
+
+typedef struct _DBGKD_GET_VERSION64
+{
+ USHORT MajorVersion;
+ USHORT MinorVersion;
+ UCHAR ProtocolVersion;
+ UCHAR KdSecondaryVersion;
+ USHORT Flags;
+ USHORT MachineType;
+ UCHAR MaxPacketType;
+ UCHAR MaxStateChange;
+ UCHAR MaxManipulate;
+ UCHAR Simulation;
+ USHORT Unused[1];
+ ULONG64 KernBase;
+ ULONG64 PsLoadedModuleList;
+ ULONG64 DebuggerDataList;
+} DBGKD_GET_VERSION64, *PDBGKD_GET_VERSION64;
+
+typedef struct _DBGKD_DEBUG_DATA_HEADER64
+{
+ LIST_ENTRY64 List;
+ ULONG OwnerTag;
+ ULONG Size;
+} DBGKD_DEBUG_DATA_HEADER64, *PDBGKD_DEBUG_DATA_HEADER64;
+
+typedef struct _KDDEBUGGER_DATA64
+{
+ DBGKD_DEBUG_DATA_HEADER64 Header;
+ ULONG64 KernBase;
+ ULONG64 BreakpointWithStatus;
+ ULONG64 SavedContext;
+ USHORT ThCallbackStack;
+ USHORT NextCallback;
+ USHORT FramePointer;
+ USHORT PaeEnabled:1;
+ ULONG64 KiCallUserMode;
+ ULONG64 KeUserCallbackDispatcher;
+ ULONG64 PsLoadedModuleList;
+ ULONG64 PsActiveProcessHead;
+ ULONG64 PspCidTable;
+ ULONG64 ExpSystemResourcesList;
+ ULONG64 ExpPagedPoolDescriptor;
+ ULONG64 ExpNumberOfPagedPools;
+ ULONG64 KeTimeIncrement;
+ ULONG64 KeBugCheckCallbackListHead;
+ ULONG64 KiBugcheckData;
+ ULONG64 IopErrorLogListHead;
+ ULONG64 ObpRootDirectoryObject;
+ ULONG64 ObpTypeObjectType;
+ ULONG64 MmSystemCacheStart;
+ ULONG64 MmSystemCacheEnd;
+ ULONG64 MmSystemCacheWs;
+ ULONG64 MmPfnDatabase;
+ ULONG64 MmSystemPtesStart;
+ ULONG64 MmSystemPtesEnd;
+ ULONG64 MmSubsectionBase;
+ ULONG64 MmNumberOfPagingFiles;
+ ULONG64 MmLowestPhysicalPage;
+ ULONG64 MmHighestPhysicalPage;
+ ULONG64 MmNumberOfPhysicalPages;
+ ULONG64 MmMaximumNonPagedPoolInBytes;
+ ULONG64 MmNonPagedSystemStart;
+ ULONG64 MmNonPagedPoolStart;
+ ULONG64 MmNonPagedPoolEnd;
+ ULONG64 MmPagedPoolStart;
+ ULONG64 MmPagedPoolEnd;
+ ULONG64 MmPagedPoolInformation;
+ ULONG64 MmPageSize;
+ ULONG64 MmSizeOfPagedPoolInBytes;
+ ULONG64 MmTotalCommitLimit;
+ ULONG64 MmTotalCommittedPages;
+ ULONG64 MmSharedCommit;
+ ULONG64 MmDriverCommit;
+ ULONG64 MmProcessCommit;
+ ULONG64 MmPagedPoolCommit;
+ ULONG64 MmExtendedCommit;
+ ULONG64 MmZeroedPageListHead;
+ ULONG64 MmFreePageListHead;
+ ULONG64 MmStandbyPageListHead;
+ ULONG64 MmModifiedPageListHead;
+ ULONG64 MmModifiedNoWritePageListHead;
+ ULONG64 MmAvailablePages;
+ ULONG64 MmResidentAvailablePages;
+ ULONG64 PoolTrackTable;
+ ULONG64 NonPagedPoolDescriptor;
+ ULONG64 MmHighestUserAddress;
+ ULONG64 MmSystemRangeStart;
+ ULONG64 MmUserProbeAddress;
+ ULONG64 KdPrintCircularBuffer;
+ ULONG64 KdPrintCircularBufferEnd;
+ ULONG64 KdPrintWritePointer;
+ ULONG64 KdPrintRolloverCount;
+ ULONG64 MmLoadedUserImageList;
+ ULONG64 NtBuildLab;
+ ULONG64 KiNormalSystemCall;
+ ULONG64 KiProcessorBlock;
+ ULONG64 MmUnloadedDrivers;
+ ULONG64 MmLastUnloadedDriver;
+ ULONG64 MmTriageActionTaken;
+ ULONG64 MmSpecialPoolTag;
+ ULONG64 KernelVerifier;
+ ULONG64 MmVerifierData;
+ ULONG64 MmAllocatedNonPagedPool;
+ ULONG64 MmPeakCommitment;
+ ULONG64 MmTotalCommitLimitMaximum;
+ ULONG64 CmNtCSDVersion;
+ ULONG64 MmPhysicalMemoryBlock;
+ ULONG64 MmSessionBase;
+ ULONG64 MmSessionSize;
+ ULONG64 MmSystemParentTablePage;
+ ULONG64 MmVirtualTranslationBase;
+ USHORT OffsetKThreadNextProcessor;
+ USHORT OffsetKThreadTeb;
+ USHORT OffsetKThreadKernelStack;
+ USHORT OffsetKThreadInitialStack;
+ USHORT OffsetKThreadApcProcess;
+ USHORT OffsetKThreadState;
+ USHORT OffsetKThreadBStore;
+ USHORT OffsetKThreadBStoreLimit;
+ USHORT SizeEProcess;
+ USHORT OffsetEprocessPeb;
+ USHORT OffsetEprocessParentCID;
+ USHORT OffsetEprocessDirectoryTableBase;
+ USHORT SizePrcb;
+ USHORT OffsetPrcbDpcRoutine;
+ USHORT OffsetPrcbCurrentThread;
+ USHORT OffsetPrcbMhz;
+ USHORT OffsetPrcbCpuType;
+ USHORT OffsetPrcbVendorString;
+ USHORT OffsetPrcbProcStateContext;
+ USHORT OffsetPrcbNumber;
+ USHORT SizeEThread;
+ ULONG64 KdPrintCircularBufferPtr;
+ ULONG64 KdPrintBufferSize;
+ ULONG64 KeLoaderBlock;
+ USHORT SizePcr;
+ USHORT OffsetPcrSelfPcr;
+ USHORT OffsetPcrCurrentPrcb;
+ USHORT OffsetPcrContainedPrcb;
+ USHORT OffsetPcrInitialBStore;
+ USHORT OffsetPcrBStoreLimit;
+ USHORT OffsetPcrInitialStack;
+ USHORT OffsetPcrStackLimit;
+ USHORT OffsetPrcbPcrPage;
+ USHORT OffsetPrcbProcStateSpecialReg;
+ USHORT GdtR0Code;
+ USHORT GdtR0Data;
+ USHORT GdtR0Pcr;
+ USHORT GdtR3Code;
+ USHORT GdtR3Data;
+ USHORT GdtR3Teb;
+ USHORT GdtLdt;
+ USHORT GdtTss;
+ USHORT Gdt64R3CmCode;
+ USHORT Gdt64R3CmTeb;
+ ULONG64 IopNumTriageDumpDataBlocks;
+ ULONG64 IopTriageDumpDataBlocks;
+ ULONG64 VfCrashDataBlock;
+} KDDEBUGGER_DATA64, *PKDDEBUGGER_DATA64;
+
+#endif
Added: branches/alex-kd-branch/reactos/include/reactos/kddll.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/include/…
==============================================================================
--- branches/alex-kd-branch/reactos/include/reactos/kddll.h (added)
+++ branches/alex-kd-branch/reactos/include/reactos/kddll.h Sun Feb 18 10:21:03 2007
@@ -1,0 +1,41 @@
+#ifndef _KDDLL_
+#define _KDDLL_
+
+NTSTATUS
+NTAPI
+KdDebuggerInitialize0(
+ IN PLOADER_PARAMETER_BLOCK LoaderBlock
+);
+
+ULONG
+NTAPI
+KdReceivePacket(
+ IN ULONG PacketType,
+ OUT PSTRING MessageHeader,
+ OUT PSTRING MessageData,
+ OUT PULONG DataLength,
+ IN OUT PKD_CONTEXT Context
+);
+
+NTSTATUS
+NTAPI
+KdRestore(
+ IN BOOLEAN SleepTransition
+);
+
+NTSTATUS
+NTAPI
+KdSave(
+ IN BOOLEAN SleepTransition
+);
+
+VOID
+NTAPI
+KdSendPacket(
+ IN ULONG PacketType,
+ IN PSTRING MessageHeader,
+ IN PSTRING MessageData,
+ IN OUT PKD_CONTEXT Context
+);
+
+#endif
Added: branches/alex-kd-branch/reactos/include/reactos/windbgkd.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/include/…
==============================================================================
--- branches/alex-kd-branch/reactos/include/reactos/windbgkd.h (added)
+++ branches/alex-kd-branch/reactos/include/reactos/windbgkd.h Sun Feb 18 10:21:03 2007
@@ -1,0 +1,229 @@
+#ifndef _WINDBGKD_
+#define _WINDBGKG_
+
+//
+// Packet Size and Control Stream Size
+//
+#define PACKET_MAX_SIZE 4000
+#define DBGKD_MAXSTREAM 16
+
+//
+// Magic Packet IDs
+//
+#define INITIAL_PACKET_ID 0x80800000
+#define SYNC_PACKET_ID 0x00000800
+
+//
+// Magic Packet bytes
+//
+#define BREAKIN_PACKET 0x62626262
+#define BREAKIN_PACKET_BYTE 0x62
+#define PACKET_LEADER 0x30303030
+#define PACKET_LEADER_BYTE 0x30
+#define CONTROL_PACKET_LEADER 0x69696969
+#define CONTROL_PACKET_LEADER_BYTE 0x69
+#define PACKET_TRAILING_BYTE 0xAA
+
+//
+// Packet Types
+//
+#define PACKET_TYPE_UNUSED 0
+#define PACKET_TYPE_KD_STATE_CHANGE32 1
+#define PACKET_TYPE_KD_STATE_MANIPULATE 2
+#define PACKET_TYPE_KD_DEBUG_IO 3
+#define PACKET_TYPE_KD_ACKNOWLEDGE 4
+#define PACKET_TYPE_KD_RESEND 5
+#define PACKET_TYPE_KD_RESET 6
+#define PACKET_TYPE_KD_STATE_CHANGE64 7
+#define PACKET_TYPE_KD_POLL_BREAKIN 8
+#define PACKET_TYPE_KD_TRACE_IO 9
+#define PACKET_TYPE_KD_CONTROL_REQUEST 10
+#define PACKET_TYPE_KD_FILE_IO 11
+#define PACKET_TYPE_MAX 12
+
+//
+// Wait State Change Types
+//
+#define DbgKdMinimumStateChange 0x00003030
+#define DbgKdExceptionStateChange 0x00003030
+#define DbgKdLoadSymbolsStateChange 0x00003031
+#define DbgKdCommandStringStateChange 0x00003032
+#define DbgKdMaximumStateChange 0x00003033
+
+//
+// Manipulate Types
+//
+#define DbgKdMinimumManipulate 0x00003130
+#define DbgKdReadVirtualMemoryApi 0x00003130
+#define DbgKdWriteVirtualMemoryApi 0x00003131
+#define DbgKdGetContextApi 0x00003132
+#define DbgKdSetContextApi 0x00003133
+#define DbgKdWriteBreakPointApi 0x00003134
+#define DbgKdRestoreBreakPointApi 0x00003135
+#define DbgKdContinueApi 0x00003136
+#define DbgKdReadControlSpaceApi 0x00003137
+#define DbgKdWriteControlSpaceApi 0x00003138
+#define DbgKdReadIoSpaceApi 0x00003139
+#define DbgKdWriteIoSpaceApi 0x0000313A
+#define DbgKdRebootApi 0x0000313B
+#define DbgKdContinueApi2 0x0000313C
+#define DbgKdReadPhysicalMemoryApi 0x0000313D
+#define DbgKdWritePhysicalMemoryApi 0x0000313E
+#define DbgKdQuerySpecialCallsApi 0x0000313F
+#define DbgKdSetSpecialCallApi 0x00003140
+#define DbgKdClearSpecialCallsApi 0x00003141
+#define DbgKdSetInternalBreakPointApi 0x00003142
+#define DbgKdGetInternalBreakPointApi 0x00003143
+#define DbgKdReadIoSpaceExtendedApi 0x00003144
+#define DbgKdWriteIoSpaceExtendedApi 0x00003145
+#define DbgKdGetVersionApi 0x00003146
+#define DbgKdWriteBreakPointExApi 0x00003147
+#define DbgKdRestoreBreakPointExApi 0x00003148
+#define DbgKdCauseBugCheckApi 0x00003149
+#define DbgKdSwitchProcessor 0x00003150
+#define DbgKdPageInApi 0x00003151
+#define DbgKdReadMachineSpecificRegister 0x00003152
+#define DbgKdWriteMachineSpecificRegister 0x00003153
+#define OldVlm1 0x00003154
+#define OldVlm2 0x00003155
+#define DbgKdSearchMemoryApi 0x00003156
+#define DbgKdGetBusDataApi 0x00003157
+#define DbgKdSetBusDataApi 0x00003158
+#define DbgKdCheckLowMemoryApi 0x00003159
+#define DbgKdClearAllInternalBreakpointsApi 0x0000315A
+#define DbgKdFillMemoryApi 0x0000315B
+#define DbgKdQueryMemoryApi 0x0000315C
+#define DbgKdSwitchPartition 0x0000315D
+#define DbgKdMaximumManipulate 0x0000315E
+
+//
+// Debug I/O Types
+//
+#define DbgKdPrintStringApi 0x00003230
+#define DbgKdGetStringApi 0x00003231
+
+//
+// Control Report Flags
+//
+#define REPORT_INCLUDES_SEGS 0x0001
+#define REPORT_INCLUDES_CS 0x0002
+
+//
+// Protocol Versions
+//
+#define DBGKD_64BIT_PROTOCOL_VERSION1 5
+#define DBGKD_64BIT_PROTOCOL_VERSION2 6
+
+//
+// KD Packet Structure
+//
+typedef struct _KD_PACKET
+{
+ ULONG PacketLeader;
+ USHORT PacketType;
+ USHORT ByteCount;
+ ULONG PacketId;
+ ULONG Checksum;
+} KD_PACKET, *PKD_PACKET;
+
+//
+// KD Context
+//
+typedef struct _KD_CONTEXT
+{
+ ULONG KdpDefaultRetries;
+ BOOLEAN KdpControlCPending;
+} KD_CONTEXT, *PKD_CONTEXT;
+
+//
+// DBGKM Structure for Exceptions
+//
+typedef struct _DBGKM_EXCEPTION64
+{
+ EXCEPTION_RECORD64 ExceptionRecord;
+ ULONG FirstChance;
+} DBGKM_EXCEPTION64, *PDBGKM_EXCEPTION64;
+
+//
+// DBGKD Structure for State Change
+//
+typedef struct _DBGKD_CONTROL_REPORT
+{
+ ULONG Dr6;
+ ULONG Dr7;
+ USHORT InstructionCount;
+ USHORT ReportFlags;
+ UCHAR InstructionStream[DBGKD_MAXSTREAM];
+ USHORT SegCs;
+ USHORT SegDs;
+ USHORT SegEs;
+ USHORT SegFs;
+ ULONG EFlags;
+} DBGKD_CONTROL_REPORT, *PDBGKD_CONTROL_REPORT;
+
+//
+// DBGKD Structure for Debug I/O Type Print String
+//
+typedef struct _DBGKD_PRINT_STRING
+{
+ ULONG LengthOfString;
+} DBGKD_PRINT_STRING, *PDBGKD_PRINT_STRING;
+
+//
+// DBGKD Structure for Debug I/O Type Get String
+//
+typedef struct _DBGKD_GET_STRING
+{
+ ULONG LengthOfPromptString;
+ ULONG LengthOfStringRead;
+} DBGKD_GET_STRING, *PDBGKD_GET_STRING;
+
+//
+// DBGKD Structure for Debug I/O
+//
+typedef struct _DBGKD_DEBUG_IO
+{
+ ULONG ApiNumber;
+ USHORT ProcessorLevel;
+ USHORT Processor;
+ union
+ {
+ DBGKD_PRINT_STRING PrintString;
+ DBGKD_GET_STRING GetString;
+ } u;
+} DBGKD_DEBUG_IO, *PDBGKD_DEBUG_IO;
+
+//
+// DBGKD Structure for Load Symbols
+//
+typedef struct _DBGKD_LOAD_SYMBOLS64
+{
+ ULONG PathNameLength;
+ ULONG64 BaseOfDll;
+ ULONG64 ProcessId;
+ ULONG CheckSum;
+ ULONG SizeOfImage;
+ BOOLEAN UnloadSymbols;
+} DBGKD_LOAD_SYMBOLS64, *PDBGKD_LOAD_SYMBOLS64;
+
+//
+// DBGKD Structure for Wait State Change
+//
+typedef struct _DBGKD_WAIT_STATE_CHANGE64
+{
+ ULONG NewState;
+ USHORT ProcessorLevel;
+ USHORT Processor;
+ ULONG NumberProcessors;
+ ULONG64 Thread;
+ ULONG64 ProgramCounter;
+ union
+ {
+ DBGKM_EXCEPTION64 Exception;
+ DBGKD_LOAD_SYMBOLS64 LoadSymbols;
+ } u;
+ DBGKD_CONTROL_REPORT ControlReport;
+ CONTEXT Context;
+} DBGKD_WAIT_STATE_CHANGE64, *PDBGKD_WAIT_STATE_CHANGE64;
+
+#endif
Modified: branches/alex-kd-branch/reactos/ntoskrnl/ex/time.c
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/ex/time.c (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/ex/time.c Sun Feb 18 10:21:03 2007
@@ -23,8 +23,44 @@
LARGE_INTEGER ExpTimeZoneBias;
ULONG ExpTimeZoneId;
ULONG ExpTickCountMultiplier;
+ERESOURCE ExpTimeRefreshLock;
/* FUNCTIONS ****************************************************************/
+
+BOOLEAN
+NTAPI
+ExAcquireTimeRefreshLock(BOOLEAN Wait)
+{
+ /* Simply acquire the Resource */
+ KeEnterCriticalRegion();
+ if (!(ExAcquireResourceExclusiveLite(&ExpTimeRefreshLock, Wait)))
+ {
+ /* We failed! */
+ KeLeaveCriticalRegion();
+ return FALSE;
+ }
+
+ /* Success */
+ return TRUE;
+}
+
+VOID
+NTAPI
+ExReleaseTimeRefreshLock(VOID)
+{
+ /* Simply release the Resource */
+ ExReleaseResourceLite(&ExpTimeRefreshLock);
+ KeLeaveCriticalRegion();
+}
+
+VOID
+NTAPI
+ExUpdateSystemTimeFromCmos(IN BOOLEAN UpdateInterruptTime,
+ IN ULONG MaxSepInSeconds)
+{
+ /* FIXME: TODO */
+ return;
+}
BOOLEAN
NTAPI
Modified: branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ex.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ex.h (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ex.h Sun Feb 18 10:21:03
2007
@@ -17,6 +17,7 @@
extern ERESOURCE ExpFirmwareTableResource;
extern LIST_ENTRY ExpFirmwareTableProviderListHead;
extern BOOLEAN ExpIsWinPEMode;
+extern ULONG NtGlobalFlag;
ULONG ExpAnsiCodePageDataOffset, ExpOemCodePageDataOffset;
ULONG ExpUnicodeCaseTableDataOffset;
PVOID ExpNlsSectionPointer;
@@ -910,7 +911,7 @@
/* Unlock the pushlock */
OldValue.Value = InterlockedExchangeAddSizeT((PLONG)PushLock,
- -EX_PUSH_LOCK_LOCK);
+ -(LONG)EX_PUSH_LOCK_LOCK);
/* Sanity checks */
ASSERT(OldValue.Locked);
@@ -989,6 +990,19 @@
NTSTATUS
ExpSetTimeZoneInformation(PTIME_ZONE_INFORMATION TimeZoneInformation);
+BOOLEAN
+NTAPI
+ExAcquireTimeRefreshLock(BOOLEAN Wait);
+
+VOID
+NTAPI
+ExReleaseTimeRefreshLock(VOID);
+
+VOID
+NTAPI
+ExUpdateSystemTimeFromCmos(IN BOOLEAN UpdateInterruptTime,
+ IN ULONG MaxSepInSeconds);
+
NTSTATUS
NTAPI
ExpAllocateLocallyUniqueId(OUT LUID *LocallyUniqueId);
Modified: branches/alex-kd-branch/reactos/ntoskrnl/include/internal/i386/intrin_i.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/include/internal/i386/intrin_i.h (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/include/internal/i386/intrin_i.h Sun Feb 18
10:21:03 2007
@@ -81,17 +81,25 @@
#define Ke386FnInit() __asm__("fninit\n\t");
//
+// CR Macros
+//
+#define Ke386SetCr2(X) __asm__ __volatile__("movl %0,%%cr2" :
:"r" (X));
+
+//
// DR Macros
//
#define Ke386GetDr0() _Ke386GetDr(0)
#define Ke386GetDr1() _Ke386GetDr(1)
#define Ke386SetDr0(X) _Ke386SetDr(0,X)
+#define Ke386SetDr1(X) _Ke386SetDr(1,X)
#define Ke386GetDr2() _Ke386GetDr(2)
#define Ke386SetDr2(X) _Ke386SetDr(2,X)
#define Ke386GetDr3() _Ke386GetDr(3)
+#define Ke386SetDr3(X) _Ke386SetDr(3,X)
#define Ke386GetDr4() _Ke386GetDr(4)
#define Ke386SetDr4(X) _Ke386SetDr(4,X)
#define Ke386GetDr6() _Ke386GetDr(6)
+#define Ke386SetDr6(X) _Ke386SetDr(6,X)
#define Ke386GetDr7() _Ke386GetDr(7)
#define Ke386SetDr7(X) _Ke386SetDr(7,X)
@@ -193,6 +201,17 @@
}
//
+// CR Macros
+//
+VOID
+FORCEINLINE
+Ke386SetCr2(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov cr2, eax;
+}
+
+//
// DR Macros
//
ULONG
@@ -243,6 +262,14 @@
{
__asm mov eax, Value;
__asm mov dr0, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr1(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr1, eax;
}
VOID
Modified: branches/alex-kd-branch/reactos/ntoskrnl/include/internal/i386/ke.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/include/internal/i386/ke.h (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/include/internal/i386/ke.h Sun Feb 18
10:21:03 2007
@@ -63,8 +63,14 @@
VOID
NTAPI
+KiRestoreProcessorControlState(
+ IN PKPROCESSOR_STATE ProcessorState
+);
+
+VOID
+NTAPI
KiSaveProcessorControlState(
- IN PKPROCESSOR_STATE ProcessorState
+ OUT PKPROCESSOR_STATE ProcessorState
);
VOID
Modified: branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ke.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ke.h (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ke.h Sun Feb 18 10:21:03
2007
@@ -70,11 +70,6 @@
IN PCHAR Ansi,
IN ULONG Length
);
-
-struct _KIRQ_TRAPFRAME;
-struct _KPCR;
-struct _KPRCB;
-struct _KEXCEPTION_FRAME;
extern ULONG_PTR MmFreeLdrFirstKrnlPhysAddr;
extern ULONG_PTR MmFreeLdrLastKrnlPhysAddr;
@@ -154,6 +149,7 @@
extern PVOID KeRaiseUserExceptionDispatcher;
extern UCHAR KiDebugRegisterTrapOffsets[9];
extern UCHAR KiDebugRegisterContextOffsets[9];
+extern ULONG KiFreezeFlag;
/* MACROS *************************************************************************/
@@ -193,16 +189,6 @@
/* INTERNAL KERNEL FUNCTIONS ************************************************/
-/* Readies a Thread for Execution. */
-BOOLEAN
-NTAPI
-KiDispatchThreadNoLock(ULONG NewThreadStatus);
-
-/* Readies a Thread for Execution. */
-VOID
-NTAPI
-KiDispatchThread(ULONG NewThreadStatus);
-
/* Finds a new thread to run */
NTSTATUS
FASTCALL
@@ -392,10 +378,6 @@
IN PKTRAP_FRAME TrapFrame,
IN KPROFILE_SOURCE Source
);
-
-BOOLEAN
-NTAPI
-KiRosPrintAddress(PVOID Address);
VOID
NTAPI
@@ -520,27 +502,11 @@
IN KPRIORITY Priority
);
-BOOLEAN
-NTAPI
-KiDispatcherObjectWake(
- DISPATCHER_HEADER* hdr,
- KPRIORITY increment
-);
-
VOID
FASTCALL
KiUnlinkThread(
IN PKTHREAD Thread,
IN NTSTATUS WaitStatus
-);
-
-VOID
-NTAPI
-KeExpireTimers(
- PKDPC Apc,
- PVOID Arg1,
- PVOID Arg2,
- PVOID Arg3
);
VOID
@@ -726,10 +692,6 @@
VOID
NTAPI
-KiInitializeSystemClock(VOID);
-
-VOID
-NTAPI
KiSystemStartup(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
@@ -949,6 +911,15 @@
IN LONGLONG Value
);
+BOOLEAN
+NTAPI
+KeFreezeExecution(IN PKTRAP_FRAME TrapFrame,
+ IN PKEXCEPTION_FRAME ExceptionFrame);
+
+VOID
+NTAPI
+KeThawExecution(IN BOOLEAN Enable);
+
#include "ke_x.h"
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_KE_H */
Modified: branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ps.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ps.h (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/include/internal/ps.h Sun Feb 18 10:21:03
2007
@@ -384,7 +384,8 @@
extern POBJECT_TYPE PsJobType;
extern LARGE_INTEGER ShortPsLockDelay;
extern UNICODE_STRING PsNtDllPathName;
-extern LIST_ENTRY PriorityListHead[MAXIMUM_PRIORITY];
+extern LIST_ENTRY PsLoadedModuleList;
+extern ULONG PsNtosImageBase;
//
// Inlined Functions
Modified: branches/alex-kd-branch/reactos/ntoskrnl/include/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/include/ntoskrnl.h (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/include/ntoskrnl.h Sun Feb 18 10:21:03 2007
@@ -12,6 +12,7 @@
#define _WIN32_WINNT _WIN32_WINNT_WS03
#define NTDDI_VERSION NTDDI_WS03SP1
#define NTKERNELAPI
+#define NOEXTAPI
/* DDK/IFS/NDK Headers */
#include <ntifs.h>
@@ -51,6 +52,11 @@
/* SetupLDR Support */
#include <arc/setupblk.h>
+/* KD Support */
+#include <windbgkd.h>
+#include <wdbgexts.h>
+#include <kddll.h>
+
/* PNP GUIDs */
#include <umpnpmgr/sysguid.h>
Modified: branches/alex-kd-branch/reactos/ntoskrnl/ke/bug.c
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/ke/bug.c (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/ke/bug.c Sun Feb 18 10:21:03 2007
@@ -37,15 +37,15 @@
{
PLIST_ENTRY current_entry;
PLDR_DATA_TABLE_ENTRY current;
- extern LIST_ENTRY ModuleListHead;
+ extern LIST_ENTRY PsLoadedModuleList;
ULONG_PTR RelativeAddress;
ULONG i = 0;
do
{
- current_entry = ModuleListHead.Flink;
-
- while (current_entry != &ModuleListHead)
+ current_entry = PsLoadedModuleList.Flink;
+
+ while (current_entry != &PsLoadedModuleList)
{
current = CONTAINING_RECORD(current_entry,
LDR_DATA_TABLE_ENTRY,
@@ -267,13 +267,13 @@
PVOID ImageBase, EipBase = NULL;
PLDR_DATA_TABLE_ENTRY Entry;
PLIST_ENTRY ListHead, NextEntry;
- extern LIST_ENTRY ModuleListHead;
+ extern LIST_ENTRY PsLoadedModuleList;
/* Assume no */
*InKernel = FALSE;
/* Set list pointers and make sure it's valid */
- ListHead = &ModuleListHead;
+ ListHead = &PsLoadedModuleList;
NextEntry = ListHead->Flink;
if (NextEntry)
{
Modified: branches/alex-kd-branch/reactos/ntoskrnl/ke/i386/cpu.c
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/ke/i386/cpu.c (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/ke/i386/cpu.c Sun Feb 18 10:21:03 2007
@@ -74,6 +74,10 @@
BOOLEAN KiI386PentiumLockErrataPresent;
BOOLEAN KiSMTProcessorsPresent;
+/* Freeze data */
+KIRQL KiOldIrql;
+ULONG KiFreezeFlag;
+
/* CPU Signatures */
static const CHAR CmpIntelID[] = "GenuineIntel";
static const CHAR CmpAmdID[] = "AuthenticAMD";
@@ -672,7 +676,36 @@
VOID
NTAPI
-KiSaveProcessorControlState(IN PKPROCESSOR_STATE ProcessorState)
+KiRestoreProcessorControlState(PKPROCESSOR_STATE ProcessorState)
+{
+ /* Restore the CR registers */
+ __writecr0(ProcessorState->SpecialRegisters.Cr0);
+ Ke386SetCr2(ProcessorState->SpecialRegisters.Cr2);
+ __writecr3(ProcessorState->SpecialRegisters.Cr3);
+ __writecr4(ProcessorState->SpecialRegisters.Cr4);
+
+ //
+ // Restore the DR registers
+ //
+ Ke386SetDr0(ProcessorState->SpecialRegisters.KernelDr0);
+ Ke386SetDr1(ProcessorState->SpecialRegisters.KernelDr1);
+ Ke386SetDr2(ProcessorState->SpecialRegisters.KernelDr2);
+ Ke386SetDr3(ProcessorState->SpecialRegisters.KernelDr3);
+ Ke386SetDr6(ProcessorState->SpecialRegisters.KernelDr6);
+ Ke386SetDr7(ProcessorState->SpecialRegisters.KernelDr7);
+
+ //
+ // Restore GDT, IDT, LDT and TSS
+ //
+ Ke386SetGlobalDescriptorTable(ProcessorState->SpecialRegisters.Gdtr);
+ Ke386SetInterruptDescriptorTable(ProcessorState->SpecialRegisters.Idtr);
+ Ke386SetTr(ProcessorState->SpecialRegisters.Tr);
+ Ke386SetLocalDescriptorTable(ProcessorState->SpecialRegisters.Ldtr);
+}
+
+VOID
+NTAPI
+KiSaveProcessorControlState(OUT PKPROCESSOR_STATE ProcessorState)
{
/* Save the CR registers */
ProcessorState->SpecialRegisters.Cr0 = __readcr0();
@@ -807,6 +840,39 @@
MmSetPageProtect(NULL, NewIdt, PAGE_READONLY);
}
+BOOLEAN
+NTAPI
+KeFreezeExecution(IN PKTRAP_FRAME TrapFrame,
+ IN PKEXCEPTION_FRAME ExceptionFrame)
+{
+ ULONG Flags;
+
+ /* Disable interrupts and get previous state */
+ Ke386SaveFlags(Flags);
+ //Flags = __getcallerseflags();
+ _disable();
+
+ /* Save freeze flag */
+ KiFreezeFlag = 4;
+
+ /* Save the old IRQL */
+ KiOldIrql = KeGetCurrentIrql();
+
+ /* Return whether interrupts were enabled */
+ return (Flags & EFLAGS_INTERRUPT_MASK) ? TRUE: FALSE;
+}
+
+VOID
+NTAPI
+KeThawExecution(IN BOOLEAN Enable)
+{
+ /* Cleanup CPU caches */
+ KeFlushCurrentTb();
+
+ /* Re-enable interrupts */
+ if (Enable) _enable();
+}
+
/* PUBLIC FUNCTIONS **********************************************************/
/*
Modified: branches/alex-kd-branch/reactos/ntoskrnl/ldr/loader.c
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/ldr/loader.c (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/ldr/loader.c Sun Feb 18 10:21:03 2007
@@ -42,7 +42,8 @@
/* GLOBALS *******************************************************************/
-LIST_ENTRY ModuleListHead;
+LIST_ENTRY PsLoadedModuleList;
+ULONG PsNtosImageBase = 0x80100000;
KSPIN_LOCK ModuleListLock;
LDR_DATA_TABLE_ENTRY NtoskrnlModuleObject;
LDR_DATA_TABLE_ENTRY HalModuleObject;
@@ -101,7 +102,7 @@
PLDR_DATA_TABLE_ENTRY HalModuleObject, NtoskrnlModuleObject, LdrEntry;
/* Initialize the module list and spinlock */
- InitializeListHead(&ModuleListHead);
+ InitializeListHead(&PsLoadedModuleList);
KeInitializeSpinLock(&ModuleListLock);
/* Get the NTOSKRNL Entry from the loader */
@@ -112,13 +113,14 @@
sizeof(LDR_DATA_TABLE_ENTRY),
TAG('M', 'm',
'L', 'd'));
NtoskrnlModuleObject->DllBase = LdrEntry->DllBase;
+ PsNtosImageBase = PtrToUlong(LdrEntry->DllBase);
RtlInitUnicodeString(&NtoskrnlModuleObject->FullDllName, KERNEL_MODULE_NAME);
LdrpBuildModuleBaseName(&NtoskrnlModuleObject->BaseDllName,
&NtoskrnlModuleObject->FullDllName);
NtoskrnlModuleObject->EntryPoint = LdrEntry->EntryPoint;
NtoskrnlModuleObject->SizeOfImage = LdrEntry->SizeOfImage;
/* Insert it into the list */
- InsertTailList(&ModuleListHead, &NtoskrnlModuleObject->InLoadOrderLinks);
+ InsertTailList(&PsLoadedModuleList,
&NtoskrnlModuleObject->InLoadOrderLinks);
/* Get the HAL Entry from the loader */
LdrEntry = CONTAINING_RECORD(KeLoaderBlock->LoadOrderListHead.Flink->Flink,
LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
@@ -134,7 +136,7 @@
HalModuleObject->SizeOfImage = LdrEntry->SizeOfImage;
/* Insert it into the list */
- InsertTailList(&ModuleListHead, &HalModuleObject->InLoadOrderLinks);
+ InsertTailList(&PsLoadedModuleList, &HalModuleObject->InLoadOrderLinks);
}
NTSTATUS
@@ -384,8 +386,8 @@
KeAcquireSpinLock(&ModuleListLock,&Irql);
/* calculate required size */
- current_entry = ModuleListHead.Flink;
- while (current_entry != (&ModuleListHead))
+ current_entry = PsLoadedModuleList.Flink;
+ while (current_entry != (&PsLoadedModuleList))
{
ModuleCount++;
current =
CONTAINING_RECORD(current_entry,LDR_DATA_TABLE_ENTRY,InLoadOrderLinks);
@@ -418,8 +420,8 @@
Smi->NumberOfModules = ModuleCount;
ModuleCount = 0;
- current_entry = ModuleListHead.Flink;
- while (current_entry != (&ModuleListHead))
+ current_entry = PsLoadedModuleList.Flink;
+ while (current_entry != (&PsLoadedModuleList))
{
current =
CONTAINING_RECORD(current_entry,LDR_DATA_TABLE_ENTRY,InLoadOrderLinks);
@@ -576,8 +578,8 @@
KeAcquireSpinLock(&ModuleListLock,&Irql);
- Entry = ModuleListHead.Flink;
- while (Entry != &ModuleListHead)
+ Entry = PsLoadedModuleList.Flink;
+ while (Entry != &PsLoadedModuleList)
{
Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
@@ -871,7 +873,7 @@
/* Insert module */
KeAcquireSpinLock(&ModuleListLock, &Irql);
- InsertTailList(&ModuleListHead,
+ InsertTailList(&PsLoadedModuleList,
&CreatedModuleObject->InLoadOrderLinks);
KeReleaseSpinLock(&ModuleListLock, Irql);
Modified: branches/alex-kd-branch/reactos/ntoskrnl/mm/mm.c
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/mm/mm.c (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/mm/mm.c Sun Feb 18 10:21:03 2007
@@ -409,7 +409,7 @@
ANSI_STRING AnsiRoutineName;
NTSTATUS Status;
PLIST_ENTRY NextEntry;
- extern LIST_ENTRY ModuleListHead;
+ extern LIST_ENTRY PsLoadedModuleList;
PLDR_DATA_TABLE_ENTRY LdrEntry;
BOOLEAN Found = FALSE;
UNICODE_STRING KernelName = RTL_CONSTANT_STRING(L"ntoskrnl.exe");
@@ -422,8 +422,8 @@
if (!NT_SUCCESS(Status)) return NULL;
/* Loop the loaded module list */
- NextEntry = ModuleListHead.Flink;
- while (NextEntry != &ModuleListHead)
+ NextEntry = PsLoadedModuleList.Flink;
+ while (NextEntry != &PsLoadedModuleList)
{
/* Get the entry */
LdrEntry = CONTAINING_RECORD(NextEntry,
Modified: branches/alex-kd-branch/reactos/ntoskrnl/mm/rpoolmgr.h
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/mm/rpoolmgr.h (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/mm/rpoolmgr.h Sun Feb 18 10:21:03 2007
@@ -143,7 +143,7 @@
if ( Block->LastOwnerStack[i] != 0xDEADBEEF )
{
R_DEBUG(" ");
- if (!R_PRINT_ADDRESS ((PVOID)Block->LastOwnerStack[i]) )
+ //if (!R_PRINT_ADDRESS ((PVOID)Block->LastOwnerStack[i]) )
{
R_DEBUG("<%X>", Block->LastOwnerStack[i] );
}
Modified: branches/alex-kd-branch/reactos/ntoskrnl/mm/verifier.c
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/mm/verifier.c (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/mm/verifier.c Sun Feb 18 10:21:03 2007
@@ -19,7 +19,7 @@
KMUTANT MmSystemLoadLock;
ULONG MiActiveVerifierThunks;
-extern LIST_ENTRY ModuleListHead;
+extern LIST_ENTRY PsLoadedModuleList;
/* PRIVATE FUNCTIONS *********************************************************/
@@ -32,7 +32,7 @@
PAGED_CODE();
/* Loop entries */
- NextEntry = ModuleListHead.Flink;
+ NextEntry = PsLoadedModuleList.Flink;
do
{
/* Get the loader entry */
@@ -51,7 +51,7 @@
/* Move on */
NextEntry = NextEntry->Flink;
- } while(NextEntry != &ModuleListHead);
+ } while(NextEntry != &PsLoadedModuleList);
/* Return the entry */
return FoundEntry;