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 <anthony.per...@citrix.com> --- OvmfPkg/XenBusDxe/Ia32/hypercall.S | 22 ---------------------- .../Ia32/{hypercall.asm => hypercall.nasm} | 7 +++---- OvmfPkg/XenBusDxe/XenBusDxe.inf | 3 +-- 3 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 OvmfPkg/XenBusDxe/Ia32/hypercall.S rename OvmfPkg/XenBusDxe/Ia32/{hypercall.asm => hypercall.nasm} (83%) diff --git a/OvmfPkg/XenBusDxe/Ia32/hypercall.S b/OvmfPkg/XenBusDxe/Ia32/hypercall.S deleted file mode 100644 index 77d3478..0000000 --- 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.nasm similarity index 83% rename from OvmfPkg/XenBusDxe/Ia32/hypercall.asm rename to OvmfPkg/XenBusDxe/Ia32/hypercall.nasm index 9ead740..8547c30 100644 --- a/OvmfPkg/XenBusDxe/Ia32/hypercall.asm +++ b/OvmfPkg/XenBusDxe/Ia32/hypercall.nasm @@ -1,4 +1,4 @@ -.code +SECTION .text ; INTN ; EFIAPI @@ -7,7 +7,8 @@ ; IN OUT INTN Arg1, ; IN OUT INTN Arg2 ; ); -XenHypercall2 PROC +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 @@ -21,6 +22,4 @@ XenHypercall2 PROC call eax pop ebx ret -XenHypercall2 ENDP -END diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index 17a5a90..2478e35 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 -- Anthony PERARD ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel