]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmControl.h
Make public header file #ifndef XXX #define XXX start with __ to avoid collision.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmControl.h
CommitLineData
79964ac8 1/** @file\r
2 This file declares SMM Control abstraction protocol.\r
3\r
4 Copyright (c) 2007, Intel Corporation\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 Module Name: SmmControl.h\r
14\r
15 @par Revision Reference:\r
16 This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
17 Version 0.9.\r
18\r
19**/\r
20\r
21#ifndef _SMM_CONTROL_H_\r
22#define _SMM_CONTROL_H_\r
23\r
b80fbe85 24#include <PiDxe.h>\r
25\r
79964ac8 26typedef struct _EFI_SMM_CONTROL_PROTOCOL EFI_SMM_CONTROL_PROTOCOL;\r
27\r
28#define EFI_SMM_CONTROL_PROTOCOL_GUID \\r
29 { \\r
30 0x8d12e231, 0xc667, 0x4fd1, {0x98, 0xf2, 0x24, 0x49, 0xa7, 0xe7, 0xb2, 0xe5 } \\r
31 }\r
32\r
33// SMM Access specification Data Structures\r
34//\r
35typedef struct {\r
36 UINT8 SmiTriggerRegister;\r
37 UINT8 SmiDataRegister;\r
38} EFI_SMM_CONTROL_REGISTER;\r
39\r
40//\r
41// SMM Control specification member function\r
42//\r
43/**\r
44 Invokes SMI activation from either the preboot or runtime environment.\r
45\r
46 @param This The EFI_SMM_CONTROL_PROTOCOL instance.\r
47 @param ArgumentBuffer Optional sized data to pass into the protocol activation.\r
48 @param ArgumentBufferSize Optional size of the data.\r
49 @param Periodic Optional mechanism to engender a periodic stream.\r
50 @param ActivationInterval Optional parameter to repeat at this period one\r
51 time or, if the Periodic Boolean is set, periodically.\r
52\r
53 @retval EFI_SUCCESS The SMI/PMI has been engendered.\r
54 @retval EFI_DEVICE_ERROR The timing is unsupported.\r
55 @retval EFI_INVALID_PARAMETER The activation period is unsupported.\r
56 @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r
57\r
58**/\r
59typedef\r
60EFI_STATUS\r
61(EFIAPI *EFI_SMM_ACTIVATE) (\r
62 IN EFI_SMM_CONTROL_PROTOCOL *This,\r
63 IN OUT INT8 *ArgumentBuffer OPTIONAL,\r
64 IN OUT UINTN *ArgumentBufferSize OPTIONAL,\r
65 IN BOOLEAN Periodic OPTIONAL,\r
66 IN UINTN ActivationInterval OPTIONAL\r
67 );\r
68\r
69/**\r
70 Clears any system state that was created in response to the Active call.\r
71\r
72 @param This The EFI_SMM_CONTROL_PROTOCOL instance.\r
73 @param Periodic Optional parameter to repeat at this period one time\r
74\r
75 @retval EFI_SUCCESS The SMI/PMI has been engendered.\r
76 @retval EFI_DEVICE_ERROR The source could not be cleared.\r
77 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.\r
78\r
79**/\r
80typedef\r
81EFI_STATUS\r
82(EFIAPI *EFI_SMM_DEACTIVATE) (\r
83 IN EFI_SMM_CONTROL_PROTOCOL *This,\r
84 IN BOOLEAN Periodic OPTIONAL\r
85 );\r
86\r
87/**\r
88 Provides information on the source register used to generate the SMI.\r
89\r
90 @param This The EFI_SMM_CONTROL_PROTOCOL instance.\r
91 @param SmiRegister Pointer to the SMI register description structure\r
92\r
93 @retval EFI_SUCCESS The register structure has been returned.\r
94\r
95**/\r
96typedef\r
97EFI_STATUS\r
98(EFIAPI *EFI_SMM_GET_REGISTER_INFO) (\r
99 IN EFI_SMM_CONTROL_PROTOCOL *This,\r
100 IN OUT EFI_SMM_CONTROL_REGISTER *SmiRegister\r
101 );\r
102\r
103/**\r
104 @par Protocol Description:\r
105 This protocol is used initiate SMI/PMI activations.\r
106\r
107 @param Trigger\r
108 Initiates the SMI/PMI activation.\r
109\r
110 @param Clear\r
111 Quiesces the SMI/PMI activation.\r
112\r
113 @param GetRegisterInfo\r
114 Provides data on the register used as the source of the SMI.\r
115\r
116 @param MinimumTriggerPeriod\r
117 Minimum interval at which the platform can set the period.\r
118\r
119**/\r
120\r
121struct _EFI_SMM_CONTROL_PROTOCOL {\r
122 EFI_SMM_ACTIVATE Trigger;\r
123 EFI_SMM_DEACTIVATE Clear;\r
124 EFI_SMM_GET_REGISTER_INFO GetRegisterInfo;\r
125 UINTN MinimumTriggerPeriod;\r
126};\r
127\r
128extern EFI_GUID gEfiSmmControlProtocolGuid;\r
129\r
130#endif\r