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