]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmSwDispatch.h
Correct the structure's comments to follow doxygen format.
[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
13 Module Name: SmmSwDispatch.h\r
14\r
15 @par Revision Reference:\r
05ef5a88 16 This Protocol is defined in Framework for EFI SMM Core Interface Spec\r
79964ac8 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
b80fbe85 24#include <PiDxe.h>\r
25\r
79964ac8 26//\r
27// Global ID for the SW SMI Protocol\r
28//\r
29#define EFI_SMM_SW_DISPATCH_PROTOCOL_GUID \\r
30 { \\r
31 0xe541b773, 0xdd11, 0x420c, {0xb0, 0x26, 0xdf, 0x99, 0x36, 0x53, 0xf8, 0xbf } \\r
32 }\r
33\r
34typedef struct _EFI_SMM_SW_DISPATCH_PROTOCOL EFI_SMM_SW_DISPATCH_PROTOCOL;\r
35\r
36//\r
37// Related Definitions\r
38//\r
39//\r
40// A particular chipset may not support all possible software SMI input values.\r
41// For example, the ICH supports only values 00h to 0FFh. The parent only allows a single\r
42// child registration for each SwSmiInputValue.\r
43//\r
44typedef struct {\r
45 UINTN SwSmiInputValue;\r
46} EFI_SMM_SW_DISPATCH_CONTEXT;\r
47\r
48//\r
49// Member functions\r
50//\r
51/**\r
52 Dispatch function for a Software SMI handler.\r
53\r
54 @param DispatchHandle Handle of this dispatch function.\r
55 @param DispatchContext Pointer to the dispatch function's context.\r
56 The SwSmiInputValue field is filled in\r
57 by the software dispatch driver prior to\r
58 invoking this dispatch function.\r
59 The dispatch function will only be called\r
60 for input values for which it is registered.\r
61\r
700a7869 62 @return None\r
79964ac8 63\r
64**/\r
65typedef\r
66VOID\r
69686d56 67(EFIAPI *EFI_SMM_SW_DISPATCH)(\r
79964ac8 68 IN EFI_HANDLE DispatchHandle,\r
69 IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext\r
70 );\r
71\r
72/**\r
73 Register a child SMI source dispatch function with a parent SMM driver\r
74\r
700a7869 75 @param This Pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.\r
76 @param DispatchFunction Function to install.\r
79964ac8 77 @param DispatchContext Pointer to the dispatch function's context.\r
78 The caller fills this context in before calling\r
79 the register function to indicate to the register\r
80 function which Software SMI input value the\r
81 dispatch function should be invoked for.\r
700a7869 82 @param DispatchHandle Handle generated by the dispatcher to track the function instance.\r
79964ac8 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
93typedef\r
94EFI_STATUS\r
69686d56 95(EFIAPI *EFI_SMM_SW_REGISTER)(\r
700a7869 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
79964ac8 100 );\r
101\r
102/**\r
103 Unregister a child SMI source dispatch function with a parent SMM driver\r
104\r
700a7869 105 @param This Pointer to the EFI_SMM_SW_DISPATCH_PROTOCOL instance.\r
106 @param DispatchHandle Handle of the service to remove.\r
79964ac8 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
79964ac8 113\r
114**/\r
115typedef\r
116EFI_STATUS\r
69686d56 117(EFIAPI *EFI_SMM_SW_UNREGISTER)(\r
700a7869 118 IN EFI_SMM_SW_DISPATCH_PROTOCOL *This,\r
119 IN EFI_HANDLE DispatchHandle\r
79964ac8 120 );\r
121\r
122//\r
123// Interface structure for the SMM Software SMI Dispatch Protocol\r
124//\r
125/**\r
79964ac8 126 Provides the parent dispatch service for a given SMI source generator.\r
79964ac8 127**/\r
128struct _EFI_SMM_SW_DISPATCH_PROTOCOL {\r
2bbaeb0d 129 ///\r
130 /// Installs a child service to be dispatched by this protocol.\r
131 ///\r
79964ac8 132 EFI_SMM_SW_REGISTER Register;\r
2bbaeb0d 133\r
134 ///\r
135 /// Removes a child service dispatched by this protocol.\r
136 ///\r
79964ac8 137 EFI_SMM_SW_UNREGISTER UnRegister;\r
2bbaeb0d 138\r
139 ///\r
140 /// A read-only field that describes the maximum value that can be used\r
141 /// in the EFI_SMM_SW_DISPATCH_PROTOCOL.Register() service.\r
142 ///\r
143 UINTN MaximumSwiValue;\r
79964ac8 144};\r
145\r
146extern EFI_GUID gEfiSmmSwDispatchProtocolGuid;\r
147\r
148#endif\r