From 8a2976125d7f55ca0ef93c88680a4c2abbaa7ca5 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 31 Oct 2014 20:54:41 +0000 Subject: OvmfPkg QemuFwCfgLib: Convert Ia32/IoLibExAsm.asm to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/IoLibExAsm.asm to Ia32/IoLibExAsm.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen Reviewed-by: Laszlo Ersek git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16289 6f19259b-4bc3-4df7-8a09-765794883524 --- OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S | 52 ------------------- OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm | 62 ----------------------- OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm | 55 ++++++++++++++++++++ OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf | 3 +- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf | 3 +- 5 files changed, 57 insertions(+), 118 deletions(-) delete mode 100644 OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S delete mode 100644 OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm create mode 100644 OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm (limited to 'OvmfPkg') diff --git a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S deleted file mode 100644 index c2735d2c65..0000000000 --- a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S +++ /dev/null @@ -1,52 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
-# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php. -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# IoReadFifo8 ( -# IN UINTN Port, -# IN UINTN Size, -# IN VOID *Buffer -# ); -#------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(IoReadFifo8) -ASM_PFX(IoReadFifo8): - movw 4(%esp), %dx - movl 8(%esp), %ecx - pushl %edi - movl 16(%esp), %edi -rep insb - popl %edi - ret - - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# IoWriteFifo8 ( -# IN UINTN Port, -# IN UINTN Size, -# IN VOID *Buffer -# ); -#------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(IoWriteFifo8) -ASM_PFX(IoWriteFifo8): - movw 4(%esp), %dx - movl 8(%esp), %ecx - pushl %esi - movl 16(%esp), %esi -rep outsb - popl %esi - ret - diff --git a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm deleted file mode 100644 index f7d65c49af..0000000000 --- a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm +++ /dev/null @@ -1,62 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -;------------------------------------------------------------------------------ - - .586P - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoReadFifo8 ( -; IN UINTN Port, -; IN UINTN Size, -; IN VOID *Buffer -; ); -;------------------------------------------------------------------------------ -IoReadFifo8 PROC - - mov dx, [esp + 4] - mov ecx, [esp + 8] - push edi - mov edi, [esp + 16] -rep insb - pop edi - ret - -IoReadFifo8 ENDP - - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoWriteFifo8 ( -; IN UINTN Port, -; IN UINTN Size, -; IN VOID *Buffer -; ); -;------------------------------------------------------------------------------ -IoWriteFifo8 PROC - - mov dx, [esp + 4] - mov ecx, [esp + 8] - push esi - mov esi, [esp + 16] -rep outsb - pop esi - ret - -IoWriteFifo8 ENDP - - END - diff --git a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm new file mode 100644 index 0000000000..faa22e97d4 --- /dev/null +++ b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm @@ -0,0 +1,55 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+; This program and the accompanying materials +; are licensed and made available under the terms and conditions of the BSD License +; which accompanies this distribution. The full text of the license may be found at +; http://opensource.org/licenses/bsd-license.php. +; +; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +;------------------------------------------------------------------------------ + + SECTION .text + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; IoReadFifo8 ( +; IN UINTN Port, +; IN UINTN Size, +; IN VOID *Buffer +; ); +;------------------------------------------------------------------------------ +global ASM_PFX(IoReadFifo8) +ASM_PFX(IoReadFifo8): + + mov dx, [esp + 4] + mov ecx, [esp + 8] + push edi + mov edi, [esp + 16] +rep insb + pop edi + ret + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; IoWriteFifo8 ( +; IN UINTN Port, +; IN UINTN Size, +; IN VOID *Buffer +; ); +;------------------------------------------------------------------------------ +global ASM_PFX(IoWriteFifo8) +ASM_PFX(IoWriteFifo8): + + mov dx, [esp + 4] + mov ecx, [esp + 8] + push esi + mov esi, [esp + 16] +rep outsb + pop esi + ret + diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf index 071737edef..f163de3d3f 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf @@ -36,8 +36,7 @@ QemuFwCfgPeiDxe.c [Sources.IA32] - Ia32/IoLibExAsm.asm - Ia32/IoLibExAsm.S + Ia32/IoLibExAsm.nasm [Sources.X64] X64/IoLibExAsm.asm diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf index 71beacbaf9..5c5c5c7f40 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf @@ -34,8 +34,7 @@ QemuFwCfgSec.c [Sources.IA32] - Ia32/IoLibExAsm.asm - Ia32/IoLibExAsm.S + Ia32/IoLibExAsm.nasm [Sources.X64] X64/IoLibExAsm.asm -- cgit v1.2.3