From nobody Wed Dec 25 14:38:10 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 1507143370671834.4177257040265; Wed, 4 Oct 2017 11:56:10 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 64DAD20945BBA; Wed, 4 Oct 2017 11:52:47 -0700 (PDT) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0082.outbound.protection.outlook.com [104.47.40.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8432321CF58DE for ; Wed, 4 Oct 2017 11:52:46 -0700 (PDT) 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:06 +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.40.82; helo=nam03-co1-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=yoVZ5whYIZQPJ8GXKsks74DXBy0DxNczWjoQ/+oBpv2zRCTk8Ij/t17CJz98CAIx673TGNlyfVxdM1a0eeTVxydZukzaTg3gxF2eOh1+XKqNn7fVbNaHDnOzhJAKSrBeMKloZR3+HqxQwTAtqpdOSIR7RGc9+ie6aOUXoTKEGgk= 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 13:55:53 -0500 Message-Id: <1507143357-18181-2-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: 7729b37d-a293-44d6-7adf-08d50b5991e0 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:g3+su1iAnBNv6+JRhfTecmS/isIqSI1+Skm5oow9xeCiu7jeksDLur7JjJZTZJV4mZ8+F7NcO8AW+AnQ3plZeYSWQn1RL56Ma/t+x6uUmPIVgWLAJ75eHWkjsMGGDQXGxVGdu2UR/juCEJmaR6Q7/BI6YxOg+jvTajnbgV7hiyCB91Y0L58Yyet+JTrXjlcWTc9JaJXeoz1RIqhDGh6cvPW602jjW6JxahjOf8qhMHOYTiDSyk8xYnbeHq6/L+uV; 25:1am+ACZX+3cStAseY1ommo9L+6PmVtIHAg4zR7PKaS0TQvUJIg0U55oTqYfVoXZNwernVmjfM4QPddoZXXk2jAFlBLj6K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Hu; 4:57eSYwiGLAr0bUMc8AyuBwsD2I1JKvqdLJ+CO7a0+QkNMiUw2aonx8d5nSVXnOMEn/vH6C7DSgd+4CD2ij1scfHlE2hM9oDuXgS4aUPCprZ0EtXYQNPm/yB5BNCOsNArBcJXDlse/8KtPc5dTjFFHzW2iy8/iPev1ECMASFc4xTDXwfTA6cLiKp/bQQsgPWUu86BP250wNvwGmCc5cNdtE9o+LV3hFtDbNdKeCBV6l27mQ2BjoLCxYSpruE0FdzfhbApl1g0MX5bK0rpj5pElUbCxEe5wgxtWMlC+I+Nc04ioGmKegwR9aoU+w9yTVb8ciCPaYnu5FLmJExWjp5dWCl5jiQXUgUFpAvtfZIPWow= 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:Wbdf/1q2euneImuTNJeo6nmkL+CL7UdYtFmmYfsex?= =?us-ascii?Q?Mx8DGznYq72FUxCewvdnAmb19abNpiI+PgRc0u0SgFE9tSHYhC6PTHnS3Ujg?= =?us-ascii?Q?dmx5nu/bajFVpvFETLt664cDU3DJnwuI2rmmrXREelPFF2suuVN5AOm9Hc9H?= =?us-ascii?Q?m0ud1yNjHxfm9emx8XF7WVAI80htJ1mBC2kP6Y08ulXN+qqjB4C7W3WML6vA?= =?us-ascii?Q?2BrMn6Q2B5cj6HZlCeIts0ypR121WXyw13pU+Xe56ujpxVXwwNDO+NkYmBto?= =?us-ascii?Q?DoAqIAqj2YDJ4axqORGsTfF48MaRbAPjkTgkjb6xKBmv9ST2T1TRsJG4m6nP?= =?us-ascii?Q?UGNqQkCqQQA3W+yb/B30vPVq5eWA8Do6721Na2VczocvqZDh1dmuZfFAumQ4?= =?us-ascii?Q?9rfZsWPzgcPU0iqAk3WFKHoqXE5VzEksu/HwuzKt+RvmFe3+3QbTGhGi7z6g?= =?us-ascii?Q?hK0wRfKtnQCtP0z1lsCstSHz1xRXxDspWaJoR6SEWdHN8FEIWOtzEncWniJ2?= =?us-ascii?Q?mgCG6Cp7RH/HvXXQ42bAugbChROdb79SPWt14eRJ8HTqa8OKpmtdtHoP93QK?= =?us-ascii?Q?7op8GeaVMV6QGiB4rolcvfCm/dDojFqfuFihrzvuRiOHkhah910GhxB6X/XZ?= =?us-ascii?Q?hETJ+7ruL3eiov211m0OuvrWHGIJMX4XDkl8rvwvc/5isIG0z/AKpdQlp1B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Xi1QDjdy1q4VSGK85Ew==; 24:ncTuqXZPPDhvcJ6Ql94bqxK38qfXzlNdyvE8lF3i3Ydn7qjPFvR6sDAskfzLFUxcGsCw9fIKC0+1UPT8FWA8NujGqWLr38XTnqJDt03MSvI=; 7:OTfUCYeCyjnrwVjthI2zRFl4X7HTuid9GEsZSPdOLoYXRgJn6n1oIOTwyD53t07mlwJ48/6++tyf0Icy8q3zcgqbwaG3CGRpR0AGU//J3dB8FUuDKZfu4v36sQsqg+OEk6luWNPTRp0x6A5ZHxmDUtL70dnuNhwXc8dDIcZWK+kX1X77otmVQpaex/rcWP7jZa52+nBmDWIyj1H4SI8xAQsItcb1Y0QKcoHsF8TXePk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 20:xvhFr214wVJ47/Zb/dfpY9Plci7hafKXiG01QXQ4vmYL6Yz/rUE5yFpcobmowsfZT0e7JJw8ssLtNR7OWIHU2mdKZ9Kt1MpQo2kXyQIrD4RHNNTNr+VAqkFKVyVEQ223pxpwBxSunx2xqqyF3arPQ+AefpyULtEkyFo9ctyLWqbbDnBPp80DNbSZyR5T6Pwx15HA1DJucBTRpZLHOpmNSB9xMtkHNzlJjX9Qixv+DYs3NttRe4sGdTsnzcuDhR3O X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 18:56:06.1758 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1237 Subject: [edk2] [PATCH v3 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:38:10 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 1507143373694167.473693109946; Wed, 4 Oct 2017 11:56:13 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A372B20945BC3; Wed, 4 Oct 2017 11:52:49 -0700 (PDT) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0069.outbound.protection.outlook.com [104.47.40.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D29DF21CF58DE for ; Wed, 4 Oct 2017 11:52:47 -0700 (PDT) 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:07 +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.40.69; helo=nam03-co1-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=yaiDo9n6Koxh4P1+1XRnhaJJg7XgQC9WuK2PNmKYmX77Se3Kv1MyfwCpizKpKZ9eJd4hsLyKgTPYdj7Az6mRqLJtr1b3bCFLvAr0sVMT8NcNHsVJWiH0ihfFqiVvvFg8GsWlGlowFkNsck2roB6MmLFlQOxjCcX50YACBY1NElM= 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 13:55:54 -0500 Message-Id: <1507143357-18181-3-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: bcdf3760-2590-4e6f-1172-08d50b599298 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:51H47wVnY+EYeyzsHDKXdwHIIbG7D2Po2TiI0EMEMZgbpBDaCrJU/J/sIJXqrJvTcyX1pXcxrNIQhxJRLVBdNI9AN0eMkvCim0t9bJNEz3VbLy2yV4njjOklEiWLfirKN4JZ15NDELk2p9uExKESJzUDPP+YoCalebiWz1sLV8RTh9h/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ICgs7fGG+wp2rsJQlvLEqPrHFtenLlw/MP5bSMlj3XTg7XA2lBRay9hy2KjMQyJ2w9gHZ3BN8UQuP7aSy0+9EPvZB+Z3APXYrWJXi1/r0o7OVkKcYflKlXUYnaxwyZ8XzipeHB2H81x1ZrXYmJFA6hD1pJB2jiRYbdW2; 4:dDw6W++pPXwM6CtyA/rBAcP1SbunSJgxEDFS+DZqbHkMq3zYMun41tlFK2d7sS693/pCZRxKi6WXvpT3PE+zLcuWv/eso9OTZ0VDgdbOFrexstwyipm6UviHVcysg8qWEfGAQjerD8E4FX1hWUVj6DW4B1j11ieAjoqfG5u0lj/H0121VrRwA96Ddh8H2rbgn0jEaViL4o8bfKKeVDxH7UiGOKKrtloPaC+v+j6EHM0jJGSd5LYhS3x4+VT0bgizstzleDFzqX0S8X9+49Zp4/yTUunXjnWEX8ZL3PDBNNFf4cInXnZsQP2eoVAqd1H4bBGBmT83GNbLQqxAdc1Hz8lZABZGZd8Q5KPSiBQqpEY= 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)(6029001)(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:dGlrzyh3LcD7fPR6/dDazoE/K8mMnK6EwkSboYOq2?= =?us-ascii?Q?BMwtsXtdfnblRbCuFz5C3uYPemh8MBnp4Vh6pblE4tB6IT1zrIDe8Jc+VkAV?= =?us-ascii?Q?uBJRw6tqecRl5UbjtzzVhVd6KNizJeLoNdDsBlE8RBk+5DmX5tn7ZLa5jD73?= =?us-ascii?Q?OkL1PwG3LSwETAW5aM0BRMeaCjPODyyCD1hMyZDdMk+rJOJCoQECPfZqWZJf?= =?us-ascii?Q?l2HPb0RYqoocVpxWrAAib0xFt7WE2OBa2ZqaT6umZVzi+J6OLnNQSL+/bCm2?= =?us-ascii?Q?654mJJry/BrCwr40oBx691jOQ4ie7kCd7+5IenNw0GTGzhpzjSUwzkhi88Du?= =?us-ascii?Q?DFn9HgZeCozx+fRmAbmJ8YimZcZpIT5pEAcKSKMnH+96ydpivto03WbxsjS5?= =?us-ascii?Q?ixRzIQVp6PvHXCTqPhELzmnvOlTBZQ7ggpT/nv1DA0xeIBeJ3Z5LFgxCGZYR?= =?us-ascii?Q?9sUMC4350q0rqxeR7wTxfgIfWT7ZgfAHuxfsWYnZR0CipcdscNTAq1zZ4SAF?= =?us-ascii?Q?h562xXr6LJwo8JzH+Ah6N4hZp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YJs8W1IL/AAGDecMTO34OZmTilvdG2XcetbsHf7/7ymsZQkzUlUCDA==; 5:7NGoYh7yr1qhdCLnKsla2C0A7LRj4GNy2yQ0IXgDwl1/2RofLTRCdGRX9jVq8KRLPHRorGHSq6ycJDWXOrx0HdNyNEkXUrR6cRqHhmOi2pjbE5fkEZntwFsuc7X5ZecUMaYFU/q1p4KDFOozoMrE6Q==; 24:Kjl099XhAqc5Ilhnud6/CnmmcwIWeKPHtWgPk+9SwZvnEx/5Vs0xZtUJOddV7BpiS/K2DUa6YZHt0snVDk8YwAqK0W7F9zyDNZUj/l19MtY=; 7:o5QVOTQINUAxjXFeT73+/d8u/edQnlgOAnvd0lAeNWVGYFoxYr7FOJmtFQzU02FJyJYJtIg5+b14C+gUNXzm7MWl5UEqJ/IyggFW6J1Rco+MN085vp8hupNQ0HXRLBhT1fGxb+zUUiHDrH8NlRY3tbju6VhyALLe3QQE2SPN21TA8OrXEBCmNfGkA7OFD5ljEzM99pI0SJC+HIHz9DGCWtgGC4J1z1W2v31E9dA90ec= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 20:ZHQQAFfTWrUnj9CKUBSw98j2DuzmTGgwywswTZC5FmXYj0szsGQspjPUdpzrg782iPAigJhTqrtjIPvnjqqSqIiaC3S2hKHeW13t4rkOpq9lrEwAF8OXQrY2airu5hQGhAGTx4tpp1oY9cN6pePTs09Bqt9wu1e8TMHIH1AarkPcGKuI1VBs3S92jM5YZcUBeRM7ENzrNLojQ2cfdgn11QLXdVB38DI4wyxFxFWu6tamU71T0GC34Nnl5aFJlxue X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 18:56:07.3633 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1237 Subject: [edk2] [PATCH v3 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:38:10 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 1507143376533425.61835881863556; Wed, 4 Oct 2017 11:56:16 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E64E620945BC4; Wed, 4 Oct 2017 11:52:50 -0700 (PDT) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0060.outbound.protection.outlook.com [104.47.40.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A6E1520945BC4 for ; Wed, 4 Oct 2017 11:52:49 -0700 (PDT) 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:08 +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.40.60; helo=nam03-co1-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=tRJv6ShB80m0KWP5su8tzkJOn5mJ/n9/ccyRaR4nujTSwsUNN0u10tBIHM31MaMvdg1G/T51ocJ6txZBDywHWQo8LfRYVpJRcn1KPiNZaMGURqpvnzhdGVzcVL8IbY4heuQ9bYU/+egepJK5L4O4UAaQcoCx97vEThJUNleUS70= 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 13:55:55 -0500 Message-Id: <1507143357-18181-4-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: 95bd7e09-0a6f-414e-6cbf-08d50b599354 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:jUHWaNf3ll0IGRZYGFomnw4btMVmZkNDVoxPtBD+/mhuxX3Ym6jX5rPECIZ1JxX/dvyH4xUvfbYCpXWsME1x46fWgqGU+Dij52CbHmeMUofcB7M6RCHEepyOysz+cF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Dlh5Z5ZBxTGtOj/phajeLvPepmiEoEwcFnPKYBdhyy2hhxD9fmjmPV8NwkyrOBWNFMh/tI8CpIYc9s0SAH/7ttdelwbJw0WOnw7UX8ZE3ECLtDDgDcdPgctGFJYvaG7B3LOzzEuSnr5Qd+CTgcb1ohyUGDP8MtLX0nWCL02xwmdEzzvifoGMWd6XlL4GEfj5uLQTnnXivxuToUpfDsFnXnGkrgRFz0k61tKo3AZONqyQTvE7k; 4:VRt832FBbbSl6s5ua8XAd5L7RvjiTc3ZLeYuomI8XUrrSTWE4NZ+hiSFO5pXRLhkxc76DxOwo+Q1y3IaYqxqS2xzultXDp+10PyMePRlGr4Ud7izKc8nl5qHSOxt0wKK7UxivKD2hvtS7vMe4JXOgVBHomyE1ElJNj36SpchKsJqnzIIPTlkhJnKPFBEc7y9PbyhPnJMpZ3JgcG/We75/xz9KJaFyOiJN0FND9lSyzbQMC4VQTCF8+9cW52CBc3ijBnIA/4EB6BrYMsvbZ3OBZGEK6s2LjiAEELYP3O8/wKq9FeP6P60OcdAYRPR+NU10w7gZjJxT56YgcDCpaqBZt7yUGjl9DtS6XeONTbVKy4= 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)(6029001)(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)(19627235001); 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:DDCtP7TBByQgq7/jy0YxIiHUwlsAuBipo0eHcf2Fc?= =?us-ascii?Q?TJ5PuzYMkQyuqbROhNaj98zyAps5kSsxoud/hwoM0xHMn/im9JQgbxdFLsqR?= =?us-ascii?Q?0yL15cGZjCcnOWYZZmw+LqwNbim/KtTxG57K3Xx1YtVxqO639KAFn6JMVN17?= =?us-ascii?Q?rtvo0vZXSodoow/Qc82RWHzIbIT7PiZ1kb+RVzkcOJWCFZy6VcW4GQIW2ayS?= =?us-ascii?Q?85HMPEc4DjmUkicbVDSLx16v0dPe40JUwVHvmQqp+JjPB3qY+f33Bxb3/jLf?= =?us-ascii?Q?hI6F5BAkzA3PwUh4jO+QrP2OrJ9t7k/fcP4tMAktCXsF5WN1prQKCCkgkg8I?= =?us-ascii?Q?tw1dA+scLC3z8Zzr0dNwzahXu9EpZBTqOU1jT+5CkhYZ8pISUhsdoo+6Mt+Y?= =?us-ascii?Q?6eDl0Oe23ywV+/KqQyl6yf/SVwgAZOXeAHnhuFrAXBk3oG6TXti6xQPIbaRq?= =?us-ascii?Q?i14XGElby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Fx37IZlincp205UCM65kZGogmkN5T6uCHefI6WCM5p0iZ4BxuHaT3yBHAJYkPOUaPpfAXpfbR9BYEYdDugMVCaCukojbcNnJrofIWFy2r1V8ABHnMb9SwVx91wWJe22dwx0bq3/IULymzD3IPBdAnHa351FFqiA5B8tH4MHqxBrAk4SX0Am+wEcAPEdPPEhapnzE1FaVFIRV5vw==; 5:wKXVgPc63IAhwSFPjudatAb1DkCf9CMGj/u9yqy0QSI9IqvI2vsJyITYA8LTho6e+6V8mcRxngirVtI23stfWDmASNG659TQUXhfWY/HZStXbf3Iw7IhjyPIU4P6SG/6N++x1diABABRMAm4IkvjvA==; 24:xF3Uc5GIcIvYM8PwTSZY0K9NKrHUb/eC2+XJ/9ee0AFTiaXcxybT6chTNGKk4yG6aOZhcOxk15RjPGZnclawYg7joQwaBrtY/n8/iMOv0TE=; 7:0pS+cJZq4/C0vP8C4fC272KZcuXjiNuKvRRRIJtVySpCNAl0wslUMqcH8dwH7jvKbbCR0ZRfgY3JjNdLoOHQYGrIaS9DlkgRQrpxv5ZXskMtGNV2Ss7ONoFkrK0GiamkoMpZfNuJtjxUFuuFpXUwqh11hvnzynm8PZCKsc/NuK8QmNjYlAVl7ZghGHJ4jw9tVnKB7/P49XaZKw3izX+b7YFgbocMOs+8xgfnMTAbzWo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 20:kN+GWnU1gqgExFmGGtNinHCXzi2lnzGr7Gz5db8ZoIDuuo/q6699lnAtnER1pdGRvRltzP5w5Mq4VKedzIfhhNjQ1WaxpetC4q4RWZjx6xH7lJjAHzjKKKWz5ngtCaby2uUZssreHPaY8w06ZFF+l0+n4pGCN58JVvg9QEYhJQKG8wkzVHr9uWC+/tKXxaTzkG0jtcXG78toZ9GVVUSlK4nw4VK5QSdT2NpvqNtFwN3QKI2WCUdjnd1vOZY6HD8c X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 18:56:08.5977 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1237 Subject: [edk2] [PATCH v3 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:38:10 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 1507143379667341.81437501769665; Wed, 4 Oct 2017 11:56:19 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3358B2095E516; Wed, 4 Oct 2017 11:52:51 -0700 (PDT) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0071.outbound.protection.outlook.com [104.47.40.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6D92420945BC4 for ; Wed, 4 Oct 2017 11:52:50 -0700 (PDT) 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:09 +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.40.71; helo=nam03-co1-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=bsKGMNezSYCL/5jjDECey6igjPF+vYuIceYoKTJtPgj6kIL5XGWDF1znBhoKUjQ5vuIRtNW5w/Q72UjKNNLHMnWy/KJ8Qhk62PkGKf2JMi4f7rNrCOBJJlQpqalX19oj6wvopd3aMU2Kwd0l5GAELJspncNSB8Y90ERoV0iDULc= 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 13:55:56 -0500 Message-Id: <1507143357-18181-5-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: d476bf08-2458-4669-db09-08d50b599423 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:esmymc2oESRAZKHf5FGWC5XBhr6rsNgtlRkB7Y5Kh5kY/3gXUd8ONW9a4MXdvjX46UvjoGtvW61N1DJzt36ov998V70geWFBxbckL4ZSty4TchcEZP3Mis2QYjomRoMvuq5sge5qIXS19uOGAo+hHPGDDpjeq6qeKaRvGN1Qk8Tr/LVCCP3KcptaTGNhvfGvmvJ0J/7K2HCyGKVD6paBLmrD/V3ED77Am2h4S/wkkiDXgzXK3b2xjTq9/U85szPE; 25:4X1mmt/lowxQDhWnML65gNhlH1wmdEzhaoT7+jcsP0adnrGZHvXdePRNOKsDOZCTRFR4daGORS5gJP0EMzVzwOl9LEoBIsKOw342sS07gtnsOpFwIPVTDuBfuzWdh5BYngDMaKHNRwy1rCM1xhiS8tqDV0JsSE2mTpsMiBhyk7ablAHtx6yyQA1N+nlG5ivtngihSyWzJaw1lu1ckz82BFPoBgFFtlAx5PNEUvPP3rFK0dyezXvCoWykPbz8wfhqrd/ZJaQSskJUZuwmnxmmfYId+BbubNYV6nrreBM99S6oOLgv2aewLuzkLVyRBXetj7hr4v0GkM6LaZQSxcAgDw==; 31:Amw6gygCgHKtc8g6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D1TwfWp5pj9bxf+0lL4KTnCO5LIadn4g57waEdUijBRvysbxb3+koh709TX82rkluizb5DPqrVEfNM+aKT5A0LFYa8KRXFks8TgbDfVY= 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)(19627235001); 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:Rqp5E6OuvsNLC4ScKO8q2YXZ+/mtp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21uMEI32C/Towc+6P0z4aG6pDhq6MxP4EmxN3FDWPO7lTjfJR6/Z8m0nKmZat3l5PIgIg9E9dg4QLeenq80yEnP68fO60ugBTkxXeDY863YOVNIL+wi1MxdrSX9bQSb0L97mi3zYM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 20:gTU8gjNL+ndP9yeccmo1IaFYCNzrPV87FfZ3/l3MUt9/8CzPyObs8n7V0l/4o4hfGVxRwTtm8/3yBi2ekF6luSrQXL7k3J7ZzU/+tIrqYJhxvyNGbnybclBkEdgyVnQ0Um3oUxX5ocIDAZzQTu95IcBYgIHU1SSC+RcafOVfqMEZO4oTkuXuQ/U2VHjo7/zwiUhWstBGNft7cCS+EkGAC7yjYLzDFm8tjFTji6i9ERANzC7UwEcXCeF3ICxS7jTW X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2017 18:56:09.8321 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1237 Subject: [edk2] [PATCH v3 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:38:10 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 1507143383313632.6425866380607; Wed, 4 Oct 2017 11:56:23 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7344921D492EC; Wed, 4 Oct 2017 11:52:52 -0700 (PDT) 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) 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 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.40.48; helo=nam03-co1-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=pgS0YUAfwRWWLngJ5MO2yU6cQw2XsWcNSQLqgXtul74BdFzHEx0eqGT8JwabimLkAZ3xn4LzxkM1t6Fl2SHFh/qgmNJfozwP+XUzXK9OwimM8RhCFpKgbNyG2z0/Jgn0aiOg2JyBiKHyGrBs4bEjgKc/oUfANzXcaA9OTvjyPCI= 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 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/eY9V1yZRafVlLqOE9mBdiMY2RzVF9ZQEePGhbF4Rk1LImHNfyg9Ic3nMq1RnwXzS0Rf3F8WgnJb4xNV8ADHzkMT7sjY99UKc++yOZU02mN2TDNSAdjTVaWyhukT2tiaA15lPfwYqqW+etZmq+1gQ/kq8QLhGQbVJ0OfJIHqUTnAHG5NrPst9Kkbh3MCbcthFY5MvjZF8f8t05bEu1vDGW9A= X-MS-TrafficTypeDiagnostic: CY4PR12MB1237: X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 20:bJBB41NV3VT5yQEcuhCU4fO5wh/UZRpdlP81ZQIOzlSWw69TH75gyDVAvrWnTzhiMkg38PT+gG/mPPOScHGT7h8laysOujDtYsyaLM1mGgLGndc+rMOf61dSmEldg2WN1r/312PqXOACaSpgxj1xMreV62GTAKEH3aZ+pXp5EUdtWdUWZyI0N9AQ9zbqqjvqfN5EA+dHB3xu6cWZPMRaKEMpKViZo3oO6PlKXM/9C3K7R8AnZPxymJeZkp4cauLQXb8pOtD4Bl7QAH4UiDU9GDnPPk8dtYYWXj0YoqcmIPa5lOQB4scIF5x7EUQGi7RkSrc4YJyPkcgRSgwKbZzBvik0RzClgZjf4IFGmZbRnogdwT/WX7aW2EIp9JmAy/CozVJGvMIGB8uJiwa4zR/q4+YsvhPtS9enXOxL2rg7zYLhzm2GaN/OZPFt/DkDjgBD7gvAhenvFqtY+PNFSW/yOmoM4ID/IGgy+i6QJeerqf0Pt0y71TUDwwQGr4o6WsjS; 4:Y7X3RgK/RvpiEPIxnQMG4DTEqSzpLC38jy0r4KJYNKMYNmZeNxE345s4m7cvwXM+X4q1kUg7dbN3YCnrpYAG5o7QsUYo+2R7+UcEmrgYO0cRUSIVzitMX8orxHAuk+UDAZeBXJu6EK2IrwvcIByFYBSWqJ+RUoVpozng4UW1BaW/sRmlLknWrLm3M/Wx5Ljpbsm8Ya/b4d7qMUIEJPaRHnUBYav2Q2mhe9FEu2PSlmN0S4kWBxn2KQ5Qm2zibg9uE1Slvnc8ZCwRsn7jCyCUl9ccLxxUBODjMGSeHTlpnUaieimOvfLJgMtMVU0ZZ29em0jGrp+HVe2UPvcggIoVPsMMPpJbzJLF9qBF+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?+CVNZzxmuuYpYTk6PXacoFKnpPQeNh2CQflRBH8S0QHkXZ4qJd4O2eoYHWUN?= =?us-ascii?Q?wQOUQF5DDcx8z+N8og3bSJ94V/vchg7bGoHZa1gNBhP8R+RdMYt0ddDOch/j?= =?us-ascii?Q?bxCz94jayd2HgQRJN3YdcY24J4rnYbEheHty34rnAg+gw/p8bAotexRMGaE9?= =?us-ascii?Q?FmSIlg/zvvKqEwLAiAQKj92ZDlG5QwSbbSwH8E5PeSH7gSnNRQPLLyP74xIY?= =?us-ascii?Q?BKpHrBVqIaAZUCg+eeJLN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12MB1237; 6:GxBAW9yZdYhDrWzmZaltOzKj7303MHQhKxtLy4JwM2ydPlC+Kr3+nkq6dfuEtgkq0A0jIidH2igWwdec3wRIgk6wJLstcWSdrviMnHygFwxlixGMYEb8g/sPb+mI4INJZt+QuxLelzXFgeNGtWLCR12gKQyMwrTvRF0fT60Z7+7lNvuqUgInrhjuux2P98KOY+uoBlHNe1zv0qrvgyG5xmyPcbztTOtl2oLNNsnoOq83WNkXT/fN0Js8fWO9gZtnpgShPXeN12PgAp3HA1nAHZNZdO8LDFm5UhzvjliFW9tuaUQLm8ZmB+3bgQWEmKdL1ffseNdllKj3FKXY7wl/fw==; 5:8hzApVIsPrSnAIDYY+STlVe1bqGLTDF4HCEMrZt1gBFdg2G4wb5bS3VcbqJ/tItDDx4yz//XZtPuAmD22dEVB5iiZCUBwiUSNILM9qpNe2ldufwhHJ78Hi4Le7eHHL72atMehr2cz+MSMABHYHeXPw==; 24:/2zX0qzI/jW1+aYT0dN1Tp2n90EFrjYHc5PhZ1z/bTQ53UuAy5iBQAVET/SN4oCN3hbJLr3dVP0+NMkLxbTbRJsx2KUmHkJBW54eyrIB5x8=; 7:Bc0XgzWVjKnC07RpJPNS5khTnj75hNLxpmSduPjpk20k6FcQMId6pkjr4DFhiz7u4KxP31q07rj6J30dCt89J4fOq2LRYPvrsU5nfA7UkaY5PahP9VsA3dmdqr/3Z7nQQ+6gpJapJJg7L+E4i0V3wdfDhX/1gENCg5WVpvnxQCqmFB27YH9b9bRypBjfiIZzHujVBiJofSMugQcOrVgT30bWCPnKOKqJ/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: [edk2] [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: , 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