]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmSwDispatch.h
Remove "Module Name:" from include file headers.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmSwDispatch.h
CommitLineData
79964ac8 1/** @file\r
8411f1c0 2 Provides the parent dispatch service for a given SMI source generator.\r
79964ac8 3\r
2bbaeb0d 4 Copyright (c) 2007 - 2009, Intel Corporation\r
79964ac8 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
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
31typedef 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
41typedef 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
51 @param DispatchHandle Handle of this dispatch function.\r
52 @param DispatchContext Pointer to the dispatch function's context.\r
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
62typedef\r
63VOID\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
70 Register a child SMI source dispatch function with a parent SMM driver\r
71\r
700a7869 72 @param This Pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.\r
73 @param DispatchFunction Function to install.\r
79964ac8 74 @param DispatchContext Pointer to the dispatch function's context.\r
75 The caller fills this context in before calling\r
76 the register function to indicate to the register\r
77 function which Software SMI input value the\r
78 dispatch function should be invoked for.\r
700a7869 79 @param DispatchHandle Handle generated by the dispatcher to track 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
83 @retval EFI_DEVICE_ERROR The SW driver was unable to enable the SMI source.\r
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
90typedef\r
91EFI_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
700a7869 102 @param This Pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.\r
103 @param DispatchHandle 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
109 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
79964ac8 110\r
111**/\r
112typedef\r
113EFI_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
127/// Inconsistent with specification here:\r
128/// In framework spec SmmCis, this definition is named as _EFI_SMM_ICHN_DISPATCH_PROTOCOL by mistake.\r
129///\r
79964ac8 130struct _EFI_SMM_SW_DISPATCH_PROTOCOL {\r
2bbaeb0d 131 ///\r
132 /// Installs a child service to be dispatched by this protocol.\r
133 ///\r
79964ac8 134 EFI_SMM_SW_REGISTER Register;\r
2bbaeb0d 135\r
136 ///\r
137 /// Removes a child service dispatched by this protocol.\r
138 ///\r
79964ac8 139 EFI_SMM_SW_UNREGISTER UnRegister;\r
2bbaeb0d 140\r
141 ///\r
142 /// A read-only field that describes the maximum value that can be used\r
143 /// in the EFI_SMM_SW_DISPATCH_PROTOCOL.Register() service.\r
144 ///\r
145 UINTN MaximumSwiValue;\r
79964ac8 146};\r
147\r
148extern EFI_GUID gEfiSmmSwDispatchProtocolGuid;\r
149\r
150#endif\r