From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.4182.1611887695975692375 for ; Thu, 28 Jan 2021 18:34:56 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: w.sheng@intel.com) IronPort-SDR: 21c74xxuKdctcgLVtdEgYI4V8XWH5d5sJwBZKNv5bdSG/Es1PpJEDVPMMCNnRSouSZUrKuXel8 jbtn1LQy7miw== X-IronPort-AV: E=McAfee;i="6000,8403,9878"; a="244438697" X-IronPort-AV: E=Sophos;i="5.79,384,1602572400"; d="scan'208";a="244438697" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2021 18:34:55 -0800 IronPort-SDR: ADR2mzFQybJzytDFLQnb30RrXcEz86ge9OYbePovV/HUZIjOZauWevR8wJ2vUNKR3Mwvj3Qpdf Np9DQyCoSZLw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,384,1602572400"; d="scan'208";a="364101027" Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.35]) by fmsmga008.fm.intel.com with ESMTP; 28 Jan 2021 18:34:53 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Jiewen Yao Subject: [PATCH] MdePkg/Include: Add CET instructions to Nasm.inc Date: Fri, 29 Jan 2021 10:34:48 +0800 Message-Id: <20210129023448.30348-1-w.sheng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 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