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