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 |
|
---|
9 | DEFAULT REL
|
---|
10 | SECTION .text
|
---|
11 |
|
---|
12 | global ASM_PFX(DisableCet)
|
---|
13 | ASM_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 |
|
---|
24 | global ASM_PFX(EnableCet)
|
---|
25 | ASM_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.