From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id E9B63941463 for ; Thu, 15 Aug 2024 07:14:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=8B9LcRooutZe4wgIB4zLCUV8ukV/fg1O0Oy9qWAmLVo=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20240206; t=1723706061; v=1; b=n48psQC0/EeMdP46rgKHyLYjUCO+vKS3K6nmb403J9AkVAw/6Q4Udrbdpcx1upQ0N88ld0Ny NOjYf7x8IycrMDvvjzJkFVE/SQ2dCEV97bBuVhajuDQfRN+L6kmXrHhnZCTmFYbufOJ72QC3DaP FZaefc3Rret7Iyn7rICS93UGZlP9g4PA4PyodVZRB0kcd1PCUtEMjUrMSt1PY9ABUi32eWJyo8P sHPFzV+wsbCJq+VWAVFl6cEe9DpfCtAebUl0yrN7bwOunTfnBivsDfVbpohSd7bjaJlTVe1JPH7 xZ7Fpu4oeME4haSZDoh/xX5ASGWQMCBwREAf1KqyJ52Ww== X-Received: by 127.0.0.2 with SMTP id CMxsYY7687511x5i8jbw4eKE; Thu, 15 Aug 2024 00:14:20 -0700 X-Received: from BL2PR02CU003.outbound.protection.outlook.com (BL2PR02CU003.outbound.protection.outlook.com [52.101.51.136]) by mx.groups.io with SMTP id smtpd.web10.117728.1723706059675404501 for ; Thu, 15 Aug 2024 00:14:19 -0700 X-Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by CH3PR01MB8490.prod.exchangelabs.com (2603:10b6:610:197::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.18; Thu, 15 Aug 2024 07:14:16 +0000 X-Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::fc79:e629:93aa:8b8f]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::fc79:e629:93aa:8b8f%3]) with mapi id 15.20.7875.018; Thu, 15 Aug 2024 07:14:16 +0000 From: "Nhi Pham via 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 1/3] AmpereAltraPkg/AcpiConfigDxe: Remove Max Frequency config option Date: Thu, 15 Aug 2024 14:12:32 +0700 Message-ID: <20240815071234.3807473-2-nhi@os.amperecomputing.com> In-Reply-To: <20240815071234.3807473-1-nhi@os.amperecomputing.com> References: <20240815071234.3807473-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com (2603:1096:4:192::20) To PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7287:EE_|CH3PR01MB8490:EE_ X-MS-Office365-Filtering-Correlation-Id: 71a466f4-de8d-4bf5-7362-08dcbcf9df55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?uMSimrLoU3Q5Aw+xBELgelVHfVlLuzfHakkywomj/qPxheIyD8cCpkjgtIWr?= =?us-ascii?Q?cJtYs5uvnn9MwGdAWB+l0ZSC1RR0vuMkcSZgXUfhDJWcxDB9ukB6u3JdT01T?= =?us-ascii?Q?l1eDZFtvdnLri/6RB/HGkV9YJROf5yHSitdRdOOMF9Wu0jiBbwL37+dFMgcI?= =?us-ascii?Q?tGk4G1mXDeMuuqywcbKxv5KN5lT0XL/Sm6LrQ9xm3twvoeMShRmlXZaktrc4?= =?us-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B3tugpw2+jC?= =?us-ascii?Q?FueRnf1PgzVUnEdv8VppdUk/5e0zC7NIhbgQ3BvUP6Q4aNNHh1LOp/0Mg4VX?= =?us-ascii?Q?X6o75nCFvedgvDets80O5aiUDTdZ3JQpDV00m/gQl5pJsCLrrr4BOLZHvC1O?= =?us-ascii?Q?eTfIX6vND2NPX72YatREayqADVHDRwt19aV2V0NKUYdVGfRYklbqj0QrBGqE?= =?us-ascii?Q?f+AOJFTxslBh7h6g/Vj0xOti1EC7GMG6/6blYnVm7LKnW7WQ0EfL7KW5Ymz5?= =?us-ascii?Q?YxoLRPReC0yrQ3g8IJuV8Eo=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71a466f4-de8d-4bf5-7362-08dcbcf9df55 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2024 07:14:16.2345 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 51JZnVbuo9GxqKuAxTnQ8TSS0E22fjYt4FJ41qRgIU0CqGk6EhXJyc3vMK3SR24ZrwsapjTBJY++DtNCYTJ0ffEFv3d0AC/4ZTeX5G4FnYw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR01MB8490 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 15 Aug 2024 00:14:19 -0700 Resent-From: nhi@os.amperecomputing.com Reply-To: devel@edk2.groups.io,nhi@os.amperecomputing.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 2fDZwxFHEjP2pwIyG9Jc1Moax7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=n48psQC0; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Beginning with SCP version 1.08, the CPU nominal frequency is equivalient to the maximum (turbo) frequency. Hence, the max frequency config option can be eliminated from the ACPI Configuration screen. Signed-off-by: Nhi Pham --- Silicon/Ampere/AmpereAltraPkg/Include/AcpiConfigNVDataStruct.h = | 4 +- Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigVfr.vfr = | 13 --- Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigDxe.c = | 83 -------------------- Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigStrings.uni = | 3 - 4 files changed, 1 insertion(+), 102 deletions(-) diff --git a/Silicon/Ampere/AmpereAltraPkg/Include/AcpiConfigNVDataStruct.h= b/Silicon/Ampere/AmpereAltraPkg/Include/AcpiConfigNVDataStruct.h index a56bfa9aa694..58574015c642 100644 --- a/Silicon/Ampere/AmpereAltraPkg/Include/AcpiConfigNVDataStruct.h +++ b/Silicon/Ampere/AmpereAltraPkg/Include/AcpiConfigNVDataStruct.h @@ -18,9 +18,7 @@ typedef struct { UINT32 EnableApeiSupport; UINT32 AcpiCppcEnable; UINT32 AcpiLpiEnable; - UINT32 AcpiTurboSupport; - UINT32 AcpiTurboMode; - UINT32 Reserved[4]; + UINT32 Reserved[6]; } ACPI_CONFIG_VARSTORE_DATA; =20 #pragma pack() diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfig= Vfr.vfr b/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigVfr= .vfr index 3962aa227037..0d775172ce81 100644 --- a/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigVfr.vfr +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigVfr.vfr @@ -51,19 +51,6 @@ formset option text =3D STRING_TOKEN(STR_ACPI_COMMON_ENABLE), value =3D 1, f= lags =3D DEFAULT; endoneof; =20 - grayoutif ideqval AcpiConfigNVData.AcpiTurboSupport =3D=3D 0; - oneof - varid =3D AcpiConfigNVData.AcpiTurboMode, - prompt =3D STRING_TOKEN(STR_ACPI_TURBO_PROMPT), - help =3D STRING_TOKEN(STR_ACPI_TURBO_HELP), - option text =3D STRING_TOKEN(STR_ACPI_COMMON_ENABLE), value =3D 1,= flags =3D DEFAULT; - option text =3D STRING_TOKEN(STR_ACPI_COMMON_DISABLE), value =3D 0= , flags =3D 0; - suppressif ideqval AcpiConfigNVData.AcpiTurboSupport > 0; - option text =3D STRING_TOKEN(STR_ACPI_UNSUPPORTED), value =3D 2, f= lags =3D 0; - endif; - endoneof; - endif; - endform; =20 endformset; diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfig= Dxe.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigDxe.c index 6ba39ad4409b..4536010a6f0d 100644 --- a/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigDxe.c +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigDxe.c @@ -338,79 +338,6 @@ DriverCallback ( return EFI_SUCCESS; } =20 -STATIC -EFI_STATUS -AcpiNVDataUpdate ( - IN ACPI_CONFIG_PRIVATE_DATA *PrivateData - ) -{ - EFI_STATUS Status; - PLATFORM_INFO_HOB *PlatformHob; - UINT32 TurboSupport; - - ASSERT (PrivateData !=3D NULL); - - PlatformHob =3D PrivateData->PlatformHob; - TurboSupport =3D PlatformHob->TurboCapability[0] + PlatformHob->TurboCap= ability[1]; - - if (TurboSupport =3D=3D 0) { - PrivateData->Configuration.AcpiTurboMode =3D 2; // Unsupported mode - PrivateData->Configuration.AcpiTurboSupport =3D 0; - } else { - PrivateData->Configuration.AcpiTurboSupport =3D 1; - } - - Status =3D gRT->SetVariable ( - AcpiVarstoreDataName, - &gAcpiConfigFormSetGuid, - ACPI_VARSTORE_ATTRIBUTES, - sizeof (ACPI_CONFIG_VARSTORE_DATA), - &PrivateData->Configuration - ); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a %d gRT->SetVariable() failed \n", __FUNCTION_= _, __LINE__)); - return Status; - } - - return EFI_SUCCESS; -} - -STATIC -EFI_STATUS -UpdateTurboModeConfig ( - IN ACPI_CONFIG_PRIVATE_DATA *PrivateData - ) -{ - EFI_STATUS Status; - PLATFORM_INFO_HOB *PlatformHob; - BOOLEAN EnableTurbo; - - ASSERT (PrivateData !=3D NULL); - - if (PrivateData->Configuration.AcpiTurboSupport !=3D 0) { - PlatformHob =3D PrivateData->PlatformHob; - EnableTurbo =3D (PrivateData->Configuration.AcpiTurboMode !=3D 0) ? TR= UE : FALSE; - - if (PlatformHob->TurboCapability[0] !=3D 0) { - Status =3D MailboxMsgTurboConfig (0, EnableTurbo); - if (EFI_ERROR (Status)) { - return Status; - } - } - - if (PlatformHob->TurboCapability[1] !=3D 0) { - Status =3D MailboxMsgTurboConfig (1, EnableTurbo); - if (EFI_ERROR (Status)) { - return Status; - } - } - } else { - DEBUG ((DEBUG_INFO, "%a: Turbo mode is unsupported! \n", __FUNCTION__)= ); - } - - return EFI_SUCCESS; -} - STATIC EFI_STATUS UpdateCPPCConfig ( @@ -519,11 +446,6 @@ UpdateAcpiOnReadyToBoot ( return; } =20 - Status =3D UpdateTurboModeConfig (mPrivateData); - if (EFI_ERROR (Status)) { - return; - } - // // Close DSDT Table // @@ -719,10 +641,5 @@ AcpiConfigEntryPoint ( return Status; } =20 - Status =3D AcpiNVDataUpdate (mPrivateData); - if (EFI_ERROR (Status)) { - return Status; - } - return EFI_SUCCESS; } diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfig= Strings.uni b/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfi= gStrings.uni index 21a6188518fd..143672262744 100644 --- a/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigStrings= .uni +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigStrings= .uni @@ -22,6 +22,3 @@ =20 #string STR_ACPI_LPI_PROMPT #language en-US "LPI = Support" #string STR_ACPI_LPI_HELP #language en-US "Enab= les or Disables System ability to LPI (Lower Power Idle)" - -#string STR_ACPI_TURBO_PROMPT #language en-US "Max = Performance" -#string STR_ACPI_TURBO_HELP #language en-US "Enab= les or Disables System ability to Max Performance" --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120348): https://edk2.groups.io/g/devel/message/120348 Mute This Topic: https://groups.io/mt/107909935/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-