]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifo.nasm
MdePkg: Expand BaseIoLibIntrinsic (IoLib class) library
[mirror_edk2.git] / MdePkg / Library / BaseIoLibIntrinsic / Ia32 / IoFifo.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
4 ; Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
5 ;
6 ; This program and the accompanying materials are licensed and made available
7 ; under the terms and conditions of the BSD License which accompanies this
8 ; distribution. The full text of the license may be found at
9 ; http://opensource.org/licenses/bsd-license.php.
10 ;
11 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 ;
14 ;------------------------------------------------------------------------------
15
16 SECTION .text
17
18 ;------------------------------------------------------------------------------
19 ; VOID
20 ; EFIAPI
21 ; IoReadFifo8 (
22 ; IN UINTN Port,
23 ; IN UINTN Size,
24 ; OUT VOID *Buffer
25 ; );
26 ;------------------------------------------------------------------------------
27 global ASM_PFX(IoReadFifo8)
28 ASM_PFX(IoReadFifo8):
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
38 ;------------------------------------------------------------------------------
39 ; VOID
40 ; EFIAPI
41 ; IoReadFifo16 (
42 ; IN UINTN Port,
43 ; IN UINTN Size,
44 ; OUT VOID *Buffer
45 ; );
46 ;------------------------------------------------------------------------------
47 global ASM_PFX(IoReadFifo16)
48 ASM_PFX(IoReadFifo16):
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
58 ;------------------------------------------------------------------------------
59 ; VOID
60 ; EFIAPI
61 ; IoReadFifo32 (
62 ; IN UINTN Port,
63 ; IN UINTN Size,
64 ; OUT VOID *Buffer
65 ; );
66 ;------------------------------------------------------------------------------
67 global ASM_PFX(IoReadFifo32)
68 ASM_PFX(IoReadFifo32):
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
78 ;------------------------------------------------------------------------------
79 ; VOID
80 ; EFIAPI
81 ; IoWriteFifo8 (
82 ; IN UINTN Port,
83 ; IN UINTN Size,
84 ; IN VOID *Buffer
85 ; );
86 ;------------------------------------------------------------------------------
87 global ASM_PFX(IoWriteFifo8)
88 ASM_PFX(IoWriteFifo8):
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
98 ;------------------------------------------------------------------------------
99 ; VOID
100 ; EFIAPI
101 ; IoWriteFifo16 (
102 ; IN UINTN Port,
103 ; IN UINTN Size,
104 ; IN VOID *Buffer
105 ; );
106 ;------------------------------------------------------------------------------
107 global ASM_PFX(IoWriteFifo16)
108 ASM_PFX(IoWriteFifo16):
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
118 ;------------------------------------------------------------------------------
119 ; VOID
120 ; EFIAPI
121 ; IoWriteFifo32 (
122 ; IN UINTN Port,
123 ; IN UINTN Size,
124 ; IN VOID *Buffer
125 ; );
126 ;------------------------------------------------------------------------------
127 global ASM_PFX(IoWriteFifo32)
128 ASM_PFX(IoWriteFifo32):
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