IntelFrameworkPkg/DxeIoLibCpuIo: Add new Fifo routines in IoLib class
[mirror_edk2.git] / OvmfPkg / Library / QemuFwCfgLib / Ia32 / IoLibExAsm.nasm
CommitLineData
f1ec65ba 1;------------------------------------------------------------------------------\r
2;\r
29874a8c 3; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
f1ec65ba 4; This program and the accompanying materials\r
5; are licensed and made available under the terms and conditions of the BSD License\r
6; which accompanies this distribution. The full text of the license may be found at\r
7; http://opensource.org/licenses/bsd-license.php.\r
8;\r
9; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11;\r
12;------------------------------------------------------------------------------\r
13\r
8a297612 14 SECTION .text\r
f1ec65ba 15\r
16;------------------------------------------------------------------------------\r
17; VOID\r
18; EFIAPI\r
19; IoReadFifo8 (\r
20; IN UINTN Port,\r
21; IN UINTN Size,\r
22; IN VOID *Buffer\r
23; );\r
24;------------------------------------------------------------------------------\r
8a297612
JJ
25global ASM_PFX(IoReadFifo8)\r
26ASM_PFX(IoReadFifo8):\r
f1ec65ba 27\r
28 mov dx, [esp + 4]\r
29 mov ecx, [esp + 8]\r
30 push edi\r
b5e243b7 31 mov edi, [esp + 16]\r
f1ec65ba 32rep insb\r
33 pop edi\r
34 ret\r
35\r
29874a8c 36;------------------------------------------------------------------------------\r
37; VOID\r
38; EFIAPI\r
39; IoWriteFifo8 (\r
40; IN UINTN Port,\r
41; IN UINTN Size,\r
42; IN VOID *Buffer\r
43; );\r
44;------------------------------------------------------------------------------\r
8a297612
JJ
45global ASM_PFX(IoWriteFifo8)\r
46ASM_PFX(IoWriteFifo8):\r
29874a8c 47\r
48 mov dx, [esp + 4]\r
49 mov ecx, [esp + 8]\r
50 push esi\r
51 mov esi, [esp + 16]\r
52rep outsb\r
53 pop esi\r
54 ret\r
55\r