From 29874a8c6015deff95e90e64fb9321bdc7b32a99 Mon Sep 17 00:00:00 2001 From: jljusten Date: Mon, 28 Jan 2013 16:54:55 +0000 Subject: QemuFwCfgLib: Add QemuFwCfgWriteBytes() function Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Woodhouse Reviewed-by: Jordan Justen git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14109 6f19259b-4bc3-4df7-8a09-765794883524 --- OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S | 22 +++++++++++++++++++++- OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm | 24 +++++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) (limited to 'OvmfPkg/Library/QemuFwCfgLib/Ia32') diff --git a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S index a32b2c60c4..c2735d2c65 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S +++ b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ # -# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -30,3 +30,23 @@ rep insb popl %edi ret + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# IoWriteFifo8 ( +# IN UINTN Port, +# IN UINTN Size, +# IN VOID *Buffer +# ); +#------------------------------------------------------------------------------ +ASM_GLOBAL ASM_PFX(IoWriteFifo8) +ASM_PFX(IoWriteFifo8): + movw 4(%esp), %dx + movl 8(%esp), %ecx + pushl %esi + movl 16(%esp), %esi +rep outsb + popl %esi + ret + diff --git a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm index 248d52237e..f7d65c49af 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm +++ b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm @@ -1,6 +1,6 @@ ;------------------------------------------------------------------------------ ; -; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at @@ -36,5 +36,27 @@ rep insb IoReadFifo8 ENDP + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; IoWriteFifo8 ( +; IN UINTN Port, +; IN UINTN Size, +; IN VOID *Buffer +; ); +;------------------------------------------------------------------------------ +IoWriteFifo8 PROC + + mov dx, [esp + 4] + mov ecx, [esp + 8] + push esi + mov esi, [esp + 16] +rep outsb + pop esi + ret + +IoWriteFifo8 ENDP + END -- cgit v1.2.3