]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Protocol/SmmSxDispatch/SmmSxDispatch.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Protocol / SmmSxDispatch / SmmSxDispatch.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 1999 - 2002, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials\r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12\r
13Module Name:\r
14\r
15 SmmSxDispatch.h\r
16\r
17Abstract:\r
18\r
19 EFI Smm Sx Smi Child Protocol\r
20\r
21Revision History\r
22\r
23--*/\r
24\r
25#ifndef _EFI_SMM_SX_DISPATCH_H_\r
26#define _EFI_SMM_SX_DISPATCH_H_\r
27\r
28//\r
29// Global ID for the Sx SMI Protocol\r
30//\r
31#define EFI_SMM_SX_DISPATCH_PROTOCOL_GUID \\r
32 { \\r
7ccf38a3 33 0x14fc52be, 0x1dc, 0x426c, {0x91, 0xae, 0xa2, 0x3c, 0x3e, 0x22, 0xa, 0xe8} \\r
3eb9473e 34 }\r
35\r
36EFI_FORWARD_DECLARATION (EFI_SMM_SX_DISPATCH_PROTOCOL);\r
37\r
38//\r
39// Related Definitions\r
40//\r
41typedef enum {\r
42 SxS0,\r
43 SxS1,\r
44 SxS2,\r
45 SxS3,\r
46 SxS4,\r
47 SxS5,\r
48 EfiMaximumSleepType\r
49} EFI_SLEEP_TYPE;\r
50\r
51typedef enum {\r
52 SxEntry,\r
53 SxExit,\r
54 EfiMaximumPhase\r
55} EFI_SLEEP_PHASE;\r
56\r
57typedef struct {\r
58 EFI_SLEEP_TYPE Type;\r
59 EFI_SLEEP_PHASE Phase;\r
60} EFI_SMM_SX_DISPATCH_CONTEXT;\r
61\r
62//\r
63// Member functions\r
64//\r
65typedef\r
66VOID\r
67(EFIAPI *EFI_SMM_SX_DISPATCH) (\r
68 IN EFI_HANDLE DispatchHandle,\r
69 IN EFI_SMM_SX_DISPATCH_CONTEXT * DispatchContext\r
70 );\r
71\r
72/*++\r
73\r
74 Routine Description:\r
75 Dispatch function for a Sx state SMI handler.\r
76\r
77 Arguments:\r
78 DispatchHandle - Handle of this dispatch function.\r
79 DispatchContext - Pointer to the dispatch function's context.\r
80 The Type and Phase fields are filled in\r
81 by the Sx dispatch driver prior to invoking\r
82 this dispatch function.\r
83 For this intertace, the Sx driver will call the\r
84 dispatch function for all Sx type and phases,\r
85 so the Sx state handler(s) must check the Type\r
86 and Phase field of the Dispatch context and act\r
87 accordingly.\r
88\r
89 Returns:\r
90 Nothing\r
91\r
92--*/\r
93typedef\r
94EFI_STATUS\r
95(EFIAPI *EFI_SMM_SX_REGISTER) (\r
96 IN EFI_SMM_SX_DISPATCH_PROTOCOL * This,\r
97 IN EFI_SMM_SX_DISPATCH DispatchFunction,\r
98 IN EFI_SMM_SX_DISPATCH_CONTEXT * DispatchContext,\r
99 OUT EFI_HANDLE * DispatchHandle\r
100 );\r
101\r
102/*++\r
103\r
104 Routine Description:\r
105 Register a child SMI source dispatch function with a parent SMM driver\r
106\r
107 Arguments:\r
108 This - Protocol instance pointer.\r
109 DispatchFunction - Pointer to dispatch function to be invoked for\r
110 this SMI source\r
111 DispatchContext - Pointer to the dispatch function's context.\r
112 The caller fills this context in before calling\r
113 the register function to indicate to the register\r
114 function which Sx state type and phase the caller\r
115 wishes to be called back on. For this intertace,\r
116 the Sx driver will call the registered handlers for\r
117 all Sx type and phases, so the Sx state handler(s)\r
118 must check the Type and Phase field of the Dispatch\r
119 context and act accordingly.\r
120 DispatchHandle - Handle of dispatch function, for when interfacing\r
121 with the parent Sx state SMM driver.\r
122\r
123 Returns:\r
124 EFI_SUCCESS - The dispatch function has been successfully\r
125 registered and the SMI source has been enabled.\r
126 EFI_UNSUPPORTED - The Sx driver or hardware does not support that\r
127 Sx Type/Phase.\r
128 EFI_DEVICE_ERROR - The Sx driver was unable to enable the SMI source.\r
129 EFI_OUT_OF_RESOURCES - Not enough memory (system or SMM) to manage this\r
130 child.\r
131 EFI_INVALID_PARAMETER - DispatchContext is invalid. Type & Phase are not\r
132 within valid range.\r
133\r
134--*/\r
135typedef\r
136EFI_STATUS\r
137(EFIAPI *EFI_SMM_SX_UNREGISTER) (\r
138 IN EFI_SMM_SX_DISPATCH_PROTOCOL * This,\r
139 IN EFI_HANDLE DispatchHandle\r
140 );\r
141\r
142/*++\r
143\r
144 Routine Description:\r
145 Unregister a child SMI source dispatch function with a parent SMM driver\r
146\r
147 Arguments:\r
148 This - Protocol instance pointer.\r
149 DispatchHandle - Handle of dispatch function to deregister.\r
150\r
151 Returns:\r
152 EFI_SUCCESS - The dispatch function has been successfully unregistered and the\r
153 SMI source has been disabled if there are no other registered child\r
154 dispatch functions for this SMI source.\r
155 EFI_INVALID_PARAMETER - Handle is invalid.\r
156 other - TBD\r
157\r
158--*/\r
159\r
160//\r
161// Interface structure for the SMM Child Dispatch Protocol\r
162//\r
5d46191d 163struct _EFI_SMM_SX_DISPATCH_PROTOCOL {\r
3eb9473e 164 EFI_SMM_SX_REGISTER Register;\r
165 EFI_SMM_SX_UNREGISTER UnRegister;\r
5d46191d 166};\r
3eb9473e 167\r
168extern EFI_GUID gEfiSmmSxDispatchProtocolGuid;\r
169\r
170#endif\r