From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=helo; client-ip=104.47.40.48; helo=nam03-co1-obe.outbound.protection.outlook.com; envelope-from=leo.duran@amd.com; receiver=edk2-devel@lists.01.org Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0048.outbound.protection.outlook.com [104.47.40.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B855F20958BF5 for ; Wed, 4 Oct 2017 11:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=5tSB5KXfJ1cJnzs2cthP6mxgOVPeNKnS3oexkb32QnY=; b=pgS0YUAfwRWWLngJ5MO2yU6cQw2XsWcNSQLqgXtul74BdFzHEx0eqGT8JwabimLkAZ3xn4LzxkM1t6Fl2SHFh/qgmNJfozwP+XUzXK9OwimM8RhCFpKgbNyG2z0/Jgn0aiOg2JyBiKHyGrBs4bEjgKc/oUfANzXcaA9OTvjyPCI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by CY4PR12MB1237.namprd12.prod.outlook.com (10.168.167.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 4 Oct 2017 18:56:11 +0000 From: Leo Duran To: edk2-devel@lists.01.org Cc: Leo Duran , Jiewen Yao , Ruiyu Ni , Michael D Kinney , Jordan Justen , Liming Gao Date: Wed, 4 Oct 2017 13:55:57 -0500 Message-Id: <1507143357-18181-6-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507143357-18181-1-git-send-email-leo.duran@amd.com> References: <1507143357-18181-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR03CA0062.namprd03.prod.outlook.com (10.173.137.24) To CY4PR12MB1237.namprd12.prod.outlook.com (10.168.167.12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cb19fa39-c331-4a5f-d400-08d50b5994dd X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR12MB1237; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 3:ekA8roFdkOZ5yCGNJfhO96NUVCLVv025T2MRSBiqBVt4k7yge3EcoAtYLmZxpsVWlN8aMZLl0jJ5cRAp5YPNCZnAnNMsTQTYR6VLEEvvA3FSuZ4z62/3y89LpLbFc6gq+LQwYBEaTK9q4lfYAkaHGOqJcNiYz8rbzHeHdeNN3o0xeVFxx4dqhJCZPUlc0juFp3uHeTKOv3WhAiUGyi4O+JwO+mLOAevvuJeErRcQfqFQdemre9PtoyLbkCCqB6R7; 25:bYTG/1/PjaOxU8J3yjDB2Tdo2Jtv44zyagF9S9mkk7Eq97mG9IZhi7gpI9xTUDJyCquPrenhIbDy6eAmo6Cab2CVz2mIOYBVGZvrSfGbi7VvOUrmVnHsN+IFrJIBadptutiZQovHzWstzUx567GlGmvajI6hDag0y2bEVeDKoe2zD9Ru+hs8zpuBzoLOAwamSacIVLnj57RSDoYl1xwF06lKrhMpPxS8KkUzpYpWQudPBPqUKE1Ov0cU8A2jEGMpYlN6r+oQXiGLQFz087dpUy62LHV6gq1zD027tVeYLMpYeannK+g7fecVbpyVescoGZ9oVqVk5w+AhgB/jEF11A==; 31:nNPvjHMkLg7GiyT0V8D/eY9V1yZRafVlLqOE9mBdiMY2RzVF9ZQEePGhbF4Rk1LImHNfyg9Ic3nMq1RnwXzS0Rf3F8WgnJb4xNV8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sMMPpJbzJLF9qBF+tEovNA= X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(788757137089)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1237; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1237; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(199003)(189002)(478600001)(66066001)(16586007)(316002)(97736004)(6486002)(47776003)(50226002)(305945005)(36756003)(6666003)(2906002)(54906003)(189998001)(86362001)(53936002)(5003940100001)(101416001)(68736007)(50986999)(2950100002)(81166006)(50466002)(8676002)(48376002)(8936002)(53416004)(25786009)(2361001)(2351001)(33646002)(5660300001)(7736002)(6916009)(106356001)(6116002)(105586002)(3846002)(81156014)(4326008)(76176999)(16526018); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1237; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1237; 23:eZ7v5Y0FIwjK9zA5oTGuOdnl210ZTt4WFxI5BhJRg?= =?us-ascii?Q?+CVNZzxmuuYpYTk6PXacoFKnpPQeNh2CQflRBH8S0QHkXZ4qJd4O2e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JofSMugQcOrVgT30bWCPnKOKqJ/wNy1lxmUh0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 20:V3OLWJDYSyU9BOxN3H6kSmYsmOo187048sirJNLOZ4nLqVBNCaWHrgaapikkORvJK7cQo51F7GBF5TotT3XEFhj9nwcSPWWwf/eP4KZah80amPHmFDBXyug1N7y4msn7BMpWshjg5s9/i/+qJvxk4OuZs0Pcgam9nxvjFcHyeTy9P6cyZHe1+iRFO+HzdHPLbtShNLu6Q6uA4KYs4C0AVwXon+0Q8ILmY/dBuTBCjXkomZAs27iC4Ejz8FMfhAbq X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 18:56:11.1759 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1237 Subject: [PATCH v3 5/5] UefiCpuPkg/SmmCpuFeaturesLib: Use FixedPCD on non-STM library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Oct 2017 18:52:51 -0000 Content-Type: text/plain Consume a FixedPCD to replace Intel-specific macro. The new PCD will allow SMM support on AMD-based x86 systems. PcdCpuSmmSmramSaveStateMapOffset - SMRAM Save State Map Offset. Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Michael D Kinney Cc: Jordan Justen Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leo Duran --- UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c index 2d2bc6d..88f43b4 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c @@ -2,6 +2,8 @@ The CPU specific programming for PiSmmCpuDxeSmm module. Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2017, AMD Incorporated. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -224,7 +226,7 @@ SmmCpuFeaturesInitializeProcessor ( // // Configure SMBASE. // - CpuState = (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + SMRAM_SAVE_STATE_MAP_OFFSET); + CpuState = (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + FixedPcdGet16 (PcdCpuSmmSmramSaveStateMapOffset)); CpuState->x86.SMBASE = (UINT32)CpuHotPlugData->SmBase[CpuIndex]; // -- 2.7.4