Skip to content

Commit

Permalink
UefiCpuPkg: Add macro definitions for CET feature for NASM files.
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Wei <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Cc: Wu Jiaxin <[email protected]>
Cc: Tan Dun <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
  • Loading branch information
swei22 authored and mergify[bot] committed Dec 7, 2023
1 parent ff4c49a commit b5f20ec
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions UefiCpuPkg/PiSmmCpuDxeSmm/Cet.inc
Original file line number Diff line number Diff line change
@@ -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 NASM files.
;
;------------------------------------------------------------------------------

%define MSR_IA32_U_CET 0x6A0
%define MSR_IA32_S_CET 0x6A2
%define MSR_IA32_CET_SH_STK_EN (1<<0)
%define MSR_IA32_CET_WR_SHSTK_EN (1<<1)
%define MSR_IA32_CET_ENDBR_EN (1<<2)
%define MSR_IA32_CET_LEG_IW_EN (1<<3)
%define MSR_IA32_CET_NO_TRACK_EN (1<<4)
%define MSR_IA32_CET_SUPPRESS_DIS (1<<5)
%define MSR_IA32_CET_SUPPRESS (1<<10)
%define MSR_IA32_CET_TRACKER (1<<11)
%define MSR_IA32_PL0_SSP 0x6A4
%define MSR_IA32_INTERRUPT_SSP_TABLE_ADDR 0x6A8

%define CR4_CET_BIT 23
%define CR4_CET (1<<CR4_CET_BIT)

0 comments on commit b5f20ec

Please sign in to comment.