From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.65]) by mx.groups.io with SMTP id smtpd.web11.17360.1673417777506382814 for ; Tue, 10 Jan 2023 22:16:17 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=01Yg11eS; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.95.65, mailfrom: abdullateef.attar@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NtSFv0XwMB4+6BDa4L7+xgeR3pJA2XHgDa4MadBWTSnqqRlUzqqIujJYh7MHd+5mX9HPPzdT0fibXf6AD2wcAxSQx4AQrg3flKjTLVB82kkBbkJowbPm0Pj2pmJ8bm1gQ3kCuAp32GDV/l2maUVc/DPA8v8pUH62q0hysY5pnGSqO8UgUju6FXKz/T1u1C1qyXUBLXrz6Meg+Mxd/muGP2EE1PD+oQQHBc52Sym7ljtLqOx45CfFN5TAg9KWZam6CtBJYLU/qVrqYuFxy94Qp0fRm+vXP1D3AI0nxRT9ZsnOJ0/qzmFUquXVq0DqSfQvBIdSqqqXp1ghX+vgbNKAZA== 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=3f4pDN9D6KMQJzLSWjctT8/l/vh33udDBUsS5E5CQIA=; b=as34OyU8itd+/mUO7UBdq4YU4NtvSlFtwt5VVpzMiCZ6isjxaQBTGLSHThnBHBF9Q4b1ZEJgd9jC7OYGTbXlg/Xe4C4KZW3DPYThQG+gzsZMmhJxdTDNYMXmGKBspTOiRb0k/12Djx6T6Uqk63bXzWRjuPSTP55dtReiN5X34ZstU+orHdOMMGc61iuRVMtyEa0Tf1Ldr8iL8xnb2p6V7RJzD03u0QtCYq9W6nrUUzaM3EC20z8thTgbt250707+0lius7Zxut7Wj8T0SokM9FUuc9MZeKGGExaVBXbDsgJ3K6kqYNxJGaP3a+zJbEWucnvYEKt2PxW4WBzxdSK+hA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3f4pDN9D6KMQJzLSWjctT8/l/vh33udDBUsS5E5CQIA=; b=01Yg11eStwW3SReofLty54A2g2skzPZc4RIDdIui+jHCHZEuXsK/iOwATVk9Y/qwaMXKX8Wv7ERjj6FGw5RGUSPC/T4kOwL2GOGArqwWJEEY8Wd3LHZ6UbBvB+8EESzXNILq/7NjRD80qqxarp4zokT/GVrA1Yq37fZ/A5JBPaw= Received: from DS7PR03CA0295.namprd03.prod.outlook.com (2603:10b6:5:3ad::30) by DM8PR12MB5416.namprd12.prod.outlook.com (2603:10b6:8:28::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Wed, 11 Jan 2023 06:16:12 +0000 Received: from DS1PEPF0000E646.namprd02.prod.outlook.com (2603:10b6:5:3ad:cafe::36) by DS7PR03CA0295.outlook.office365.com (2603:10b6:5:3ad::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18 via Frontend Transport; Wed, 11 Jan 2023 06:16:12 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF0000E646.mail.protection.outlook.com (10.167.18.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.11 via Frontend Transport; Wed, 11 Jan 2023 06:16:12 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 11 Jan 2023 00:16:12 -0600 Received: from BLR-LAB-SFW01.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Wed, 11 Jan 2023 00:16:00 -0600 From: "Abdul Lateef Attar" To: CC: Abdul Lateef Attar , Paul Grimes , Garrett Kirkendall , Abner Chang , Eric Dong , Ray Ni , Rahul Kumar , Michael D Kinney , Liming Gao , "Zhiguang Liu" Subject: [PATCH v2 0/6] Adds AmdSmmCpuFeaturesLib Date: Wed, 11 Jan 2023 11:45:38 +0530 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Return-Path: AbdulLateef.Attar@amd.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E646:EE_|DM8PR12MB5416:EE_ X-MS-Office365-Filtering-Correlation-Id: a9cd0b2f-d9b3-491b-f9c6-08daf39b56d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yHI6ZyiuLHuHND8DATOjvQDgtKqWxtyuuGB2WIX0dmm9iRmiggu2VyjvhAE4p1Jqrp+WzyiuTaGUGGukwYKCqKBAeJSrSKDn06mTt0kP/7wRbS8Z2WF/JXcatEsL1E7tcDuLMfjQoU8v5KT/BcO0lzrk9r2MneEGLxcv8C86Kbxlgr7Q9FUFCNowiixpUa683d+wKm/fBrkyO98LiagO8BLDdbxr11+YyolH+LF9yBeH7wVngOIxQFQDVVCyC99Za924StI9jg0Qo0FMR18XR0o00MrzS09CEvkBvrJFlehyq/wHMlEt5DqA3MPrWmz0aoaDYneNwevhFJjV4Q3mnggfITZDjlFGMLxMypU6jIQhDUbYYelSa61UOkdyuKT3Ai0bogj3BcsZ58RRdbtVv7iv6r3gDCkukvTVKEtEfS6xfLnU9h9L2/DAUb60bCpzI7Td4iTSqH+/CMFihm0s5++AoZXNii92h36Uxv2oyDtgVwE+QcV2GgtQHKTplJnoc2IGjoJ2RvMBLcy88AjAbmPzB+b/WV+RQ9DHX2YUaDa4GqvlWQ5imq55/1pAIeQ+RwMZ7uSEQu2bQS3d5Ku4Jgi5pWa0y3oUbNBU5JoZPpMI0HS4sBDSH7tv+fxA97dV8RewJcoJcb2uO6mIa8Pb5S7edAkihgbvqaFTWkHdeJrjvrdZMeiz9aH2lOuVmzw3NcBAHtVQkbGXTH2ExdR9s1EoS9HnhDMIK8dTf+rJUi2b8V6vlhanhFKfuMiBfxTrvDkdXcbJNzY5mVWF6okS7gT+UdlqnusdE3tNQFjoOQ0= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(346002)(396003)(136003)(376002)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(6666004)(36860700001)(2906002)(36756003)(4326008)(6916009)(8676002)(5660300002)(8936002)(83380400001)(82740400003)(478600001)(81166007)(356005)(41300700001)(47076005)(966005)(426003)(336012)(26005)(82310400005)(186003)(70206006)(70586007)(40480700001)(7696005)(40460700003)(316002)(2616005)(54906003)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2023 06:16:12.7425 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a9cd0b2f-d9b3-491b-f9c6-08daf39b56d0 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E646.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5416 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable V2 series addresses review comments from V1. Adds SmmSmramSaveStateLib library Removes global references across modules. drops S3 support patch. PR: https://github.com/tianocore/edk2/pull/3882 Cc: Paul Grimes Cc: Garrett Kirkendall Cc: Abner Chang Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Abdul Lateef Attar (6): UefiCpuPkg/SmmCpuFeaturesLib: Restructure arch-dependent code MdePkg: Adds AMD SMRAM save state map UefiCpuPkg: Adds SmmSmramSaveStateLib library class UefiCpuPkg: Implements SmmSmramSaveStateLib library class UefiCpuPkg: Initial implementation of AMD's SmmCpuFeaturesLib UefiCpuPkg: Implements SmmCpuFeaturesLib for AMD Family UefiCpuPkg/UefiCpuPkg.dec | 4 + UefiCpuPkg/UefiCpuPkg.dsc | 11 + .../AmdSmmCpuFeaturesLib.inf | 39 ++ .../AmdSmmSmramSaveStateLib.inf | 28 ++ .../Include/Register/Amd/SmramSaveStateMap.h | 194 ++++++++ .../Include/Library/SmmSmramSaveStateLib.h | 69 +++ .../SmmSmramSaveStateLib/SmramSaveState.h | 102 ++++ .../SmmCpuFeaturesLib/Amd/SmmCpuFeaturesLib.c | 445 ++++++++++++++++++ .../IntelSmmCpuFeaturesLib.c | 128 +++++ .../SmmCpuFeaturesLibCommon.c | 128 ----- .../SmmSmramSaveStateLib/Amd/SmramSaveState.c | 318 +++++++++++++ .../SmramSaveStateCommon.c | 124 +++++ MdePkg/MdePkg.ci.yaml | 3 +- 13 files changed, 1464 insertions(+), 129 deletions(-) create mode 100644 UefiCpuPkg/Library/SmmCpuFeaturesLib/AmdSmmCpuFeaturesL= ib.inf create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/AmdSmmSmramSave= StateLib.inf create mode 100644 MdePkg/Include/Register/Amd/SmramSaveStateMap.h create mode 100644 UefiCpuPkg/Include/Library/SmmSmramSaveStateLib.h create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/SmramSaveState.= h create mode 100644 UefiCpuPkg/Library/SmmCpuFeaturesLib/Amd/SmmCpuFeatures= Lib.c create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/Amd/SmramSaveSt= ate.c create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/SmramSaveStateC= ommon.c --=20 2.25.1