From 8e7ca01de038f0f4ee3df8fabf0caa2eb804379c Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Sat, 8 Nov 2014 02:40:44 +0000 Subject: OvmfPkg XenBusDxe: Convert Ia32/hypercall.asm to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/hypercall.asm to Ia32/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@16314 6f19259b-4bc3-4df7-8a09-765794883524 --- OvmfPkg/XenBusDxe/Ia32/hypercall.S | 22 ---------------------- OvmfPkg/XenBusDxe/Ia32/hypercall.asm | 26 -------------------------- OvmfPkg/XenBusDxe/Ia32/hypercall.nasm | 25 +++++++++++++++++++++++++ OvmfPkg/XenBusDxe/XenBusDxe.inf | 3 +-- 4 files changed, 26 insertions(+), 50 deletions(-) delete mode 100644 OvmfPkg/XenBusDxe/Ia32/hypercall.S delete mode 100644 OvmfPkg/XenBusDxe/Ia32/hypercall.asm create mode 100644 OvmfPkg/XenBusDxe/Ia32/hypercall.nasm diff --git a/OvmfPkg/XenBusDxe/Ia32/hypercall.S b/OvmfPkg/XenBusDxe/Ia32/hypercall.S deleted file mode 100644 index 77d3478475..0000000000 --- a/OvmfPkg/XenBusDxe/Ia32/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): - # 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 - mov 8(%esp), %eax - # Copy Arg1 to the register expected by Xen - mov 12(%esp), %ebx - # Copy Arg2 to the register expected by Xen - mov 16(%esp), %ecx - # Call HypercallAddr - call *%eax - pop %ebx - ret diff --git a/OvmfPkg/XenBusDxe/Ia32/hypercall.asm b/OvmfPkg/XenBusDxe/Ia32/hypercall.asm deleted file mode 100644 index 9ead740f91..0000000000 --- a/OvmfPkg/XenBusDxe/Ia32/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 - ; 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 - 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 - pop ebx - ret -XenHypercall2 ENDP - -END diff --git a/OvmfPkg/XenBusDxe/Ia32/hypercall.nasm b/OvmfPkg/XenBusDxe/Ia32/hypercall.nasm new file mode 100644 index 0000000000..8547c30b81 --- /dev/null +++ b/OvmfPkg/XenBusDxe/Ia32/hypercall.nasm @@ -0,0 +1,25 @@ +SECTION .text + +; INTN +; EFIAPI +; XenHypercall2 ( +; IN VOID *HypercallAddr, +; IN OUT INTN Arg1, +; IN OUT INTN Arg2 +; ); +global ASM_PFX(XenHypercall2) +ASM_PFX(XenHypercall2): + ; 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 + 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 + pop ebx + ret + diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index 17a5a9073a..2478e35b63 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.inf +++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf @@ -49,8 +49,7 @@ Helpers.c [Sources.IA32] - Ia32/hypercall.S - Ia32/hypercall.asm + Ia32/hypercall.nasm Ia32/InterlockedCompareExchange16.S Ia32/InterlockedCompareExchange16.asm Ia32/TestAndClearBit.S -- cgit v1.2.3