https://git.reactos.org/?p=reactos.git;a=commitdiff;h=be01e6d76f821eaa0c6fb…
commit be01e6d76f821eaa0c6fb4661c61fa2799f17ab9
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Mon Nov 9 22:33:02 2020 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Mon Nov 9 22:33:02 2020 +0100
[XDK] Update the definition of DEBUG_DEVICE_DESCRIPTOR and related structures with
Vista,7,8,10 additions.
CORE-17360
Information from:
-
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/ns-ntdd…
-
https://www.vergiliusproject.com
-
https://codemachine.com
---
sdk/include/xdk/kdtypes.h | 86 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 84 insertions(+), 2 deletions(-)
diff --git a/sdk/include/xdk/kdtypes.h b/sdk/include/xdk/kdtypes.h
index 1c7efbcc405..fbe32dde0b2 100644
--- a/sdk/include/xdk/kdtypes.h
+++ b/sdk/include/xdk/kdtypes.h
@@ -5,7 +5,17 @@ $if (_NTDDK_)
typedef struct _DEBUG_DEVICE_ADDRESS {
UCHAR Type;
BOOLEAN Valid;
- UCHAR Reserved[2];
+#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
+ union {
+#endif
+ UCHAR Reserved[2];
+#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
+ struct {
+ UCHAR BitWidth;
+ UCHAR AccessSize;
+ };
+ };
+#endif
PUCHAR TranslatedAddress;
ULONG Length;
} DEBUG_DEVICE_ADDRESS, *PDEBUG_DEVICE_ADDRESS;
@@ -19,19 +29,91 @@ typedef struct _DEBUG_MEMORY_REQUIREMENTS {
BOOLEAN Aligned;
} DEBUG_MEMORY_REQUIREMENTS, *PDEBUG_MEMORY_REQUIREMENTS;
+#if (NTDDI_VERSION >= NTDDI_WIN8)
+typedef enum {
+ KdNameSpacePCI,
+ KdNameSpaceACPI,
+ KdNameSpaceAny,
+ KdNameSpaceNone,
+ KdNameSpaceMax, /* Maximum namespace enumerator */
+} KD_NAMESPACE_ENUM, *PKD_NAMESPACE_ENUM;
+#endif
+
+#if (NTDDI_VERSION >= NTDDI_WIN10)
+typedef struct _DEBUG_TRANSPORT_DATA {
+ ULONG HwContextSize;
+ BOOLEAN UseSerialFraming;
+#if (NTDDI_VERSION >= NTDDI_WIN10_RS5)
+ BOOLEAN ValidUSBCoreId;
+ UCHAR USBCoreId;
+#endif
+} DEBUG_TRANSPORT_DATA, *PDEBUG_TRANSPORT_DATA;
+#endif
+
+#define MAXIMUM_DEBUG_BARS 6
+
+#if (NTDDI_VERSION >= NTDDI_WIN10)
+#define DBG_DEVICE_FLAG_HAL_SCRATCH_ALLOCATED 0x01
+#define DBG_DEVICE_FLAG_BARS_MAPPED 0x02
+#define DBG_DEVICE_FLAG_SCRATCH_ALLOCATED 0x04
+#endif
+#if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
+#define DBG_DEVICE_FLAG_UNCACHED_MEMORY 0x08
+#endif
+#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
+#define DBG_DEVICE_FLAG_SYNTHETIC 0x10
+#endif
+
typedef struct _DEBUG_DEVICE_DESCRIPTOR {
ULONG Bus;
+#if (NTDDI_VERSION >= NTDDI_VISTA) && (NTDDI_VERSION < NTDDI_WIN8)
+ USHORT Segment;
+#endif
ULONG Slot;
+#if (NTDDI_VERSION >= NTDDI_WIN8)
USHORT Segment;
+#endif
USHORT VendorID;
USHORT DeviceID;
UCHAR BaseClass;
UCHAR SubClass;
UCHAR ProgIf;
+#if (NTDDI_VERSION >= NTDDI_WIN8)
+#if (NTDDI_VERSION >= NTDDI_WIN10)
+ union {
+#endif
+ UCHAR Flags;
+#if (NTDDI_VERSION >= NTDDI_WIN10)
+ struct {
+ UCHAR DbgHalScratchAllocated : 1;
+ UCHAR DbgBarsMapped : 1;
+ UCHAR DbgScratchAllocated : 1;
+ };
+ };
+#endif
+#endif
BOOLEAN Initialized;
+#if (NTDDI_VERSION >= NTDDI_VISTA)
BOOLEAN Configured;
- DEBUG_DEVICE_ADDRESS BaseAddress[6];
+#endif
+ DEBUG_DEVICE_ADDRESS BaseAddress[MAXIMUM_DEBUG_BARS];
DEBUG_MEMORY_REQUIREMENTS Memory;
+#if (NTDDI_VERSION >= NTDDI_WIN10_19H1)
+ ULONG Dbg2TableIndex;
+#endif
+#if (NTDDI_VERSION >= NTDDI_WIN8)
+ USHORT PortType;
+ USHORT PortSubtype;
+ PVOID OemData;
+ ULONG OemDataLength;
+ KD_NAMESPACE_ENUM NameSpace;
+ PWCHAR NameSpacePath;
+ ULONG NameSpacePathLength;
+#endif
+#if (NTDDI_VERSION >= NTDDI_WIN10)
+ ULONG TransportType;
+ DEBUG_TRANSPORT_DATA TransportData;
+#endif
} DEBUG_DEVICE_DESCRIPTOR, *PDEBUG_DEVICE_DESCRIPTOR;
typedef NTSTATUS