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