]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S
QemuFwCfgLib: Add QemuFwCfgWriteBytes() function
[mirror_edk2.git] / OvmfPkg / Library / QemuFwCfgLib / Ia32 / IoLibExAsm.S
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
14#------------------------------------------------------------------------------\r
15# VOID\r
16# EFIAPI\r
17# IoReadFifo8 (\r
18# IN UINTN Port,\r
19# IN UINTN Size,\r
20# IN VOID *Buffer\r
21# );\r
22#------------------------------------------------------------------------------\r
23ASM_GLOBAL ASM_PFX(IoReadFifo8)\r
24ASM_PFX(IoReadFifo8):\r
25 movw 4(%esp), %dx\r
26 movl 8(%esp), %ecx\r
27 pushl %edi\r
28 movl 16(%esp), %edi\r
29rep insb\r
30 popl %edi\r
31 ret\r
32\r
29874a8c 33\r
34#------------------------------------------------------------------------------\r
35# VOID\r
36# EFIAPI\r
37# IoWriteFifo8 (\r
38# IN UINTN Port,\r
39# IN UINTN Size,\r
40# IN VOID *Buffer\r
41# );\r
42#------------------------------------------------------------------------------\r
43ASM_GLOBAL ASM_PFX(IoWriteFifo8)\r
44ASM_PFX(IoWriteFifo8):\r
45 movw 4(%esp), %dx\r
46 movl 8(%esp), %ecx\r
47 pushl %esi\r
48 movl 16(%esp), %esi\r
49rep outsb\r
50 popl %esi\r
51 ret\r
52\r