]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/IoLib.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / RuntimeDxe / EfiRuntimeLib / Ia32 / IoLib.c
CommitLineData
3eb9473e 1/*++\r
2\r
4ea9375a
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 IoLib.c\r
15\r
16Abstract:\r
17\r
18 Light weight lib to support Tiano drivers.\r
19\r
20--*/\r
21\r
22#include "Tiano.h"\r
23#include "EfiRuntimeLib.h"\r
24#include EFI_PROTOCOL_DEFINITION (CpuIo)\r
25\r
26extern EFI_CPU_IO_PROTOCOL *gCpuIo;\r
27\r
28EFI_STATUS\r
29EfiIoRead (\r
30 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
31 IN UINT64 Address,\r
32 IN UINTN Count,\r
33 IN OUT VOID *Buffer\r
34 )\r
35/*++\r
36\r
37Routine Description:\r
38 Perform an IO read into Buffer.\r
39\r
40Arguments:\r
41 Width - Width of read transaction, and repeat operation to use\r
42 Address - IO address to read\r
43 Count - Number of times to read the IO address.\r
44 Buffer - Buffer to read data into. size is Width * Count\r
45\r
46Returns: \r
47 BugBug: Check with Mike to see if I can find this #define some ware else\r
48\r
49--*/\r
50{\r
51 return gCpuIo->Io.Read (gCpuIo, Width, Address, Count, Buffer);\r
52}\r
53\r
54EFI_STATUS\r
55EfiIoWrite (\r
56 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
57 IN UINT64 Address,\r
58 IN UINTN Count,\r
59 IN OUT VOID *Buffer\r
60 )\r
61/*++\r
62\r
63Routine Description:\r
64 Perform an IO write into Buffer.\r
65\r
66Arguments:\r
67 Width - Width of write transaction, and repeat operation to use\r
68 Address - IO address to write\r
69 Count - Number of times to write the IO address.\r
70 Buffer - Buffer to write data from. size is Width * Count\r
71\r
72Returns: \r
73 BugBug: Check with Mike to see if I can find this #define some ware else\r
74\r
75--*/\r
76{\r
77 return gCpuIo->Io.Write (gCpuIo, Width, Address, Count, Buffer);\r
78}\r
79\r
80EFI_STATUS\r
81EfiMemRead (\r
82 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
83 IN UINT64 Address,\r
84 IN UINTN Count,\r
85 IN OUT VOID *Buffer\r
86 )\r
87/*++\r
88\r
89Routine Description:\r
90 Perform a Memory mapped IO read into Buffer.\r
91\r
92Arguments:\r
93 Width - Width of each read transaction.\r
94 Address - Memory mapped IO address to read\r
95 Count - Number of Width quanta to read\r
96 Buffer - Buffer to read data into. size is Width * Count\r
97\r
98Returns: \r
99 BugBug: Check with Mike to see if I can find this #define some ware else\r
100\r
101--*/\r
102{\r
103 return gCpuIo->Mem.Read (gCpuIo, Width, Address, Count, Buffer);\r
104}\r
105\r
106EFI_STATUS\r
107EfiMemWrite (\r
108 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
109 IN UINT64 Address,\r
110 IN UINTN Count,\r
111 IN OUT VOID *Buffer\r
112 )\r
113/*++\r
114\r
115Routine Description:\r
116 Perform a memory mapped IO write into Buffer.\r
117\r
118Arguments:\r
119 Width - Width of write transaction, and repeat operation to use\r
120 Address - IO address to write\r
121 Count - Number of times to write the IO address.\r
122 Buffer - Buffer to write data from. size is Width * Count\r
123\r
124Returns: \r
125 BugBug: Check with Mike to see if I can find this #define some ware else\r
126\r
127--*/\r
128{\r
129 return gCpuIo->Mem.Write (gCpuIo, Width, Address, Count, Buffer);\r
130}\r