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