OvmfPkg PciHostBridgeDxe: Convert X64/IoFifo.asm to NASM
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 8 Mar 2016 03:18:04 +0000 (19:18 -0800)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 8 Mar 2016 09:52:33 +0000 (10:52 +0100)
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>
OvmfPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
OvmfPkg/PciHostBridgeDxe/X64/IoFifo.S [deleted file]
OvmfPkg/PciHostBridgeDxe/X64/IoFifo.asm [deleted file]
OvmfPkg/PciHostBridgeDxe/X64/IoFifo.nasm [new file with mode: 0644]

index 5ef1ef67de5c288ef456bbc9f0237288cfa8023a..edf1657267c4420d4dcd661cb01da0d4c1895452 100644 (file)
@@ -52,8 +52,7 @@
   Ia32/IoFifo.nasm\r
 \r
 [Sources.X64]\r
-  X64/IoFifo.asm\r
-  X64/IoFifo.S\r
+  X64/IoFifo.nasm\r
 \r
 [Protocols]\r
   gEfiPciHostBridgeResourceAllocationProtocolGuid       ## PRODUCES\r
diff --git a/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.S b/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.S
deleted file mode 100644 (file)
index decb382..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
-#\r
-# This program and the accompanying materials are licensed and made available\r
-# under the terms and conditions of the BSD License which accompanies this\r
-# distribution.  The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php.\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-#------------------------------------------------------------------------------\r
-#  VOID\r
-#  EFIAPI\r
-#  IoReadFifo8 (\r
-#    IN UINTN                  Port,              // rcx\r
-#    IN UINTN                  Count,             // rdx\r
-#    IN VOID                   *Buffer            // r8\r
-#    );\r
-#------------------------------------------------------------------------------\r
-ASM_GLOBAL ASM_PFX(IoReadFifo8)\r
-ASM_PFX(IoReadFifo8):\r
-    cld\r
-    xchg    %rcx, %rdx\r
-    xchg    %r8, %rdi           # rdi: buffer address; r8: save register\r
-rep insb\r
-    mov     %r8, %rdi           # restore rdi\r
-    ret\r
-\r
-#------------------------------------------------------------------------------\r
-#  VOID\r
-#  EFIAPI\r
-#  IoReadFifo16 (\r
-#    IN UINTN                  Port,              // rcx\r
-#    IN UINTN                  Count,             // rdx\r
-#    IN VOID                   *Buffer            // r8\r
-#    );\r
-#------------------------------------------------------------------------------\r
-ASM_GLOBAL ASM_PFX(IoReadFifo16)\r
-ASM_PFX(IoReadFifo16):\r
-    cld\r
-    xchg    %rcx, %rdx\r
-    xchg    %r8, %rdi           # rdi: buffer address; r8: save register\r
-rep insw\r
-    mov     %r8, %rdi           # restore rdi\r
-    ret\r
-\r
-#------------------------------------------------------------------------------\r
-#  VOID\r
-#  EFIAPI\r
-#  IoReadFifo32 (\r
-#    IN UINTN                  Port,              // rcx\r
-#    IN UINTN                  Count,             // rdx\r
-#    IN VOID                   *Buffer            // r8\r
-#    );\r
-#------------------------------------------------------------------------------\r
-ASM_GLOBAL ASM_PFX(IoReadFifo32)\r
-ASM_PFX(IoReadFifo32):\r
-    cld\r
-    xchg    %rcx, %rdx\r
-    xchg    %r8, %rdi           # rdi: buffer address; r8: save register\r
-rep insl\r
-    mov     %r8, %rdi           # restore rdi\r
-    ret\r
-\r
-#------------------------------------------------------------------------------\r
-#  VOID\r
-#  EFIAPI\r
-#  IoWriteFifo8 (\r
-#    IN UINTN                  Port,              // rcx\r
-#    IN UINTN                  Count,             // rdx\r
-#    IN VOID                   *Buffer            // r8\r
-#    );\r
-#------------------------------------------------------------------------------\r
-ASM_GLOBAL ASM_PFX(IoWriteFifo8)\r
-ASM_PFX(IoWriteFifo8):\r
-    cld\r
-    xchg    %rcx, %rdx\r
-    xchg    %r8, %rsi           # rsi: buffer address; r8: save register\r
-rep outsb\r
-    mov     %r8, %rsi           # restore rsi\r
-    ret\r
-\r
-#------------------------------------------------------------------------------\r
-#  VOID\r
-#  EFIAPI\r
-#  IoWriteFifo16 (\r
-#    IN UINTN                  Port,              // rcx\r
-#    IN UINTN                  Count,             // rdx\r
-#    IN VOID                   *Buffer            // r8\r
-#    );\r
-#------------------------------------------------------------------------------\r
-ASM_GLOBAL ASM_PFX(IoWriteFifo16)\r
-ASM_PFX(IoWriteFifo16):\r
-    cld\r
-    xchg    %rcx, %rdx\r
-    xchg    %r8, %rsi           # rsi: buffer address; r8: save register\r
-rep outsw\r
-    mov     %r8, %rsi           # restore rsi\r
-    ret\r
-\r
-#------------------------------------------------------------------------------\r
-#  VOID\r
-#  EFIAPI\r
-#  IoWriteFifo32 (\r
-#    IN UINTN                  Port,              // rcx\r
-#    IN UINTN                  Count,             // rdx\r
-#    IN VOID                   *Buffer            // r8\r
-#    );\r
-#------------------------------------------------------------------------------\r
-ASM_GLOBAL ASM_PFX(IoWriteFifo32)\r
-ASM_PFX(IoWriteFifo32):\r
-    cld\r
-    xchg    %rcx, %rdx\r
-    xchg    %r8, %rsi           # rsi: buffer address; r8: save register\r
-rep outsl\r
-    mov     %r8, %rsi           # restore rsi\r
-    ret\r
-\r
diff --git a/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.asm b/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.asm
deleted file mode 100644 (file)
index 1a3f0ef..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
-;\r
-; This program and the accompanying materials are licensed and made available\r
-; under the terms and conditions of the BSD License which accompanies this\r
-; distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php.\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoReadFifo8 (\r
-;    IN UINTN                  Port,              // rcx\r
-;    IN UINTN                  Size,              // rdx\r
-;    IN VOID                   *Buffer            // r8\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoReadFifo8 PROC\r
-    cld\r
-    xchg    rcx, rdx\r
-    xchg    rdi, r8             ; rdi: buffer address; r8: save rdi\r
-rep insb\r
-    mov     rdi, r8             ; restore rdi\r
-    ret\r
-IoReadFifo8 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoReadFifo16 (\r
-;    IN UINTN                  Port,              // rcx\r
-;    IN UINTN                  Size,              // rdx\r
-;    IN VOID                   *Buffer            // r8\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoReadFifo16 PROC\r
-    cld\r
-    xchg    rcx, rdx\r
-    xchg    rdi, r8             ; rdi: buffer address; r8: save rdi\r
-rep insw\r
-    mov     rdi, r8             ; restore rdi\r
-    ret\r
-IoReadFifo16 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoReadFifo32 (\r
-;    IN UINTN                  Port,              // rcx\r
-;    IN UINTN                  Size,              // rdx\r
-;    IN VOID                   *Buffer            // r8\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoReadFifo32 PROC\r
-    cld\r
-    xchg    rcx, rdx\r
-    xchg    rdi, r8             ; rdi: buffer address; r8: save rdi\r
-rep insd\r
-    mov     rdi, r8             ; restore rdi\r
-    ret\r
-IoReadFifo32 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoWriteFifo8 (\r
-;    IN UINTN                  Port,              // rcx\r
-;    IN UINTN                  Size,              // rdx\r
-;    IN VOID                   *Buffer            // r8\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoWriteFifo8 PROC\r
-    cld\r
-    xchg    rcx, rdx\r
-    xchg    rsi, r8             ; rsi: buffer address; r8: save rsi\r
-rep outsb\r
-    mov     rsi, r8             ; restore rsi\r
-    ret\r
-IoWriteFifo8 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoWriteFifo16 (\r
-;    IN UINTN                  Port,              // rcx\r
-;    IN UINTN                  Size,              // rdx\r
-;    IN VOID                   *Buffer            // r8\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoWriteFifo16 PROC\r
-    cld\r
-    xchg    rcx, rdx\r
-    xchg    rsi, r8             ; rsi: buffer address; r8: save rsi\r
-rep outsw\r
-    mov     rsi, r8             ; restore rsi\r
-    ret\r
-IoWriteFifo16 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoWriteFifo32 (\r
-;    IN UINTN                  Port,              // rcx\r
-;    IN UINTN                  Size,              // rdx\r
-;    IN VOID                   *Buffer            // r8\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoWriteFifo32 PROC\r
-    cld\r
-    xchg    rcx, rdx\r
-    xchg    rsi, r8             ; rsi: buffer address; r8: save rsi\r
-rep outsd\r
-    mov     rsi, r8             ; restore rsi\r
-    ret\r
-IoWriteFifo32 ENDP\r
-\r
-    END\r
-\r
diff --git a/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.nasm b/OvmfPkg/PciHostBridgeDxe/X64/IoFifo.nasm
new file mode 100644 (file)
index 0000000..bb3d1da
--- /dev/null
@@ -0,0 +1,125 @@
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+;\r
+; This program and the accompanying materials are licensed and made available\r
+; under the terms and conditions of the BSD License which accompanies this\r
+; distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php.\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+    DEFAULT REL\r
+    SECTION .text\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EFIAPI\r
+;  IoReadFifo8 (\r
+;    IN UINTN                  Port,              // rcx\r
+;    IN UINTN                  Size,              // rdx\r
+;    IN VOID                   *Buffer            // r8\r
+;    );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(IoReadFifo8)\r
+ASM_PFX(IoReadFifo8):\r
+    cld\r
+    xchg    rcx, rdx\r
+    xchg    rdi, r8             ; rdi: buffer address; r8: save rdi\r
+rep insb\r
+    mov     rdi, r8             ; restore rdi\r
+    ret\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EFIAPI\r
+;  IoReadFifo16 (\r
+;    IN UINTN                  Port,              // rcx\r
+;    IN UINTN                  Size,              // rdx\r
+;    IN VOID                   *Buffer            // r8\r
+;    );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(IoReadFifo16)\r
+ASM_PFX(IoReadFifo16):\r
+    cld\r
+    xchg    rcx, rdx\r
+    xchg    rdi, r8             ; rdi: buffer address; r8: save rdi\r
+rep insw\r
+    mov     rdi, r8             ; restore rdi\r
+    ret\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EFIAPI\r
+;  IoReadFifo32 (\r
+;    IN UINTN                  Port,              // rcx\r
+;    IN UINTN                  Size,              // rdx\r
+;    IN VOID                   *Buffer            // r8\r
+;    );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(IoReadFifo32)\r
+ASM_PFX(IoReadFifo32):\r
+    cld\r
+    xchg    rcx, rdx\r
+    xchg    rdi, r8             ; rdi: buffer address; r8: save rdi\r
+rep insd\r
+    mov     rdi, r8             ; restore rdi\r
+    ret\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EFIAPI\r
+;  IoWriteFifo8 (\r
+;    IN UINTN                  Port,              // rcx\r
+;    IN UINTN                  Size,              // rdx\r
+;    IN VOID                   *Buffer            // r8\r
+;    );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(IoWriteFifo8)\r
+ASM_PFX(IoWriteFifo8):\r
+    cld\r
+    xchg    rcx, rdx\r
+    xchg    rsi, r8             ; rsi: buffer address; r8: save rsi\r
+rep outsb\r
+    mov     rsi, r8             ; restore rsi\r
+    ret\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EFIAPI\r
+;  IoWriteFifo16 (\r
+;    IN UINTN                  Port,              // rcx\r
+;    IN UINTN                  Size,              // rdx\r
+;    IN VOID                   *Buffer            // r8\r
+;    );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(IoWriteFifo16)\r
+ASM_PFX(IoWriteFifo16):\r
+    cld\r
+    xchg    rcx, rdx\r
+    xchg    rsi, r8             ; rsi: buffer address; r8: save rsi\r
+rep outsw\r
+    mov     rsi, r8             ; restore rsi\r
+    ret\r
+\r
+;------------------------------------------------------------------------------\r
+;  VOID\r
+;  EFIAPI\r
+;  IoWriteFifo32 (\r
+;    IN UINTN                  Port,              // rcx\r
+;    IN UINTN                  Size,              // rdx\r
+;    IN VOID                   *Buffer            // r8\r
+;    );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(IoWriteFifo32)\r
+ASM_PFX(IoWriteFifo32):\r
+    cld\r
+    xchg    rcx, rdx\r
+    xchg    rsi, r8             ; rsi: buffer address; r8: save rsi\r
+rep outsd\r
+    mov     rsi, r8             ; restore rsi\r
+    ret\r
+\r