]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - IntelFrameworkPkg/Include/Protocol/SmmSxDispatch.h
Correct the structure's comments to follow doxygen format.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmSxDispatch.h
... / ...
CommitLineData
1/** @file\r
2 Provides the parent dispatch service for a given Sx-state source generator.\r
3\r
4 Copyright (c) 2007 - 2009, 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: SmmSxDispatch.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 _EFI_SMM_SX_DISPATCH_H_\r
22#define _EFI_SMM_SX_DISPATCH_H_\r
23\r
24#include <PiDxe.h>\r
25\r
26//\r
27// Global ID for the Sx SMI Protocol\r
28//\r
29#define EFI_SMM_SX_DISPATCH_PROTOCOL_GUID \\r
30 { \\r
31 0x14fc52be, 0x1dc, 0x426c, {0x91, 0xae, 0xa2, 0x3c, 0x3e, 0x22, 0xa, 0xe8 } \\r
32 }\r
33\r
34typedef struct _EFI_SMM_SX_DISPATCH_PROTOCOL EFI_SMM_SX_DISPATCH_PROTOCOL;\r
35//\r
36// Related Definitions\r
37//\r
38typedef enum {\r
39 SxS0,\r
40 SxS1,\r
41 SxS2,\r
42 SxS3,\r
43 SxS4,\r
44 SxS5,\r
45 EfiMaximumSleepType\r
46} EFI_SLEEP_TYPE;\r
47\r
48typedef enum {\r
49 SxEntry,\r
50 SxExit,\r
51 EfiMaximumPhase\r
52} EFI_SLEEP_PHASE;\r
53\r
54typedef struct {\r
55 EFI_SLEEP_TYPE Type;\r
56 EFI_SLEEP_PHASE Phase;\r
57} EFI_SMM_SX_DISPATCH_CONTEXT;\r
58\r
59//\r
60// Member functions\r
61//\r
62/**\r
63 Dispatch function for a Sx state SMI handler.\r
64\r
65 @param DispatchHandle Handle of this dispatch function.\r
66 @param DispatchContext Pointer to the dispatch function's context.\r
67 The Type and Phase fields are filled in by the Sx dispatch driver\r
68 prior to invoking this dispatch function. For this interface,\r
69 the Sx driver will call the dispatch function for all Sx type\r
70 and phases, so the Sx state handler(s) must check the Type and\r
71 Phase field of EFI_SMM_SX_DISPATCH_CONTEXT and act accordingly.\r
72\r
73 @return None\r
74\r
75**/\r
76typedef\r
77VOID\r
78(EFIAPI *EFI_SMM_SX_DISPATCH)(\r
79 IN EFI_HANDLE DispatchHandle,\r
80 IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext\r
81 );\r
82\r
83/**\r
84 Register a child SMI source dispatch function with a parent SMM driver\r
85\r
86 @param This Pointer to the EFI_SMM_SX_DISPATCH_PROTOCOL instance.\r
87 @param DispatchFunction Function to install.\r
88 @param DispatchContext Pointer to the dispatch function's context.\r
89 The caller fills this context in before calling\r
90 the register function to indicate to the register\r
91 function which Sx state type and phase the caller\r
92 wishes to be called back on. For this intertace,\r
93 the Sx driver will call the registered handlers for\r
94 all Sx type and phases, so the Sx state handler(s)\r
95 must check the Type and Phase field of the Dispatch\r
96 context and act accordingly.\r
97 @param DispatchHandle Handle of dispatch function, for when interfacing\r
98 with the parent Sx state SMM driver.\r
99\r
100 @retval EFI_SUCCESS The dispatch function has been successfully\r
101 registered and the SMI source has been enabled.\r
102 @retval EFI_UNSUPPORTED The Sx driver or hardware does not support that\r
103 Sx Type/Phase.\r
104 @retval EFI_DEVICE_ERROR The Sx driver was unable to enable the SMI source.\r
105 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
106 child.\r
107 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. Type & Phase are not\r
108 within valid range.\r
109\r
110**/\r
111typedef\r
112EFI_STATUS\r
113(EFIAPI *EFI_SMM_SX_REGISTER)(\r
114 IN EFI_SMM_SX_DISPATCH_PROTOCOL *This,\r
115 IN EFI_SMM_SX_DISPATCH DispatchFunction,\r
116 IN EFI_SMM_SX_DISPATCH_CONTEXT *DispatchContext,\r
117 OUT EFI_HANDLE *DispatchHandle\r
118 );\r
119\r
120/**\r
121 Unregisters an Sx-state service\r
122\r
123 @param This Pointer to the EFI_SMM_SX_DISPATCH_PROTOCOL instance.\r
124 @param DispatchHandle Handle of the service to remove.\r
125\r
126 @retval EFI_SUCCESS The dispatch function has been successfully unregistered and the\r
127 SMI source has been disabled if there are no other registered child\r
128 dispatch functions for this SMI source.\r
129 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
130\r
131**/\r
132typedef\r
133EFI_STATUS\r
134(EFIAPI *EFI_SMM_SX_UNREGISTER)(\r
135 IN EFI_SMM_SX_DISPATCH_PROTOCOL *This,\r
136 IN EFI_HANDLE DispatchHandle\r
137 );\r
138\r
139//\r
140// Interface structure for the SMM Child Dispatch Protocol\r
141//\r
142/**\r
143 Provides the parent dispatch service for a given Sx-state source generator.\r
144**/\r
145struct _EFI_SMM_SX_DISPATCH_PROTOCOL {\r
146 EFI_SMM_SX_REGISTER Register; ///< Installs a child service to be dispatched by this protocol.\r
147 EFI_SMM_SX_UNREGISTER UnRegister; ///< Removes a child service dispatched by this protocol.\r
148};\r
149\r
150extern EFI_GUID gEfiSmmSxDispatchProtocolGuid;\r
151\r
152#endif\r