https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4c78b2c38d1621c4787a98...
commit 4c78b2c38d1621c4787a9847210f865f07b6fae8 Author: Stanislav Motylkov x86corez@gmail.com AuthorDate: Mon May 25 01:24:52 2020 +0300 Commit: Stanislav Motylkov x86corez@gmail.com CommitDate: Mon May 25 01:24:52 2020 +0300
[NTOS:PO] Report correct CPU frequency in CurrentMhz
Also add some relevant FIXME comments. CORE-13206 --- ntoskrnl/po/power.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/po/power.c b/ntoskrnl/po/power.c index d29c85658bc..c1b82234fe6 100644 --- a/ntoskrnl/po/power.c +++ b/ntoskrnl/po/power.c @@ -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;