From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 07AA2211CBD1B for ; Fri, 22 Feb 2019 05:30:45 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2019 05:30:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,399,1544515200"; d="scan'208";a="118276881" Received: from yzhong5-mobl4.ccr.corp.intel.com (HELO jyao1-MOBL2.ccr.corp.intel.com) ([10.254.213.130]) by orsmga006.jf.intel.com with ESMTP; 22 Feb 2019 05:30:43 -0800 From: Jiewen Yao To: edk2-devel@lists.01.org Cc: Michael D Kinney , Liming Gao , Eric Dong , Ray Ni , Laszlo Ersek , Yao Jiewen Date: Fri, 22 Feb 2019 21:30:33 +0800 Message-Id: <20190222133036.28468-2-jiewen.yao@intel.com> X-Mailer: git-send-email 2.19.2.windows.1 In-Reply-To: <20190222133036.28468-1-jiewen.yao@intel.com> References: <20190222133036.28468-1-jiewen.yao@intel.com> MIME-Version: 1.0 Subject: [PATCH V3 1/4] MdePkg/Include: Add Nasm.inc X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2019 13:30:45 -0000 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1521 This is to add CET related instruction in Nasm because CET instruction is not supported yet. See https://www.nasm.us/xdoc/2.14.02/html/nasmdocb.html Cc: Michael D Kinney Cc: Liming Gao Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yao Jiewen --- MdePkg/Include/Ia32/Nasm.inc | 28 ++++++++++++++++++++ MdePkg/Include/X64/Nasm.inc | 28 ++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/MdePkg/Include/Ia32/Nasm.inc b/MdePkg/Include/Ia32/Nasm.inc new file mode 100644 index 0000000000..c018bb3cae --- /dev/null +++ b/MdePkg/Include/Ia32/Nasm.inc @@ -0,0 +1,28 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2019, Intel Corporation. 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 +; http://opensource.org/licenses/bsd-license.php. +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Abstract: +; +; This file provides macro definitions for NASM files. +; +;------------------------------------------------------------------------------ + +%macro SETSSBSY 0 + DB 0xF3, 0x0F, 0x01, 0xE8 +%endmacro + +%macro READSSP_EAX 0 + DB 0xF3, 0x0F, 0x1E, 0xC8 +%endmacro + +%macro INCSSP_EAX 0 + DB 0xF3, 0x0F, 0xAE, 0xE8 +%endmacro diff --git a/MdePkg/Include/X64/Nasm.inc b/MdePkg/Include/X64/Nasm.inc new file mode 100644 index 0000000000..129a330212 --- /dev/null +++ b/MdePkg/Include/X64/Nasm.inc @@ -0,0 +1,28 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2019, Intel Corporation. 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 +; http://opensource.org/licenses/bsd-license.php. +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +; Abstract: +; +; This file provides macro definitions for NASM files. +; +;------------------------------------------------------------------------------ + +%macro SETSSBSY 0 + DB 0xF3, 0x0F, 0x01, 0xE8 +%endmacro + +%macro READSSP_RAX 0 + DB 0xF3, 0x48, 0x0F, 0x1E, 0xC8 +%endmacro + +%macro INCSSP_RAX 0 + DB 0xF3, 0x48, 0x0F, 0xAE, 0xE8 +%endmacro -- 2.19.2.windows.1