]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
2 | This file declares EFI Smm Software Smi Child Protocol\r | |
3 | \r | |
4 | Copyright (c) 2006, 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: SmmSwDispatch.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_SW_DISPATCH_H_\r | |
22 | #define _EFI_SMM_SW_DISPATCH_H_\r | |
23 | \r | |
24 | //\r | |
25 | // Global ID for the SW SMI Protocol\r | |
26 | //\r | |
27 | #define EFI_SMM_SW_DISPATCH_PROTOCOL_GUID \\r | |
28 | { \\r | |
29 | 0xe541b773, 0xdd11, 0x420c, {0xb0, 0x26, 0xdf, 0x99, 0x36, 0x53, 0xf8, 0xbf } \\r | |
30 | }\r | |
31 | \r | |
32 | typedef struct _EFI_SMM_SW_DISPATCH_PROTOCOL EFI_SMM_SW_DISPATCH_PROTOCOL;\r | |
33 | \r | |
34 | //\r | |
35 | // Related Definitions\r | |
36 | //\r | |
37 | //\r | |
38 | // A particular chipset may not support all possible software SMI input values.\r | |
39 | // For example, the ICH supports only values 00h to 0FFh. The parent only allows a single\r | |
40 | // child registration for each SwSmiInputValue.\r | |
41 | //\r | |
42 | typedef struct {\r | |
43 | UINTN SwSmiInputValue;\r | |
44 | } EFI_SMM_SW_DISPATCH_CONTEXT;\r | |
45 | \r | |
46 | //\r | |
47 | // Member functions\r | |
48 | //\r | |
49 | /**\r | |
50 | Dispatch function for a Software SMI handler.\r | |
51 | \r | |
52 | @param DispatchHandle Handle of this dispatch function.\r | |
53 | @param DispatchContext Pointer to the dispatch function's context.\r | |
54 | The SwSmiInputValue field is filled in\r | |
55 | by the software dispatch driver prior to\r | |
56 | invoking this dispatch function.\r | |
57 | The dispatch function will only be called\r | |
58 | for input values for which it is registered.\r | |
59 | \r | |
60 | Nothing\r | |
61 | \r | |
62 | **/\r | |
63 | typedef\r | |
64 | VOID\r | |
65 | (EFIAPI *EFI_SMM_SW_DISPATCH) (\r | |
66 | IN EFI_HANDLE DispatchHandle,\r | |
67 | IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext\r | |
68 | );\r | |
69 | \r | |
70 | /**\r | |
71 | Register a child SMI source dispatch function with a parent SMM driver\r | |
72 | \r | |
73 | @param This Protocol instance pointer.\r | |
74 | @param DispatchFunction Pointer to dispatch function to be invoked for\r | |
75 | this SMI source\r | |
76 | @param DispatchContext Pointer to the dispatch function's context.\r | |
77 | The caller fills this context in before calling\r | |
78 | the register function to indicate to the register\r | |
79 | function which Software SMI input value the\r | |
80 | dispatch function should be invoked for.\r | |
81 | @param DispatchHandle Handle of dispatch function, for when interfacing\r | |
82 | with the parent Sx state SMM driver.\r | |
83 | \r | |
84 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
85 | registered and the SMI source has been enabled.\r | |
86 | @retval EFI_DEVICE_ERROR The SW driver was unable to enable the SMI source.\r | |
87 | @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r | |
88 | child.\r | |
89 | @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The SW SMI input value\r | |
90 | is not within valid range.\r | |
91 | \r | |
92 | **/\r | |
93 | typedef\r | |
94 | EFI_STATUS\r | |
95 | (EFIAPI *EFI_SMM_SW_REGISTER) (\r | |
96 | IN EFI_SMM_SW_DISPATCH_PROTOCOL *This,\r | |
97 | IN EFI_SMM_SW_DISPATCH DispatchFunction,\r | |
98 | IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext,\r | |
99 | OUT EFI_HANDLE *DispatchHandle\r | |
100 | );\r | |
101 | \r | |
102 | /**\r | |
103 | Unregister a child SMI source dispatch function with a parent SMM driver\r | |
104 | \r | |
105 | @param This Protocol instance pointer.\r | |
106 | @param DispatchHandle Handle of dispatch function to deregister.\r | |
107 | \r | |
108 | @retval EFI_SUCCESS The dispatch function has been successfully\r | |
109 | unregistered and the SMI source has been disabled\r | |
110 | if there are no other registered child dispatch\r | |
111 | functions for this SMI source.\r | |
112 | @retval EFI_INVALID_PARAMETER Handle is invalid.\r | |
113 | @retval other TBD\r | |
114 | \r | |
115 | **/\r | |
116 | typedef\r | |
117 | EFI_STATUS\r | |
118 | (EFIAPI *EFI_SMM_SW_UNREGISTER) (\r | |
119 | IN EFI_SMM_SW_DISPATCH_PROTOCOL *This,\r | |
120 | IN EFI_HANDLE DispatchHandle\r | |
121 | );\r | |
122 | \r | |
123 | //\r | |
124 | // Interface structure for the SMM Software SMI Dispatch Protocol\r | |
125 | //\r | |
126 | /**\r | |
127 | @par Protocol Description:\r | |
128 | Provides the parent dispatch service for a given SMI source generator.\r | |
129 | \r | |
130 | @param Register\r | |
131 | Installs a child service to be dispatched by this protocol.\r | |
132 | \r | |
133 | @param UnRegister\r | |
134 | Removes a child service dispatched by this protocol.\r | |
135 | \r | |
136 | @param MaximumSwiValue\r | |
137 | A read-only field that describes the maximum value that can be used \r | |
138 | in the EFI_SMM_SW_DISPATCH_PROTOCOL.Register() service.\r | |
139 | \r | |
140 | **/\r | |
141 | struct _EFI_SMM_SW_DISPATCH_PROTOCOL {\r | |
142 | EFI_SMM_SW_REGISTER Register;\r | |
143 | EFI_SMM_SW_UNREGISTER UnRegister;\r | |
144 | UINTN MaximumSwiValue;\r | |
145 | };\r | |
146 | \r | |
147 | extern EFI_GUID gEfiSmmSwDispatchProtocolGuid;\r | |
148 | \r | |
149 | #endif\r |