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