diff --git a/reactos/config b/reactos/config index 4045d73b7a9..25fdf5dce01 100644 --- a/reactos/config +++ b/reactos/config @@ -14,17 +14,17 @@ ARCH := i386 # be optimized for. # -OARCH := i486 +OARCH := i586 # # Whether to compile in the kernel debugger # -KDBG := 0 +KDBG := 1 # # Whether to compile for debugging # -DBG := 0 +DBG := 1 # # Whether to compile a multiprocessor or single processor version diff --git a/reactos/include/ntos/zwtypes.h b/reactos/include/ntos/zwtypes.h index 2f7960c65cc..50147fbc46a 100755 --- a/reactos/include/ntos/zwtypes.h +++ b/reactos/include/ntos/zwtypes.h @@ -490,6 +490,19 @@ struct _SYSTEM_CACHE_INFORMATION } SYSTEM_CACHE_INFORMATION; +// SystemInterruptInformation (23) +typedef +struct _SYSTEM_INTERRUPT_INFORMATION +{ + ULONG ContextSwitches; + ULONG DpcCount; + ULONG DpcRate; + ULONG TimeIncrement; + ULONG DpcBypassCount; + ULONG ApcBypassCount; + +} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION; + // SystemDpcInformation (24) typedef struct _SYSTEM_DPC_INFORMATION diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/reactos/ntoskrnl/ex/sysinfo.c index 2e96cfd16e7..c9d91fae7c6 100644 --- a/reactos/ntoskrnl/ex/sysinfo.c +++ b/reactos/ntoskrnl/ex/sysinfo.c @@ -1017,12 +1017,35 @@ QSI_DEF(SystemPoolTagInformation) return (STATUS_NOT_IMPLEMENTED); } -/* Class 23 - Interrupt Information */ +/* Class 23 - Interrupt Information for all processors */ QSI_DEF(SystemInterruptInformation) { - /* FIXME */ - DPRINT1("NtQuerySystemInformation - SystemInterruptInformation not implemented\n"); - return (STATUS_NOT_IMPLEMENTED); + PKPRCB Prcb; + UINT i; + ULONG ti; + PSYSTEM_INTERRUPT_INFORMATION sii = (PSYSTEM_INTERRUPT_INFORMATION)Buffer; + + if(Size < KeNumberProcessors * sizeof(SYSTEM_INTERRUPT_INFORMATION)) + { + return (STATUS_INFO_LENGTH_MISMATCH); + } + + ti = KeQueryTimeIncrement(); + + Prcb = ((PKPCR)KPCR_BASE)->Prcb; + for (i = 0; i < KeNumberProcessors; i++) + { + sii->ContextSwitches = Prcb->KeContextSwitches; + sii->DpcCount = 0; /* FIXME */ + sii->DpcRate = 0; /* FIXME */ + sii->TimeIncrement = ti; + sii->DpcBypassCount = 0; /* FIXME */ + sii->ApcBypassCount = 0; /* FIXME */ + sii++; + Prcb = (PKPRCB)((ULONG_PTR)Prcb + PAGE_SIZE); + } + + return STATUS_SUCCESS; } /* Class 24 - DPC Behaviour Information */ diff --git a/reactos/ntoskrnl/include/internal/i386/ps.h b/reactos/ntoskrnl/include/internal/i386/ps.h index cf9e505b9f2..5d328917b17 100644 --- a/reactos/ntoskrnl/include/internal/i386/ps.h +++ b/reactos/ntoskrnl/include/internal/i386/ps.h @@ -102,7 +102,7 @@ typedef struct _KPRCB { ULONG CcCopyReadWait; ULONG CcCopyReadNoWaitMiss; ULONG KeAlignmentFixupCount; - ULONG SpareCounter0; + ULONG KeContextSwitches; ULONG KeDcacheFlushCount; ULONG KeExceptionDispatchCount; ULONG KeFirstLevelTbFills;