From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com []) by mx.groups.io with SMTP id smtpd.web12.6667.1611907194868853779 for ; Thu, 28 Jan 2021 23:59:59 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: w.sheng@intel.com) IronPort-SDR: J1WRyJ98OfL2rP7F5f0Rclpt59sh63xEe49M+H+1YwhoN0akues9qxOvbhzR1UohubAlR0cORa tTaB83jZhSww== X-IronPort-AV: E=McAfee;i="6000,8403,9878"; a="160155476" X-IronPort-AV: E=Sophos;i="5.79,384,1602572400"; d="scan'208";a="160155476" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2021 23:59:58 -0800 IronPort-SDR: kxnRCkJZOn9ZZZCQK/YoXGbFsO9qB7q1gIV8ziawmz9DdWgSFYtMj02+5Zq9jbCx8gtBhDB21i 3y4HLQK8iCPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,384,1602572400"; d="scan'208";a="364211113" Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.35]) by fmsmga008.fm.intel.com with ESMTP; 28 Jan 2021 23:59:57 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Jiewen Yao Subject: [PATCH 1/2] MdePkg/Include: Add CET instructions to Nasm.inc Date: Fri, 29 Jan 2021 15:59:45 +0800 Message-Id: <20210129075946.31684-2-w.sheng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20210129075946.31684-1-w.sheng@intel.com> References: <20210129075946.31684-1-w.sheng@intel.com> This is to add instruction SAVEPREVSSP, CLRSSBSY and RSTORSSP_RAX in Nasm, because these instructions are not supported yet. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3192 Signed-off-by: Sheng Wei Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Jiewen Yao --- MdePkg/Include/Ia32/Nasm.inc | 14 +++++++++++++- MdePkg/Include/X64/Nasm.inc | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Ia32/Nasm.inc b/MdePkg/Include/Ia32/Nasm.inc index 31ce861f1e..9c1b7796ea 100644 --- a/MdePkg/Include/Ia32/Nasm.inc +++ b/MdePkg/Include/Ia32/Nasm.inc @@ -1,6 +1,6 @@ ;------------------------------------------------------------------------------ ; -; Copyright (c) 2019, Intel Corporation. All rights reserved.
+; Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Abstract: @@ -20,3 +20,15 @@ %macro INCSSP_EAX 0 DB 0xF3, 0x0F, 0xAE, 0xE8 %endmacro + +%macro SAVEPREVSSP 0 + DB 0xF3, 0x0F, 0x01, 0xEA +%endmacro + +%macro CLRSSBSY_EAX 0 + DB 0x67, 0xF3, 0x0F, 0xAE, 0x30 +%endmacro + +%macro RSTORSSP_EAX 0 + DB 0x67, 0xF3, 0x0F, 0x01, 0x28 +%endmacro diff --git a/MdePkg/Include/X64/Nasm.inc b/MdePkg/Include/X64/Nasm.inc index 42412735ea..c5189982bb 100644 --- a/MdePkg/Include/X64/Nasm.inc +++ b/MdePkg/Include/X64/Nasm.inc @@ -1,6 +1,6 @@ ;------------------------------------------------------------------------------ ; -; Copyright (c) 2019, Intel Corporation. All rights reserved.
+; Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Abstract: @@ -20,3 +20,15 @@ %macro INCSSP_RAX 0 DB 0xF3, 0x48, 0x0F, 0xAE, 0xE8 %endmacro + +%macro SAVEPREVSSP 0 + DB 0xF3, 0x0F, 0x01, 0xEA +%endmacro + +%macro CLRSSBSY_RAX 0 + DB 0xF3, 0x0F, 0xAE, 0x30 +%endmacro + +%macro RSTORSSP_RAX 0 + DB 0xF3, 0x0F, 0x01, 0x28 +%endmacro -- 2.16.2.windows.1