]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: Modify CpuIo2Dxe to use new IoLib library
authorLeo Duran <leo.duran@amd.com>
Fri, 13 Jan 2017 20:09:52 +0000 (04:09 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 17 Jan 2017 02:10:04 +0000 (10:10 +0800)
The Fifo routines from the UefiCpuPkg/CpuIo2Dxe driver have been
moved to the new BaseIoLibIntrinsic (IoLib class) library.

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.c
UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.asm [deleted file]
UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.nasm [deleted file]
UefiCpuPkg/CpuIo2Dxe/IoFifo.h [deleted file]
UefiCpuPkg/CpuIo2Dxe/X64/IoFifo.asm [deleted file]
UefiCpuPkg/CpuIo2Dxe/X64/IoFifo.nasm [deleted file]

index 6ccfc40e10f8fb8b9ea2625ce79ea9af4487799e..60f4bbc1fde8d1ce96c5c500a814fe6ccfb70b67 100644 (file)
@@ -2,6 +2,8 @@
   Produces the CPU I/O 2 Protocol.\r
 \r
 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
   Produces the CPU I/O 2 Protocol.\r
 \r
 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
+\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -13,7 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 \r
 #include "CpuIo2Dxe.h"\r
 **/\r
 \r
 #include "CpuIo2Dxe.h"\r
-#include "IoFifo.h"\r
 \r
 //\r
 // Handle for the CPU I/O 2 Protocol\r
 \r
 //\r
 // Handle for the CPU I/O 2 Protocol\r
@@ -412,7 +413,9 @@ CpuIoServiceRead (
   OutStride = mOutStride[Width];\r
   OperationWidth = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
 \r
   OutStride = mOutStride[Width];\r
   OperationWidth = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
 \r
-#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)\r
+  //\r
+  // Fifo operations supported for (mInStride[Width] == 0)\r
+  //\r
   if (InStride == 0) {\r
     switch (OperationWidth) {\r
     case EfiCpuIoWidthUint8:\r
   if (InStride == 0) {\r
     switch (OperationWidth) {\r
     case EfiCpuIoWidthUint8:\r
@@ -433,7 +436,6 @@ CpuIoServiceRead (
       break;\r
     }\r
   }\r
       break;\r
     }\r
   }\r
-#endif\r
 \r
   for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
     if (OperationWidth == EfiCpuIoWidthUint8) {\r
 \r
   for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
     if (OperationWidth == EfiCpuIoWidthUint8) {\r
@@ -518,7 +520,9 @@ CpuIoServiceWrite (
   OutStride = mOutStride[Width];\r
   OperationWidth = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
 \r
   OutStride = mOutStride[Width];\r
   OperationWidth = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
 \r
-#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)\r
+  //\r
+  // Fifo operations supported for (mInStride[Width] == 0)\r
+  //\r
   if (InStride == 0) {\r
     switch (OperationWidth) {\r
     case EfiCpuIoWidthUint8:\r
   if (InStride == 0) {\r
     switch (OperationWidth) {\r
     case EfiCpuIoWidthUint8:\r
@@ -539,7 +543,6 @@ CpuIoServiceWrite (
       break;\r
     }\r
   }\r
       break;\r
     }\r
   }\r
-#endif\r
 \r
   for (Uint8Buffer = (UINT8 *)Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
     if (OperationWidth == EfiCpuIoWidthUint8) {\r
 \r
   for (Uint8Buffer = (UINT8 *)Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {\r
     if (OperationWidth == EfiCpuIoWidthUint8) {\r
index 920ede7846b78a40f0c42fbb50c8303d70621feb..55036622ca7bdf482f6cc7339fe76562d92984c3 100644 (file)
@@ -2,6 +2,8 @@
 #  Produces the CPU I/O 2 Protocol by using the services of the I/O Library.\r
 #\r
 # Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
 #  Produces the CPU I/O 2 Protocol by using the services of the I/O Library.\r
 #\r
 # Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
+#\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
 [Sources]\r
   CpuIo2Dxe.c\r
   CpuIo2Dxe.h\r
 [Sources]\r
   CpuIo2Dxe.c\r
   CpuIo2Dxe.h\r
-  IoFifo.h\r
-  \r
-[Sources.IA32]\r
-  Ia32/IoFifo.nasm\r
-  Ia32/IoFifo.asm\r
-\r
-[Sources.X64]\r
-  X64/IoFifo.nasm\r
-  X64/IoFifo.asm\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
diff --git a/UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.asm b/UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.asm
deleted file mode 100644 (file)
index b1cc25e..0000000
+++ /dev/null
@@ -1,140 +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
-    .586P\r
-    .model  flat,C\r
-    .code\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoReadFifo8 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoReadFifo8 PROC\r
-    push    edi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     edi, [esp + 16]\r
-rep insb\r
-    pop     edi\r
-    ret\r
-IoReadFifo8 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoReadFifo16 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoReadFifo16 PROC\r
-    push    edi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     edi, [esp + 16]\r
-rep insw\r
-    pop     edi\r
-    ret\r
-IoReadFifo16 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoReadFifo32 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoReadFifo32 PROC\r
-    push    edi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     edi, [esp + 16]\r
-rep insd\r
-    pop     edi\r
-    ret\r
-IoReadFifo32 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoWriteFifo8 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoWriteFifo8 PROC\r
-    push    esi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     esi, [esp + 16]\r
-rep outsb\r
-    pop     esi\r
-    ret\r
-IoWriteFifo8 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoWriteFifo16 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoWriteFifo16 PROC\r
-    push    esi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     esi, [esp + 16]\r
-rep outsw\r
-    pop     esi\r
-    ret\r
-IoWriteFifo16 ENDP\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoWriteFifo32 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-IoWriteFifo32 PROC\r
-    push    esi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     esi, [esp + 16]\r
-rep outsd\r
-    pop     esi\r
-    ret\r
-IoWriteFifo32 ENDP\r
-\r
-    END\r
-\r
diff --git a/UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.nasm b/UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.nasm
deleted file mode 100644 (file)
index daa90a9..0000000
+++ /dev/null
@@ -1,136 +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
-    SECTION .text\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoReadFifo8 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(IoReadFifo8)\r
-ASM_PFX(IoReadFifo8):\r
-    push    edi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     edi, [esp + 16]\r
-rep insb\r
-    pop     edi\r
-    ret\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoReadFifo16 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(IoReadFifo16)\r
-ASM_PFX(IoReadFifo16):\r
-    push    edi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     edi, [esp + 16]\r
-rep insw\r
-    pop     edi\r
-    ret\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoReadFifo32 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(IoReadFifo32)\r
-ASM_PFX(IoReadFifo32):\r
-    push    edi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     edi, [esp + 16]\r
-rep insd\r
-    pop     edi\r
-    ret\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoWriteFifo8 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(IoWriteFifo8)\r
-ASM_PFX(IoWriteFifo8):\r
-    push    esi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     esi, [esp + 16]\r
-rep outsb\r
-    pop     esi\r
-    ret\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoWriteFifo16 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(IoWriteFifo16)\r
-ASM_PFX(IoWriteFifo16):\r
-    push    esi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     esi, [esp + 16]\r
-rep outsw\r
-    pop     esi\r
-    ret\r
-\r
-;------------------------------------------------------------------------------\r
-;  VOID\r
-;  EFIAPI\r
-;  IoWriteFifo32 (\r
-;    IN UINTN                  Port,\r
-;    IN UINTN                  Size,\r
-;    IN VOID                   *Buffer\r
-;    );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(IoWriteFifo32)\r
-ASM_PFX(IoWriteFifo32):\r
-    push    esi\r
-    cld\r
-    mov     dx, [esp + 8]\r
-    mov     ecx, [esp + 12]\r
-    mov     esi, [esp + 16]\r
-rep outsd\r
-    pop     esi\r
-    ret\r
-\r
diff --git a/UefiCpuPkg/CpuIo2Dxe/IoFifo.h b/UefiCpuPkg/CpuIo2Dxe/IoFifo.h
deleted file mode 100644 (file)
index 9978f8b..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-/** @file\r
-  I/O FIFO routines\r
-\r
-  Copyright (c) 2008 - 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
-#ifndef _IO_FIFO_H_INCLUDED_\r
-#define _IO_FIFO_H_INCLUDED_\r
-\r
-/**\r
-  Reads an 8-bit I/O port fifo into a block of memory.\r
-\r
-  Reads the 8-bit I/O fifo port specified by Port.\r
-\r
-  The port is read Count times, and the read data is\r
-  stored in the provided Buffer.\r
-\r
-  This function must guarantee that all I/O read and write operations are\r
-  serialized.\r
-\r
-  If 8-bit I/O port operations are not supported, then ASSERT().\r
-\r
-  @param  Port    The I/O port to read.\r
-  @param  Count   The number of times to read I/O port.\r
-  @param  Buffer  The buffer to store the read data into.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-IoReadFifo8 (\r
-  IN      UINTN                     Port,\r
-  IN      UINTN                     Count,\r
-  OUT     VOID                      *Buffer\r
-  );\r
-\r
-/**\r
-  Reads a 16-bit I/O port fifo into a block of memory.\r
-\r
-  Reads the 16-bit I/O fifo port specified by Port.\r
-\r
-  The port is read Count times, and the read data is\r
-  stored in the provided Buffer.\r
-\r
-  This function must guarantee that all I/O read and write operations are\r
-  serialized.\r
-\r
-  If 16-bit I/O port operations are not supported, then ASSERT().\r
-\r
-  @param  Port    The I/O port to read.\r
-  @param  Count   The number of times to read I/O port.\r
-  @param  Buffer  The buffer to store the read data into.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-IoReadFifo16 (\r
-  IN      UINTN                     Port,\r
-  IN      UINTN                     Count,\r
-  OUT     VOID                      *Buffer\r
-  );\r
-\r
-/**\r
-  Reads a 32-bit I/O port fifo into a block of memory.\r
-\r
-  Reads the 32-bit I/O fifo port specified by Port.\r
-\r
-  The port is read Count times, and the read data is\r
-  stored in the provided Buffer.\r
-\r
-  This function must guarantee that all I/O read and write operations are\r
-  serialized.\r
-\r
-  If 32-bit I/O port operations are not supported, then ASSERT().\r
-\r
-  @param  Port    The I/O port to read.\r
-  @param  Count   The number of times to read I/O port.\r
-  @param  Buffer  The buffer to store the read data into.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-IoReadFifo32 (\r
-  IN      UINTN                     Port,\r
-  IN      UINTN                     Count,\r
-  OUT     VOID                      *Buffer\r
-  );\r
-\r
-/**\r
-  Writes a block of memory into an 8-bit I/O port fifo.\r
-\r
-  Writes the 8-bit I/O fifo port specified by Port.\r
-\r
-  The port is written Count times, and the write data is\r
-  retrieved from the provided Buffer.\r
-\r
-  This function must guarantee that all I/O write and write operations are\r
-  serialized.\r
-\r
-  If 8-bit I/O port operations are not supported, then ASSERT().\r
-\r
-  @param  Port    The I/O port to write.\r
-  @param  Count   The number of times to write I/O port.\r
-  @param  Buffer  The buffer to store the write data into.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-IoWriteFifo8 (\r
-  IN      UINTN                     Port,\r
-  IN      UINTN                     Count,\r
-  OUT     VOID                      *Buffer\r
-  );\r
-\r
-/**\r
-  Writes a block of memory into a 16-bit I/O port fifo.\r
-\r
-  Writes the 16-bit I/O fifo port specified by Port.\r
-\r
-  The port is written Count times, and the write data is\r
-  retrieved from the provided Buffer.\r
-\r
-  This function must guarantee that all I/O write and write operations are\r
-  serialized.\r
-\r
-  If 16-bit I/O port operations are not supported, then ASSERT().\r
-\r
-  @param  Port    The I/O port to write.\r
-  @param  Count   The number of times to write I/O port.\r
-  @param  Buffer  The buffer to store the write data into.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-IoWriteFifo16 (\r
-  IN      UINTN                     Port,\r
-  IN      UINTN                     Count,\r
-  OUT     VOID                      *Buffer\r
-  );\r
-\r
-/**\r
-  Writes a block of memory into a 32-bit I/O port fifo.\r
-\r
-  Writes the 32-bit I/O fifo port specified by Port.\r
-\r
-  The port is written Count times, and the write data is\r
-  retrieved from the provided Buffer.\r
-\r
-  This function must guarantee that all I/O write and write operations are\r
-  serialized.\r
-\r
-  If 32-bit I/O port operations are not supported, then ASSERT().\r
-\r
-  @param  Port    The I/O port to write.\r
-  @param  Count   The number of times to write I/O port.\r
-  @param  Buffer  The buffer to store the write data into.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-IoWriteFifo32 (\r
-  IN      UINTN                     Port,\r
-  IN      UINTN                     Count,\r
-  OUT     VOID                      *Buffer\r
-  );\r
-\r
-#endif\r
-\r
diff --git a/UefiCpuPkg/CpuIo2Dxe/X64/IoFifo.asm b/UefiCpuPkg/CpuIo2Dxe/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/UefiCpuPkg/CpuIo2Dxe/X64/IoFifo.nasm b/UefiCpuPkg/CpuIo2Dxe/X64/IoFifo.nasm
deleted file mode 100644 (file)
index bb3d1da..0000000
+++ /dev/null
@@ -1,125 +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
-    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