master
h 32 lines 626 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_WIN_DRV_H
4 #define NETDATA_WIN_DRV_H
5
6 #if defined(OS_WINDOWS)
7
8 #include <windows.h>
9 #include <intrin.h>
10
11 // Device + symbolic link names used by the driver
12 #define MSR_USER_PATH "\\\\.\\NDDrv"
13
14 // IOCTLs
15 #define IOCTL_MSR_READ CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)
16
17 typedef struct {
18 ULONG msr;
19 ULONG cpu;
20 ULONG low;
21 ULONG high;
22 } MSR_REQUEST;
23
24 enum netdata_cpu_detection {
25 NETDATA_CPU_WIN_UNKNOWN,
26 NETDATA_CPU_WIN_INTEL,
27 NETDATA_CPU_WIN_AMD
28 };
29
30 #endif // OS_WINDOWS
31
32 #endif // NETDATA_WIN_DRV_H