What order should things be in when calling UEFI functions? Should I have the 5th, 6th, and 7th parameters on the stack before the shadow space or vice versa? For example should I have this
Code: Select all
; UEFI parameters go on the stack in reverse order
push PARAM_7 ; Push parameter 7
push PARAM_6 ; Push parameter 6
push PARAM_5 ; Push parameter 5
sub rsp, 32 ; Required shadow space
call UEFI_function ; Call the function
Code: Select all
sub rsp, 32 ; Make shadow space
; Remaining parameters go on the stack in reverse order
push PARAM_7 ; Push parameter 7
push PARAM_6 ; Push parameter 6
push PARAM_5 ; Push parameter 5
call UEFI_function ; Call the function