]>
Commit | Line | Data |
---|---|---|
79964ac8 | 1 | /** @file\r |
8411f1c0 | 2 | Provides the parent dispatch service for a given SMI source generator.\r |
79964ac8 | 3 | \r |
2b3687db | 4 | Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r |
f22f941e | 5 | This program and the accompanying materials are licensed and made available under \r |
6 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
7 | 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 | |
79964ac8 | 12 | \r |
79964ac8 | 13 | @par Revision Reference:\r |
05ef5a88 | 14 | This Protocol is defined in Framework for EFI SMM Core Interface Spec\r |
79964ac8 | 15 | Version 0.9.\r |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef _EFI_SMM_SW_DISPATCH_H_\r | |
20 | #define _EFI_SMM_SW_DISPATCH_H_\r | |
21 | \r | |
b80fbe85 | 22 | \r |
79964ac8 | 23 | //\r |
24 | // Global ID for the SW SMI Protocol\r | |
25 | //\r | |
26 | #define EFI_SMM_SW_DISPATCH_PROTOCOL_GUID \\r | |
27 | { \\r | |
28 | 0xe541b773, 0xdd11, 0x420c, {0xb0, 0x26, 0xdf, 0x99, 0x36, 0x53, 0xf8, 0xbf } \\r | |
29 | }\r | |
30 | \r | |
31 | typedef struct _EFI_SMM_SW_DISPATCH_PROTOCOL EFI_SMM_SW_DISPATCH_PROTOCOL;\r | |
32 | \r | |
33 | //\r | |
34 | // Related Definitions\r | |
35 | //\r | |
36 | //\r | |
37 | // A particular chipset may not support all possible software SMI input values.\r | |
38 | // For example, the ICH supports only values 00h to 0FFh. The parent only allows a single\r | |
39 | // child registration for each SwSmiInputValue.\r | |
40 | //\r | |
41 | typedef struct {\r | |
42 | UINTN SwSmiInputValue;\r | |
43 | } EFI_SMM_SW_DISPATCH_CONTEXT;\r | |
44 | \r | |
45 | //\r | |
46 | // Member functions\r | |
47 | //\r | |
48 | /**\r | |
49 | Dispatch function for a Software SMI handler.\r | |
50 | \r | |
f22f941e | 51 | @param DispatchHandle The handle of this dispatch function.\r |
52 | @param DispatchContext The pointer to the dispatch function's context.\r | |
79964ac8 | 53 | The SwSmiInputValue field is filled in\r |
54 | by the software dispatch driver prior to\r | |
55 | invoking this dispatch function.\r | |
56 | The dispatch function will only be called\r | |
57 | for input values for which it is registered.\r | |
58 | \r | |
700a7869 | 59 | @return None\r |
79964ac8 | 60 | \r |
61 | **/\r | |
62 | typedef\r | |
63 | VOID\r | |
69686d56 | 64 | (EFIAPI *EFI_SMM_SW_DISPATCH)(\r |
79964ac8 | 65 | IN EFI_HANDLE DispatchHandle,\r |
66 | IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext\r | |
67 | );\r | |
68 | \r | |
69 | /**\r | |
f22f941e | 70 | Register a child SMI source dispatch function with a parent SMM driver.\r |
79964ac8 | 71 | \r |
f22f941e | 72 | @param This The pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.\r |
73 | @param DispatchFunction The function to install.\r | |
74 | @param DispatchContext The pointer to the dispatch function's context.\r | |
5259c97d | 75 | Indicates to the register\r |
f22f941e | 76 | function the Software SMI input value for which \r |
77 | to invoke the dispatch function.\r | |
78 | @param DispatchHandle The handle generated by the dispatcher to track \r | |
79 | the function instance.\r | |
79964ac8 | 80 | \r |
81 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
82 | registered and the SMI source has been enabled.\r | |
5259c97d | 83 | @retval EFI_DEVICE_ERROR The SW driver could not enable the SMI source.\r |
79964ac8 | 84 | @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r |
85 | child.\r | |
86 | @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The SW SMI input value\r | |
87 | is not within valid range.\r | |
88 | \r | |
89 | **/\r | |
90 | typedef\r | |
91 | EFI_STATUS\r | |
69686d56 | 92 | (EFIAPI *EFI_SMM_SW_REGISTER)(\r |
700a7869 | 93 | IN EFI_SMM_SW_DISPATCH_PROTOCOL *This,\r |
94 | IN EFI_SMM_SW_DISPATCH DispatchFunction,\r | |
95 | IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext,\r | |
96 | OUT EFI_HANDLE *DispatchHandle\r | |
79964ac8 | 97 | );\r |
98 | \r | |
99 | /**\r | |
100 | Unregister a child SMI source dispatch function with a parent SMM driver\r | |
101 | \r | |
f22f941e | 102 | @param This The pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.\r |
103 | @param DispatchHandle The handle of the service to remove.\r | |
79964ac8 | 104 | \r |
105 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
106 | unregistered and the SMI source has been disabled\r | |
107 | if there are no other registered child dispatch\r | |
108 | functions for this SMI source.\r | |
f22f941e | 109 | @retval EFI_INVALID_PARAMETER The handle is invalid.\r |
79964ac8 | 110 | \r |
111 | **/\r | |
112 | typedef\r | |
113 | EFI_STATUS\r | |
69686d56 | 114 | (EFIAPI *EFI_SMM_SW_UNREGISTER)(\r |
700a7869 | 115 | IN EFI_SMM_SW_DISPATCH_PROTOCOL *This,\r |
116 | IN EFI_HANDLE DispatchHandle\r | |
79964ac8 | 117 | );\r |
118 | \r | |
da879e3f | 119 | \r |
79964ac8 | 120 | //\r |
121 | // Interface structure for the SMM Software SMI Dispatch Protocol\r | |
122 | //\r | |
123 | /**\r | |
79964ac8 | 124 | Provides the parent dispatch service for a given SMI source generator.\r |
79964ac8 | 125 | **/\r |
da879e3f | 126 | ///\r |
f22f941e | 127 | /// Inconsistent with the specification here:\r |
128 | /// In The Framework specification SmmCis, this definition is named as \r | |
129 | /// _EFI_SMM_ICHN_DISPATCH_PROTOCOL by mistake.\r | |
da879e3f | 130 | ///\r |
79964ac8 | 131 | struct _EFI_SMM_SW_DISPATCH_PROTOCOL {\r |
2bbaeb0d | 132 | ///\r |
133 | /// Installs a child service to be dispatched by this protocol.\r | |
134 | ///\r | |
79964ac8 | 135 | EFI_SMM_SW_REGISTER Register;\r |
2bbaeb0d | 136 | \r |
137 | ///\r | |
138 | /// Removes a child service dispatched by this protocol.\r | |
139 | ///\r | |
79964ac8 | 140 | EFI_SMM_SW_UNREGISTER UnRegister;\r |
2bbaeb0d | 141 | \r |
142 | ///\r | |
143 | /// A read-only field that describes the maximum value that can be used\r | |
144 | /// in the EFI_SMM_SW_DISPATCH_PROTOCOL.Register() service.\r | |
145 | ///\r | |
146 | UINTN MaximumSwiValue;\r | |
79964ac8 | 147 | };\r |
148 | \r | |
149 | extern EFI_GUID gEfiSmmSwDispatchProtocolGuid;\r | |
150 | \r | |
151 | #endif\r |