Merge PR #283 "[USBPORT] Transaction Translator (TT) support bringup"
[reactos.git] / sdk / include / xdk / kdtypes.h
1 /******************************************************************************
2 * Kernel Debugger Types *
3 ******************************************************************************/
4 $if (_NTDDK_)
5 typedef struct _DEBUG_DEVICE_ADDRESS {
6 UCHAR Type;
7 BOOLEAN Valid;
8 UCHAR Reserved[2];
9 PUCHAR TranslatedAddress;
10 ULONG Length;
11 } DEBUG_DEVICE_ADDRESS, *PDEBUG_DEVICE_ADDRESS;
12
13 typedef struct _DEBUG_MEMORY_REQUIREMENTS {
14 PHYSICAL_ADDRESS Start;
15 PHYSICAL_ADDRESS MaxEnd;
16 PVOID VirtualAddress;
17 ULONG Length;
18 BOOLEAN Cached;
19 BOOLEAN Aligned;
20 } DEBUG_MEMORY_REQUIREMENTS, *PDEBUG_MEMORY_REQUIREMENTS;
21
22 typedef struct _DEBUG_DEVICE_DESCRIPTOR {
23 ULONG Bus;
24 ULONG Slot;
25 USHORT Segment;
26 USHORT VendorID;
27 USHORT DeviceID;
28 UCHAR BaseClass;
29 UCHAR SubClass;
30 UCHAR ProgIf;
31 BOOLEAN Initialized;
32 BOOLEAN Configured;
33 DEBUG_DEVICE_ADDRESS BaseAddress[6];
34 DEBUG_MEMORY_REQUIREMENTS Memory;
35 } DEBUG_DEVICE_DESCRIPTOR, *PDEBUG_DEVICE_DESCRIPTOR;
36
37 typedef NTSTATUS
38 (NTAPI *pKdSetupPciDeviceForDebugging)(
39 _In_opt_ PVOID LoaderBlock,
40 _Inout_ PDEBUG_DEVICE_DESCRIPTOR PciDevice);
41
42 typedef NTSTATUS
43 (NTAPI *pKdReleasePciDeviceForDebugging)(
44 _Inout_ PDEBUG_DEVICE_DESCRIPTOR PciDevice);
45
46 typedef PVOID
47 (NTAPI *pKdGetAcpiTablePhase0)(
48 _In_ struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
49 _In_ ULONG Signature);
50
51 typedef VOID
52 (NTAPI *pKdCheckPowerButton)(VOID);
53
54 #if (NTDDI_VERSION >= NTDDI_VISTA)
55 typedef PVOID
56 (NTAPI *pKdMapPhysicalMemory64)(
57 _In_ PHYSICAL_ADDRESS PhysicalAddress,
58 _In_ ULONG NumberPages,
59 _In_ BOOLEAN FlushCurrentTLB);
60
61 typedef VOID
62 (NTAPI *pKdUnmapVirtualAddress)(
63 _In_ PVOID VirtualAddress,
64 _In_ ULONG NumberPages,
65 _In_ BOOLEAN FlushCurrentTLB);
66 #else
67 typedef PVOID
68 (NTAPI *pKdMapPhysicalMemory64)(
69 _In_ PHYSICAL_ADDRESS PhysicalAddress,
70 _In_ ULONG NumberPages);
71
72 typedef VOID
73 (NTAPI *pKdUnmapVirtualAddress)(
74 _In_ PVOID VirtualAddress,
75 _In_ ULONG NumberPages);
76 #endif
77
78 typedef ULONG
79 (NTAPI *pKdGetPciDataByOffset)(
80 _In_ ULONG BusNumber,
81 _In_ ULONG SlotNumber,
82 _Out_writes_bytes_(Length) PVOID Buffer,
83 _In_ ULONG Offset,
84 _In_ ULONG Length);
85
86 typedef ULONG
87 (NTAPI *pKdSetPciDataByOffset)(
88 _In_ ULONG BusNumber,
89 _In_ ULONG SlotNumber,
90 _In_reads_bytes_(Length) PVOID Buffer,
91 _In_ ULONG Offset,
92 _In_ ULONG Length);
93 $endif (_NTDDK_)