]> git.proxmox.com Git - mirror_edk2.git/blob - DuetPkg/DxeIpl/X64/CpuIoAccess.asm
Initialize DuetPkg ...
[mirror_edk2.git] / DuetPkg / DxeIpl / X64 / CpuIoAccess.asm
1 title CpuIoAccess.asm
2 ;------------------------------------------------------------------------------
3 ;
4 ; Copyright (c) 2006 - 2007, Intel Corporation
5 ; All rights reserved. This program and the accompanying materials
6 ; are licensed and made available under the terms and conditions of the BSD License
7 ; which accompanies this 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 ; Module Name:
14 ; CpuIoAccess.asm
15 ;
16 ; Abstract:
17 ; CPU IO Abstraction
18 ;
19 ;------------------------------------------------------------------------------
20
21
22 .code
23
24 ;------------------------------------------------------------------------------
25 ; UINT8
26 ; CpuIoRead8 (
27 ; UINT16 Port // rcx
28 ; )
29 ;------------------------------------------------------------------------------
30 CpuIoRead8 PROC PUBLIC
31 xor eax, eax
32 mov dx, cx
33 in al, dx
34 ret
35 CpuIoRead8 ENDP
36
37 ;------------------------------------------------------------------------------
38 ; VOID
39 ; CpuIoWrite8 (
40 ; UINT16 Port, // rcx
41 ; UINT32 Data // rdx
42 ; )
43 ;------------------------------------------------------------------------------
44 CpuIoWrite8 PROC PUBLIC
45 mov eax, edx
46 mov dx, cx
47 out dx, al
48 ret
49 CpuIoWrite8 ENDP
50
51
52 END