MdePkg: Expand BaseIoLibIntrinsic (IoLib class) library
[mirror_edk2.git] / UefiCpuPkg / CpuIo2Dxe / Ia32 / IoFifo.nasm
CommitLineData
fb8b5469
LE
1;------------------------------------------------------------------------------\r
2;\r
3; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
4;\r
5; This program and the accompanying materials are licensed and made available\r
6; under the terms and conditions of the BSD License which accompanies this\r
7; distribution. The full text of the license may be found at\r
8; http://opensource.org/licenses/bsd-license.php.\r
9;\r
10; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12;\r
13;------------------------------------------------------------------------------\r
14\r
15 SECTION .text\r
16\r
17;------------------------------------------------------------------------------\r
18; VOID\r
19; EFIAPI\r
20; IoReadFifo8 (\r
21; IN UINTN Port,\r
22; IN UINTN Size,\r
23; IN VOID *Buffer\r
24; );\r
25;------------------------------------------------------------------------------\r
26global ASM_PFX(IoReadFifo8)\r
27ASM_PFX(IoReadFifo8):\r
28 push edi\r
29 cld\r
30 mov dx, [esp + 8]\r
31 mov ecx, [esp + 12]\r
32 mov edi, [esp + 16]\r
33rep insb\r
34 pop edi\r
35 ret\r
36\r
37;------------------------------------------------------------------------------\r
38; VOID\r
39; EFIAPI\r
40; IoReadFifo16 (\r
41; IN UINTN Port,\r
42; IN UINTN Size,\r
43; IN VOID *Buffer\r
44; );\r
45;------------------------------------------------------------------------------\r
46global ASM_PFX(IoReadFifo16)\r
47ASM_PFX(IoReadFifo16):\r
48 push edi\r
49 cld\r
50 mov dx, [esp + 8]\r
51 mov ecx, [esp + 12]\r
52 mov edi, [esp + 16]\r
53rep insw\r
54 pop edi\r
55 ret\r
56\r
57;------------------------------------------------------------------------------\r
58; VOID\r
59; EFIAPI\r
60; IoReadFifo32 (\r
61; IN UINTN Port,\r
62; IN UINTN Size,\r
63; IN VOID *Buffer\r
64; );\r
65;------------------------------------------------------------------------------\r
66global ASM_PFX(IoReadFifo32)\r
67ASM_PFX(IoReadFifo32):\r
68 push edi\r
69 cld\r
70 mov dx, [esp + 8]\r
71 mov ecx, [esp + 12]\r
72 mov edi, [esp + 16]\r
73rep insd\r
74 pop edi\r
75 ret\r
76\r
77;------------------------------------------------------------------------------\r
78; VOID\r
79; EFIAPI\r
80; IoWriteFifo8 (\r
81; IN UINTN Port,\r
82; IN UINTN Size,\r
83; IN VOID *Buffer\r
84; );\r
85;------------------------------------------------------------------------------\r
86global ASM_PFX(IoWriteFifo8)\r
87ASM_PFX(IoWriteFifo8):\r
88 push esi\r
89 cld\r
90 mov dx, [esp + 8]\r
91 mov ecx, [esp + 12]\r
92 mov esi, [esp + 16]\r
93rep outsb\r
94 pop esi\r
95 ret\r
96\r
97;------------------------------------------------------------------------------\r
98; VOID\r
99; EFIAPI\r
100; IoWriteFifo16 (\r
101; IN UINTN Port,\r
102; IN UINTN Size,\r
103; IN VOID *Buffer\r
104; );\r
105;------------------------------------------------------------------------------\r
106global ASM_PFX(IoWriteFifo16)\r
107ASM_PFX(IoWriteFifo16):\r
108 push esi\r
109 cld\r
110 mov dx, [esp + 8]\r
111 mov ecx, [esp + 12]\r
112 mov esi, [esp + 16]\r
113rep outsw\r
114 pop esi\r
115 ret\r
116\r
117;------------------------------------------------------------------------------\r
118; VOID\r
119; EFIAPI\r
120; IoWriteFifo32 (\r
121; IN UINTN Port,\r
122; IN UINTN Size,\r
123; IN VOID *Buffer\r
124; );\r
125;------------------------------------------------------------------------------\r
126global ASM_PFX(IoWriteFifo32)\r
127ASM_PFX(IoWriteFifo32):\r
128 push esi\r
129 cld\r
130 mov dx, [esp + 8]\r
131 mov ecx, [esp + 12]\r
132 mov esi, [esp + 16]\r
133rep outsd\r
134 pop esi\r
135 ret\r
136\r