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.54]) by mx.groups.io with SMTP id smtpd.web11.75602.1674225119906349646 for ; Fri, 20 Jan 2023 06:32:00 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=FoI4oW0B; 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.54, mailfrom: abdullateef.attar@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PYH/k5xSHExUdVHrdPvrb85+gSuLm+Mk4VCmsAFDinw49Umt2eAMwDiyuD1UrLtzRi25wSQovYwcVxIIOyDBNtsiYxhwLMM4R641R+O+WTqM0qCrwoFJVLcTIdyRJ5MHyL7koX1KTY3db6DRT18ycpfa6whHgIlq0lK8BtCOM9jvyMNnFsq49tjTEHt22ZMnqLkzuhHB5/fzo/aHWk4YUPcLhU3T3jB47L+zxDrnLqzc7uQBlbvBKgIGvzIbZJb3lPpWNQ926y1nUuqWXubctxdUU1p98KN5a44k96QYkwKyWOY4S8qNF51hR7HvItJ8GVWnFFVntz7HQgNUZYGyTA== 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=W3Novf+Trmzp5U9OG5EtLnVOGSKi3Y5NSByOp/ACZTE=; b=OzD0zFS8T3EPGRDXtLu6CBrKz1p4J/pCR0FTIYf11INU4mjvSH8E/9jc5OWzZTdy77i3Y464w4rnZcTn9idGKCcJZTebaxlRBcRlF4+XoHl0uqq065gUxCvvPDJ9mmgpuKshZRArbWX2sbyAfcKVPCQuZa+AzyjOXuIq0du8UxJyXvHTOgLh0tEfiuHsPp7Hk6A+y8GbnJg42p9T9abGx+Ge8gMQ55ZWcvuAx2ghEg7LNYijUpGGfBNV2B5cBLJvepaR8C1E8BPFQXKySqFjBJY5KdA+Y7yp1dhKaMGmhy3MXzZgIsr3zvVdqEFQUEv81aw79AHN3P/xmTL1KhdLFQ== 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=W3Novf+Trmzp5U9OG5EtLnVOGSKi3Y5NSByOp/ACZTE=; b=FoI4oW0BmPUQEMqPvtyXHs6pnWsk2C2kIwHs/vycwGK6SJOoWDm2e1494PsHQb4UFvya02go2aKNBdq7n/j6epTPRvopiAZzoJcv+exvJajZv1d9cRs7nGegUDQYlWcLlO/Ety9NgXTFT8IVuxLxGvJAJvlLVQSLeTgByDfWxIg= Received: from CY5PR22CA0035.namprd22.prod.outlook.com (2603:10b6:930:1d::11) by PH7PR12MB6636.namprd12.prod.outlook.com (2603:10b6:510:212::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Fri, 20 Jan 2023 14:31:55 +0000 Received: from CY4PEPF0000B8E8.namprd05.prod.outlook.com (2603:10b6:930:1d:cafe::6a) by CY5PR22CA0035.outlook.office365.com (2603:10b6:930:1d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.27 via Frontend Transport; Fri, 20 Jan 2023 14:31:55 +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 Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000B8E8.mail.protection.outlook.com (10.167.241.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.6 via Frontend Transport; Fri, 20 Jan 2023 14:31:53 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) 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.2375.34; Fri, 20 Jan 2023 08:31:52 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 20 Jan 2023 08:31:51 -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; Fri, 20 Jan 2023 08:31:48 -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 v4 0/6] Adds AmdSmmCpuFeaturesLib for AMD Family Date: Fri, 20 Jan 2023 20:01:39 +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: CY4PEPF0000B8E8:EE_|PH7PR12MB6636:EE_ X-MS-Office365-Filtering-Correlation-Id: bd1b82e3-a5ce-4e35-31c4-08dafaf31415 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: O4A71idZZyccL5LdSXxQgWmm5Dt9nVeO4ozozOUhRIQpSoeeJG7AQq+BclRe0kizV8bwAO+zeldDUDOiF8/+GgWXsi4K5D1BX7/DC6ZUCgvyVEQnMLVkgWLPuCZ8506W1lXbmrykQ6rr2KHCLgsfWTQHFq/z3CBWXWkEUlGjvKANcc+RwBqSH7FT895kamD5g1JpzG/jTeDz+wQeAqr/UdZG5YoKu4BKBFvpmId9YgtUxe7+fg9/rdqvrkQgJw83msBY02vrCSXnw5w/jcLIFas0Z0l3j7cCl2stpk+Xq+1mF2vZjtvDttDIDhuVoCfWqoq1luKsdyRgpCoG8EU4X6GvC4YzYOGqARYvmGPd8YI4YQxAjxmo2cT0jO/eyc9nKJhc6+bGoVzemqjL0+BN8wUpgvfwrui8n0rChzldG1slaJiH5M8q492FmXbCusG+g4FKxVPLw9EuZN4L4WBIX6f+N2CZr5xzCbf2i+DzTyaCG6MDh5v/oBJj4IZlOhtpdACPV0G07g14/keemF6jsI8tDJepn6SvmrtfF1bAfk1/aTqsTkJUmL48P7+GtFxxzQ+oYmukDnwWgbkET40uENqYnkjDIfSm5rU1jXoWZeXQy4Bz/mK+qoGMIBGWIvRSI/tgHCuUG3rPu3F9tkJVhv6PLxIuWNNqlEf4ra2dzsf3fqUjMBnaY4h2TxKFNU2hGsUw+ffePDcBJlADtSTrWRboWVrZXzhzQF1eq5+p0YqnzIvWmrydo/f1OEyxF+eXhZ9rfkdru9MeqNO2k05f5Ob2ioTnICtdtzEYvBbNNI8= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(346002)(376002)(396003)(136003)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(36756003)(356005)(8936002)(81166007)(4326008)(6916009)(2906002)(5660300002)(6666004)(8676002)(70206006)(83380400001)(82740400003)(36860700001)(70586007)(40460700003)(7696005)(47076005)(54906003)(966005)(316002)(82310400005)(478600001)(336012)(41300700001)(40480700001)(2616005)(26005)(186003)(426003)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2023 14:31:53.7278 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd1b82e3-a5ce-4e35-31c4-08dafaf31415 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: CY4PEPF0000B8E8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6636 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable V4 delta changes: rebase to master branch. added reviewed-by. V3 delta changes: Addressed review comments from Abner chang. Re-arranged patch order. PR: https://github.com/tianocore/edk2/pull/3936 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