Skip to content

Commit ceb58c8

Browse files
committed
[NTOS][SDK] Add new kernel debug filters that have been added in Win8 and Win10; they can be useful for us.
1 parent b2eaf90 commit ceb58c8

File tree

5 files changed

+141
-4
lines changed

5 files changed

+141
-4
lines changed

ntoskrnl/config/cmdata.c

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,6 +1751,75 @@ INIT_SECTION CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
17511751
NULL
17521752
},
17531753
//
1754+
// Components specified in Windows 8
1755+
//
1756+
{
1757+
L"Session Manager\\Debug Print Filter",
1758+
L"POWER",
1759+
&Kd_POWER_Mask,
1760+
NULL,
1761+
NULL
1762+
},
1763+
{
1764+
L"Session Manager\\Debug Print Filter",
1765+
L"CRASHDUMPXHCI",
1766+
&Kd_CRASHDUMPXHCI_Mask,
1767+
NULL,
1768+
NULL
1769+
},
1770+
{
1771+
L"Session Manager\\Debug Print Filter",
1772+
L"GPIO",
1773+
&Kd_GPIO_Mask,
1774+
NULL,
1775+
NULL
1776+
},
1777+
{
1778+
L"Session Manager\\Debug Print Filter",
1779+
L"REFS",
1780+
&Kd_REFS_Mask,
1781+
NULL,
1782+
NULL
1783+
},
1784+
{
1785+
L"Session Manager\\Debug Print Filter",
1786+
L"WER",
1787+
&Kd_WER_Mask,
1788+
NULL,
1789+
NULL
1790+
},
1791+
//
1792+
// Components specified in Windows 10
1793+
//
1794+
{
1795+
L"Session Manager\\Debug Print Filter",
1796+
L"CAPIMG",
1797+
&Kd_CAPIMG_Mask,
1798+
NULL,
1799+
NULL
1800+
},
1801+
{
1802+
L"Session Manager\\Debug Print Filter",
1803+
L"VPCI",
1804+
&Kd_VPCI_Mask,
1805+
NULL,
1806+
NULL
1807+
},
1808+
{
1809+
L"Session Manager\\Debug Print Filter",
1810+
L"STORAGECLASSMEMORY",
1811+
&Kd_STORAGECLASSMEMORY_Mask,
1812+
NULL,
1813+
NULL
1814+
},
1815+
{
1816+
L"Session Manager\\Debug Print Filter",
1817+
L"FSLIB",
1818+
&Kd_FSLIB_Mask,
1819+
NULL,
1820+
NULL
1821+
},
1822+
//
17541823
// END OF Debug Filter Masks
17551824
//
17561825

ntoskrnl/include/internal/kd64.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ extern ULONG TraceDataBufferPosition;
561561
//
562562
// Debug Filter Component Table
563563
//
564-
#define MAX_KD_COMPONENT_TABLE_ENTRIES 147
564+
#define MAX_KD_COMPONENT_TABLE_ENTRIES (DPFLTR_ENDOFTABLE_ID + 2)
565565
extern ULONG KdComponentTableSize;
566566
extern PULONG KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES];
567567

@@ -718,3 +718,18 @@ extern ULONG Kd_FILETRACE_Mask;
718718
extern ULONG Kd_XSAVE_Mask;
719719
extern ULONG Kd_SE_Mask;
720720
extern ULONG Kd_DRIVEEXTENDER_Mask;
721+
//
722+
// Components specified in Windows 8
723+
//
724+
extern ULONG Kd_POWER_Mask;
725+
extern ULONG Kd_CRASHDUMPXHCI_Mask;
726+
extern ULONG Kd_GPIO_Mask;
727+
extern ULONG Kd_REFS_Mask;
728+
extern ULONG Kd_WER_Mask;
729+
//
730+
// Components specified in Windows 10
731+
//
732+
extern ULONG Kd_CAPIMG_Mask;
733+
extern ULONG Kd_VPCI_Mask;
734+
extern ULONG Kd_STORAGECLASSMEMORY_Mask;
735+
extern ULONG Kd_FSLIB_Mask;

ntoskrnl/kd64/kddata.c

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,21 @@ ULONG Kd_FILETRACE_Mask;
294294
ULONG Kd_XSAVE_Mask;
295295
ULONG Kd_SE_Mask;
296296
ULONG Kd_DRIVEEXTENDER_Mask;
297+
//
298+
// Components specified in Windows 8
299+
//
300+
ULONG Kd_POWER_Mask;
301+
ULONG Kd_CRASHDUMPXHCI_Mask;
302+
ULONG Kd_GPIO_Mask;
303+
ULONG Kd_REFS_Mask;
304+
ULONG Kd_WER_Mask;
305+
//
306+
// Components specified in Windows 10
307+
//
308+
ULONG Kd_CAPIMG_Mask;
309+
ULONG Kd_VPCI_Mask;
310+
ULONG Kd_STORAGECLASSMEMORY_Mask;
311+
ULONG Kd_FSLIB_Mask;
297312
// End Mask
298313
ULONG Kd_ENDOFTABLE_Mask;
299314

@@ -407,7 +422,6 @@ PULONG KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES] =
407422
&Kd_MM_Mask,
408423
&Kd_DFSC_Mask,
409424
&Kd_WOW64_Mask,
410-
411425
//
412426
// Components specified in Vista+, some of which we also use in ReactOS
413427
//
@@ -452,11 +466,26 @@ PULONG KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES] =
452466
&Kd_XSAVE_Mask,
453467
&Kd_SE_Mask,
454468
&Kd_DRIVEEXTENDER_Mask,
455-
// End Mask
469+
//
470+
// Components specified in Windows 8
471+
//
472+
&Kd_POWER_Mask,
473+
&Kd_CRASHDUMPXHCI_Mask,
474+
&Kd_GPIO_Mask,
475+
&Kd_REFS_Mask,
476+
&Kd_WER_Mask,
477+
//
478+
// Components specified in Windows 10
479+
//
480+
&Kd_CAPIMG_Mask,
481+
&Kd_VPCI_Mask,
482+
&Kd_STORAGECLASSMEMORY_Mask,
483+
&Kd_FSLIB_Mask,
484+
// End Mask
456485
&Kd_ENDOFTABLE_Mask,
457486
};
458487

459-
ULONG KdComponentTableSize = sizeof(KdComponentTable) / sizeof(KdComponentTable[0]);
488+
ULONG KdComponentTableSize = RTL_NUMBER_OF(KdComponentTable);
460489

461490
//
462491
// Debugger Data

ntoskrnl/kdbg/kdb_cli.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,21 @@ ComponentTable[] =
301301
{ "XSAVE", DPFLTR_XSAVE_ID },
302302
{ "SE", DPFLTR_SE_ID },
303303
{ "DRIVEEXTENDER", DPFLTR_DRIVEEXTENDER_ID },
304+
//
305+
// Components specified in Windows 8
306+
//
307+
{ "POWER", DPFLTR_POWER_ID },
308+
{ "CRASHDUMPXHCI", DPFLTR_CRASHDUMPXHCI_ID },
309+
{ "GPIO", DPFLTR_GPIO_ID },
310+
{ "REFS", DPFLTR_REFS_ID },
311+
{ "WER", DPFLTR_WER_ID },
312+
//
313+
// Components specified in Windows 10
314+
//
315+
{ "CAPIMG", DPFLTR_CAPIMG_ID },
316+
{ "VPCI", DPFLTR_VPCI_ID },
317+
{ "STORAGECLASSMEMORY", DPFLTR_STORAGECLASSMEMORY_ID },
318+
{ "FSLIB", DPFLTR_FSLIB_ID },
304319
};
305320

306321
//

sdk/include/psdk/dpfilter.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,14 @@ typedef enum _DPFLTR_TYPE {
171171
DPFLTR_XSAVE_ID = 143,
172172
DPFLTR_SE_ID = 144,
173173
DPFLTR_DRIVEEXTENDER_ID = 145,
174+
DPFLTR_POWER_ID = 146,
175+
DPFLTR_CRASHDUMPXHCI_ID = 147,
176+
DPFLTR_GPIO_ID = 148,
177+
DPFLTR_REFS_ID = 149,
178+
DPFLTR_WER_ID = 150,
179+
DPFLTR_CAPIMG_ID = 151,
180+
DPFLTR_VPCI_ID = 152,
181+
DPFLTR_STORAGECLASSMEMORY_ID = 153,
182+
DPFLTR_FSLIB_ID = 154,
174183
DPFLTR_ENDOFTABLE_ID
175184
} DPFLTR_TYPE;

0 commit comments

Comments
 (0)