From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.69]) by mx.groups.io with SMTP id smtpd.web11.2024.1680850702587546330 for ; Thu, 06 Apr 2023 23:58:22 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=3YCAbURA; 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.220.69, mailfrom: abdullateef.attar@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lforWJI8PDGaF6VdoUIno/Wy6XdYJzxvUOk3pYjeZCwHLdBbhGrpd0Lp0PNVuwbDsUGxBv6DWXjcK9kHQfNiCxtWFQ8H2G3HS/NuMBWcCRUh/UP04iUzKki8MyFZCGXSVybmuykhBUezKw7JUiJ7blFZEXzXMydiCY3yz4qPJAA2FkH7DIj0t58mewV9cbgGgWbDclCDXkYgrxQ0MLn3z/2ovJa9IxNJ5wKS3ZXcTlnsY989zHaTuo95ewWGLMIqdGURJldoYJGPCPdkQJrkJsGnlb9ko30tKoRWZ4GCl5Mifz+IVIhX++5Q4WVyrwAWT80Mtg+2vNNeV+BsRpW70Q== 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=X18BIPptgkCuRXVNsjP/st03BzMLHht2pC/LvnWkkUs=; b=NiLvIe7s0UxaW9utqk2CfhjlthTPFkhe8NOV7R2zSKiMtHeFCMU+AlgxghtdCyemlfiMmvq0Vx7lnPVH7xA0zt54lgL5dhDYHEawTt4M1j+PnvfVLYUkN7/k0VKIHiRI+LNWJ3Mo9FIw2FYD33OE38AH4OpSaPBi8eG68Qqjiua/xDuJWDIjsA+1srmvo8mLvkfM1YY402cfePUEPzxMi+5faNJ/P4bTW5xV/gbwZ3+rAKVJNI5B0UiY6CEAawGfUH45vG31+dd7OUSTC9LilvYnALSftim4bFA5DCx1VQCDVTCDFa61ilkXYpLXkI6Yd0KCOu1IezLy2euZ61je+g== 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=X18BIPptgkCuRXVNsjP/st03BzMLHht2pC/LvnWkkUs=; b=3YCAbURAmINjSKGnswjw8j5hEHaG8rvOFAY59jkfQD0E3+1IBpSw4LqtMht1b0y4u05eLPlNwOUwifeV/3dze27gKHvL0agc2jrOvMVU0MAzGlkagh/kMhqDZnhXRkCGIwE0u+ORsga0d6CmE5WnYnLgQ7d6OIjgWHflnsSnobA= Received: from MN2PR08CA0030.namprd08.prod.outlook.com (2603:10b6:208:239::35) by PH7PR12MB6441.namprd12.prod.outlook.com (2603:10b6:510:1fb::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.35; Fri, 7 Apr 2023 06:58:20 +0000 Received: from BL02EPF000145BB.namprd05.prod.outlook.com (2603:10b6:208:239:cafe::c1) by MN2PR08CA0030.outlook.office365.com (2603:10b6:208:239::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.31 via Frontend Transport; Fri, 7 Apr 2023 06:58: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 BL02EPF000145BB.mail.protection.outlook.com (10.167.241.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6277.30 via Frontend Transport; Fri, 7 Apr 2023 06:58:19 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) 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; Fri, 7 Apr 2023 01:58:10 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 6 Apr 2023 23:58:09 -0700 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; Fri, 7 Apr 2023 01:58:06 -0500 From: "Abdul Lateef Attar" To: CC: Abdul Lateef Attar , Paul Grimes , Garrett Kirkendall , Abner Chang , Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann , Michael D Kinney , "Liming Gao" , Zhiguang Liu , "Ard Biesheuvel" , Jiewen Yao , Jordan Justen Subject: [PATCH v7 0/8] Adds AmdSmmCpuFeaturesLib and SmmSmramSaveStateLib Date: Fri, 7 Apr 2023 12:27:53 +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: BL02EPF000145BB:EE_|PH7PR12MB6441:EE_ X-MS-Office365-Filtering-Correlation-Id: bc3b43d8-6428-45a3-91d0-08db37357891 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: prQJfiNWS7BDAW+n+7jE+5p2Kk2I98RW6olJResqcsglT9UsQmJjQkaCROC0kpD9GezGw2JPRr2wTePHQzgXNwRbAGWCsmcU2x9yhWtsueqaPLTIA9VcrABOajlUjRMltPu724UVPWQU1IkD+kr2GQwWklylDSIHRvpNx/FT4490GdxxGXQ8wk5kKG/33VT5eWrZeOCtQka9a3lWDnb+1C2zvpNraUzkZnUClKQkzud6Hu5iDDMBnXhhtoQmLx3puRpfIEW93cYvG95RDd3rf0fud/zq7x8genxPI85Lh/MI6bXqz3uIgG1A5DTmXoMjyUHUm0lSscPTlzyQY1FTY3TarLZEoyvI+Rq2DbbWy2HpG9A9IXZI5S6yxmyhBPF0RtmX1Lx4VScjC8LGNrwwAhq1ckoRIHRRm6VWxZ5kbMrDLNvmDzsbv/U/VWSRLP/7Hv/lP/y0qBj3hu+4YjMoDVYfXeAlhJyOVvkPsZniWZCeLyn8ZlyXw7QPxA4EUD+IHP2JMsZwxbsQzgSsn2oDT60cHgrisWJMsqSxqs27DnnwcCzj3E/bG6GowDbj2JDHy4gRQCDDA3Q1MvjvBi03x9bgFSgLPdTuUzcDqNATxKNj3KtKLmWUgGsad/GEqCfCI9JP19cW9z3TZ6Br1JkSMY/xCRPNrguV5qdm+lG/701D2ZdAe8wPWuqyQkWc0cPo22fMA+dcNKKsZx+C9ywVZkOCQ9h4eDnxd6QPRs1hHngsu6QxkOM04npyLdgitDz4 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:(13230028)(4636009)(346002)(376002)(136003)(39860400002)(396003)(451199021)(40470700004)(46966006)(36840700001)(70586007)(36860700001)(336012)(426003)(2616005)(356005)(82740400003)(966005)(186003)(83380400001)(8936002)(5660300002)(40480700001)(47076005)(26005)(6666004)(2906002)(7416002)(81166007)(478600001)(7696005)(36756003)(6916009)(40460700003)(70206006)(8676002)(54906003)(41300700001)(4326008)(19627235002)(316002)(82310400005)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2023 06:58:19.8188 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc3b43d8-6428-45a3-91d0-08db37357891 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: BL02EPF000145BB.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6441 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain PR: https://github.com/tianocore/edk2/pull/4251 V7 delta changes: Adds SmmSmramSaveStateLib for Intel processor. Integrate SmmSmramSaveStateLib library. V6 delta changes: Addressed review comments for Ray NI. removed unnecessary EFIAPI. V5 delta changes: rebase to master branch. updated Reviewed-by V4 delta changes: rebase to master branch. added reviewed-by. V3 delta changes: Addressed review comments from Abner chang. Re-arranged patch order. Cc: Paul Grimes Cc: Garrett Kirkendall Cc: Abner Chang Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Abdul Lateef Attar Abdul Lateef Attar (8): 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: Implements SmmSmramSaveStateLib for Intel UefiCpuPkg: Uses SmmSmramSaveStateLib library UefiCpuPkg/UefiCpuPkg.dec | 4 + OvmfPkg/OvmfPkgIa32X64.dsc | 2 + UefiCpuPkg/UefiCpuPkg.dsc | 15 + .../AmdSmmCpuFeaturesLib.inf | 39 ++ .../AmdSmmSmramSaveStateLib.inf | 28 + .../IntelSmmSmramSaveStateLib.inf | 28 + UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 2 + .../Include/Register/Amd/SmramSaveStateMap.h | 194 +++++++ .../Include/Library/SmmSmramSaveStateLib.h | 70 +++ .../SmmSmramSaveStateLib/SmramSaveState.h | 100 ++++ UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 2 + .../SmmCpuFeaturesLib/AmdSmmCpuFeaturesLib.c | 445 ++++++++++++++++ .../IntelSmmCpuFeaturesLib.c | 128 +++++ .../SmmCpuFeaturesLibCommon.c | 128 ----- .../SmmSmramSaveStateLib/AmdSmramSaveState.c | 286 ++++++++++ .../IntelSmramSaveState.c | 359 +++++++++++++ .../SmramSaveStateCommon.c | 232 ++++++++ UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 5 +- UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 500 +----------------- MdePkg/MdePkg.ci.yaml | 4 +- 20 files changed, 1942 insertions(+), 629 deletions(-) create mode 100644 UefiCpuPkg/Library/SmmCpuFeaturesLib/AmdSmmCpuFeaturesL= ib.inf create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/AmdSmmSmramSave= StateLib.inf create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/IntelSmmSmramSa= veStateLib.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/IntelSmramSaveS= tate.c create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/SmramSaveStateC= ommon.c --=20 2.25.1