summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2016-03-07 19:18:04 -0800
committerLaszlo Ersek <lersek@redhat.com>2016-03-08 10:52:33 +0100
commitace1d0517b656a6d15484e875d73c0fe661ac8c7 (patch)
treebe177e7e3ad97584981a9fc93c8806e6680991fd
parent6026bf4600373d408fbd9f23d3e894f60a547b9d (diff)
downloadedk2-platforms-ace1d0517b656a6d15484e875d73c0fe661ac8c7.tar.xz
OvmfPkg PciHostBridgeDxe: Convert X64/IoFifo.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/IoFifo.asm to X64/IoFifo.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
-rw-r--r--OvmfPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf3
-rw-r--r--OvmfPkg/PciHostBridgeDxe/X64/IoFifo.S122
-rw-r--r--OvmfPkg/PciHostBridgeDxe/X64/IoFifo.nasm (renamed from OvmfPkg/PciHostBridgeDxe/X64/IoFifo.asm)29
3 files changed, 15 insertions, 139 deletions
diff --git a/OvmfPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf b/OvmfPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
index 5ef1ef67de..edf1657267 100644
--- a/OvmfPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
+++ b/OvmfPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
@@ -52,8 +52,7 @@
Ia32/IoFifo.nasm
[Sources.X64]
- X64/IoFifo.asm
- X64/IoFifo.S
+ X64/IoFifo.nasm
[Protocols]
gEfiPciHostBridgeResourceAllocationProtocolGuid ## PRODUCES
diff --git a/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.S b/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.S
deleted file mode 100644
index decb382028..0000000000
--- a/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.S
+++ /dev/null
@@ -1,122 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
-#
-# 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, // rcx
-# IN UINTN Count, // rdx
-# IN VOID *Buffer // r8
-# );
-#------------------------------------------------------------------------------
-ASM_GLOBAL ASM_PFX(IoReadFifo8)
-ASM_PFX(IoReadFifo8):
- cld
- xchg %rcx, %rdx
- xchg %r8, %rdi # rdi: buffer address; r8: save register
-rep insb
- mov %r8, %rdi # restore rdi
- ret
-
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# IoReadFifo16 (
-# IN UINTN Port, // rcx
-# IN UINTN Count, // rdx
-# IN VOID *Buffer // r8
-# );
-#------------------------------------------------------------------------------
-ASM_GLOBAL ASM_PFX(IoReadFifo16)
-ASM_PFX(IoReadFifo16):
- cld
- xchg %rcx, %rdx
- xchg %r8, %rdi # rdi: buffer address; r8: save register
-rep insw
- mov %r8, %rdi # restore rdi
- ret
-
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# IoReadFifo32 (
-# IN UINTN Port, // rcx
-# IN UINTN Count, // rdx
-# IN VOID *Buffer // r8
-# );
-#------------------------------------------------------------------------------
-ASM_GLOBAL ASM_PFX(IoReadFifo32)
-ASM_PFX(IoReadFifo32):
- cld
- xchg %rcx, %rdx
- xchg %r8, %rdi # rdi: buffer address; r8: save register
-rep insl
- mov %r8, %rdi # restore rdi
- ret
-
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# IoWriteFifo8 (
-# IN UINTN Port, // rcx
-# IN UINTN Count, // rdx
-# IN VOID *Buffer // r8
-# );
-#------------------------------------------------------------------------------
-ASM_GLOBAL ASM_PFX(IoWriteFifo8)
-ASM_PFX(IoWriteFifo8):
- cld
- xchg %rcx, %rdx
- xchg %r8, %rsi # rsi: buffer address; r8: save register
-rep outsb
- mov %r8, %rsi # restore rsi
- ret
-
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# IoWriteFifo16 (
-# IN UINTN Port, // rcx
-# IN UINTN Count, // rdx
-# IN VOID *Buffer // r8
-# );
-#------------------------------------------------------------------------------
-ASM_GLOBAL ASM_PFX(IoWriteFifo16)
-ASM_PFX(IoWriteFifo16):
- cld
- xchg %rcx, %rdx
- xchg %r8, %rsi # rsi: buffer address; r8: save register
-rep outsw
- mov %r8, %rsi # restore rsi
- ret
-
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# IoWriteFifo32 (
-# IN UINTN Port, // rcx
-# IN UINTN Count, // rdx
-# IN VOID *Buffer // r8
-# );
-#------------------------------------------------------------------------------
-ASM_GLOBAL ASM_PFX(IoWriteFifo32)
-ASM_PFX(IoWriteFifo32):
- cld
- xchg %rcx, %rdx
- xchg %r8, %rsi # rsi: buffer address; r8: save register
-rep outsl
- mov %r8, %rsi # restore rsi
- ret
-
diff --git a/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.asm b/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.nasm
index 1a3f0ef2ca..bb3d1da67a 100644
--- a/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.asm
+++ b/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.nasm
@@ -12,7 +12,8 @@
;
;------------------------------------------------------------------------------
- .code
+ DEFAULT REL
+ SECTION .text
;------------------------------------------------------------------------------
; VOID
@@ -23,14 +24,14 @@
; IN VOID *Buffer // r8
; );
;------------------------------------------------------------------------------
-IoReadFifo8 PROC
+global ASM_PFX(IoReadFifo8)
+ASM_PFX(IoReadFifo8):
cld
xchg rcx, rdx
xchg rdi, r8 ; rdi: buffer address; r8: save rdi
rep insb
mov rdi, r8 ; restore rdi
ret
-IoReadFifo8 ENDP
;------------------------------------------------------------------------------
; VOID
@@ -41,14 +42,14 @@ IoReadFifo8 ENDP
; IN VOID *Buffer // r8
; );
;------------------------------------------------------------------------------
-IoReadFifo16 PROC
+global ASM_PFX(IoReadFifo16)
+ASM_PFX(IoReadFifo16):
cld
xchg rcx, rdx
xchg rdi, r8 ; rdi: buffer address; r8: save rdi
rep insw
mov rdi, r8 ; restore rdi
ret
-IoReadFifo16 ENDP
;------------------------------------------------------------------------------
; VOID
@@ -59,14 +60,14 @@ IoReadFifo16 ENDP
; IN VOID *Buffer // r8
; );
;------------------------------------------------------------------------------
-IoReadFifo32 PROC
+global ASM_PFX(IoReadFifo32)
+ASM_PFX(IoReadFifo32):
cld
xchg rcx, rdx
xchg rdi, r8 ; rdi: buffer address; r8: save rdi
rep insd
mov rdi, r8 ; restore rdi
ret
-IoReadFifo32 ENDP
;------------------------------------------------------------------------------
; VOID
@@ -77,14 +78,14 @@ IoReadFifo32 ENDP
; IN VOID *Buffer // r8
; );
;------------------------------------------------------------------------------
-IoWriteFifo8 PROC
+global ASM_PFX(IoWriteFifo8)
+ASM_PFX(IoWriteFifo8):
cld
xchg rcx, rdx
xchg rsi, r8 ; rsi: buffer address; r8: save rsi
rep outsb
mov rsi, r8 ; restore rsi
ret
-IoWriteFifo8 ENDP
;------------------------------------------------------------------------------
; VOID
@@ -95,14 +96,14 @@ IoWriteFifo8 ENDP
; IN VOID *Buffer // r8
; );
;------------------------------------------------------------------------------
-IoWriteFifo16 PROC
+global ASM_PFX(IoWriteFifo16)
+ASM_PFX(IoWriteFifo16):
cld
xchg rcx, rdx
xchg rsi, r8 ; rsi: buffer address; r8: save rsi
rep outsw
mov rsi, r8 ; restore rsi
ret
-IoWriteFifo16 ENDP
;------------------------------------------------------------------------------
; VOID
@@ -113,14 +114,12 @@ IoWriteFifo16 ENDP
; IN VOID *Buffer // r8
; );
;------------------------------------------------------------------------------
-IoWriteFifo32 PROC
+global ASM_PFX(IoWriteFifo32)
+ASM_PFX(IoWriteFifo32):
cld
xchg rcx, rdx
xchg rsi, r8 ; rsi: buffer address; r8: save rsi
rep outsd
mov rsi, r8 ; restore rsi
ret
-IoWriteFifo32 ENDP
-
- END