Reviewed-by: Jiewen Yao <jiewen....@intel.com> > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sheng Wei > Sent: Saturday, February 20, 2021 11:15 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Liming Gao > <gaolim...@byosoft.com.cn>; Liu, Zhiguang <zhiguang....@intel.com>; Yao, > Jiewen <jiewen....@intel.com> > Subject: [edk2-devel] [PATCH v5 1/2] MdePkg/Include: Add CET instructions to > Nasm.inc > > This is to add instruction SAVEPREVSSP, CLRSSBSY and RSTORSSP_RAX in Nasm. > The open CI is using NASM 2.14.02. > CET instructions are supported since NASM 2.15.01. > > DB-encoded CET instructions need to be removed after open CI update to > NASM 2.15.01. > The BZ ticket is https://bugzilla.tianocore.org/show_bug.cgi?id=3227 . > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3192 > > Signed-off-by: Sheng Wei <w.sh...@intel.com> > Cc: Michael D Kinney <michael.d.kin...@intel.com> > Cc: Liming Gao <gaolim...@byosoft.com.cn> > Cc: Zhiguang Liu <zhiguang....@intel.com> > Cc: Jiewen Yao <jiewen....@intel.com> > --- > MdePkg/Include/Ia32/Nasm.inc | 12 ++++++++++++ > MdePkg/Include/X64/Nasm.inc | 12 ++++++++++++ > 2 files changed, 24 insertions(+) > > diff --git a/MdePkg/Include/Ia32/Nasm.inc b/MdePkg/Include/Ia32/Nasm.inc > index 31ce861f1e..fa42f9d3e9 100644 > --- a/MdePkg/Include/Ia32/Nasm.inc > +++ b/MdePkg/Include/Ia32/Nasm.inc > @@ -9,6 +9,18 @@ > ; > > ;------------------------------------------------------------------------------ > > +%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 > + > %macro SETSSBSY 0 > DB 0xF3, 0x0F, 0x01, 0xE8 > %endmacro > diff --git a/MdePkg/Include/X64/Nasm.inc b/MdePkg/Include/X64/Nasm.inc > index 42412735ea..e57a803c81 100644 > --- a/MdePkg/Include/X64/Nasm.inc > +++ b/MdePkg/Include/X64/Nasm.inc > @@ -9,6 +9,18 @@ > ; > > ;------------------------------------------------------------------------------ > > +%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 > + > %macro SETSSBSY 0 > DB 0xF3, 0x0F, 0x01, 0xE8 > %endmacro > -- > 2.16.2.windows.1 > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#72217): https://edk2.groups.io/g/devel/message/72217 Mute This Topic: https://groups.io/mt/80772530/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-