summaryrefslogtreecommitdiff
path: root/powerlimit/plclient/powerlimitclient_drvinterface.h
diff options
context:
space:
mode:
authorJakob Lichtenberg (170957) <[email protected]>2024-06-28 11:39:18 -0700
committerJakob Lichtenberg (170957) <[email protected]>2024-06-28 11:39:18 -0700
commit1971c7bfc27f90764155ef96df64db4b4cfb93df (patch)
tree9193a001a463219d073ce9ea5f1e3408a0ba3d56 /powerlimit/plclient/powerlimitclient_drvinterface.h
parent3c4d58d08b74cf2925ec632ed1fe81e0d81df8a1 (diff)
parentb3af8c8f9bd508f54075da2f2516b31d05cd52c8 (diff)
Merge branch 'main' into user/jakobl/nuget_packagereference_instead_of_packages_configuser/jakobl/nuget_packagereference_instead_of_packages_config
Diffstat (limited to 'powerlimit/plclient/powerlimitclient_drvinterface.h')
-rw-r--r--powerlimit/plclient/powerlimitclient_drvinterface.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/powerlimit/plclient/powerlimitclient_drvinterface.h b/powerlimit/plclient/powerlimitclient_drvinterface.h
new file mode 100644
index 00000000..d4c71bda
--- /dev/null
+++ b/powerlimit/plclient/powerlimitclient_drvinterface.h
@@ -0,0 +1,58 @@
+/*++
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+ powerlimitclient_drvinterface.h
+
+Abstract:
+
+ This module contains the interfaces used to communicate with the simulate
+ power limit client driver stack.
+
+--*/
+
+//--------------------------------------------------------------------- Pragmas
+
+#pragma once
+
+//--------------------------------------------------------------------- Defines
+
+//
+// IOCTLs to control the client driver
+//
+
+#define POWERLIMITCLIENT_IOCTL(_index_) \
+ CTL_CODE(FILE_DEVICE_UNKNOWN, _index_, METHOD_BUFFERED, FILE_WRITE_DATA)
+
+//
+// IOCTL_POWERLIMIT_CLIENT_QUERY_LIMIT_COUNT
+// - Output: ULONG, number of supported power limit parameters.
+//
+
+#define IOCTL_POWERLIMIT_CLIENT_QUERY_LIMIT_COUNT POWERLIMITCLIENT_IOCTL(0x800)
+
+//
+// IOCTL_POWERLIMIT_CLIENT_QUERY_ATTRIBUTES
+// - Output: POWER_LIMIT_ATTRIBUTES[], attributes of supported power limit parameters.
+//
+
+#define IOCTL_POWERLIMIT_CLIENT_QUERY_ATTRIBUTES POWERLIMITCLIENT_IOCTL(0x801)
+
+//
+// IOCTL_POWERLIMIT_CLIENT_QUERY_LIMITS
+// - Output: POWER_LIMIT_VALUE[], values of supported power limit parameters.
+//
+
+#define IOCTL_POWERLIMIT_CLIENT_QUERY_LIMITS POWERLIMITCLIENT_IOCTL(0x802)
+
+//
+// Each domain supports PowerLimitContinuous/Burst/BurstTimeParameter.
+//
+
+#define PLCLIENT_DEFAULT_LIMIT_COUNT_PER_DOMAIN 3UL
+#define PLCLIENT_DEFAULT_DOMAIN_COUNT 2UL
+#define PLCLIENT_DEFAULT_LIMIT_COUNT PLCLIENT_DEFAULT_LIMIT_COUNT_PER_DOMAIN * PLCLIENT_DEFAULT_DOMAIN_COUNT
+#define PLCLIENT_DEFAULT_MAX_VALUE 50000UL
+#define PLCLIENT_DEFAULT_MIN_VALUE 1000UL