From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 7371DD808CC for ; Wed, 15 Nov 2023 02:02:06 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5JY0NtA0SwsEBcJWUMdNdRdBQ9dBumxHdb+KJzpShcI=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20140610; t=1700013725; v=1; b=QOrkz5u4QHypQ2w1dgU50hjRpTdup5aSlLkMEeIjJ7hkoowGSNvxfrNonEtkLsTNhEIteV2n /e23KMLF0XM8e6bUIdedDQm3MBzFB4g4hlRrteXLvbp4MuSQxFsxVlt6wJLOeXZxEkvKpb1HP48 XN0JyKyhFq/dXowIotcZIQyQ= X-Received: by 127.0.0.2 with SMTP id gZVZYY7687511xT2tLo8XrA2; Tue, 14 Nov 2023 18:02:05 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.3745.1700013724361828388 for ; Tue, 14 Nov 2023 18:02:04 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10894"; a="457291676" X-IronPort-AV: E=Sophos;i="6.03,303,1694761200"; d="scan'208,217";a="457291676" X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2023 18:02:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10894"; a="855494462" X-IronPort-AV: E=Sophos;i="6.03,303,1694761200"; d="scan'208,217";a="855494462" X-Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 14 Nov 2023 18:02:03 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 14 Nov 2023 18:02:02 -0800 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Tue, 14 Nov 2023 18:02:02 -0800 X-Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Tue, 14 Nov 2023 18:02:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FeHkuUQIajq8i/Foisgb8tG8YRwtC8qyVhqTkQYtutoMnCWilmZiFmDQlNGhp9r7fB0gspb5G+EeC++H7bRntdmZB24rCkEO0pUQ6lapG1VzPuVoA/8dt8bB6fpTHYwqn/h1kiNrEh/2G1VJoW4GU4Z2MdXuu9z8//z/86XMuHHWiicUN9yRWEiwBMMkPcvo6Ic0457xqRiUEDkQ2FPzy67SGODbQ7g3WkYgPl3IE6jn1A33nLLwZVpdJn+JpKUH3dq1mC5wlkWVmSXjs9pmvUoPpwrV/VdGBVxrL45vZ0F8ATrTqDskr/wCnX8KNovHy6uqjMN6+oo0DZWOTlVViA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=726399IaQvxc4H5otglx+6X60+u3jn5B3gWyNIeeAes=; b=mkuGGK+plA3buLprEt1YpJUx7E0KMnJ5l/D5BwjQGOp2ZXbIskq7wW5I7VUgI5OPV8q4MgxpTCTi+wSHRhgwY1eb75YmwQV4eF2ZQrhXFvJiMAQCt6X2gvsFGLk+rktOth5iUzHPM/mIJAKk6peYr5YPkV5nJd7cbvdsB6OFYLtHmjQqBdu4iTcAz9NbweqeEy/8GAoOYCcIg5dZhV+bMNOouBv6CiaXEegsT/U7xY2kxmQPEqhClAr9lmFMExijiRixnhlJjs+UUPj2zpeHW3VRFFzq+ob9M01a5Uqiyi4rqC0bZk+xuJWQatTyFK/Q4QMORUrYZ9LRSz+I+rPkCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by IA1PR11MB6442.namprd11.prod.outlook.com (2603:10b6:208:3a9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.29; Wed, 15 Nov 2023 02:02:00 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858%4]) with mapi id 15.20.6977.029; Wed, 15 Nov 2023 02:02:00 +0000 From: "Ni, Ray" To: "Sheng, W" , "devel@edk2.groups.io" CC: "Dong, Eric" , Laszlo Ersek , "Wu, Jiaxin" , "Tan, Dun" Subject: Re: [edk2-devel] [PATCH v4 1/5] UefiCpuPkg: Add macro definitions for CET feature for NASM files. Thread-Topic: [PATCH v4 1/5] UefiCpuPkg: Add macro definitions for CET feature for NASM files. Thread-Index: AQHaFfnYnvluyd7ieEyNZVv6E7nyN7B6o0o8 Date: Wed, 15 Nov 2023 02:02:00 +0000 Message-ID: References: <20231113062245.649-1-w.sheng@intel.com> <20231113062245.649-2-w.sheng@intel.com> In-Reply-To: <20231113062245.649-2-w.sheng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|IA1PR11MB6442:EE_ x-ms-office365-filtering-correlation-id: 5026a8b3-ef30-4e57-a040-08dbe57edadb x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: qXQiun8ITX8JYTNBAGzfiZrMGSoS8ao8cFjLUiJ59tKhkKxlBUXsBnXANfNKT2UHWrsqLrPnIpqEYEtmFCFYlxHGyiRN0A5Es5FghTzkNWxs6kdtzgmCVlXqD91yykZ0ENRUrl7ZfHSJsmvjPRBPLtgtv/zfryJM6IuoRm9pGvHLPmtwqqZXQ+L4wk2kPNQnWf7RH+9HoVdKMwdowCzoPOzRZlb8xBwJ/Q0JvB4SzW0IilQi6MrWNXDC+eqifImepdSLEzEnnqaLleRGwQ6a8RmF/PCFGieHuP4A/HQsqK+Gko2ac7UR6o2caDHy1fZtiT78DtQH1OGZYUgUeltuQDMAnPApFgeV73sTfh8xHG7C+H1OfSFkuT4QuCG8k2r95flAcWmFk3yfIT6+xGoeBmxyWE2HDFP4GwqBERNKP2jeRtaCoCOG5OxuGrAaWNB63L8+1KHQzRKGJhQeNWkA3+9ZtRRS6up+HwW0veCaLgax2RYqEUIoZQXcQ8i2tEmPY+PgUCO7NWoGbyprLlmVnlyKi/oMtjDW/fZ/snZmsKbVslXzsPmwZsnVs2RBjKFRQ8GGkpbCKxMMa6bAs+qdKnPIAlzVPbX4O3WsUEDg1B+s/4ULd24YUNyV0Asv+OOu x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-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aOS3vjigSgkCG45z/c9Tqr/vvxYZKiCizAK+swK?= =?us-ascii?Q?0uxSlja2RQSRih8B+XHDyz53GZmpd/Jw2TP2+3eN2xZ1qmxp/AmG7MdZxG9P?= =?us-ascii?Q?7VPWekxJfRlPp6TFbketDn1cL4BRwP0lI0MSbeC11N7Qn11R+yzS8pEV5p1e?= =?us-ascii?Q?u5lmEq+juAErUNmt0x51/RhluijvtNSvYNgr2G6nsETvBphe/qGo+oaR5SLC?= =?us-ascii?Q?XU1CpULAKO6fSwh+B/FYzZLHRncO0XrwvIuGz0YLJUPGKRy8XxHea6L9nPCy?= =?us-ascii?Q?NN9mawTlTK5BIAOGTOuoc1yviO8CuThf8OhJRz2QAARjVvOZ6lrhQ6UNOgxu?= =?us-ascii?Q?J1IyMrWYBO+PRK0WBq29ciOYp1UNVsD2cZwJ+wV8I/kHjcqPZkmdQ1HUfyZr?= =?us-ascii?Q?7fF5rkVdRy0m42TaRkduvhWcgawrytliWobsNidDmKXRzqsxBlGGn/IX0b30?= =?us-ascii?Q?Vz3SUtvHi948SWTNnYZ72drQpH+4c2Gvkz+XmZ7fYGst1EjCULNw3GW8f6pv?= =?us-ascii?Q?qXJjif7rgXh51SSi7aOvzzwUmFOHVMWU0IPfeTOgN/VNFmVPqp8aHrkFFFgB?= =?us-ascii?Q?SriTD/azSP4RHCZARlLyT1GoCTYUXWp8Ac+HSyquec+7IZxKirciBe6EIbuV?= =?us-ascii?Q?QA/YHzZR7p30DJiEybffGKBgNhMyK77Ltf3wr4RIqydF1JOMBDbxTZu8zw/k?= =?us-ascii?Q?xwp37T+Np4UzanxFp08=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5026a8b3-ef30-4e57-a040-08dbe57edadb X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2023 02:02:00.3373 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qEWh2yDz0ew2S5HGzAxdCiPoqUAHuTLHZHLrwpYE0U7S3760jGUICn2iJdjZ5CZrUT2oxCDak59SdI3Nrmki2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6442 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: kvJBU7TsXTbvS6b766dKKkFwx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244F6054ADBB3B2241FBE8B8CB1AMN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=QOrkz5u4; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") --_000_MN6PR11MB8244F6054ADBB3B2241FBE8B8CB1AMN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable If only CpuSmm driver consumes these macros, can we move the macro definiti= ons into CpuSmm driver folder? Thanks, Ray ________________________________ From: Sheng, W Sent: Monday, November 13, 2023 2:22 PM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Laszlo Er= sek ; Wu, Jiaxin ; Tan, Dun Subject: [PATCH v4 1/5] UefiCpuPkg: Add macro definitions for CET feature f= or NASM files. Signed-off-by: Sheng Wei Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Wu Jiaxin Cc: Tan Dun --- UefiCpuPkg/Include/Cet.inc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 UefiCpuPkg/Include/Cet.inc diff --git a/UefiCpuPkg/Include/Cet.inc b/UefiCpuPkg/Include/Cet.inc new file mode 100644 index 0000000000..a4038a0682 --- /dev/null +++ b/UefiCpuPkg/Include/Cet.inc @@ -0,0 +1,26 @@ +;-------------------------------------------------------------------------= ----- +; +; Copyright (c) 2023, Intel Corporation. All rights reserved.
+; SPDX-License-Identifier: BSD-2-Clause-Patent +; +; Abstract: +; +; This file provides macro definitions for CET feature for NASM files. +; +;-------------------------------------------------------------------------= ----- + +%define MSR_IA32_U_CET 0x6A0 +%define MSR_IA32_S_CET 0x6A2 +%define MSR_IA32_CET_SH_STK_EN 0x1 +%define MSR_IA32_CET_WR_SHSTK_EN 0x2 +%define MSR_IA32_CET_ENDBR_EN 0x4 +%define MSR_IA32_CET_LEG_IW_EN 0x8 +%define MSR_IA32_CET_NO_TRACK_EN 0x10 +%define MSR_IA32_CET_SUPPRESS_DIS 0x20 +%define MSR_IA32_CET_SUPPRESS 0x400 +%define MSR_IA32_CET_TRACKER 0x800 +%define MSR_IA32_PL0_SSP 0x6A4 +%define MSR_IA32_INTERRUPT_SSP_TABLE_ADDR 0x6A8 + +%define CR4_CET_BIT 23 +%define CR4_CET 0x800000 -- 2.26.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111227): https://edk2.groups.io/g/devel/message/111227 Mute This Topic: https://groups.io/mt/102556833/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB8244F6054ADBB3B2241FBE8B8CB1AMN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
If only CpuSmm driver consumes these macros, can we move the macro definiti= ons into CpuSmm driver folder?

Thanks,
Ray

From: Sheng, W <w.sheng@= intel.com>
Sent: Monday, November 13, 2023 2:22 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel= .com>; Laszlo Ersek <lersek@redhat.com>; Wu, Jiaxin <jiaxin.wu@= intel.com>; Tan, Dun <dun.tan@intel.com>
Subject: [PATCH v4 1/5] UefiCpuPkg: Add macro definitions for CET fe= ature for NASM files.
 
Signed-off-by: Sheng Wei <w.sheng@intel.com>=
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Tan Dun <dun.tan@intel.com>
---
 UefiCpuPkg/Include/Cet.inc | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 UefiCpuPkg/Include/Cet.inc

diff --git a/UefiCpuPkg/Include/Cet.inc b/UefiCpuPkg/Include/Cet.inc
new file mode 100644
index 0000000000..a4038a0682
--- /dev/null
+++ b/UefiCpuPkg/Include/Cet.inc
@@ -0,0 +1,26 @@
+;-------------------------------------------------------------------------= -----

+;

+; Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
+; SPDX-License-Identifier: BSD-2-Clause-Patent

+;

+; Abstract:

+;

+;   This file provides macro definitions for CET feature for NAS= M files.

+;

+;-------------------------------------------------------------------------= -----

+

+%define MSR_IA32_U_CET        &nbs= p;            0x6A0<= br>
+%define MSR_IA32_S_CET        &nbs= p;            0x6A2<= br>
+%define MSR_IA32_CET_SH_STK_EN       &n= bsp;     0x1

+%define MSR_IA32_CET_WR_SHSTK_EN       =     0x2

+%define MSR_IA32_CET_ENDBR_EN       &nb= sp;      0x4

+%define MSR_IA32_CET_LEG_IW_EN       &n= bsp;     0x8

+%define MSR_IA32_CET_NO_TRACK_EN       =     0x10

+%define MSR_IA32_CET_SUPPRESS_DIS       = ;   0x20

+%define MSR_IA32_CET_SUPPRESS       &nb= sp;      0x400

+%define MSR_IA32_CET_TRACKER       &nbs= p;       0x800

+%define MSR_IA32_PL0_SSP        &n= bsp;          0x6A4

+%define MSR_IA32_INTERRUPT_SSP_TABLE_ADDR  0x6A8

+

+%define CR4_CET_BIT         &= nbsp;           &nbs= p;  23

+%define CR4_CET          = ;            &n= bsp;     0x800000

--
2.26.2.windows.1

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#111227) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB8244F6054ADBB3B2241FBE8B8CB1AMN6PR11MB8244namp_--