]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/SmmControl.h
Initial import.
[mirror_edk2.git] / MdePkg / Include / Protocol / SmmControl.h
CommitLineData
878ddf1f 1/** @file\r
2 This file declares SMM Control abstraction protocol.\r
3\r
4 Copyright (c) 2006, 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
24typedef struct _EFI_SMM_CONTROL_PROTOCOL EFI_SMM_CONTROL_PROTOCOL;\r
25\r
26#define EFI_SMM_CONTROL_PROTOCOL_GUID \\r
27 { \\r
28 0x8d12e231, 0xc667, 0x4fd1, {0x98, 0xf2, 0x24, 0x49, 0xa7, 0xe7, 0xb2, 0xe5 } \\r
29 }\r
30\r
31// SMM Access specification Data Structures\r
32//\r
33typedef struct {\r
34 UINT8 SmiTriggerRegister;\r
35 UINT8 SmiDataRegister;\r
36} EFI_SMM_CONTROL_REGISTER;\r
37\r
38//\r
39// SMM Control specification member function\r
40//\r
41/**\r
42 Invokes SMI activation from either the preboot or runtime environment.\r
43\r
44 @param This The EFI_SMM_CONTROL_PROTOCOL instance. \r
45 \r
46 @param ArgumentBuffer Optional sized data to pass into the protocol activation. \r
47 \r
48 @param ArgumentBufferSize Optional size of the data.\r
49 \r
50 @param Periodic Optional mechanism to engender a periodic stream.\r
51 \r
52 @param ActivationInterval Optional parameter to repeat at this period one \r
53 time or, if the Periodic Boolean is set, periodically.\r
54\r
55 @retval EFI_SUCCESS The SMI/PMI has been engendered.\r
56 \r
57 @retval EFI_DEVICE_ERROR The timing is unsupported.\r
58 \r
59 @retval EFI_INVALID_PARAMETER The activation period is unsupported.\r
60 \r
61 @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r
62\r
63**/\r
64typedef\r
65EFI_STATUS\r
66(EFIAPI *EFI_SMM_ACTIVATE) (\r
67 IN EFI_SMM_CONTROL_PROTOCOL *This,\r
68 IN OUT INT8 *ArgumentBuffer OPTIONAL,\r
69 IN OUT UINTN *ArgumentBufferSize OPTIONAL,\r
70 IN BOOLEAN Periodic OPTIONAL,\r
71 IN UINTN ActivationInterval OPTIONAL\r
72 );\r
73\r
74/**\r
75 Clears any system state that was created in response to the Active call.\r
76\r
77 @param This The EFI_SMM_CONTROL_PROTOCOL instance. \r
78 \r
79 @param Periodic Optional parameter to repeat at this period one time\r
80\r
81 @retval EFI_SUCCESS The SMI/PMI has been engendered.\r
82 \r
83 @retval EFI_DEVICE_ERROR The source could not be cleared.\r
84 \r
85 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.\r
86\r
87**/\r
88typedef\r
89EFI_STATUS\r
90(EFIAPI *EFI_SMM_DEACTIVATE) (\r
91 IN EFI_SMM_CONTROL_PROTOCOL *This,\r
92 IN BOOLEAN Periodic OPTIONAL\r
93 );\r
94\r
95/**\r
96 Provides information on the source register used to generate the SMI.\r
97\r
98 @param This The EFI_SMM_CONTROL_PROTOCOL instance. \r
99 \r
100 @param SmiRegister Pointer to the SMI register description structure\r
101\r
102 @retval EFI_SUCCESS The register structure has been returned.\r
103\r
104**/\r
105typedef\r
106EFI_STATUS\r
107(EFIAPI *EFI_SMM_GET_REGISTER_INFO) (\r
108 IN EFI_SMM_CONTROL_PROTOCOL *This,\r
109 IN OUT EFI_SMM_CONTROL_REGISTER *SmiRegister\r
110 );\r
111\r
112/**\r
113 @par Protocol Description:\r
114 This protocol is used initiate SMI/PMI activations. \r
115\r
116 @param Trigger\r
117 Initiates the SMI/PMI activation.\r
118\r
119 @param Clear\r
120 Quiesces the SMI/PMI activation. \r
121\r
122 @param GetRegisterInfo\r
123 Provides data on the register used as the source of the SMI.\r
124\r
125 @param MinimumTriggerPeriod\r
126 Minimum interval at which the platform can set the period. \r
127\r
128**/\r
129\r
130struct _EFI_SMM_CONTROL_PROTOCOL {\r
131 EFI_SMM_ACTIVATE Trigger;\r
132 EFI_SMM_DEACTIVATE Clear;\r
133 EFI_SMM_GET_REGISTER_INFO GetRegisterInfo;\r
134 UINTN MinimumTriggerPeriod;\r
135};\r
136\r
137extern EFI_GUID gEfiSmmControlProtocolGuid;\r
138\r
139#endif\r