]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmCpuIo.h
Clarify @pram b in Base.h. Accepted and edited in Qing Huang changes for @retval...
[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
6 Copyright (c) 2009 - 2010, Intel Corporation\r
7 All rights reserved. This program and the accompanying materials\r
8 are licensed and made available under the terms and conditions of the BSD License\r
9 which accompanies this distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/\r
16\r
17#ifndef _SMM_CPU_IO_H_\r
18#define _SMM_CPU_IO_H_\r
19\r
20#include <Protocol/SmmCpuIo2.h>\r
21\r
22#define EFI_SMM_CPU_IO_GUID \\r
23 { \\r
24 0x5f439a0b, 0x45d8, 0x4682, {0xa4, 0xf4, 0xf0, 0x57, 0x6b, 0x51, 0x34, 0x41} \\r
25 }\r
26\r
27typedef struct _EFI_SMM_CPU_IO_INTERFACE EFI_SMM_CPU_IO_INTERFACE;\r
28\r
29/**\r
30 Provides the basic memory and I/O interfaces used to abstract accesses to devices.\r
31\r
32 The I/O operations are carried out exactly as requested. The caller is \r
33 responsible for any alignment and I/O width issues that the bus, device, \r
34 platform, or type of I/O might require.\r
35\r
36 @param[in] This The EFI_SMM_CPU_IO_INTERFACE instance.\r
37 @param[in] Width Signifies the width of the I/O operations.\r
38 @param[in] Address The base address of the I/O operations. The caller is \r
39 responsible for aligning the Address if required. \r
40 @param[in] Count The number of I/O operations to perform.\r
41 @param[in,out] Buffer For read operations, the destination buffer to store \r
42 the results. For write operations, the source buffer \r
43 from which to write data.\r
44\r
45 @retval EFI_SUCCESS The data was read from or written to the device.\r
46 @retval EFI_UNSUPPORTED The Address is not valid for this system.\r
47 @retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.\r
48 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack\r
49 of resources.\r
50**/\r
51typedef\r
52EFI_STATUS\r
53(EFIAPI *EFI_SMM_CPU_IO)(\r
54 IN EFI_SMM_CPU_IO_INTERFACE *This,\r
55 IN EFI_SMM_IO_WIDTH Width,\r
56 IN UINT64 Address,\r
57 IN UINTN Count,\r
58 IN OUT VOID *Buffer\r
59 );\r
60\r
61typedef struct {\r
62 ///\r
63 /// This service provides the various modalities of memory and I/O read.\r
64 ///\r
65 EFI_SMM_CPU_IO Read;\r
66 ///\r
67 /// This service provides the various modalities of memory and I/O write.\r
68 ///\r
69 EFI_SMM_CPU_IO Write;\r
70} EFI_SMM_IO_ACCESS;\r
71\r
72///\r
73/// SMM CPU I/O Protocol provides CPU I/O and memory access within SMM.\r
74///\r
75struct _EFI_SMM_CPU_IO_INTERFACE {\r
76 ///\r
77 /// Allows reads and writes to memory-mapped I/O space.\r
78 ///\r
79 EFI_SMM_IO_ACCESS Mem;\r
80 ///\r
81 /// Allows reads and writes to I/O space.\r
82 ///\r
83 EFI_SMM_IO_ACCESS Io;\r
84};\r
85\r
86extern EFI_GUID gEfiSmmCpuIoGuid;\r
87\r
88#endif\r