]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/SmmSwDispatch.h
Update to BSD license header.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmSwDispatch.h
CommitLineData
79964ac8 1/** @file\r
2 This file declares EFI Smm Software Smi Child Protocol\r
3\r
4 Copyright (c) 2007, 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
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
62 Nothing\r
63\r
64**/\r
65typedef\r
66VOID\r
67(EFIAPI *EFI_SMM_SW_DISPATCH) (\r
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
75 @param This Protocol instance pointer.\r
76 @param DispatchFunction Pointer to dispatch function to be invoked for\r
77 this SMI source\r
78 @param DispatchContext Pointer to the dispatch function's context.\r
79 The caller fills this context in before calling\r
80 the register function to indicate to the register\r
81 function which Software SMI input value the\r
82 dispatch function should be invoked for.\r
83 @param DispatchHandle Handle of dispatch function, for when interfacing\r
84 with the parent Sx state SMM driver.\r
85\r
86 @retval EFI_SUCCESS The dispatch function has been successfully\r
87 registered and the SMI source has been enabled.\r
88 @retval EFI_DEVICE_ERROR The SW driver was unable to enable the SMI source.\r
89 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
90 child.\r
91 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The SW SMI input value\r
92 is not within valid range.\r
93\r
94**/\r
95typedef\r
96EFI_STATUS\r
97(EFIAPI *EFI_SMM_SW_REGISTER) (\r
98 IN EFI_SMM_SW_DISPATCH_PROTOCOL *This,\r
99 IN EFI_SMM_SW_DISPATCH DispatchFunction,\r
100 IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext,\r
101 OUT EFI_HANDLE *DispatchHandle\r
102 );\r
103\r
104/**\r
105 Unregister a child SMI source dispatch function with a parent SMM driver\r
106\r
107 @param This Protocol instance pointer.\r
108 @param DispatchHandle Handle of dispatch function to deregister.\r
109\r
110 @retval EFI_SUCCESS The dispatch function has been successfully\r
111 unregistered and the SMI source has been disabled\r
112 if there are no other registered child dispatch\r
113 functions for this SMI source.\r
114 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
115 @retval other TBD\r
116\r
117**/\r
118typedef\r
119EFI_STATUS\r
120(EFIAPI *EFI_SMM_SW_UNREGISTER) (\r
121 IN EFI_SMM_SW_DISPATCH_PROTOCOL *This,\r
122 IN EFI_HANDLE DispatchHandle\r
123 );\r
124\r
125//\r
126// Interface structure for the SMM Software SMI Dispatch Protocol\r
127//\r
128/**\r
129 @par Protocol Description:\r
130 Provides the parent dispatch service for a given SMI source generator.\r
131\r
132 @param Register\r
133 Installs a child service to be dispatched by this protocol.\r
134\r
135 @param UnRegister\r
136 Removes a child service dispatched by this protocol.\r
137\r
138 @param MaximumSwiValue\r
139 A read-only field that describes the maximum value that can be used\r
140 in the EFI_SMM_SW_DISPATCH_PROTOCOL.Register() service.\r
141\r
142**/\r
143struct _EFI_SMM_SW_DISPATCH_PROTOCOL {\r
144 EFI_SMM_SW_REGISTER Register;\r
145 EFI_SMM_SW_UNREGISTER UnRegister;\r
146 UINTN MaximumSwiValue;\r
147};\r
148\r
149extern EFI_GUID gEfiSmmSwDispatchProtocolGuid;\r
150\r
151#endif\r