Skip to content

Commit

Permalink
[BOOT] Build fix attempt 1
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFire01 committed Oct 10, 2023
1 parent 0f7e230 commit d13848d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions boot/freeldr/freeldr/arch/uefi/amd64/uefiasm.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <arch/pc/pcbios.h>

.code64
EXTERN UefiServiceStack:QWORD
EXTERN BasicStack:QWORD
EXTERN UefiServiceStack:DWORD
EXTERN BasicStack:DWORD
EXTERN ExecuteLoaderCleanly:PROC
EXTERN UefiExitBootServices:PROC

Expand All @@ -17,12 +17,13 @@ _exituefi:
push rdi
push rbx


/* Save the old stack */
mov rbx, rsp

/* Load the new stack */
xor rbp, rbp
mov rsp, UefiServiceStack
mov rsp, qword ptr UefiServiceStack

/* Call the entry routine, passing the parameters */
mov rax, UefiExitBootServices
Expand All @@ -44,7 +45,7 @@ _exituefi:
PUBLIC _changestack
_changestack:
mov rax, rsp
mov rsp, BasicStack
mov rsp, qword ptr BasicStack
push rax
call ExecuteLoaderCleanly
ret
Expand Down

0 comments on commit d13848d

Please sign in to comment.