]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmCpuIo.h
Remove IntelFrameworkModulePkg
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmCpuIo.h
CommitLineData
88ab69a3 1/** @file\r
2 SMM CPU I/O protocol as defined in the Intel Framework specification.\r
3\r
4 This protocol provides CPU I/O and memory access within SMM.\r
5\r
1c2f052d 6Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
22a69a5e 7SPDX-License-Identifier: BSD-2-Clause-Patent\r
88ab69a3 8\r
9**/\r
10\r
11#ifndef _SMM_CPU_IO_H_\r
12#define _SMM_CPU_IO_H_\r
13\r
14#include <Protocol/SmmCpuIo2.h>\r
15\r
16#define EFI_SMM_CPU_IO_GUID \\r
17 { \\r
18 0x5f439a0b, 0x45d8, 0x4682, {0xa4, 0xf4, 0xf0, 0x57, 0x6b, 0x51, 0x34, 0x41} \\r
19 }\r
20\r
21typedef struct _EFI_SMM_CPU_IO_INTERFACE EFI_SMM_CPU_IO_INTERFACE;\r
22\r
23/**\r
24 Provides the basic memory and I/O interfaces used to abstract accesses to devices.\r
25\r
1c2f052d
LG
26 The I/O operations are carried out exactly as requested. The caller is\r
27 responsible for any alignment and I/O width issues that the bus, device,\r
88ab69a3 28 platform, or type of I/O might require.\r
29\r
30 @param[in] This The EFI_SMM_CPU_IO_INTERFACE instance.\r
31 @param[in] Width Signifies the width of the I/O operations.\r
1c2f052d
LG
32 @param[in] Address The base address of the I/O operations. The caller is\r
33 responsible for aligning the Address, if required.\r
88ab69a3 34 @param[in] Count The number of I/O operations to perform.\r
1c2f052d
LG
35 @param[in,out] Buffer For read operations, the destination buffer to store\r
36 the results. For write operations, the source buffer\r
88ab69a3 37 from which to write data.\r
38\r
39 @retval EFI_SUCCESS The data was read from or written to the device.\r
40 @retval EFI_UNSUPPORTED The Address is not valid for this system.\r
41 @retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.\r
42 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack\r
43 of resources.\r
44**/\r
45typedef\r
46EFI_STATUS\r
47(EFIAPI *EFI_SMM_CPU_IO)(\r
48 IN EFI_SMM_CPU_IO_INTERFACE *This,\r
49 IN EFI_SMM_IO_WIDTH Width,\r
50 IN UINT64 Address,\r
51 IN UINTN Count,\r
52 IN OUT VOID *Buffer\r
53 );\r
54\r
55typedef struct {\r
56 ///\r
57 /// This service provides the various modalities of memory and I/O read.\r
58 ///\r
59 EFI_SMM_CPU_IO Read;\r
60 ///\r
61 /// This service provides the various modalities of memory and I/O write.\r
62 ///\r
63 EFI_SMM_CPU_IO Write;\r
64} EFI_SMM_IO_ACCESS;\r
65\r
66///\r
67/// SMM CPU I/O Protocol provides CPU I/O and memory access within SMM.\r
68///\r
69struct _EFI_SMM_CPU_IO_INTERFACE {\r
70 ///\r
71 /// Allows reads and writes to memory-mapped I/O space.\r
72 ///\r
73 EFI_SMM_IO_ACCESS Mem;\r
74 ///\r
75 /// Allows reads and writes to I/O space.\r
76 ///\r
77 EFI_SMM_IO_ACCESS Io;\r
78};\r
79\r
80extern EFI_GUID gEfiSmmCpuIoGuid;\r
81\r
82#endif\r