From nobody Wed Dec 25 14:03:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507143761293719.9629772454016; Wed, 4 Oct 2017 12:02:41 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 70AB220945BC0; Wed, 4 Oct 2017 11:59:18 -0700 (PDT) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0063.outbound.protection.outlook.com [104.47.33.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8388621CF58DE for ; Wed, 4 Oct 2017 11:59:16 -0700 (PDT) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) 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 19:02:36 +0000 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=helo; client-ip=104.47.33.63; helo=nam01-bn3-obe.outbound.protection.outlook.com; envelope-from=leo.duran@amd.com; receiver=edk2-devel@lists.01.org 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=OaU0uy9QjG2qMsUWpJGZdxnTAUB7qFZSPqoq5cezzcg=; b=f8cIc6Kf62s7ormYHuHhD9htmti1kg38hE0VFIzX5Xit2Vc3IyHhzyrz4WmaO+X7fIz2JqifaiaZTnl5G4I3Vr2mU9JCWMQ/Eyf2ic7l2dDGwrRj8zZWAi7yE5TOXehS9ljFIY+i8c10rQ+pVDh9pA2/Xa6kSOM+LoEw0LWcAG4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: edk2-devel@lists.01.org Date: Wed, 4 Oct 2017 14:02:23 -0500 Message-Id: <1507143747-18377-2-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507143747-18377-1-git-send-email-leo.duran@amd.com> References: <1507143747-18377-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR1701CA0004.namprd17.prod.outlook.com (10.172.58.14) To MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8a4bc37f-293d-41cd-b453-08d50b5a7a1e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR12MB1246; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1246; 3:ekL+yT/zLvntM1ULEPCJ+Qr4q5KzuTlsoxWjUi4tg/1Y3hWzRxR/iCFKQYa9YkZaBK8a3fROklDmIRZ7PVa0FtH4fb+qLxSI/VdJJuatVD8zUmPA9GX2jrfc8kJPZJ1cUm6ALZ0dBRT7HtLR+lVAJbNUVurfdHXH+JyHEPBLO7XGcqT7EEtsasJ7sPlPWbZUGvFh+lVFL6VA//A6b7wWKBVgUE/GtzJfZwGtriF36BJV8z3sEossF/wf7/r2sTew; 25:4+wpynF9IpDbYotn2q3SBx2rAu9QRKCGBn09UPv+7uKZGsNnH+zqi1nKMs1oWB57bZl0I+ntleA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5sTM8WzAoeHH+LaW5Zf1jnDWa3mb; 4:ox+d/hCst6sVeajOzJR7ZNhsREyKxFKB6kTPqck4Qvjg6aprrU224H/2cVHYJMN+rxmgb2F8Z6jkW/KmUk+kywqjr6CxVUGo9/VlWL7M6zcUzFgTbKYoP8QgRFWRhGtRnym1eUPQBKiwGcYZ7QaOc1/8ct93LFo7PfiC3qMGVV+P1qXKNxvrAnReqWndZFpNuipydkDl5X3zL7OxGw9488MSYYx1lgY7UADKz72tGH8xvViM8TWJixwv1hlTLzbxe73bzkXAqRABx3U+HN/cT09ANyPNjiKKAX/VD6s9xwxNl+1fwuG4W7DJos2K2tderLWjn6Eo8lwNKOVcopQVAoMDHP78Id+t7ZTtpNMYAwk= 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1246; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1246; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(199003)(189002)(5003940100001)(48376002)(3846002)(76176999)(50986999)(47776003)(66066001)(68736007)(25786009)(86362001)(33646002)(478600001)(2950100002)(16526018)(50466002)(6916009)(2906002)(6486002)(7736002)(5660300001)(6116002)(101416001)(6666003)(2351001)(105586002)(36756003)(106356001)(53936002)(81166006)(16586007)(4326008)(54906003)(189998001)(81156014)(50226002)(8936002)(305945005)(2361001)(316002)(53416004)(8676002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1246; 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; MWHPR12MB1246; 23:VnEvcIkkUwu6jERAYi4X85gWb2yIjKGZKP2fzR9WY?= =?us-ascii?Q?rHR+Joj8Z8rDLBfXWW72xvcD3wMjA2gdZ6WGoMZrlO4bWi1taKemAZg/C4ti?= =?us-ascii?Q?lzFeaaZ4F64GygRyxlva3OGjbVj7rgFrgWB2lQVYj6u1sjC2whlhK4ryWSLN?= =?us-ascii?Q?EBjwnpfX/VxNHmpqbyz8iIAMnvjN86Hsze+ioCaH2Rt+xFK9da1k4Jm4lsmd?= =?us-ascii?Q?zqeUyzcYb9I24emKUv0A8OFWIpaRKF2zMCdx2ypvhpFbj+S5C9hMFoxa7srA?= =?us-ascii?Q?ZGVRH7K5dtyDtReL0NTSEh2hTnxB8TMMSDCisGk5nql1otc7BG+sh9b//YAQ?= =?us-ascii?Q?JK3+qxM7So53ZJKb6Flp8KX6eQfpLLyiHPAJ82KJ+NKgWDbMerkzFMcwL53G?= =?us-ascii?Q?wENvSZmWw2VCMXp/85k/TvmVSQum9JygUsvMSEUIEZce16PLcJWgVQF+WwDK?= =?us-ascii?Q?W0mu8FHzfrSfFUDWYT3P8GZvUffnZXkRgCWXn8UzuuOWW+X744rv/nJFGK94?= =?us-ascii?Q?FtA+K1Mc6JzAMEhGTLYA0x61TGHBuLdxbMmR7EctJo/Z/6vMkKhchMTaKy8+?= =?us-ascii?Q?Yb8hwQtEnTGAOZM3kkLAngjOLqRHqLE9/5AiqNY9VGwQqkHsCs78SivnksdO?= =?us-ascii?Q?Ta7qFzjrjaRPFSscK6SYRsD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QFFJ4//ORuQT7np0RCYKsFzT7hPfy7eDqumz4iEc+YgqCflnQGe4cA1Q==; 24:pwK7PbPeN/RIOfnZCya2bGz94DDErWNKD0tJcVnJXkzrfybDqwKyPtP0oaOksGQoaxGGFHpyKJoWPd4Vg+K9H2xPxCCxKbHIesJihVu9mEM=; 7:KXS+BN+IpajVpemhb+fBiUF598cAU5eQdByliLCdfMfCIsC08O0kgoj8hmCPjSW2mYv0QZcCJ11R3wO3yOegSoSouSm10XwBulecKm9tnFiQYZJf7aQ/Ab+R4LlzEQbGsHZ689wxFHQSlHAugo1zWuR+ITUcYp3KwAu/FrjLWwLkvSXXvCnqSlZJatRQU1uIT/vQ1fRbTbGaUV+cjm4VJvK/r7HxMpYUpIkhVAJopx0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1246; 20:LhVFkzhk5TR+R/yilKHyBWQ5zgzRxF3KKiAZJvGbeUdKIxZqvSrKZEXVj2Sjw9ome18udQuQUGkQf1CjtYpMkTcTKP7zo3y/1c9+dcJ6vTGzHotuZXzGUGfBxwngfJZ3snQvASBt20176vmpazMvWJK+0ulCeHQRw7BUZulIm2ogJ4ypSMENM1c/y1oGJlJbgn5JIg4pF23k9qSjurfF/ufLLn2GYrwNHE/hD/Z3Zok3LeThlckXHg9F3oDouAnX X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 19:02:36.1744 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1246 Subject: [edk2] [PATCH v4 1/5] UefiCpuPkg/UefiCpuPkg.dec: Create FixedPCDs for SMM support 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: , Cc: Ruiyu Ni , Jordan Justen , Liming Gao , Jiewen Yao , Michael D Kinney Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Introduce a couple of FixedPCDs to replace Intel-specific macros. The new PCDs will allow SMM support on AMD-based x86 systems. 1) PcdCpuSmmSmramSaveStateMapOffset - SMRAM Save State Map Offset. 2) PcdCpuSmmPSDOffset - Processor SMM Descriptor Offset in SMRAM. 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/UefiCpuPkg.dec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec index 3bd8740..c92c56e 100644 --- a/UefiCpuPkg/UefiCpuPkg.dec +++ b/UefiCpuPkg/UefiCpuPkg.dec @@ -2,6 +2,7 @@ # This Package provides UEFI compatible CPU modules and libraries. # # Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# # This program and the accompanying materials are licensed and made availa= ble under # the terms and conditions of the BSD License which accompanies this distr= ibution. @@ -204,6 +205,14 @@ # @Prompt If CPU features will be initialized during S3 resume. gUefiCpuPkgTokenSpaceGuid.PcdCpuFeaturesInitOnS3Resume|FALSE|BOOLEAN|0x0= 000001D =20 + ## Specifies the Offset of SMRAM Save State Map from SMBASE. + # @Prompt SMRAM Save State Map Offset. + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSmramSaveStateMapOffset|0xFC00|UINT16= |0x32132113 + + ## Specifies the PROCESSOR SMM DESCRIPTOR Offset in SMRAM. + # @Prompt SMRAM PSD Offset. + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmPSDOffset|0xFB00|UINT16|0x32132114 + [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] ## Specifies max supported number of Logical Processors. # @Prompt Configure max supported number of Logical Processors --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Wed Dec 25 14:03:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507143763755547.3461027025495; Wed, 4 Oct 2017 12:02:43 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B089120945BC7; Wed, 4 Oct 2017 11:59:19 -0700 (PDT) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0089.outbound.protection.outlook.com [104.47.33.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D71BE20945BB9 for ; Wed, 4 Oct 2017 11:59:17 -0700 (PDT) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) 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 19:02:37 +0000 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=helo; client-ip=104.47.33.89; helo=nam01-bn3-obe.outbound.protection.outlook.com; envelope-from=leo.duran@amd.com; receiver=edk2-devel@lists.01.org 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=/V4zS6gcS4j0G7So/ifNWqKvMW4c76iTJEw+WnnGPMU=; b=IrLK46zhrcCKEXd57h5r15slTVt0wTPANlUcCJYlXvo+MOiz9zHbxx+tPQ3PzaLN1Fjgn/E2S9YDprb3yivGzXlLLsCVvJs3HOO4HF/1f3CS5Q3/v+k8cX1eVI9a0EhBoUW7kITNiBOnYk1JGx/N2SnIMc1njdgJAVn3XNE42Ho= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: edk2-devel@lists.01.org Date: Wed, 4 Oct 2017 14:02:24 -0500 Message-Id: <1507143747-18377-3-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507143747-18377-1-git-send-email-leo.duran@amd.com> References: <1507143747-18377-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR1701CA0004.namprd17.prod.outlook.com (10.172.58.14) To MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 888f379e-3911-40f7-e8c5-08d50b5a7ab4 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR12MB1246; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1246; 3:15v+bvyiP41UfoIwRnnUZDNy/PKYHVIJchuseSYl1u7zn/mCYT4ChcuqCv7U2vexddfWIunKbUEW3L5R2ty2WAaTsDdY+sKDveaWIvbO5UKRvM7QM8KqqTew6iwI/x+6tt3IZpkeSs/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kkPoM3ALnM8Rot9yc3jvwAR7Q73sVVcPjp0vLH9oAUx1xpnbVhE37c8FPPyjdfreGNfDXcWnT3sOQ4vFkvZB4ZsZdYR6jXPd6bZBH1b7s+eFuRZZy/FDbiiTz2rL3jzrz5TR2NRtzn1qKqzeqZ9gbt7PjeeePWjl5U9pY48P1+HlBw1rrmYRnyImnnP7Z4yT13wxIHgKl2evpA; 4:ec8eq8elEeRGPtY+fnW5iwlsFKFvlUmrkRx9Oo69AxUnDwi4iNomAtxA8Z98zqCEBbQ5dIkbW2tjqy5gV14xGnfEe6CoKrCJz6blkVUficM+4rolgSwNiB1hmQqkrQcnOrJohdT52AmWWlmIRERPVMo7zfOXFDugMEioruH3wuAdfP0dqIBBTTO3Ig85DRG+hg+zNnGvPLPA2q2pfrGJN8pQlQAozd3AN0UHjvdVK7ykl0ijDi1y/5MlIaUEgBysiVdNWX/k7zX3cZGpN9ONsTZpyOct8H9xQZ1tHPsLKgTmq/wWaXu8PP70kYk/DrASA8/x4lsPAeCsvNtRG9Yo5aHyqerOVPh6kJtq7Yinv28= 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1246; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1246; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6029001)(376002)(39860400002)(346002)(199003)(189002)(5003940100001)(48376002)(3846002)(76176999)(50986999)(47776003)(66066001)(68736007)(25786009)(86362001)(33646002)(478600001)(2950100002)(16526018)(50466002)(6916009)(2906002)(6486002)(7736002)(5660300001)(6116002)(101416001)(6666003)(2351001)(105586002)(36756003)(106356001)(53936002)(81166006)(16586007)(4326008)(54906003)(189998001)(81156014)(50226002)(8936002)(305945005)(2361001)(316002)(53416004)(8676002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1246; 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; MWHPR12MB1246; 23:fw4Ukx/eD+9rrRZ4IxozxPSQISovh4Kuy/KCvjq7X?= =?us-ascii?Q?PG5TWGAW2Jdo4tGI5P1mwOWJ8YDXC5Ts7spOOWe1Xajz2EWiYTml8G7Qwiu6?= =?us-ascii?Q?a7jutnaBMBgbQEPmoY3ALdk194e1kGUylKxc/35FyEi+MaqiM4K1ruBlRbNQ?= =?us-ascii?Q?uIYJGzTp63W6j90+Ud5iNZgQDho3xkpgEw0bUW9JP7JLQfHyond9Kq7ZPCa0?= =?us-ascii?Q?LowuW5Bvmi9rnZNQpy+fAFgAD+nALjPD97oIfVlAOnpVgxNCKoXKSOfdc/5/?= =?us-ascii?Q?i+zss/TbPnndqD34Rd5iiowjBETMZBpK4onHaEFBZjHZInGj1rq+z06SC9DP?= =?us-ascii?Q?ymzMmdH3C1L5JzbtEFyhXKgEd1akS9IlC3jxroSeUjF3DmcAxgqp/YlfmL1H?= =?us-ascii?Q?nPONY1qisWvsJbww7x03YjGX86y9fmSFwMrJcISLDcRCR7ysZJ9pSnHFTht4?= =?us-ascii?Q?S2eYeEoskPccF6nUHyqCcCP1HWSSmgpgoMSiVi2BkXYpMLn7PGgapy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4ecM6sIsq+OM0o1MN9b4TznsCzN9OqHj+q4+DoR7X1khV2D5hqvlxv/VqBleKyFif0UHwnJxeflfsvLovgc/lqjZwFqg4k3gjDyB8IAYlKh8/w==; 5:GZB/ynq8gtk+yA7fXcpJ33riS0f1gKUSps3DPX4EJtTp29PR30fukc93/euWEpzheEXf62wUmdGyJa5sqnKFiXZyGI7U0zR3UrANPYvG9TC/h5GqJ3Ww3mS3m7xni+MQGPEonwcCBMgsDvVbD4St2g==; 24:uuAOA/K06iVbMfFanGHa12k43l642FmQam5o/5FBSvDtjQUWVHXOkaIOzW6hyrE+Cjmea3lm4QSlBaFqzDJqL1zJiMg8L/KxPAbiIqg/uCM=; 7:rlOtorIwE1YvmYPsPE+V8Rn0dzif+WHE2stiFoLpB5kWtQHVzpnvLc2UknsA73x8mZv37Ipg7fFsEeQd8IP+YbpxVNqParn7Wl7lDmVKGUp0tgVPeutBleLo7AnEDs740RjARl7NHAXYlDH0abnzMKvhhbQvoMUeUHs26UoB45+qAE/b3VpoNGfHXRnNIB0wCElXTcW0aiBqQeL9pODLB+0Wc/2ur0JyDyjlTGTw+m4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1246; 20:NmARshL2CdBC9BqHqQyfHYcOm1BQy5qOsSpJdWBM7rYm3pV9yaZM1DnuRFXUz/KIZ4pBAT52PZ9iUJ0HHpy/3R8kyYisMr2yjTZa6ijU8BJKAGA7a95oEddIQjaWwh+6ZfzM6nt5W4qkLk5mRlrpCzry+jXa2hJWUUW4Vny/VTQihgoRn+Yz6Bhj/g9BA4OPyEz8x3dt+CVNejc+bxF1XTE+dG+a5b2O9Yg32VXInnWhNW8dSVuf1BkItDHH4Wiv X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 19:02:37.1431 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1246 Subject: [edk2] [PATCH v4 2/5] UefiCpuPkg/PiSmmCpuDxeSmm: Consume FixedPCDs to enhance SMM support 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: , Cc: Ruiyu Ni , Jordan Justen , Liming Gao , Jiewen Yao , Michael D Kinney Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Consume a couple of FixedPCDs to replace Intel-specific macros. The new PCDs will allow SMM support on AMD-based x86 systems. 1) PcdCpuSmmSmramSaveStateMapOffset - SMRAM Save State Map Offset. 2) PcdCpuSmmPSDOffset - Processor SMM Descriptor Offset in SMRAM. 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/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf b/UefiCpuPkg/PiSm= mCpuDxeSmm/PiSmmCpuDxeSmm.inf index 099792e..bf237f7 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf @@ -147,6 +147,10 @@ gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmProfileRingBuffer ## CONS= UMES gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmFeatureControlMsrLock ## CONS= UMES =20 +[FixedPcd] + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSmramSaveStateMapOffset ## CONS= UMES + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmPSDOffset ## CONS= UMES + [Pcd] gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## SOME= TIMES_CONSUMES gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmProfileSize ## SOME= TIMES_CONSUMES --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Wed Dec 25 14:03:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507143766331825.6991979185763; Wed, 4 Oct 2017 12:02:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EB61820958BF5; Wed, 4 Oct 2017 11:59:19 -0700 (PDT) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0089.outbound.protection.outlook.com [104.47.33.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6472E20945BB9 for ; Wed, 4 Oct 2017 11:59:18 -0700 (PDT) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) 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 19:02:37 +0000 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=helo; client-ip=104.47.33.89; helo=nam01-bn3-obe.outbound.protection.outlook.com; envelope-from=leo.duran@amd.com; receiver=edk2-devel@lists.01.org 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=x8UcfJP35nBVmlD1Vk7waL3cU103mtuWx/5F9ZGSjKI=; b=qxho4Iy4BiUa8I1T1QRU1Z2xBL4gE7YJzNjWh4cCZO0JsGya0voiMUJit3O8EBMH9gyZQVkxdCT1n3952bcwnLbdcnQF03Q67OLJRfD1hDGkPGRL+vEDJh+qEEY5YydqpTjeOZQ4C5P7Qv1AObpItzsuXzt61Joxfy45MYlMBio= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: edk2-devel@lists.01.org Date: Wed, 4 Oct 2017 14:02:25 -0500 Message-Id: <1507143747-18377-4-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507143747-18377-1-git-send-email-leo.duran@amd.com> References: <1507143747-18377-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR1701CA0004.namprd17.prod.outlook.com (10.172.58.14) To MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cba06744-2c44-49e0-59df-08d50b5a7b27 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR12MB1246; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1246; 3:UCiC8vBq7NxEZyxy9Hixs61IEdr+PeoknzDshPNNWL4e3BpmGeg53Kuv/ZCsd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slEMQGtjb98NtM0Vp+ztoUVi5jS28jCYafS6pgW9tQQnO1hCoGgCxFRIRjq/wnzRZC9EGFSBCM7VmFd8vdS11o6G4jqls9za0XqHk0PbzgZjdnAkdAOZ3OfzkpD8nIUsmOPIlaly0X7blVoqZ/7Z2AnRdAfg+ZjXwtez1QUlc+o+xDfCpIoSlZEewzAF6HPW5nxuAFIIrbcu7wmCv3JRnaOx/fpPPB1e8T0lZR5Deqmx8Y9ts6CacJBez5BSE/haXLvYtiOQZwz8HSV9f6NTcXK+YXAUblAGK50; 4:fhsWtvVnAG+zYTkJSMH3i0dLRXqcjM+3qP3zhSNFS9UBxrl/TZ4EueDRH9x49xutnFmOdWFFDeTeaxhPFxLWbtsYLq+s0Y0iIuGTtkiMkw6r8TERv+57lZkCu7qBR2VoE8j/KbE/hh1kMB0WVNoJa3olZPr7Pv/Po6xDi6sy8qrDLJJtM6riuSBj56BN45tzaGxTR7+TC/OjK4pFj2aqvwv331zPGr0PlKkdtmECJBbOmYmjSHAdGo2rn71Z4BFkEV5Pf0phfoktDeJdX1bMvj4UAnqXtEOqCBSj6STz5Wum0tWSZmjCSebzQ4Z2exXDSGbTvyAQNhZ423e/dMlG98508eV552LWZxdxKk7GK/0= 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1246; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1246; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6029001)(376002)(39860400002)(346002)(199003)(189002)(5003940100001)(48376002)(3846002)(76176999)(50986999)(47776003)(66066001)(68736007)(25786009)(86362001)(33646002)(478600001)(2950100002)(16526018)(50466002)(6916009)(2906002)(6486002)(7736002)(5660300001)(6116002)(101416001)(6666003)(2351001)(105586002)(36756003)(106356001)(53936002)(81166006)(16586007)(4326008)(54906003)(189998001)(81156014)(50226002)(8936002)(305945005)(2361001)(316002)(53416004)(8676002)(97736004)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1246; 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; MWHPR12MB1246; 23:4a6WFdUCEXQIQWbtAcYDJn6Da8zJ3k0Xp2N1NVbSo?= =?us-ascii?Q?IIsLswBbZnzSC98WjLKwonJ/ArWY3eVHYRZeNXxnBCezVmztemhHhknRIzKz?= =?us-ascii?Q?EvLvPk1nqyYEDvbjfNCnsEtlNxIEYlFQam0eevWlpksFyQcBY69OoJ+GrOwn?= =?us-ascii?Q?eHxw9P/+FLhkVPC/xR7Tmqb/8dJkVf8NV/xY560K7wzPaCho75aM7NhuxRTM?= =?us-ascii?Q?xAaTXoxwhzLjjaWK1+Fwz6TxHIDUYQvyeb6xfgedSP7P8tlw0FuBShBHzeBH?= =?us-ascii?Q?9KG7LqAN4lYPkwhwkTr9FzgSn3YmcX/p2tfOMswA58k0S418iAKF/22PFix6?= =?us-ascii?Q?7XT2jskpBt4st8nT8lCRJ/SYoKFZbxaCjQS63a5iG/RF+i28s80G4VU/9sRK?= =?us-ascii?Q?E0VKrSUnERUa25OqjKCmtVBEM7uSakG/Faw4umzesyZi+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0/sU X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 19:02:37.9244 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1246 Subject: [edk2] [PATCH v4 3/5] UefiCpuPkg/PiSmmCpuDxeSmm: Use FixedPCDs to enhance SMM support 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: , Cc: Ruiyu Ni , Jordan Justen , Liming Gao , Jiewen Yao , Michael D Kinney Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Consume a couple of FixedPCDs to replace Intel-specific macros. The new PCDs will allow SMM support on AMD-based x86 systems. 1) PcdCpuSmmSmramSaveStateMapOffset - SMRAM Save State Map Offset. 2) PcdCpuSmmPSDOffset - Processor SMM Descriptor Offset in SMRAM. 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/PiSmmCpuDxeSmm/Ia32/Semaphore.c | 4 +++- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S | 4 +++- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm | 4 +++- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm | 4 +++- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 10 +++++----- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 2 -- UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 4 +++- UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 4 +++- UefiCpuPkg/PiSmmCpuDxeSmm/X64/Semaphore.c | 4 +++- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.S | 4 +++- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.asm | 4 +++- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm | 4 +++- 12 files changed, 35 insertions(+), 17 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Semaphore.c b/UefiCpuPkg/PiSmmC= puDxeSmm/Ia32/Semaphore.c index 02a866b..cc2624e 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Semaphore.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Semaphore.c @@ -3,6 +3,8 @@ Semaphore mechanism to indicate to the BSP that an AP has e= xited SMM after SMBASE relocation. =20 Copyright (c) 2009 - 2015, 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 @@ -38,7 +40,7 @@ SemaphoreHook ( =20 mRebasedFlag =3D RebasedFlag; =20 - CpuState =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + SMRAM_= SAVE_STATE_MAP_OFFSET); + CpuState =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + FixedP= cdGet16 (PcdCpuSmmSmramSaveStateMapOffset)); mSmmRelocationOriginalAddress =3D (UINTN)HookReturnFromSmm ( CpuIndex, CpuState, diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S b/UefiCpuPkg/PiSmmCp= uDxeSmm/Ia32/SmiEntry.S index 3243a91..25af6e7 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S @@ -1,6 +1,8 @@ #-------------------------------------------------------------------------= ----- # # Copyright (c) 2009 - 2017, 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 BS= D License # which accompanies this distribution. The full text of the license may b= e found at @@ -35,7 +37,7 @@ ASM_GLOBAL ASM_PFX(gSmiHandlerIdtr) # # Constants relating to PROCESSOR_SMM_DESCRIPTOR # -.equ DSC_OFFSET, 0xfb00 +.equ DSC_OFFSET, (FixedPcdGet16 (PcdCpuSmmPSDOffset)) .equ DSC_GDTPTR, 0x30 .equ DSC_GDTSIZ, 0x38 .equ DSC_CS, 14 diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm b/UefiCpuPkg/PiSmm= CpuDxeSmm/Ia32/SmiEntry.asm index 8296f36..f526778 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm @@ -1,5 +1,7 @@ ;-------------------------------------------------------------------------= ----- ; ; Copyright (c) 2009 - 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 BS= D License ; which accompanies this distribution. The full text of the license may b= e found at @@ -29,7 +31,7 @@ MSR_EFER_XD EQU 0800h ; ; Constants relating to PROCESSOR_SMM_DESCRIPTOR ; -DSC_OFFSET EQU 0fb00h +DSC_OFFSET EQU (FixedPcdGet16 (PcdCpuSmmPSDOffset)) DSC_GDTPTR EQU 30h DSC_GDTSIZ EQU 38h DSC_CS EQU 14 diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm b/UefiCpuPkg/PiSm= mCpuDxeSmm/Ia32/SmiEntry.nasm index 4d2383f..9092dcc 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm @@ -1,5 +1,7 @@ ;-------------------------------------------------------------------------= ----- ; ; Copyright (c) 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 BS= D License ; which accompanies this distribution. The full text of the license may b= e found at @@ -25,7 +27,7 @@ ; ; Constants relating to PROCESSOR_SMM_DESCRIPTOR ; -%define DSC_OFFSET 0xfb00 +%define DSC_OFFSET (FixedPcdGet16 (PcdCpuSmmPSDOffset)) %define DSC_GDTPTR 0x30 %define DSC_GDTSIZ 0x38 %define DSC_CS 14 diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmC= puDxeSmm/PiSmmCpuDxeSmm.c index 282d2e6..b2a941e 100755 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -407,7 +407,7 @@ SmmRelocateBases ( gcSmiInitGdtr.Limit =3D gcSmiGdtr.Limit; =20 U8Ptr =3D (UINT8*)(UINTN)(SMM_DEFAULT_SMBASE + SMM_HANDLER_OFFSET); - CpuStatePtr =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + SMR= AM_SAVE_STATE_MAP_OFFSET); + CpuStatePtr =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + Fix= edPcdGet16 (PcdCpuSmmSmramSaveStateMapOffset)); =20 // // Backup original contents at address 0x38000 @@ -707,12 +707,12 @@ PiCpuSmmEntry ( =20 // // Compute tile size of buffer required to hold the CPU SMRAM Save State= Map, extra CPU - // specific context start starts at SMBASE + SMM_PSD_OFFSET, and the SMI= entry point. + // specific context start starts at SMBASE + PcdCpuSmmPSDOffset, and the= SMI entry point. // This size is rounded up to nearest power of 2. // TileCodeSize =3D GetSmiHandlerSize (); TileCodeSize =3D ALIGN_VALUE(TileCodeSize, SIZE_4KB); - TileDataSize =3D (SMRAM_SAVE_STATE_MAP_OFFSET - SMM_PSD_OFFSET) + sizeof= (SMRAM_SAVE_STATE_MAP); + TileDataSize =3D (FixedPcdGet16 (PcdCpuSmmSmramSaveStateMapOffset) - Fix= edPcdGet16 (PcdCpuSmmPSDOffset)) + sizeof (SMRAM_SAVE_STATE_MAP); TileDataSize =3D ALIGN_VALUE(TileDataSize, SIZE_4KB); TileSize =3D TileDataSize + TileCodeSize - 1; TileSize =3D 2 * GetPowerOfTwo32 ((UINT32)TileSize); @@ -725,7 +725,7 @@ PiCpuSmmEntry ( // the SMI Handler size must be reduced or the size of the extra CPU spe= cific // context must be reduced. // - ASSERT (TileSize <=3D (SMRAM_SAVE_STATE_MAP_OFFSET + sizeof (SMRAM_SAVE_= STATE_MAP) - SMM_HANDLER_OFFSET)); + ASSERT (TileSize <=3D (FixedPcdGet16 (PcdCpuSmmSmramSaveStateMapOffset) = + sizeof (SMRAM_SAVE_STATE_MAP) - SMM_HANDLER_OFFSET)); =20 // // Allocate buffer for all of the tiles. @@ -783,7 +783,7 @@ PiCpuSmmEntry ( for (Index =3D 0; Index < mMaxNumberOfCpus; Index++) { mCpuHotPlugData.SmBase[Index] =3D (UINTN)Buffer + Index * Til= eSize - SMM_HANDLER_OFFSET; gSmmCpuPrivate->CpuSaveStateSize[Index] =3D sizeof(SMRAM_SAVE_STATE_MA= P); - gSmmCpuPrivate->CpuSaveState[Index] =3D (VOID *)(mCpuHotPlugData.S= mBase[Index] + SMRAM_SAVE_STATE_MAP_OFFSET); + gSmmCpuPrivate->CpuSaveState[Index] =3D (VOID *)(mCpuHotPlugData.S= mBase[Index] + FixedPcdGet16 (PcdCpuSmmSmramSaveStateMapOffset)); gSmmCpuPrivate->Operation[Index] =3D SmmCpuNone; =20 if (Index < mNumberOfCpus) { diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmC= puDxeSmm/PiSmmCpuDxeSmm.h index 1cf85c1..31e4f53 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h @@ -360,8 +360,6 @@ typedef struct { UINT32 MsrIndex; } MP_MSR_LOCK; =20 -#define SMM_PSD_OFFSET 0xfb00 - /// /// All global semaphores' pointer /// diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c b/UefiCpuPk= g/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c index 3ad5256..147b694 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c @@ -1,6 +1,8 @@ /** @file =20 Copyright (c) 2016 - 2017, 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 @@ -703,7 +705,7 @@ PatchSmmSaveStateMap ( =20 TileCodeSize =3D GetSmiHandlerSize (); TileCodeSize =3D ALIGN_VALUE(TileCodeSize, SIZE_4KB); - TileDataSize =3D (SMRAM_SAVE_STATE_MAP_OFFSET - SMM_PSD_OFFSET) + sizeof= (SMRAM_SAVE_STATE_MAP); + TileDataSize =3D (FixedPcdGet16 (PcdCpuSmmSmramSaveStateMapOffset) - Fix= edPcdGet16 (PcdCpuSmmPSDOffset)) + sizeof (SMRAM_SAVE_STATE_MAP); TileDataSize =3D ALIGN_VALUE(TileDataSize, SIZE_4KB); TileSize =3D TileDataSize + TileCodeSize - 1; TileSize =3D 2 * GetPowerOfTwo32 ((UINT32)TileSize); diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c b/UefiCpuPkg/PiSmmC= puDxeSmm/SmramSaveState.c index 3188d43..d59b9a0 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c @@ -2,6 +2,8 @@ Provides services to access SMRAM Save State Map =20 Copyright (c) 2010 - 2017, 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 @@ -690,7 +692,7 @@ InstallSmiHandler ( // // Initialize PROCESSOR_SMM_DESCRIPTOR // - Psd =3D (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)((UINTN)SmBase + SMM_PSD_OFF= SET); + Psd =3D (PROCESSOR_SMM_DESCRIPTOR *)(VOID *)((UINTN)SmBase + FixedPcdGet= 16 (PcdCpuSmmPSDOffset)); CopyMem (Psd, &gcPsd, sizeof (gcPsd)); Psd->SmmGdtPtr =3D (UINT64)GdtBase; Psd->SmmGdtSize =3D (UINT32)GdtSize; diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/Semaphore.c b/UefiCpuPkg/PiSmmCp= uDxeSmm/X64/Semaphore.c index 6dbcb08..e74bb69 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/Semaphore.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/Semaphore.c @@ -3,6 +3,8 @@ Semaphore mechanism to indicate to the BSP that an AP has e= xited SMM after SMBASE relocation. =20 Copyright (c) 2009 - 2015, 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 @@ -51,7 +53,7 @@ SemaphoreHook ( mRebasedFlag =3D RebasedFlag; mRebasedFlagAddr32 =3D (UINT32)(UINTN)mRebasedFlag; =20 - CpuState =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + SMRAM_= SAVE_STATE_MAP_OFFSET); + CpuState =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + FixedP= cdGet16 (PcdCpuSmmSmramSaveStateMapOffset)); mSmmRelocationOriginalAddress =3D HookReturnFromSmm ( CpuIndex, CpuState, diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.S b/UefiCpuPkg/PiSmmCpu= DxeSmm/X64/SmiEntry.S index 600d862..ebea477 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.S +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.S @@ -1,6 +1,8 @@ #-------------------------------------------------------------------------= ----- # # Copyright (c) 2009 - 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 BS= D License # which accompanies this distribution. The full text of the license may b= e found at @@ -34,7 +36,7 @@ ASM_GLOBAL ASM_PFX(gSmiHandlerIdtr) # # Constants relating to PROCESSOR_SMM_DESCRIPTOR # -.equ DSC_OFFSET, 0xfb00 +.equ DSC_OFFSET, (FixedPcdGet16 (PcdCpuSmmPSDOffset)) .equ DSC_GDTPTR, 0x30 .equ DSC_GDTSIZ, 0x38 .equ DSC_CS, 14 diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.asm b/UefiCpuPkg/PiSmmC= puDxeSmm/X64/SmiEntry.asm index c74f82a..ff46838 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.asm +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.asm @@ -1,5 +1,7 @@ ;-------------------------------------------------------------------------= ----- ; ; Copyright (c) 2009 - 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 BS= D License ; which accompanies this distribution. The full text of the license may b= e found at @@ -39,7 +41,7 @@ MSR_EFER_XD EQU 0800h ; ; Constants relating to PROCESSOR_SMM_DESCRIPTOR ; -DSC_OFFSET EQU 0fb00h +DSC_OFFSET EQU (FixedPcdGet16 (PcdCpuSmmPSDOffset)) DSC_GDTPTR EQU 30h DSC_GDTSIZ EQU 38h DSC_CS EQU 14 diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm b/UefiCpuPkg/PiSmm= CpuDxeSmm/X64/SmiEntry.nasm index c3c094f..f55da9b 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm @@ -1,5 +1,7 @@ ;-------------------------------------------------------------------------= ----- ; ; Copyright (c) 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 BS= D License ; which accompanies this distribution. The full text of the license may b= e found at @@ -29,7 +31,7 @@ ; ; Constants relating to PROCESSOR_SMM_DESCRIPTOR ; -%define DSC_OFFSET 0xfb00 +%define DSC_OFFSET (FixedPcdGet16 (PcdCpuSmmPSDOffset)) %define DSC_GDTPTR 0x30 %define DSC_GDTSIZ 0x38 %define DSC_CS 14 --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Wed Dec 25 14:03:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507143770664802.7870851157937; Wed, 4 Oct 2017 12:02:50 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 559222095E529; Wed, 4 Oct 2017 11:59:21 -0700 (PDT) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0089.outbound.protection.outlook.com [104.47.33.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4572F21CF58DF for ; Wed, 4 Oct 2017 11:59:19 -0700 (PDT) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) 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 19:02:38 +0000 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=helo; client-ip=104.47.33.89; helo=nam01-bn3-obe.outbound.protection.outlook.com; envelope-from=leo.duran@amd.com; receiver=edk2-devel@lists.01.org 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=JjggMK9DKTh/r2FYuPhdALLtEs14jNhkM2McMOLFJWY=; b=3wEhLNVSOgMSya8OfaskM7bTbpXPmmdHeQw8B8JKxxRlT8tfT7s1kqUkxwy2oDBCvyJEn6wGhq/6+/KDGlGT1agfRih6L8akzNeJatFN34o43eGxyAi0xbYg1kQOyEhW562/TjJp8THjAjoeuWNzSzTWIbtNHSZ26SuUuU38Fmk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: edk2-devel@lists.01.org Date: Wed, 4 Oct 2017 14:02:26 -0500 Message-Id: <1507143747-18377-5-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507143747-18377-1-git-send-email-leo.duran@amd.com> References: <1507143747-18377-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR1701CA0004.namprd17.prod.outlook.com (10.172.58.14) To MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98d3fb1f-068f-4c03-a288-08d50b5a7bb1 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR12MB1246; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1246; 3:uYrc6oPE2DHvr3FEx/U/UEieGkVf0zdRCO2GOqGGd8Y/htEtimSvUMOa4zvYiPj2hteqBrnZRTNaePe6fZp1BThhx3JFIrTGgZ45id0CvayF0xyqlIAeCGtv04Z54Kdq65sXTIWGEWIwgAZuq8qD88FzqKbAsi5PaugWdqvg1gbXWBHNUV0NJfQ4f3rpZggWd+bMQrFz6mJWd9NoRF4FKnLnwIKwiSS762i7shFNyiMtSAPB79cztmSZNYMqzfVN; 25:RlgixO9R/LurQqVbDlACJIpHDBl2mNhStuZb86SRwDy5ruMeEM2HoEpC8Aukrq8zexyXO0fmXtiwc5ogrFXQkac/Ahz+hCXAgxhoiYs2iGEcYtdRjkb+SXAwBaR1TwOrFBGvxANCdodIt790eE6x3tW482jtlTM0geYjEO5rLO8p5Q4vNpJIsJSjDm2Gd/Z1m58+KgxbAyASDqpw3BmMsyJovhePuc+V7+19ydn+B02PBFw1RvWaAqjTIz9xOSHcPZYf/fjmX3GgNSQReeK6MgvTcZitWkFSDtt1OGTHkvTjOHpVBk45v4I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tTxY2nBiPjVA1AwkHVL12OUuoFU/loc2je7U3SZ9rHF81AD+35WuwKU7+/Yc49Wy2UCbdhjDrRxCObaxEpsaoqAMrIXv07HzjyWQ6J0u3ufHpIzJturNQOcDnnhG2hmA2Ac/lYAEGC5k= 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1246; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1246; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(199003)(189002)(5003940100001)(48376002)(3846002)(76176999)(50986999)(47776003)(66066001)(68736007)(25786009)(86362001)(33646002)(478600001)(2950100002)(16526018)(50466002)(6916009)(2906002)(6486002)(7736002)(5660300001)(6116002)(101416001)(6666003)(2351001)(105586002)(36756003)(106356001)(53936002)(81166006)(16586007)(4326008)(54906003)(189998001)(81156014)(50226002)(8936002)(305945005)(2361001)(316002)(53416004)(8676002)(97736004)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1246; 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; MW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mo2lFot74lypZvIJRB0xGLI+mwc7zjjondMVBlBq2SeaxHO63Lr04UKCqO1CQ2MOXVO3T+acmb0ngPa6wcvW8L6OHmb6mPVjWHiYHy2714mvaBCaasDT07VPSxJ+zJ7iJNeh9W9kXh291YlVkGGGK6L5zdzcqF5y5Gkv4Y0j3N+VhmqEqZhQxq5my3iXspI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1246; 20:PPuI4Fg8ilStxzAeiRbyug39Wco8LI8Xxlqv/CInZV78q+yVAPRQngn07wE2+QQLHM+mF70TU3GbEZF4kbF2+i8pYUnneEjnmFbf95wizgyinLW/CZrNn5ZqwPBhTv17dXG1+Dnz6XZv39tMRybE5DZdpfoYkedj2qYuQ70wO6HPYRcFpJFfw81ynDAE5+WJC2FszLhizcHkaYYeApP9m/XfCHAUmvVtIGhwSPsfYMrnbWjPNJuqPDuuMd1EMSeh X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 19:02:38.8306 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1246 Subject: [edk2] [PATCH v4 4/5] UefiCpuPkg/SmmCpuFeaturesLib: Consume FixedPCD to enhance SMM support 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: , Cc: Ruiyu Ni , Jordan Justen , Liming Gao , Jiewen Yao , Michael D Kinney Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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.inf | 5 +++++ UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf b/U= efiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf index 77908b0..1be2671 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf @@ -2,6 +2,8 @@ # The CPU specific programming for PiSmmCpuDxeSmm module. # # Copyright (c) 2009 - 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 B= SD License # which accompanies this distribution. The full text of the license may = be found at @@ -36,5 +38,8 @@ MemoryAllocationLib DebugLib =20 +[FixedPcd] + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSmramSaveStateMapOffset ## CONS= UMES + [Pcd] gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## SOME= TIMES_CONSUMES diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf = b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf index db8dcdc..a91e9ed 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf @@ -3,6 +3,8 @@ # is included. # # Copyright (c) 2009 - 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 B= SD License # which accompanies this distribution. The full text of the license may = be found at @@ -78,6 +80,9 @@ gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## System= Table gEfiAcpi10TableGuid ## SOMETIMES_CONSUMES ## System= Table =20 +[FixedPcd] + gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSmramSaveStateMapOffset ## CONS= UMES + [Pcd] gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## SOME= TIMES_CONSUMES gUefiCpuPkgTokenSpaceGuid.PcdCpuMsegSize ## SOME= TIMES_CONSUMES --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Wed Dec 25 14:03:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507143773999152.8133033755388; Wed, 4 Oct 2017 12:02:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 955F520945BB9; Wed, 4 Oct 2017 11:59:23 -0700 (PDT) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0066.outbound.protection.outlook.com [104.47.33.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B298821CF58DE for ; Wed, 4 Oct 2017 11:59:21 -0700 (PDT) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) 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 19:02:39 +0000 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=helo; client-ip=104.47.33.66; helo=nam01-bn3-obe.outbound.protection.outlook.com; envelope-from=leo.duran@amd.com; receiver=edk2-devel@lists.01.org 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=ijGYl+N1+0aQn7P4N2wIPhMiAQ3YbG+5IVyXrwX15SwojVyx/4rUqewMWDpl0472a6FqhSOnauoyAcV26nsnrhS4xFYwncp6kWxzGtBsH7J02/eGjI4mHuL5fdWAxXKNWRO1Y6vm7x8kxOi1z9VSi4WG1wub5YCl1XCZyvZgoIc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; From: Leo Duran To: edk2-devel@lists.01.org Date: Wed, 4 Oct 2017 14:02:27 -0500 Message-Id: <1507143747-18377-6-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507143747-18377-1-git-send-email-leo.duran@amd.com> References: <1507143747-18377-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR1701CA0004.namprd17.prod.outlook.com (10.172.58.14) To MWHPR12MB1246.namprd12.prod.outlook.com (10.169.204.150) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8c1c0d80-e37d-4d71-afe9-08d50b5a7c40 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR12MB1246; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1246; 3:E6FFpacRa0MK0doY/QBPiluQAGYO6rw364z4tojne//CBDG9MoYYkgUd4iwTJVvUNzfk2n9N6mSgN6mIDge6optEpbRlFz72r9GKmLhKAIqmxGqy3c+z+P0t4WpQV/J8dTOL1ERNWeve+zUaJ2plsDImNIMBUHw2FH8Hp9EpFmsaDwGH1jxgDajJzckWOEIvcuPdk4SaK/n1qZAfhZy+ZIQkbxz2lHRRrEhaj6RqXkC2TI9z9ZoDBummh1Fd1nC2; 25:/PlBU+bBjINMMDTPcsxGCzYI4Sc7CSjUdRLkrBQ4sS4J3AC9GtSnko7UH3Y4iuDuc9GTrkcGLmdexVBBaj6ym9Mju4OwmVP8GngiVLLonMoIWqIJhg9e8NwXSOHj5fsBKBSeZCFOWNXZh5urmTC22ag+PB+FuAehgDsTfZxypDSQ80Y7DlvEz8ZF20lWQCxmo1PqqcEwfO6V/kRfkaGFXpZqp6sHGGdBPOEoomcQEXj8O+dkmCfe73zcbRqa1tC8B5zsqMJhIMGpB56SOy00dV0NeKdWAXKvHgEbJsvVh8qqceSIzl+r+ucYceIxUCWK8aTrLGU3azU25hf3XxYC/g==; 31:JsKFgsKR4AwgAsG7cIECBwhLTJzCpFv1WFl/iobxvg3thx6kTqnBqCMBGziFhPAT0TDQXCvurld4z51Te9Fdb196e2fd1qmWudl10eNyWto/AYg6G+wr0yFijD+wijCx7kOrCB3hYxMsTvCrT5YmNc8SZ+9+V2HqRaUKGd3/uLXobE81UNmJM28/a3CBxGStPs6cJjqziUzIObo/32+Kl5QEVPufIm4Tep+utXvbsNU= X-MS-TrafficTypeDiagnostic: MWHPR12MB1246: X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1246; 20:bwXHmx7jQ3J9iP55hl1OLr2JLKyDfiXzFHvtJSDC84jMJmkL0D5sfifWeUjUK/8Mjf6bstvm7BAMuRC8M1ogcgGvyXuxemv/ErC2BDUOv4JV+R23JXjUMrFul5IjCJlQvz7NenMBKL4qONSkSaicWRdLo9b4Ol0P960l44Jy1Ra/zsG/KHBpJSydmMKBxxB0U8VnGLHadwz6Xyb+UggYsmsPi8E2SwQ4CTGqMUORjKMr5o081jcYQAfL1JDE+f/CFHJbMXRURZMvxYhoTg+5mxvQCtylaOzYJcE8ND6ePwimEX+d1YtwGy+GuXm4rDDJJQ4j4r34pNLKsbVnI3QoAppieDcm9N0Tmo6STUvHn3JrtCwweOX/M6xyttDFNqLVsTUHT+U9Zaa1fh/tXR0FhX3mz+9x97m8W9m+v73ZFGuwyghN18WjWBcy/0zrp7fPZx7AhSLLT3RnZO+hEfTbeErzpTPYuV7S7BhMi2HNvVaaXHCXjTSAuI2sBdQcwd94; 4:ipbsS9EfsHgyK1sHHHgrOkGAxP0PSyOb6BqBphi6A2RgBjCxhV1eVj4G26uKeOlSvsLMZ0ctF8UEgkwP7MmeJf5C9dXVgVHiZiyuTRWSSuiYwJUax7LA8m4g/y3SdZLjEPF0IGIRcJwSNsNcUKdA0rBDde03xRGthwHSI5NTsgXsd/eYaSQQWE7MBG5roZL60WLO7WRy7nHSQeSZnQ5WUQbwQVFY6tRJXdUZ1D1j9qTKaNhXidIDxtkRdYe5wIMmzZ4A25yPxWt+Yal+fLvsvYXGlTVzhsTDeXSdWcca2BBGuVz3XNcWpT1U9oZaXE+E2xV0UupF71wdk8lNhHcGtmdkFaTRsDj762X6pHmzJGI= 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1246; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1246; X-Forefront-PRVS: 0450A714CB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(199003)(189002)(5003940100001)(48376002)(3846002)(76176999)(50986999)(47776003)(66066001)(68736007)(25786009)(86362001)(33646002)(478600001)(2950100002)(16526018)(50466002)(6916009)(2906002)(6486002)(7736002)(5660300001)(6116002)(101416001)(6666003)(2351001)(105586002)(36756003)(106356001)(53936002)(81166006)(16586007)(4326008)(54906003)(189998001)(81156014)(50226002)(8936002)(305945005)(2361001)(316002)(53416004)(8676002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1246; 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; MWHPR12MB1246; 23:Yc54HSDD/sM4KuwgqADEN24MGG227qRCiP8gFsnnV?= =?us-ascii?Q?XzRKkYgOKfXf1lWImdZ0hfoMlX1hX/bm+Qqd5kz7w8z906w6Fuf2ted/EV/k?= =?us-ascii?Q?6JUevOmbX3KIrmQv0EVOMEnU2BZo6+QD959yMoj5aLps7TszH+UfNecDSDpI?= =?us-ascii?Q?bQbNMMBulNroy4dZE0FP3Oxa3415bY0fPs/VAKoH8Q+qFPunmrMGSFF/BFyS?= =?us-ascii?Q?c2JJLP1kO4YQlMzZz5zc9X+0nyS2yafamwPWTJRkK8YgmSM2wZ9+vZIqTPgw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R4sYzAl5+adNMFUOq06Kb+MtZL3moqx2KjkMRIrirrgR0uitEy2HVp56pW/VWT26nXDE2xSdEWVpeXzx7v0ibG3VxDUcsZDk80gzJgbVpsNqKU/KZ1gTe0aImmaQ/X7KCUt+oP6V4UPgMXuLvmE5HZuzeI X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 19:02:39.7525 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1246 Subject: [edk2] [PATCH v4 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: , Cc: Ruiyu Ni , Jordan Justen , Liming Gao , Jiewen Yao , Michael D Kinney Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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/Uef= iCpuPkg/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. =20 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 =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + SMRAM_= SAVE_STATE_MAP_OFFSET); + CpuState =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + FixedP= cdGet16 (PcdCpuSmmSmramSaveStateMapOffset)); CpuState->x86.SMBASE =3D (UINT32)CpuHotPlugData->SmBase[CpuIndex]; =20 // --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel