From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1A1C2AC0C11 for ; Tue, 31 Oct 2023 05:37:44 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=3UaLW7IZHJL0bcaDgZI14wbKDfKHZtxma04y4DwPdGo=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1698730663; v=1; b=ME6zBXw8PlYKbcYIccy2NKzRPvGeXD48fLAiIbFsVuN/J4FhRi+0VR+gJdJxHkmhR3B4PNm+ vgwm170jeb9vyseu5F9+Ul0NTeWapqhY6/MAliRNULmpK4ZvNQkiC5Cf0weGOIUTimVTrwar5pc 9kasEecQ4QG+sesBSi3NmSDM= X-Received: by 127.0.0.2 with SMTP id XiOqYY7687511xjhc4UKsCqs; Mon, 30 Oct 2023 22:37:43 -0700 X-Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.74]) by mx.groups.io with SMTP id smtpd.web10.180192.1698730662889528885 for ; Mon, 30 Oct 2023 22:37:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BlLonyw1seM2prlDGZviQeyhyQsBpe0F/JWOPWtWMP+fFCr8N8oGXM2CitVDh97n3eAiPvOBqjDbKozN0jUN99paGE/2SqE99RdoL/UK2fxUDWydbAGRwvRtM+ffCMW1uEcL3VnMM79EqMbC+ClDb24wHZaEXhIIRLQrPQHARzGVJSEI6lWSYR8lgK7WIYRkU1YDtOLrX6soRGuU5UW4PJqc7x6CQdnnyLxLVSYaOq4X/ZS6WAqFD5RIcyJhI+7ntSSEbxy4yzszINg6lJApjFivBMzNhabNTsoeuLNaUTMTc9etyoP6iAEHa+twLTnZ+BXS989MmTDQ4gpewUU8sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qy1q0gNx1hrgSReW02CF3H4+ceOB2IyrqvIPo9p3axM=; b=i7HnsBLYuzSDMeFCbG0Hfz9agbMulo9S6pdmSQyItZiefdc+27RlgRRyAiTjWc9DybI338YZCfVO0PNge96l1SyJJyX1fVfCiqLSvUDTTBuXc9MUSZXRmtOx3w/nl6PlnizTxX3AoBjWXOpDS324qp+xjPkI5oqIS2B9lqjAf5sMGiRh808XI2MgxJ37Cb09CIs8VuWu+UrVYPJsnV93J4ZPfawsw6yf+jqd4OXkYEnXiI8F2qSutqCUkmOsUu4K4PFbFioTF8H/iqiz3q0Dl+fd3fu+ol93qQsfLLlXechHKXbS8iL+mZ5ap6aEq2LehBrS9z0dnVe2Pw1urrIDIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) X-Received: from CY8P220CA0018.NAMP220.PROD.OUTLOOK.COM (2603:10b6:930:46::15) by MN0PR12MB5786.namprd12.prod.outlook.com (2603:10b6:208:375::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.28; Tue, 31 Oct 2023 05:37:38 +0000 X-Received: from CY4PEPF0000EDD3.namprd03.prod.outlook.com (2603:10b6:930:46:cafe::a3) by CY8P220CA0018.outlook.office365.com (2603:10b6:930:46::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.30 via Frontend Transport; Tue, 31 Oct 2023 05:37:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000EDD3.mail.protection.outlook.com (10.167.241.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6933.15 via Frontend Transport; Tue, 31 Oct 2023 05:37:38 +0000 X-Received: from TPE-L-HSIENLIN.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 31 Oct 2023 00:37:36 -0500 From: "Jacque Lin via groups.io" To: CC: Jacque Lin , Abdul Lateef Attar , Abner Chang Subject: [edk2-devel] [PATCH v2] UefiCpuPkg/MmSaveStateLib: Remove checking Smm Rev ID in AMD MmSaveStateLib Date: Tue, 31 Oct 2023 13:37:11 +0800 Message-ID: <20231031053711.1416-1-hsienchieh.lin@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD3:EE_|MN0PR12MB5786:EE_ X-MS-Office365-Filtering-Correlation-Id: 70e7f107-fa60-4b32-4289-08dbd9d37e53 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: fkXPh6xCQg/fak2Gn58GnpUk/ULX7DLnGruaysQGO8iiGx6N3uGYd/plj2SoSbJygbHPxNdoa/ZvTSYUBp4SlmivjXM3jOOwwIiuhqZRSg3hNdDwX2mQNWZ2B3A4tEs8U/TDL81ixO08qYMPK/iIKJdeDO/vurlkKA1JqKwHMC/a72diiI7L0aASjogp6GBCv4VXCs843N+TLy1V69QSbbnWcYA9xMueDjtJ+BzW7svypaxlUxQ7K8GFauHIQ6xKBwZkXDFT+7bm+FLF1gXeJSWIsG6FAfPqnFZ/Tpu7vrB0MdKPa+QVrXGq8JE9ZGtUZthNeCnGQ3F7VsKd14SFpN8iC4p2OHltBNbUOW4RLw6/c2anDjq1Rnrzai3K1yGywjwSLd/IgH62zEdwcKwCsaTfUrXOZurGAO133/Ge9w5sbpejNAptgdnj9A32/M9V59Y2Yv2AH574vP6QE91GilfeZylmrykHt3kaR3zy3sadQmE63mIAj28G01OI3hN8zNtBMvOgK3y3q8hLa3VP1K+byvtiY8NfXKWZnHrsJOT0+hG+6/ad4hJgXu3Rnra4HFv+Y5s0/xju4vOOQejxjD89qcTBjX1eFg1Hx1+7XRrqoSei6ftOa5ec7cF02QKawj4KbsdwejPvGpUtCRJGgSdV131pBScRJI4i1fDVKd5Q9ItW19yPl0hOOQt0ojR43Ik9+qAL0gGzWgTF6hpRYYUl7mI0i1r4cdc7YaqyblDkuqNVVi+kN/PLcuFDchLbAqi6DzjBJJf9Go+eeXIrGQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2023 05:37:38.2676 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70e7f107-fa60-4b32-4289-08dbd9d37e53 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5786 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 Reply-To: devel@edk2.groups.io,hsienchieh.lin@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: OUcUCnb7HFjVUyP6NfBqe0Zjx7686176AA= 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=20140610 header.b=ME6zBXw8; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Remove checking SMM Rev ID in AMD Save State lib when reading Save State Register EFI_MM_SAVE_STATE_REGISTER_IO. For AMD, it is not necessary to check SmmRevId when reading Save State Register EFI_MM_SAVE_STATE_REGISTER_IO. Cc: Abdul Lateef Attar Cc: Abner Chang Signed-off-by: Jacque Lin --- UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c b/UefiCpuPk= g/Library/MmSaveStateLib/AmdMmSaveState.c index 3315a6cc44..c4bf6ad4bb 100644 --- a/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c +++ b/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c @@ -102,7 +102,6 @@ MmSaveStateReadRegister ( OUT VOID *Buffer ) { - UINT32 SmmRevId; EFI_MM_SAVE_STATE_IO_INFO *IoInfo; AMD_SMRAM_SAVE_STATE_MAP *CpuSaveState; UINT8 DataWidth; @@ -124,18 +123,6 @@ MmSaveStateReadRegister ( =20 // Check for special EFI_MM_SAVE_STATE_REGISTER_IO if (Register =3D=3D EFI_MM_SAVE_STATE_REGISTER_IO) { - // - // Get SMM Revision ID - // - MmSaveStateReadRegisterByIndex (CpuIndex, AMD_MM_SAVE_STATE_REGISTER_S= MMREVID_INDEX, sizeof (SmmRevId), &SmmRevId); - - // - // See if the CPU supports the IOMisc register in the save state - // - if (SmmRevId < AMD_SMM_MIN_REV_ID_X64) { - return EFI_NOT_FOUND; - } - // Check if IO Restart Dword [IO Trap] is valid or not using bit 1. if (!(CpuSaveState->x64.IO_DWord & 0x02u)) { return EFI_NOT_FOUND; --=20 2.36.1.windows.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 (#110365): https://edk2.groups.io/g/devel/message/110365 Mute This Topic: https://groups.io/mt/102292190/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-