2 Internal include file of SMM CPU IO Library.
3 It includes all necessary protocol/library class's header file
4 for implementation of IoLib library instance. It is included
5 all source code of this library instance.
7 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
8 This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php.
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #ifndef _SMM_CPUIO_LIB_INTERNAL_H_
19 #define _SMM_CPUIO_LIB_INTERNAL_H_
22 #include <Protocol/SmmCpuIo2.h>
23 #include <Protocol/SmmPciRootBridgeIo.h>
24 #include <Library/IoLib.h>
25 #include <Library/DebugLib.h>
26 #include <Library/BaseLib.h>
27 #include <Library/SmmServicesTableLib.h>
31 Reads registers in the EFI CPU I/O space.
33 Reads the I/O port specified by Port with registers width specified by Width.
34 The read value is returned. If such operations are not supported, then ASSERT().
35 This function must guarantee that all I/O read and write operations are serialized.
37 @param Port The base address of the I/O operation.
38 The caller is responsible for aligning the Address if required.
39 @param Width The width of the I/O operation.
41 @return Data read from registers in the EFI CPU I/O space.
48 IN EFI_SMM_IO_WIDTH Width
52 Writes registers in the EFI CPU I/O space.
54 Writes the I/O port specified by Port with registers width and value specified by Width
55 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().
56 This function must guarantee that all I/O read and write operations are serialized.
58 @param Port The base address of the I/O operation.
59 The caller is responsible for aligning the Address if required.
60 @param Width The width of the I/O operation.
61 @param Data The value to write to the I/O port.
63 @return The paramter of Data.
70 IN EFI_SMM_IO_WIDTH Width
,
75 Reads memory-mapped registers in the EFI system memory space.
77 Reads the MMIO registers specified by Address with registers width specified by Width.
78 The read value is returned. If such operations are not supported, then ASSERT().
79 This function must guarantee that all MMIO read and write operations are serialized.
81 @param Address The MMIO register to read.
82 The caller is responsible for aligning the Address if required.
83 @param Width The width of the I/O operation.
85 @return Data read from registers in the EFI system memory space.
92 IN EFI_SMM_IO_WIDTH Width
96 Writes memory-mapped registers in the EFI system memory space.
98 Writes the MMIO registers specified by Address with registers width and value specified by Width
99 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().
100 This function must guarantee that all MMIO read and write operations are serialized.
102 @param Address The MMIO register to read.
103 The caller is responsible for aligning the Address if required.
104 @param Width The width of the I/O operation.
105 @param Data The value to write to the I/O port.
107 @return Data read from registers in the EFI system memory space.
114 IN EFI_SMM_IO_WIDTH Width
,