summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm')
-rw-r--r--OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm37
1 files changed, 30 insertions, 7 deletions
diff --git a/OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm b/OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm
index e0fa71bb5b..abcfcb55ce 100644
--- a/OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm
+++ b/OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm
@@ -2,24 +2,47 @@ SECTION .text
; INTN
; EFIAPI
-; __XenHypercall2 (
-; IN VOID *HypercallAddr,
+; __XenVmmcall2 (
+; IN INTN HypercallNum,
; IN OUT INTN Arg1,
; IN OUT INTN Arg2
; );
-global ASM_PFX(__XenHypercall2)
-ASM_PFX(__XenHypercall2):
+global ASM_PFX(__XenVmmcall2)
+ASM_PFX(__XenVmmcall2):
; Save only ebx, ecx is supposed to be a scratch register and needs to be
; saved by the caller
push ebx
- ; Copy HypercallAddr to eax
+ ; Copy HypercallNum to eax
mov eax, [esp + 8]
; Copy Arg1 to the register expected by Xen
mov ebx, [esp + 12]
; Copy Arg2 to the register expected by Xen
mov ecx, [esp + 16]
- ; Call HypercallAddr
- call eax
+ ; Call Hypercall
+ vmmcall
+ pop ebx
+ ret
+
+; INTN
+; EFIAPI
+; __XenVmcall2 (
+; IN INTN HypercallNum,
+; IN OUT INTN Arg1,
+; IN OUT INTN Arg2
+; );
+global ASM_PFX(__XenVmcall2)
+ASM_PFX(__XenVmcall2):
+ ; Save only ebx, ecx is supposed to be a scratch register and needs to be
+ ; saved by the caller
+ push ebx
+ ; Copy HypercallNum to eax
+ mov eax, [esp + 8]
+ ; Copy Arg1 to the register expected by Xen
+ mov ebx, [esp + 12]
+ ; Copy Arg2 to the register expected by Xen
+ mov ecx, [esp + 16]
+ ; Call Hypercall
+ vmcall
pop ebx
ret