From 60aafa1bdee040c366da84f58a660df505fbff92 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Sat, 8 Nov 2014 02:41:15 +0000 Subject: OvmfPkg XenBusDxe: Convert X64/hypercall.asm to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/hypercall.asm to X64/hypercall.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD Reviewed-by: Jordan Justen git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16317 6f19259b-4bc3-4df7-8a09-765794883524 --- OvmfPkg/XenBusDxe/X64/hypercall.S | 22 ---------------------- OvmfPkg/XenBusDxe/X64/hypercall.asm | 26 -------------------------- OvmfPkg/XenBusDxe/X64/hypercall.nasm | 26 ++++++++++++++++++++++++++ OvmfPkg/XenBusDxe/XenBusDxe.inf | 3 +-- 4 files changed, 27 insertions(+), 50 deletions(-) delete mode 100644 OvmfPkg/XenBusDxe/X64/hypercall.S delete mode 100644 OvmfPkg/XenBusDxe/X64/hypercall.asm create mode 100644 OvmfPkg/XenBusDxe/X64/hypercall.nasm (limited to 'OvmfPkg/XenBusDxe') diff --git a/OvmfPkg/XenBusDxe/X64/hypercall.S b/OvmfPkg/XenBusDxe/X64/hypercall.S deleted file mode 100644 index 83cf466953..0000000000 --- a/OvmfPkg/XenBusDxe/X64/hypercall.S +++ /dev/null @@ -1,22 +0,0 @@ -# INTN -# EFIAPI -# XenHypercall2 ( -# IN VOID *HypercallAddr, -# IN OUT INTN Arg1, -# IN OUT INTN Arg2 -# ); -ASM_GLOBAL ASM_PFX(XenHypercall2) -ASM_PFX(XenHypercall2): - push %rdi - push %rsi - # Copy HypercallAddr to rax - movq %rcx, %rax - # Copy Arg1 to the register expected by Xen - movq %rdx, %rdi - # Copy Arg2 to the register expected by Xen - movq %r8, %rsi - # Call HypercallAddr - call *%rax - pop %rsi - pop %rdi - ret diff --git a/OvmfPkg/XenBusDxe/X64/hypercall.asm b/OvmfPkg/XenBusDxe/X64/hypercall.asm deleted file mode 100644 index 5b3451473d..0000000000 --- a/OvmfPkg/XenBusDxe/X64/hypercall.asm +++ /dev/null @@ -1,26 +0,0 @@ -.code - -; INTN -; EFIAPI -; XenHypercall2 ( -; IN VOID *HypercallAddr, -; IN OUT INTN Arg1, -; IN OUT INTN Arg2 -; ); -XenHypercall2 PROC - 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 -XenHypercall2 ENDP - -END diff --git a/OvmfPkg/XenBusDxe/X64/hypercall.nasm b/OvmfPkg/XenBusDxe/X64/hypercall.nasm new file mode 100644 index 0000000000..177f271ef0 --- /dev/null +++ b/OvmfPkg/XenBusDxe/X64/hypercall.nasm @@ -0,0 +1,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 + diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index b421b852e8..3309f53f6b 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.inf +++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf @@ -54,8 +54,7 @@ Ia32/TestAndClearBit.nasm [Sources.X64] - X64/hypercall.S - X64/hypercall.asm + X64/hypercall.nasm X64/InterlockedCompareExchange16.S X64/InterlockedCompareExchange16.asm X64/TestAndClearBit.S -- cgit v1.2.3