summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/XenBusDxe/X64/hypercall.nasm
blob: 177f271ef094b74fe4f034e9dbf8d25ad8f55fe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
DEFAULT REL
SECTION .text

; INTN
; EFIAPI
; XenHypercall2 (
;   IN     VOID *HypercallAddr,
;   IN OUT INTN Arg1,
;   IN OUT INTN Arg2
;   );
global ASM_PFX(XenHypercall2)
ASM_PFX(XenHypercall2):
  push rdi
  push rsi
  ; Copy HypercallAddr to rax
  mov rax, rcx
  ; Copy Arg1 to the register expected by Xen
  mov rdi, rdx
  ; Copy Arg2 to the register expected by Xen
  mov rsi, r8
  ; Call HypercallAddr
  call rax
  pop rsi
  pop rdi
  ret