[NTOS:PO] Report correct CPU frequency in CurrentMhz

Also add some relevant FIXME comments. CORE-13206
This commit is contained in:
Stanislav Motylkov 2020-05-25 01:24:52 +03:00
parent 93aa5801dc
commit 4c78b2c38d
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92

View file

@ -863,11 +863,14 @@ NtPowerInformation(IN POWER_INFORMATION_LEVEL PowerInformationLevel,
if (OutputBufferLength < sizeof(PROCESSOR_POWER_INFORMATION))
return STATUS_BUFFER_TOO_SMALL;
/* FIXME: return structures for all processors */
_SEH2_TRY
{
/* FIXME: some values are hardcoded */
PowerInformation->Number = 0;
PowerInformation->MaxMhz = 1000;
PowerInformation->CurrentMhz = 1000;
PowerInformation->CurrentMhz = KeGetCurrentPrcb()->MHz;
PowerInformation->MhzLimit = 1000;
PowerInformation->MaxIdleState = 0;
PowerInformation->CurrentIdleState = 0;