]> git.proxmox.com Git - mirror_edk2.git/blame - OldMdePkg/Include/Protocol/SmmControl.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / 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
0647c9ad
LG
44 @param This The EFI_SMM_CONTROL_PROTOCOL instance.\r
45 @param ArgumentBuffer Optional sized data to pass into the protocol activation.\r
46 @param ArgumentBufferSize Optional size of the data.\r
47 @param Periodic Optional mechanism to engender a periodic stream.\r
48 @param ActivationInterval Optional parameter to repeat at this period one\r
49 time or, if the Periodic Boolean is set, periodically.\r
50\r
51 @retval EFI_SUCCESS The SMI/PMI has been engendered.\r
52 @retval EFI_DEVICE_ERROR The timing is unsupported.\r
53 @retval EFI_INVALID_PARAMETER The activation period is unsupported.\r
54 @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r
878ddf1f 55\r
56**/\r
57typedef\r
58EFI_STATUS\r
59(EFIAPI *EFI_SMM_ACTIVATE) (\r
60 IN EFI_SMM_CONTROL_PROTOCOL *This,\r
61 IN OUT INT8 *ArgumentBuffer OPTIONAL,\r
62 IN OUT UINTN *ArgumentBufferSize OPTIONAL,\r
63 IN BOOLEAN Periodic OPTIONAL,\r
64 IN UINTN ActivationInterval OPTIONAL\r
65 );\r
66\r
67/**\r
68 Clears any system state that was created in response to the Active call.\r
69\r
0647c9ad
LG
70 @param This The EFI_SMM_CONTROL_PROTOCOL instance.\r
71 @param Periodic Optional parameter to repeat at this period one time\r
878ddf1f 72\r
0647c9ad
LG
73 @retval EFI_SUCCESS The SMI/PMI has been engendered.\r
74 @retval EFI_DEVICE_ERROR The source could not be cleared.\r
75 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.\r
878ddf1f 76\r
77**/\r
78typedef\r
79EFI_STATUS\r
80(EFIAPI *EFI_SMM_DEACTIVATE) (\r
81 IN EFI_SMM_CONTROL_PROTOCOL *This,\r
82 IN BOOLEAN Periodic OPTIONAL\r
83 );\r
84\r
85/**\r
86 Provides information on the source register used to generate the SMI.\r
87\r
0647c9ad
LG
88 @param This The EFI_SMM_CONTROL_PROTOCOL instance.\r
89 @param SmiRegister Pointer to the SMI register description structure\r
878ddf1f 90\r
0647c9ad 91 @retval EFI_SUCCESS The register structure has been returned.\r
878ddf1f 92\r
93**/\r
94typedef\r
95EFI_STATUS\r
96(EFIAPI *EFI_SMM_GET_REGISTER_INFO) (\r
97 IN EFI_SMM_CONTROL_PROTOCOL *This,\r
98 IN OUT EFI_SMM_CONTROL_REGISTER *SmiRegister\r
99 );\r
100\r
101/**\r
102 @par Protocol Description:\r
103 This protocol is used initiate SMI/PMI activations. \r
104\r
105 @param Trigger\r
106 Initiates the SMI/PMI activation.\r
107\r
108 @param Clear\r
109 Quiesces the SMI/PMI activation. \r
110\r
111 @param GetRegisterInfo\r
112 Provides data on the register used as the source of the SMI.\r
113\r
114 @param MinimumTriggerPeriod\r
115 Minimum interval at which the platform can set the period. \r
116\r
117**/\r
118\r
119struct _EFI_SMM_CONTROL_PROTOCOL {\r
120 EFI_SMM_ACTIVATE Trigger;\r
121 EFI_SMM_DEACTIVATE Clear;\r
122 EFI_SMM_GET_REGISTER_INFO GetRegisterInfo;\r
123 UINTN MinimumTriggerPeriod;\r
124};\r
125\r
126extern EFI_GUID gEfiSmmControlProtocolGuid;\r
127\r
128#endif\r