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