public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nhi Pham via groups.io" <nhi=os.amperecomputing.com@groups.io>
To: devel@edk2.groups.io
Cc: quic_llindhol@quicinc.com, chuong@os.amperecomputing.com,
	rebecca@os.amperecomputing.com, nhi@os.amperecomputing.com
Subject: [edk2-devel] [edk2-platforms][PATCH 2/3] AmpereAltraPkg/PlatformInfoDxe: Correct CPU frequency info
Date: Thu, 15 Aug 2024 14:12:33 +0700	[thread overview]
Message-ID: <20240815071234.3807473-3-nhi@os.amperecomputing.com> (raw)
In-Reply-To: <20240815071234.3807473-1-nhi@os.amperecomputing.com>

Given that the max frequency is always active, the CPU frequency showned
on the CPU Information screen should be retrieved using the
CpuGetMaxFreq() function. The function will prioritize obtaining the max
frequency over the  CPU normal frequency.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
---
 Silicon/Ampere/AmpereAltraPkg/Drivers/PlatformInfoDxe/PlatformInfoDxe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/PlatformInfoDxe/PlatformInfoDxe.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/PlatformInfoDxe/PlatformInfoDxe.c
index 82d2cf131c16..4b677765cd0e 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/PlatformInfoDxe/PlatformInfoDxe.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/PlatformInfoDxe/PlatformInfoDxe.c
@@ -156,7 +156,7 @@ UpdatePlatformInfoScreen (
     );
 
   /* CPU clock */
-  UnicodeSPrint (Str, sizeof (Str), L"%dMHz", PlatformHob->CpuClk / MHZ_SCALE_FACTOR);
+  UnicodeSPrint (Str, sizeof (Str), L"%dMHz", CpuGetMaxFreq (0) / MHZ_SCALE_FACTOR);
   HiiSetString (
     HiiHandle,
     STRING_TOKEN (STR_PLATFORM_INFO_CPUCLK_VALUE),
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120349): https://edk2.groups.io/g/devel/message/120349
Mute This Topic: https://groups.io/mt/107909936/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  parent reply	other threads:[~2024-08-15  7:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-15  7:12 [edk2-devel] [edk2-platforms][PATCH 0/3] AmpereAltraPkg: Remove Max Frequency config Nhi Pham via groups.io
2024-08-15  7:12 ` [edk2-devel] [edk2-platforms][PATCH 1/3] AmpereAltraPkg/AcpiConfigDxe: Remove Max Frequency config option Nhi Pham via groups.io
2024-08-15  7:12 ` Nhi Pham via groups.io [this message]
2024-08-15  7:12 ` [edk2-devel] [edk2-platforms][PATCH 3/3] AmpereAltraPkg/SystemFirmwareInterfaceLib: Remove unused MailboxMsgTurboConfig() Nhi Pham via groups.io
2024-08-22  6:58 ` [edk2-devel] [edk2-platforms][PATCH 0/3] AmpereAltraPkg: Remove Max Frequency config Chuong Tran
2024-08-23  2:50   ` Nhi Pham via groups.io

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240815071234.3807473-3-nhi@os.amperecomputing.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox