]>
Commit | Line | Data |
---|---|---|
58251024 | 1 | /** @file\r |
2 | Internal include file of DXE CPU IO Library.\r | |
3 | \r | |
4 | Copyright (c) 2006, Intel Corporation\r | |
5 | All rights reserved. This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | Module Name: DxeCpuIoLibInternal.h\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __DXE_CPUIO_LIB_INTERNAL_H__\r | |
18 | #define __DXE_CPUIO_LIB_INTERNAL_H__\r | |
19 | \r | |
20 | /**\r | |
21 | Reads registers in the EFI CPU I/O space.\r | |
22 | \r | |
23 | Reads the I/O port specified by Port with registers width specified by Width.\r | |
24 | The read value is returned. If such operations are not supported, then ASSERT().\r | |
25 | This function must guarantee that all I/O read and write operations are serialized.\r | |
26 | \r | |
27 | @param Port The base address of the I/O operation.\r | |
28 | The caller is responsible for aligning the Address if required.\r | |
29 | @param Width The width of the I/O operation.\r | |
30 | \r | |
31 | @return Data read from registers in the EFI CPU I/O space.\r | |
32 | \r | |
33 | **/\r | |
34 | UINT64\r | |
35 | EFIAPI\r | |
36 | IoReadWorker (\r | |
37 | IN UINTN Port,\r | |
38 | IN EFI_CPU_IO_PROTOCOL_WIDTH Width\r | |
39 | );\r | |
40 | \r | |
41 | /**\r | |
42 | Writes registers in the EFI CPU I/O space.\r | |
43 | \r | |
44 | Writes the I/O port specified by Port with registers width and value specified by Width\r | |
45 | and Data respectively. Data is returned. If such operations are not supported, then ASSERT().\r | |
46 | This function must guarantee that all I/O read and write operations are serialized.\r | |
47 | \r | |
48 | @param Port The base address of the I/O operation.\r | |
49 | The caller is responsible for aligning the Address if required.\r | |
50 | @param Width The width of the I/O operation.\r | |
51 | @param Data The value to write to the I/O port.\r | |
52 | \r | |
53 | @return The paramter of Data.\r | |
54 | \r | |
55 | **/\r | |
56 | UINT64\r | |
57 | EFIAPI\r | |
58 | IoWriteWorker (\r | |
59 | IN UINTN Port,\r | |
60 | IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r | |
61 | IN UINT64 Data\r | |
62 | );\r | |
63 | \r | |
64 | /**\r | |
65 | Reads memory-mapped registers in the EFI system memory space.\r | |
66 | \r | |
67 | Reads the MMIO registers specified by Address with registers width specified by Width.\r | |
68 | The read value is returned. If such operations are not supported, then ASSERT().\r | |
69 | This function must guarantee that all MMIO read and write operations are serialized.\r | |
70 | \r | |
71 | @param Address The MMIO register to read.\r | |
72 | The caller is responsible for aligning the Address if required.\r | |
73 | @param Width The width of the I/O operation.\r | |
74 | \r | |
75 | @return Data read from registers in the EFI system memory space.\r | |
76 | \r | |
77 | **/\r | |
78 | UINT64\r | |
79 | EFIAPI\r | |
80 | MmioReadWorker (\r | |
81 | IN UINTN Address,\r | |
82 | IN EFI_CPU_IO_PROTOCOL_WIDTH Width\r | |
83 | );\r | |
84 | \r | |
85 | /**\r | |
86 | Writes memory-mapped registers in the EFI system memory space.\r | |
87 | \r | |
88 | Writes the MMIO registers specified by Address with registers width and value specified by Width\r | |
89 | and Data respectively. Data is returned. If such operations are not supported, then ASSERT().\r | |
90 | This function must guarantee that all MMIO read and write operations are serialized.\r | |
91 | \r | |
92 | @param Address The MMIO register to read.\r | |
93 | The caller is responsible for aligning the Address if required.\r | |
94 | @param Width The width of the I/O operation.\r | |
95 | \r | |
96 | @return Data read from registers in the EFI system memory space.\r | |
97 | \r | |
98 | **/\r | |
99 | UINT64\r | |
100 | EFIAPI\r | |
101 | MmioWriteWorker (\r | |
102 | IN UINTN Address,\r | |
103 | IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r | |
104 | IN UINT64 Data\r | |
105 | );\r | |
106 | \r | |
107 | #endif\r |