-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mikhail Krichanov
committed
Jan 22, 2024
1 parent
cff574f
commit b10b1de
Showing
10 changed files
with
173 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
MdePkg/Library/Ring3UefiBootServicesTableLib/X64/SysCall.nasm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
;------------------------------------------------------------------------------ | ||
; Copyright (c) 2024, Mikhail Krichanov. All rights reserved. | ||
; SPDX-License-Identifier: BSD-3-Clause | ||
;------------------------------------------------------------------------------ | ||
|
||
DEFAULT REL | ||
SECTION .text | ||
|
||
;------------------------------------------------------------------------------ | ||
; UINTN | ||
; EFIAPI | ||
; SysCall ( | ||
; IN UINTN FunctionAddress, | ||
; ... | ||
; ); | ||
;------------------------------------------------------------------------------ | ||
global ASM_PFX(SysCall) | ||
ASM_PFX(SysCall): | ||
; Save FunctionAddress for CoreBootServices(). | ||
mov r10, rcx | ||
|
||
; SYSCALL saves RFLAGS into R11 and the RIP of the next instruction into RCX. | ||
syscall | ||
; SYSRET copies the value in RCX into RIP and loads RFLAGS from R11. | ||
|
||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters