diff options
Diffstat (limited to 'OvmfPkg/Library/QemuFwCfgLib/X64')
-rw-r--r-- | OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.S | 19 | ||||
-rw-r--r-- | OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.asm | 22 |
2 files changed, 39 insertions, 2 deletions
diff --git a/OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.S b/OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.S index b1125ed..69167b7 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.S +++ b/OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.S @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
# 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
@@ -28,3 +28,20 @@ rep insb mov %r8, %rdi # restore rdi
ret
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# IoWriteFifo8 (
+# IN UINTN Port, // rcx
+# IN UINTN Size, // rdx
+# IN VOID *Buffer // r8
+# );
+#------------------------------------------------------------------------------
+ASM_GLOBAL ASM_PFX(IoWriteFifo8)
+ASM_PFX(IoWriteFifo8):
+ xchg %rcx, %rdx
+ xchg %r8, %rsi # rdi: buffer address; r8: save rsi
+rep outsb
+ mov %r8, %rsi # restore rsi
+ ret
+
diff --git a/OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.asm b/OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.asm index c60ad2c..47ac158 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.asm +++ b/OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.asm @@ -1,6 +1,6 @@ ;------------------------------------------------------------------------------
;
-; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
; 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
@@ -32,5 +32,25 @@ rep insb IoReadFifo8 ENDP
+
+;------------------------------------------------------------------------------
+; VOID
+; EFIAPI
+; IoWriteFifo8 (
+; IN UINTN Port, // rcx
+; IN UINTN Size, // rdx
+; IN VOID *Buffer // r8
+; );
+;------------------------------------------------------------------------------
+IoWriteFifo8 PROC
+
+ xchg rcx, rdx
+ xchg rsi, r8 ; rdi: buffer address; r8: save rdi
+rep outsb
+ mov rsi, r8 ; restore rdi
+ ret
+
+IoWriteFifo8 ENDP
+
END
|