VirtualBox

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

最後變更 在這個檔案從80721是 80721,由 vboxsync 提交於 6 年 前

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 3.6 KB
 
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/**
25 Reads registers in the EFI CPU I/O space.
26
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.
30
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.
34
35 @return Data read from registers in the EFI CPU I/O space.
36
37**/
38UINT64
39EFIAPI
40IoReadWorker (
41 IN UINTN Port,
42 IN EFI_SMM_IO_WIDTH Width
43 );
44
45/**
46 Writes registers in the EFI CPU I/O space.
47
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.
51
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.
56
57 @return The parameter of Data.
58
59**/
60UINT64
61EFIAPI
62IoWriteWorker (
63 IN UINTN Port,
64 IN EFI_SMM_IO_WIDTH Width,
65 IN UINT64 Data
66 );
67
68/**
69 Reads memory-mapped registers in the EFI system memory space.
70
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.
74
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.
78
79 @return Data read from registers in the EFI system memory space.
80
81**/
82UINT64
83EFIAPI
84MmioReadWorker (
85 IN UINTN Address,
86 IN EFI_SMM_IO_WIDTH Width
87 );
88
89/**
90 Writes memory-mapped registers in the EFI system memory space.
91
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.
95
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.
100
101 @return Data read from registers in the EFI system memory space.
102
103**/
104UINT64
105EFIAPI
106MmioWriteWorker (
107 IN UINTN Address,
108 IN EFI_SMM_IO_WIDTH Width,
109 IN UINT64 Data
110 );
111
112#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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