]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Provides the parent dispatch service for the standby button SMI source generator.\r | |
3 | \r | |
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 | |
8 | Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
9 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
10 | \r | |
11 | @par Revision Reference:\r | |
12 | This Protocol is defined in Framework of EFI SMM Core Interface Spec\r | |
13 | Version 0.9.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r | |
18 | #define _EFI_SMM_STANDBY_BUTTON_DISPATCH_H_\r | |
19 | \r | |
20 | //\r | |
21 | // Share some common definitions with PI SMM\r | |
22 | //\r | |
23 | #include <Protocol/SmmStandbyButtonDispatch2.h>\r | |
24 | \r | |
25 | //\r | |
26 | // Global ID for the Standby Button SMI Protocol\r | |
27 | //\r | |
28 | #define EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID \\r | |
29 | { \\r | |
30 | 0x78965b98, 0xb0bf, 0x449e, {0x8b, 0x22, 0xd2, 0x91, 0x4e, 0x49, 0x8a, 0x98 } \\r | |
31 | }\r | |
32 | \r | |
33 | typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL;\r | |
34 | \r | |
35 | //\r | |
36 | // Related Definitions\r | |
37 | //\r | |
38 | \r | |
39 | typedef struct {\r | |
40 | /// Describes whether the child handler should be invoked upon the entry to the button\r | |
41 | /// activation or upon exit (i.e., upon receipt of the button press event or upon release of\r | |
42 | /// the event).\r | |
43 | EFI_STANDBY_BUTTON_PHASE Phase;\r | |
44 | } EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT;\r | |
45 | \r | |
46 | //\r | |
47 | // Member functions\r | |
48 | //\r | |
49 | \r | |
50 | /**\r | |
51 | Dispatch function for a Standby Button SMI handler.\r | |
52 | \r | |
53 | @param DispatchHandle The handle of this dispatch function.\r | |
54 | @param DispatchContext The pointer to the dispatch function's context.\r | |
55 | The DispatchContext fields are filled in\r | |
56 | by the dispatching driver prior to\r | |
57 | invoking this dispatch function.\r | |
58 | \r | |
59 | **/\r | |
60 | typedef\r | |
61 | VOID\r | |
62 | (EFIAPI *EFI_SMM_STANDBY_BUTTON_DISPATCH)(\r | |
63 | IN EFI_HANDLE DispatchHandle,\r | |
64 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext\r | |
65 | );\r | |
66 | \r | |
67 | /**\r | |
68 | Provides the parent dispatch service for a given SMI source generator\r | |
69 | \r | |
70 | @param This The pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r | |
71 | @param DispatchFunction The function to install.\r | |
72 | @param DispatchContext The pointer to the dispatch function's context.\r | |
73 | Indicates to the register function the Standby\r | |
74 | Button SMI phase for which to invoke the dispatch\r | |
75 | function.\r | |
76 | @param DispatchHandle The handle generated by the dispatcher to track the\r | |
77 | function instance.\r | |
78 | \r | |
79 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
80 | registered, and the SMI source has been enabled.\r | |
81 | @retval EFI_DEVICE_ERROR The driver could not enable the SMI source.\r | |
82 | @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r | |
83 | child.\r | |
84 | @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The Standby Button SMI\r | |
85 | phase is not within valid range.\r | |
86 | \r | |
87 | **/\r | |
88 | typedef\r | |
89 | EFI_STATUS\r | |
90 | (EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER)(\r | |
91 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r | |
92 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH DispatchFunction,\r | |
93 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH_CONTEXT *DispatchContext,\r | |
94 | OUT EFI_HANDLE *DispatchHandle\r | |
95 | );\r | |
96 | \r | |
97 | /**\r | |
98 | Unregister a child SMI source dispatch function with a parent SMM driver.\r | |
99 | \r | |
100 | @param This The pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL instance.\r | |
101 | @param DispatchHandle The handle of the service to remove.\r | |
102 | \r | |
103 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
104 | unregistered, and the SMI source has been disabled,\r | |
105 | if there are no other registered child dispatch\r | |
106 | functions for this SMI source.\r | |
107 | @retval EFI_INVALID_PARAMETER The handle is invalid.\r | |
108 | \r | |
109 | **/\r | |
110 | typedef\r | |
111 | EFI_STATUS\r | |
112 | (EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER)(\r | |
113 | IN EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL *This,\r | |
114 | IN EFI_HANDLE DispatchHandle\r | |
115 | );\r | |
116 | \r | |
117 | //\r | |
118 | // Interface structure for the SMM Standby Button SMI Dispatch Protocol\r | |
119 | //\r | |
120 | /**\r | |
121 | This protocol provices the parent dispatch service for the standby button SMI source generator.\r | |
122 | Provides the ability to install child handlers for the given event types.\r | |
123 | **/\r | |
124 | struct _EFI_SMM_STANDBY_BUTTON_DISPATCH_PROTOCOL {\r | |
125 | ///\r | |
126 | /// Installs a child service to be dispatched by this protocol.\r | |
127 | ///\r | |
128 | EFI_SMM_STANDBY_BUTTON_REGISTER Register;\\r | |
129 | ///\r | |
130 | /// Removes a child service dispatched by this protocol.\r | |
131 | ///\r | |
132 | EFI_SMM_STANDBY_BUTTON_UNREGISTER UnRegister;\r | |
133 | };\r | |
134 | \r | |
135 | extern EFI_GUID gEfiSmmStandbyButtonDispatchProtocolGuid;\r | |
136 | \r | |
137 | #endif\r |