https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ceb58c821a0b86f5de51b…
commit ceb58c821a0b86f5de51b577e314162708669d17
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Jul 18 16:25:45 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Jul 18 17:45:40 2020 +0200
[NTOS][SDK] Add new kernel debug filters that have been added in Win8 and Win10; they
can be useful for us.
---
ntoskrnl/config/cmdata.c | 69 ++++++++++++++++++++++++++++++++++++++++
ntoskrnl/include/internal/kd64.h | 17 +++++++++-
ntoskrnl/kd64/kddata.c | 35 ++++++++++++++++++--
ntoskrnl/kdbg/kdb_cli.c | 15 +++++++++
sdk/include/psdk/dpfilter.h | 9 ++++++
5 files changed, 141 insertions(+), 4 deletions(-)
diff --git a/ntoskrnl/config/cmdata.c b/ntoskrnl/config/cmdata.c
index 7b34fc936cb..ca9d9175a43 100644
--- a/ntoskrnl/config/cmdata.c
+++ b/ntoskrnl/config/cmdata.c
@@ -1751,6 +1751,75 @@ INIT_SECTION CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
NULL
},
//
+// Components specified in Windows 8
+//
+ {
+ L"Session Manager\\Debug Print Filter",
+ L"POWER",
+ &Kd_POWER_Mask,
+ NULL,
+ NULL
+ },
+ {
+ L"Session Manager\\Debug Print Filter",
+ L"CRASHDUMPXHCI",
+ &Kd_CRASHDUMPXHCI_Mask,
+ NULL,
+ NULL
+ },
+ {
+ L"Session Manager\\Debug Print Filter",
+ L"GPIO",
+ &Kd_GPIO_Mask,
+ NULL,
+ NULL
+ },
+ {
+ L"Session Manager\\Debug Print Filter",
+ L"REFS",
+ &Kd_REFS_Mask,
+ NULL,
+ NULL
+ },
+ {
+ L"Session Manager\\Debug Print Filter",
+ L"WER",
+ &Kd_WER_Mask,
+ NULL,
+ NULL
+ },
+//
+// Components specified in Windows 10
+//
+ {
+ L"Session Manager\\Debug Print Filter",
+ L"CAPIMG",
+ &Kd_CAPIMG_Mask,
+ NULL,
+ NULL
+ },
+ {
+ L"Session Manager\\Debug Print Filter",
+ L"VPCI",
+ &Kd_VPCI_Mask,
+ NULL,
+ NULL
+ },
+ {
+ L"Session Manager\\Debug Print Filter",
+ L"STORAGECLASSMEMORY",
+ &Kd_STORAGECLASSMEMORY_Mask,
+ NULL,
+ NULL
+ },
+ {
+ L"Session Manager\\Debug Print Filter",
+ L"FSLIB",
+ &Kd_FSLIB_Mask,
+ NULL,
+ NULL
+ },
+//
// END OF Debug Filter Masks
//
diff --git a/ntoskrnl/include/internal/kd64.h b/ntoskrnl/include/internal/kd64.h
index bff0a3a872d..76742c8f0eb 100644
--- a/ntoskrnl/include/internal/kd64.h
+++ b/ntoskrnl/include/internal/kd64.h
@@ -561,7 +561,7 @@ extern ULONG TraceDataBufferPosition;
//
// Debug Filter Component Table
//
-#define MAX_KD_COMPONENT_TABLE_ENTRIES 147
+#define MAX_KD_COMPONENT_TABLE_ENTRIES (DPFLTR_ENDOFTABLE_ID + 2)
extern ULONG KdComponentTableSize;
extern PULONG KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES];
@@ -718,3 +718,18 @@ extern ULONG Kd_FILETRACE_Mask;
extern ULONG Kd_XSAVE_Mask;
extern ULONG Kd_SE_Mask;
extern ULONG Kd_DRIVEEXTENDER_Mask;
+//
+// Components specified in Windows 8
+//
+extern ULONG Kd_POWER_Mask;
+extern ULONG Kd_CRASHDUMPXHCI_Mask;
+extern ULONG Kd_GPIO_Mask;
+extern ULONG Kd_REFS_Mask;
+extern ULONG Kd_WER_Mask;
+//
+// Components specified in Windows 10
+//
+extern ULONG Kd_CAPIMG_Mask;
+extern ULONG Kd_VPCI_Mask;
+extern ULONG Kd_STORAGECLASSMEMORY_Mask;
+extern ULONG Kd_FSLIB_Mask;
diff --git a/ntoskrnl/kd64/kddata.c b/ntoskrnl/kd64/kddata.c
index 23887d165cf..dd8cef7a6aa 100644
--- a/ntoskrnl/kd64/kddata.c
+++ b/ntoskrnl/kd64/kddata.c
@@ -294,6 +294,21 @@ ULONG Kd_FILETRACE_Mask;
ULONG Kd_XSAVE_Mask;
ULONG Kd_SE_Mask;
ULONG Kd_DRIVEEXTENDER_Mask;
+//
+// Components specified in Windows 8
+//
+ULONG Kd_POWER_Mask;
+ULONG Kd_CRASHDUMPXHCI_Mask;
+ULONG Kd_GPIO_Mask;
+ULONG Kd_REFS_Mask;
+ULONG Kd_WER_Mask;
+//
+// Components specified in Windows 10
+//
+ULONG Kd_CAPIMG_Mask;
+ULONG Kd_VPCI_Mask;
+ULONG Kd_STORAGECLASSMEMORY_Mask;
+ULONG Kd_FSLIB_Mask;
// End Mask
ULONG Kd_ENDOFTABLE_Mask;
@@ -407,7 +422,6 @@ PULONG KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES] =
&Kd_MM_Mask,
&Kd_DFSC_Mask,
&Kd_WOW64_Mask,
-
//
// Components specified in Vista+, some of which we also use in ReactOS
//
@@ -452,11 +466,26 @@ PULONG KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES] =
&Kd_XSAVE_Mask,
&Kd_SE_Mask,
&Kd_DRIVEEXTENDER_Mask,
- // End Mask
+//
+// Components specified in Windows 8
+//
+ &Kd_POWER_Mask,
+ &Kd_CRASHDUMPXHCI_Mask,
+ &Kd_GPIO_Mask,
+ &Kd_REFS_Mask,
+ &Kd_WER_Mask,
+//
+// Components specified in Windows 10
+//
+ &Kd_CAPIMG_Mask,
+ &Kd_VPCI_Mask,
+ &Kd_STORAGECLASSMEMORY_Mask,
+ &Kd_FSLIB_Mask,
+// End Mask
&Kd_ENDOFTABLE_Mask,
};
-ULONG KdComponentTableSize = sizeof(KdComponentTable) / sizeof(KdComponentTable[0]);
+ULONG KdComponentTableSize = RTL_NUMBER_OF(KdComponentTable);
//
// Debugger Data
diff --git a/ntoskrnl/kdbg/kdb_cli.c b/ntoskrnl/kdbg/kdb_cli.c
index 5aa5ec99611..08dcff4d29b 100644
--- a/ntoskrnl/kdbg/kdb_cli.c
+++ b/ntoskrnl/kdbg/kdb_cli.c
@@ -301,6 +301,21 @@ ComponentTable[] =
{ "XSAVE", DPFLTR_XSAVE_ID },
{ "SE", DPFLTR_SE_ID },
{ "DRIVEEXTENDER", DPFLTR_DRIVEEXTENDER_ID },
+//
+// Components specified in Windows 8
+//
+ { "POWER", DPFLTR_POWER_ID },
+ { "CRASHDUMPXHCI", DPFLTR_CRASHDUMPXHCI_ID },
+ { "GPIO", DPFLTR_GPIO_ID },
+ { "REFS", DPFLTR_REFS_ID },
+ { "WER", DPFLTR_WER_ID },
+//
+// Components specified in Windows 10
+//
+ { "CAPIMG", DPFLTR_CAPIMG_ID },
+ { "VPCI", DPFLTR_VPCI_ID },
+ { "STORAGECLASSMEMORY", DPFLTR_STORAGECLASSMEMORY_ID },
+ { "FSLIB", DPFLTR_FSLIB_ID },
};
//
diff --git a/sdk/include/psdk/dpfilter.h b/sdk/include/psdk/dpfilter.h
index e3965100335..5766f2ad62e 100644
--- a/sdk/include/psdk/dpfilter.h
+++ b/sdk/include/psdk/dpfilter.h
@@ -171,5 +171,14 @@ typedef enum _DPFLTR_TYPE {
DPFLTR_XSAVE_ID = 143,
DPFLTR_SE_ID = 144,
DPFLTR_DRIVEEXTENDER_ID = 145,
+ DPFLTR_POWER_ID = 146,
+ DPFLTR_CRASHDUMPXHCI_ID = 147,
+ DPFLTR_GPIO_ID = 148,
+ DPFLTR_REFS_ID = 149,
+ DPFLTR_WER_ID = 150,
+ DPFLTR_CAPIMG_ID = 151,
+ DPFLTR_VPCI_ID = 152,
+ DPFLTR_STORAGECLASSMEMORY_ID = 153,
+ DPFLTR_FSLIB_ID = 154,
DPFLTR_ENDOFTABLE_ID
} DPFLTR_TYPE;