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 3/3] AmpereAltraPkg/SystemFirmwareInterfaceLib: Remove unused MailboxMsgTurboConfig()
Date: Thu, 15 Aug 2024 14:12:34 +0700	[thread overview]
Message-ID: <20240815071234.3807473-4-nhi@os.amperecomputing.com> (raw)
In-Reply-To: <20240815071234.3807473-1-nhi@os.amperecomputing.com>

Since configuring the max frequency is unnecessary, its configuration
functions is unused, so remove it.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
---
 Silicon/Ampere/AmpereAltraPkg/Include/Library/SystemFirmwareInterfaceLib.h                    | 25 ------------
 Silicon/Ampere/AmpereAltraPkg/Library/SystemFirmwareInterfaceLib/SystemFirmwareInterfaceLib.c | 43 --------------------
 2 files changed, 68 deletions(-)

diff --git a/Silicon/Ampere/AmpereAltraPkg/Include/Library/SystemFirmwareInterfaceLib.h b/Silicon/Ampere/AmpereAltraPkg/Include/Library/SystemFirmwareInterfaceLib.h
index ce96c2a6b4b6..b91b7c1f862f 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Include/Library/SystemFirmwareInterfaceLib.h
+++ b/Silicon/Ampere/AmpereAltraPkg/Include/Library/SystemFirmwareInterfaceLib.h
@@ -153,14 +153,6 @@
 #define MAILBOX_BOOT_PROGRESS_COMMAND_SET 1
 #define MAILBOX_BOOT_PROGRESS_STAGE_UEFI  8
 
-//
-// Parameters for Set Configuration
-//   Param0: Configuration type
-//     20: Turbo configuration
-//   Param1: Unused
-//
-#define MAILBOX_SET_CONFIGURATION_TURBO 20
-
 /**
   Read a register which is not accessible from the non-secure world
   by sending a mailbox message to the SMpro processor.
@@ -262,21 +254,4 @@ MailboxMsgSetBootProgress (
   IN UINT32  Checkpoint
   );
 
-/**
-  Configure the Turbo (Max Performance) mode.
-
-  @param[in]  Socket           Active socket index.
-  @param[in]  Enable           Enable/Disable the Turbo (Max performance) mode.
-
-  @retval EFI_SUCCESS           Configure the Turbo successfully.
-  @retval EFI_INVALID_PARAMETER A parameter is invalid.
-  @retval Otherwise             Errors returned from the MailboxWrite() functions.
-**/
-EFI_STATUS
-EFIAPI
-MailboxMsgTurboConfig (
-  IN UINT8   Socket,
-  IN BOOLEAN Enable
-  );
-
 #endif /* SYSTEM_FIRMWARE_INTERFACE_LIB_H_ */
diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/SystemFirmwareInterfaceLib/SystemFirmwareInterfaceLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/SystemFirmwareInterfaceLib/SystemFirmwareInterfaceLib.c
index 9cab653418fb..dacfd36d1691 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/SystemFirmwareInterfaceLib/SystemFirmwareInterfaceLib.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/SystemFirmwareInterfaceLib/SystemFirmwareInterfaceLib.c
@@ -283,46 +283,3 @@ MailboxMsgSetBootProgress (
 
   return Status;
 }
-
-/**
-  Configure the Turbo (Max Performance) mode.
-
-  @param[in]  Socket           Active socket index.
-  @param[in]  Enable           Enable/Disable the Turbo (Max performance) mode.
-
-  @retval EFI_SUCCESS           Configure the Turbo successfully.
-  @retval EFI_INVALID_PARAMETER A parameter is invalid.
-  @retval Otherwise             Errors returned from the MailboxWrite() functions.
-**/
-EFI_STATUS
-EFIAPI
-MailboxMsgTurboConfig (
-  IN UINT8   Socket,
-  IN BOOLEAN Enable
-  )
-{
-  EFI_STATUS           Status;
-  MAILBOX_MESSAGE_DATA Message;
-
-  if (Socket >= GetNumberOfSupportedSockets ()) {
-    return EFI_INVALID_PARAMETER;
-  }
-
-  Message.Data = MAILBOX_USER_MESSAGE_ENCODE (
-                   MAILBOX_USER_MESSAGE_SUBTYPE_SET_CONFIGURATION,
-                   MAILBOX_SET_CONFIGURATION_TURBO,
-                   0
-                   );
-
-  //
-  // The Turbo configuration is written into the extended data 0.
-  // The extended data 1 is unused.
-  //
-  Message.ExtendedData[0] = Enable ? 1 : 0;
-  Message.ExtendedData[1] = 0;
-
-  Status = MailboxWrite (Socket, PMproDoorbellChannel1, &Message);
-  ASSERT_EFI_ERROR (Status);
-
-  return Status;
-}
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120350): https://edk2.groups.io/g/devel/message/120350
Mute This Topic: https://groups.io/mt/107909938/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 ` [edk2-devel] [edk2-platforms][PATCH 2/3] AmpereAltraPkg/PlatformInfoDxe: Correct CPU frequency info Nhi Pham via groups.io
2024-08-15  7:12 ` Nhi Pham via groups.io [this message]
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-4-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