VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/UefiCpuPkg/PiSmmCpuDxeSmm/X64/Cet.nasm@ 89983

Last change on this file since 89983 was 80721, checked in by vboxsync, 5 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: 765 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
9DEFAULT REL
10SECTION .text
11
12global ASM_PFX(DisableCet)
13ASM_PFX(DisableCet):
14
15 ; Skip the pushed data for call
16 mov rax, 1
17 INCSSP_RAX
18
19 mov rax, cr4
20 btr eax, 23 ; clear CET
21 mov cr4, rax
22 ret
23
24global ASM_PFX(EnableCet)
25ASM_PFX(EnableCet):
26
27 mov rax, cr4
28 bts eax, 23 ; set CET
29 mov cr4, rax
30
31 ; use jmp to skip the check for ret
32 pop rax
33 jmp rax
34
Note: See TracBrowser for help on using the repository browser.

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