From 4c78b2c38d1621c4787a9847210f865f07b6fae8 Mon Sep 17 00:00:00 2001 From: Stanislav Motylkov Date: Mon, 25 May 2020 01:24:52 +0300 Subject: [PATCH] [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;