VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Cet.nasm@ 86173

Last change on this file since 86173 was 80721, checked in by vboxsync, 6 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 753 bytes
Line 
1;------------------------------------------------------------------------------ ;
2; Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
3; SPDX-License-Identifier: BSD-2-Clause-Patent
4;
5;-------------------------------------------------------------------------------
6
7%include "Nasm.inc"
8
9SECTION .text
10
11global ASM_PFX(DisableCet)
12ASM_PFX(DisableCet):
13
14 ; Skip the pushed data for call
15 mov eax, 1
16 INCSSP_EAX
17
18 mov eax, cr4
19 btr eax, 23 ; clear CET
20 mov cr4, eax
21 ret
22
23global ASM_PFX(EnableCet)
24ASM_PFX(EnableCet):
25
26 mov eax, cr4
27 bts eax, 23 ; set CET
28 mov cr4, eax
29
30 ; use jmp to skip the check for ret
31 pop eax
32 jmp eax
33
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette