VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h@ 105681

Last change on this file since 105681 was 99404, checked in by vboxsync, 23 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 3.5 KB
Line 
1/** @file
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.
6
7 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10**/
11
12#ifndef _SMM_CPUIO_LIB_INTERNAL_H_
13#define _SMM_CPUIO_LIB_INTERNAL_H_
14
15#include <PiSmm.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>
22
23/**
24 Reads registers in the EFI CPU I/O space.
25
26 Reads the I/O port specified by Port with registers width specified by Width.
27 The read value is returned. If such operations are not supported, then ASSERT().
28 This function must guarantee that all I/O read and write operations are serialized.
29
30 @param Port The base address of the I/O operation.
31 The caller is responsible for aligning the Address if required.
32 @param Width The width of the I/O operation.
33
34 @return Data read from registers in the EFI CPU I/O space.
35
36**/
37UINT64
38EFIAPI
39IoReadWorker (
40 IN UINTN Port,
41 IN EFI_SMM_IO_WIDTH Width
42 );
43
44/**
45 Writes registers in the EFI CPU I/O space.
46
47 Writes the I/O port specified by Port with registers width and value specified by Width
48 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().
49 This function must guarantee that all I/O read and write operations are serialized.
50
51 @param Port The base address of the I/O operation.
52 The caller is responsible for aligning the Address if required.
53 @param Width The width of the I/O operation.
54 @param Data The value to write to the I/O port.
55
56 @return The parameter of Data.
57
58**/
59UINT64
60EFIAPI
61IoWriteWorker (
62 IN UINTN Port,
63 IN EFI_SMM_IO_WIDTH Width,
64 IN UINT64 Data
65 );
66
67/**
68 Reads memory-mapped registers in the EFI system memory space.
69
70 Reads the MMIO registers specified by Address with registers width specified by Width.
71 The read value is returned. If such operations are not supported, then ASSERT().
72 This function must guarantee that all MMIO read and write operations are serialized.
73
74 @param Address The MMIO register to read.
75 The caller is responsible for aligning the Address if required.
76 @param Width The width of the I/O operation.
77
78 @return Data read from registers in the EFI system memory space.
79
80**/
81UINT64
82EFIAPI
83MmioReadWorker (
84 IN UINTN Address,
85 IN EFI_SMM_IO_WIDTH Width
86 );
87
88/**
89 Writes memory-mapped registers in the EFI system memory space.
90
91 Writes the MMIO registers specified by Address with registers width and value specified by Width
92 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().
93 This function must guarantee that all MMIO read and write operations are serialized.
94
95 @param Address The MMIO register to read.
96 The caller is responsible for aligning the Address if required.
97 @param Width The width of the I/O operation.
98 @param Data The value to write to the I/O port.
99
100 @return Data read from registers in the EFI system memory space.
101
102**/
103UINT64
104EFIAPI
105MmioWriteWorker (
106 IN UINTN Address,
107 IN EFI_SMM_IO_WIDTH Width,
108 IN UINT64 Data
109 );
110
111#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette