From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.43]) by mx.groups.io with SMTP id smtpd.web10.21322.1674061281758990000 for ; Wed, 18 Jan 2023 09:01:22 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=SDbCO8FQ; 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.244.43, mailfrom: abdullateef.attar@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HBMtFnfHKp+LYjIEbCTnz+/7mnvcmrYPnSstSgiBa9PqEar0D7K6JNCRlO8GicUi6H21nufsSuJl2SdR2zz1LSuSflyMnWbs7tQHF8ZLyxMh/C4kF33vHPHweNg00zi9win+Uz9u4rQGRQUCWmCyIKnHz0094JiTR/NZAjTdz5vMRsGJsHY3Y4aGwzRlfACncBvR5SH2oekeazQC8POb50onEn1MT3FMGFogELfYFWWXkRYlH6hDFgLyq10Z1hbYSWxPCZqrn58jr+YgRGmZ06pBaaLVacQG9+93wRKSZZH2QpeEj/KVclNz6KpdwDa+4tzXJMJCCy2LFiS8BXZsYg== 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=0Gp9cqJX3t2iqRpkPS2HyLEOqbodHX09nvtmsdIOtrs=; b=WIz8/RBdzl9TZlaq/R/v9gUwKiWGqqIcFi1BZoKFSx4LMkNNA1wvn10yK/UZt1q7g0tvN9j5L78Ai2DITo6LAckSQXX4w/ZrQ5bMPxRJMOmFLATJM9Qkl+EjBGgO3e5u1rcUyDd0WwE8C4cxY4PXCmVzoQ7aI4pykuUHbG7ZIUyZ9x+buN26H7kFljCVtT5868NKB+al0a7S8UxaK0+BhB0YsK+HOVpFe6PZUv/OGD+8AoHh8RO7kV2pxTskKJUIehX47toe3whsgbmtx9QRdUAQl38xEKPiAXZa3P7Z7Kz+cPuCWrH11A3Cc3LBNv3/O8V2RiInuuMPS/Feyfy0xQ== 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=0Gp9cqJX3t2iqRpkPS2HyLEOqbodHX09nvtmsdIOtrs=; b=SDbCO8FQhiencP2MAnCALfyJuE7CxNSeyuOWDzrRO8JIfRI3YiljqWcoPWx4s1IdJ2cayyVdao7C6EkmQ7SGBwHVSy8bOjLMe85CJW34z3sIw3QvMEImvMa+3zzcINU+Uk75WFPJq4RO9Jkzh+kSea17sxFp9rw24vOvJs08YTQ= Received: from BN9PR03CA0535.namprd03.prod.outlook.com (2603:10b6:408:131::30) by DM4PR12MB6302.namprd12.prod.outlook.com (2603:10b6:8:a4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Wed, 18 Jan 2023 17:01:19 +0000 Received: from BL02EPF00010209.namprd05.prod.outlook.com (2603:10b6:408:131:cafe::61) by BN9PR03CA0535.outlook.office365.com (2603:10b6:408:131::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Wed, 18 Jan 2023 17:01:19 +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 BL02EPF00010209.mail.protection.outlook.com (10.167.241.198) 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, 18 Jan 2023 17:01:19 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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, 18 Jan 2023 11:01:17 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 18 Jan 2023 11:01:14 -0600 Received: from BLR-LAB-SFW01.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Wed, 18 Jan 2023 11:01:12 -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 v3 0/6] Adds AmdSmmCpuFeaturesLib for AMD Family Date: Wed, 18 Jan 2023 22:31:02 +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: BL02EPF00010209:EE_|DM4PR12MB6302:EE_ X-MS-Office365-Filtering-Correlation-Id: 0279ca11-b9fb-49c8-1321-08daf9759e90 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KmZW7MSWYDRUx61cEK7PfyXSqydYQ2wqjlB1HdSzA9LXoTZFHFItPn04CVnHNiUW6aMhLaiRzs9ukv5s0JGADt9o/tz+GHoBoZzC/6PIw/N2KEy34fPEv0KnmDI6W25HYwNCzc8XgzKaSu8AZ2xOEb9pEO49VYz35uNTySfPcEO+HZpijy8Ki8plvLfkfCxLK07oAuiAtg0lrbqegHA6ftr81mMQjf+UL+5K1sG5kc+Mb2Lyb3CAExUZNLCjmvcgR/e3/jrQl8mF8J76XAx4Tsk402/2Qji4KR/j3/v60E7I6g7G8emoM+u+MolnYtAAuMeuynE6oKDwM+F8L8EkJjOrzRv8uTbjghiY9TFpYpQDEpTHQDj5vvGWXegJ8pZ/EloVDxC5cdOsD5Mwx3drzX/uqfBHk0/nwOvyyNYjh5bwJLdGp4RDDDsVsp3Kuw+lB9XYE7/xp2Xy+OX6iG/DETzLGuFfMmEK5hT13VqBq0o9fLfigKBMuNwMkuJ7XhUYAwtgD/4Y6lKsleC5zI4Wc2SXEWLd1vBYvctiwpKRMNNN8yCGFByHjHIVYwUflbRiYnvt2WEUDxOQlk4gYwW7Mxd4Lb95ZnJ8kClQ1fK9dcF+2X6j0YduVqX9lZ/RIad310brmJOikPJcionDAOceTKHKYiahyoJaxN/pVrt6MfF7zIE3/rrx/LjaIipoccLX9KWf2lLC1/LZYnWnlrzPLMHN7lZ9rIK0fu94dNSYBIbpHfEGRgmdIpp40Jxtw0NO2vGiK5a4sZdz3GBbEihfw5LN0ORFWO3SfcG1XtnLibM= 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)(39860400002)(376002)(136003)(396003)(451199015)(40470700004)(46966006)(36840700001)(81166007)(83380400001)(8936002)(5660300002)(41300700001)(4326008)(6916009)(8676002)(356005)(70206006)(47076005)(426003)(82310400005)(2906002)(40460700003)(82740400003)(36756003)(36860700001)(40480700001)(966005)(2616005)(7696005)(70586007)(6666004)(26005)(186003)(478600001)(316002)(336012)(54906003)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 17:01:19.2610 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0279ca11-b9fb-49c8-1321-08daf9759e90 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: BL02EPF00010209.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6302 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable V3 delta changes: Addressed review comments from Abner Chang. PR: https://github.com/tianocore/edk2/pull/3925 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): MdePkg: Adds AMD SMRAM save state map UefiCpuPkg: Adds SmmSmramSaveStateLib library class UefiCpuPkg: Implements SmmSmramSaveStateLib library class UefiCpuPkg/SmmCpuFeaturesLib: Restructure arch-dependent code 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 | 70 +++ .../SmmSmramSaveStateLib/SmramSaveState.h | 102 ++++ .../SmmCpuFeaturesLib/AmdSmmCpuFeaturesLib.c | 445 ++++++++++++++++++ .../IntelSmmCpuFeaturesLib.c | 128 +++++ .../SmmCpuFeaturesLibCommon.c | 128 ----- .../SmmSmramSaveStateLib/AmdSmramSaveState.c | 319 +++++++++++++ .../SmramSaveStateCommon.c | 124 +++++ MdePkg/MdePkg.ci.yaml | 4 +- 13 files changed, 1467 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/AmdSmmCpuFeaturesL= ib.c create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/AmdSmramSaveSta= te.c create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/SmramSaveStateC= ommon.c --=20 2.25.1