]>
Commit | Line | Data |
---|---|---|
79964ac8 | 1 | /** @file\r |
2 | Internal include file of DXE CPU IO Library.\r | |
c4fa3eac | 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 | |
79964ac8 | 7 | Copyright (c) 2006, 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 | |
ed7748fe | 23 | \r |
79964ac8 | 24 | #include <FrameworkDxe.h>\r |
53f93f7e | 25 | \r |
ed7748fe | 26 | \r |
53f93f7e | 27 | #include <Protocol/CpuIo.h>\r |
28 | #include <Protocol/PciRootBridgeIo.h>\r | |
29 | \r | |
ed7748fe | 30 | \r |
79964ac8 | 31 | #include <Library/IoLib.h>\r |
32 | #include <Library/UefiBootServicesTableLib.h>\r | |
33 | #include <Library/DebugLib.h>\r | |
34 | #include <Library/BaseLib.h>\r | |
35 | \r | |
79964ac8 | 36 | \r |
37 | /**\r | |
38 | Reads registers in the EFI CPU I/O space.\r | |
39 | \r | |
40 | Reads the I/O port specified by Port with registers width specified by Width.\r | |
41 | The read value is returned. If such operations are not supported, then ASSERT().\r | |
42 | This function must guarantee that all I/O read and write operations are serialized.\r | |
43 | \r | |
44 | @param Port The base address of the I/O operation.\r | |
45 | The caller is responsible for aligning the Address if required.\r | |
46 | @param Width The width of the I/O operation.\r | |
47 | \r | |
48 | @return Data read from registers in the EFI CPU I/O space.\r | |
49 | \r | |
50 | **/\r | |
51 | UINT64\r | |
52 | EFIAPI\r | |
53 | IoReadWorker (\r | |
54 | IN UINTN Port,\r | |
55 | IN EFI_CPU_IO_PROTOCOL_WIDTH Width\r | |
56 | );\r | |
57 | \r | |
58 | /**\r | |
59 | Writes registers in the EFI CPU I/O space.\r | |
60 | \r | |
61 | Writes the I/O port specified by Port with registers width and value specified by Width\r | |
62 | and Data respectively. Data is returned. If such operations are not supported, then ASSERT().\r | |
63 | This function must guarantee that all I/O read and write operations are serialized.\r | |
64 | \r | |
65 | @param Port The base address of the I/O operation.\r | |
66 | The caller is responsible for aligning the Address if required.\r | |
67 | @param Width The width of the I/O operation.\r | |
68 | @param Data The value to write to the I/O port.\r | |
69 | \r | |
70 | @return The paramter of Data.\r | |
71 | \r | |
72 | **/\r | |
73 | UINT64\r | |
74 | EFIAPI\r | |
75 | IoWriteWorker (\r | |
76 | IN UINTN Port,\r | |
77 | IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r | |
78 | IN UINT64 Data\r | |
79 | );\r | |
80 | \r | |
81 | /**\r | |
82 | Reads memory-mapped registers in the EFI system memory space.\r | |
83 | \r | |
84 | Reads the MMIO registers specified by Address with registers width specified by Width.\r | |
85 | The read value is returned. If such operations are not supported, then ASSERT().\r | |
86 | This function must guarantee that all MMIO read and write operations are serialized.\r | |
87 | \r | |
88 | @param Address The MMIO register to read.\r | |
89 | The caller is responsible for aligning the Address if required.\r | |
90 | @param Width The width of the I/O operation.\r | |
91 | \r | |
92 | @return Data read from registers in the EFI system memory space.\r | |
93 | \r | |
94 | **/\r | |
95 | UINT64\r | |
96 | EFIAPI\r | |
97 | MmioReadWorker (\r | |
98 | IN UINTN Address,\r | |
99 | IN EFI_CPU_IO_PROTOCOL_WIDTH Width\r | |
100 | );\r | |
101 | \r | |
102 | /**\r | |
103 | Writes memory-mapped registers in the EFI system memory space.\r | |
104 | \r | |
105 | Writes the MMIO registers specified by Address with registers width and value specified by Width\r | |
106 | and Data respectively. Data is returned. If such operations are not supported, then ASSERT().\r | |
107 | This function must guarantee that all MMIO read and write operations are serialized.\r | |
108 | \r | |
109 | @param Address The MMIO register to read.\r | |
110 | The caller is responsible for aligning the Address if required.\r | |
111 | @param Width The width of the I/O operation.\r | |
7459094d | 112 | @param Data The value to write to the I/O port.\r |
113 | \r | |
79964ac8 | 114 | @return Data read from registers in the EFI system memory space.\r |
115 | \r | |
116 | **/\r | |
117 | UINT64\r | |
118 | EFIAPI\r | |
119 | MmioWriteWorker (\r | |
120 | IN UINTN Address,\r | |
121 | IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r | |
122 | IN UINT64 Data\r | |
123 | );\r | |
124 | \r | |
125 | #endif\r |