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 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #ifndef _SMM_CPUIO_LIB_INTERNAL_H_
13 #define _SMM_CPUIO_LIB_INTERNAL_H_
16 #include <Protocol/SmmCpuIo2.h>
17 #include <Protocol/SmmPciRootBridgeIo.h>
18 #include <Library/IoLib.h>
19 #include <Library/DebugLib.h>
20 #include <Library/BaseLib.h>
21 #include <Library/SmmServicesTableLib.h>
25 Reads registers in the EFI CPU I/O space.
27 Reads the I/O port specified by Port with registers width specified by Width.
28 The read value is returned. If such operations are not supported, then ASSERT().
29 This function must guarantee that all I/O read and write operations are serialized.
31 @param Port The base address of the I/O operation.
32 The caller is responsible for aligning the Address if required.
33 @param Width The width of the I/O operation.
35 @return Data read from registers in the EFI CPU I/O space.
42 IN EFI_SMM_IO_WIDTH Width
46 Writes registers in the EFI CPU I/O space.
48 Writes the I/O port specified by Port with registers width and value specified by Width
49 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().
50 This function must guarantee that all I/O read and write operations are serialized.
52 @param Port The base address of the I/O operation.
53 The caller is responsible for aligning the Address if required.
54 @param Width The width of the I/O operation.
55 @param Data The value to write to the I/O port.
57 @return The parameter of Data.
64 IN EFI_SMM_IO_WIDTH Width
,
69 Reads memory-mapped registers in the EFI system memory space.
71 Reads the MMIO registers specified by Address with registers width specified by Width.
72 The read value is returned. If such operations are not supported, then ASSERT().
73 This function must guarantee that all MMIO read and write operations are serialized.
75 @param Address The MMIO register to read.
76 The caller is responsible for aligning the Address if required.
77 @param Width The width of the I/O operation.
79 @return Data read from registers in the EFI system memory space.
86 IN EFI_SMM_IO_WIDTH Width
90 Writes memory-mapped registers in the EFI system memory space.
92 Writes the MMIO registers specified by Address with registers width and value specified by Width
93 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().
94 This function must guarantee that all MMIO read and write operations are serialized.
96 @param Address The MMIO register to read.
97 The caller is responsible for aligning the Address if required.
98 @param Width The width of the I/O operation.
99 @param Data The value to write to the I/O port.
101 @return Data read from registers in the EFI system memory space.
108 IN EFI_SMM_IO_WIDTH Width
,