]>
Commit | Line | Data |
---|---|---|
79964ac8 | 1 | /** @file\r |
8411f1c0 | 2 | Provides the parent dispatch service for the standby button SMI source generator.\r |
79964ac8 | 3 | \r |
79a0adf3 | 4 | The SMM Standby Button Dispatch Protocol is defined in \r |
5 | the Intel Platform Innovation Framework for EFI SMM Core Interface Specification\r | |
6 | (SMM CIS) Version 0.9.\r | |
7 | \r | |
c3b35b60 | 8 | Copyright (c) 2007, 2009 Intel Corporation\r |
79964ac8 | 9 | All rights reserved. This program and the accompanying materials\r |
10 | are licensed and made available under the terms and conditions of the BSD License\r | |
11 | which accompanies this distribution. The full text of the license may be found at\r | |
12 | http://opensource.org/licenses/bsd-license.php\r | |
13 | \r | |
14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
16 | \r | |
c3b35b60 | 17 | @par Revision Reference:\r |
18 | This Protocol is defined in Framework of EFI SMM Core Interface Spec\r | |
19 | Version 0.9.\r | |
20 | \r | |
79964ac8 | 21 | **/\r |
22 | \r | |
23 | #ifndef _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r | |
24 | #define _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r | |
25 | \r | |
26 | //\r | |
27 | // Global ID for the Standby Button SMI Protocol\r | |
28 | //\r | |
29 | #define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \\r | |
30 | { \\r | |
31 | 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \\r | |
32 | }\r | |
33 | \r | |
34 | typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL;\r | |
35 | \r | |
36 | //\r | |
37 | // Related Definitions\r | |
38 | //\r | |
79a0adf3 | 39 | \r |
c3b35b60 | 40 | ///\r |
41 | /// Standby Button. Example, Use for changing LEDs before ACPI OS is on.\r | |
42 | /// - DXE/BDS Phase\r | |
43 | /// - OS Install Phase\r | |
44 | ///\r | |
79964ac8 | 45 | typedef enum {\r |
46 | EfiStandbyButtonEntry,\r | |
79a0adf3 | 47 | EfiStandbyButtonExit\r |
79964ac8 | 48 | } EFI_STANDBY_BUTTON_PHASE;\r |
49 | \r | |
50 | typedef struct {\r | |
c3b35b60 | 51 | /// Describes whether the child handler should be invoked upon the entry to the button\r |
52 | /// activation or upon exit (i.e., upon receipt of the button press event or upon release of\r | |
53 | /// the event).\r | |
79964ac8 | 54 | EFI_STANDBY_BUTTON_PHASE Phase;\r |
55 | } EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT;\r | |
56 | \r | |
57 | //\r | |
58 | // Member functions\r | |
59 | //\r | |
79a0adf3 | 60 | \r |
79964ac8 | 61 | /**\r |
62 | Dispatch function for a Standby Button SMI handler.\r | |
63 | \r | |
64 | @param DispatchHandle Handle of this dispatch function.\r | |
65 | @param DispatchContext Pointer to the dispatch function's context.\r | |
66 | The DispatchContext fields are filled in\r | |
67 | by the dispatching driver prior to\r | |
68 | invoking this dispatch function.\r | |
69 | \r | |
79964ac8 | 70 | **/\r |
71 | typedef\r | |
72 | VOID\r | |
69686d56 | 73 | (EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH)(\r |
79964ac8 | 74 | IN EFI_HANDLE DispatchHandle,\r |
75 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext\r | |
76 | );\r | |
77 | \r | |
78 | /**\r | |
700a7869 | 79 | Provides the parent dispatch service for a given SMI source generator\r |
79964ac8 | 80 | \r |
700a7869 | 81 | @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r |
82 | @param DispatchFunction Function to install.\r | |
79964ac8 | 83 | @param DispatchContext Pointer to the dispatch function's context.\r |
5259c97d | 84 | Indicates to the register\r |
85 | function the Standby Button SMI phase for which to invoke the dispatch\r | |
86 | function.\r | |
700a7869 | 87 | @param DispatchHandle Handle generated by the dispatcher to track the function instance.\r |
79964ac8 | 88 | \r |
89 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
90 | registered and the SMI source has been enabled.\r | |
5259c97d | 91 | @retval EFI_DEVICE_ERROR The driver could not enable the SMI source.\r |
79964ac8 | 92 | @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r |
93 | child.\r | |
94 | @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI\r | |
95 | phase is not within valid range.\r | |
96 | \r | |
97 | **/\r | |
98 | typedef\r | |
99 | EFI_STATUS\r | |
69686d56 | 100 | (EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER)(\r |
700a7869 | 101 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r |
102 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction,\r | |
103 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext,\r | |
104 | OUT EFI_HANDLE *DispatchHandle\r | |
79964ac8 | 105 | );\r |
106 | \r | |
107 | /**\r | |
108 | Unregister a child SMI source dispatch function with a parent SMM driver\r | |
109 | \r | |
79a0adf3 | 110 | @param This Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r |
111 | @param DispatchHandle Handle of the service to remove.\r | |
79964ac8 | 112 | \r |
79a0adf3 | 113 | @retval EFI_SUCCESS The dispatch function has been successfully\r |
114 | unregistered and the SMI source has been disabled\r | |
115 | if there are no other registered child dispatch\r | |
116 | functions for this SMI source.\r | |
117 | @retval EFI_INVALID_PARAMETER Handle is invalid.\r | |
79964ac8 | 118 | \r |
119 | **/\r | |
120 | typedef\r | |
121 | EFI_STATUS\r | |
69686d56 | 122 | (EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER)(\r |
79a0adf3 | 123 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r |
124 | IN EFI_HANDLE DispatchHandle\r | |
79964ac8 | 125 | );\r |
126 | \r | |
127 | //\r | |
128 | // Interface structure for the SMM Standby Button SMI Dispatch Protocol\r | |
129 | //\r | |
c3b35b60 | 130 | /**\r |
412fb9ef | 131 | This protocol provices the parent dispatch service for the standby button SMI source generator.\r |
132 | Provides the ability to install child handlers for the given event types.\r | |
c3b35b60 | 133 | **/\r |
79964ac8 | 134 | struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {\r |
412fb9ef | 135 | /// \r |
c3b35b60 | 136 | /// Installs a child service to be dispatched by this protocol.\r |
137 | ///\r | |
138 | EFI_SMM_STANDBY_BUTTON_REGISTER Register;\\r | |
412fb9ef | 139 | ///\r |
140 | /// Removes a child service dispatched by this protocol.\r | |
141 | ///\r | |
79964ac8 | 142 | EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;\r |
143 | };\r | |
144 | \r | |
145 | extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;\r | |
146 | \r | |
147 | #endif\r |