diff options
| author | Jakob Lichtenberg (170957) <[email protected]> | 2024-06-28 11:39:18 -0700 |
|---|---|---|
| committer | Jakob Lichtenberg (170957) <[email protected]> | 2024-06-28 11:39:18 -0700 |
| commit | 1971c7bfc27f90764155ef96df64db4b4cfb93df (patch) | |
| tree | 9193a001a463219d073ce9ea5f1e3408a0ba3d56 /powerlimit/plpolicy/README.md | |
| parent | 3c4d58d08b74cf2925ec632ed1fe81e0d81df8a1 (diff) | |
| parent | b3af8c8f9bd508f54075da2f2516b31d05cd52c8 (diff) | |
Merge branch 'main' into user/jakobl/nuget_packagereference_instead_of_packages_configuser/jakobl/nuget_packagereference_instead_of_packages_config
Diffstat (limited to 'powerlimit/plpolicy/README.md')
| -rw-r--r-- | powerlimit/plpolicy/README.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/powerlimit/plpolicy/README.md b/powerlimit/plpolicy/README.md new file mode 100644 index 00000000..f23c22e3 --- /dev/null +++ b/powerlimit/plpolicy/README.md @@ -0,0 +1,38 @@ +--- +page_type: sample +description: "Demonstrates a simulated power policy device." +languages: +- cpp +products: +- windows +- windows-wdk +--- + +# plpolicy - Simulated Power Limit Policy Driver + +This sample is a driver for a simulated power limit policy device. + +## Universal Windows Driver Compliant + +The plpolicy sample provides the source code for a power limit controller that supplies power limit management to the operating system. + +This driver supplies IOCTLs to receive commands from other modules and plumb cooresponding information to the hardware through OS kernel +space APIs. + +IOCTL_POWERLIMIT_POLICY_REGISTER: Other module supplies the BIOS name of the target device to control the power limit. + +IOCTL_POWERLIMIT_POLICY_QUERY_ATTRIBUTES: Query the target device for supported power limits and attributes. + +IOCTL_POWERLIMIT_POLICY_QUERY_VALUES: Query the target device for active power limit values. + +IOCTL_POWERLIMIT_POLICY_SET_VALUES: Set power limit values to the target device. + +For a production driver, those IOCTLs are not needed. Instead, the policy driver should: +1. During the init phase, subscribes to GUID_DEVINTERFACE_POWER_LIMIT notifications. Then query client's BIOS name in the callback, and + compares it with the target client device. Then create power limit request through PoCreatePowerLimitRequest, query attributes through + PoQueryPowerLimitAttributes. + +2. At runtime, the policy driver should collect input signals and calcualte power limit target(s), then send targets to the client through + PoSetPowerLimitValue. If necessary, the policy driver can query the current power limit of client through PoQueryPowerLimitValue. + +3. If the power limit control is no longer needed, delete the power limit request through PoDeletePowerLimitRequest. |
