]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Framework/Protocol/SmmSwDispatch/SmmSwDispatch.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Protocol / SmmSwDispatch / SmmSwDispatch.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 SmmSwDispatch.h
16
17 Abstract:
18
19 EFI Smm Software Smi Child Protocol
20
21 Revision History
22
23 --*/
24
25 #ifndef _EFI_SMM_SW_DISPATCH_H_
26 #define _EFI_SMM_SW_DISPATCH_H_
27
28 //
29 // Global ID for the SW SMI Protocol
30 //
31 #define EFI_SMM_SW_DISPATCH_PROTOCOL_GUID \
32 { \
33 0xe541b773, 0xdd11, 0x420c, {0xb0, 0x26, 0xdf, 0x99, 0x36, 0x53, 0xf8, 0xbf} \
34 }
35
36 EFI_FORWARD_DECLARATION (EFI_SMM_SW_DISPATCH_PROTOCOL);
37
38 //
39 // Related Definitions
40 //
41 //
42 // A particular chipset may not support all possible software SMI input values.
43 // For example, the ICH supports only values 00h to 0FFh. The parent only allows a single
44 // child registration for each SwSmiInputValue.
45 //
46 typedef struct {
47 UINTN SwSmiInputValue;
48 } EFI_SMM_SW_DISPATCH_CONTEXT;
49
50 //
51 // Member functions
52 //
53 typedef
54 VOID
55 (EFIAPI *EFI_SMM_SW_DISPATCH) (
56 IN EFI_HANDLE DispatchHandle,
57 IN EFI_SMM_SW_DISPATCH_CONTEXT * DispatchContext
58 );
59
60 /*++
61
62 Routine Description:
63 Dispatch function for a Software SMI handler.
64
65 Arguments:
66 DispatchHandle - Handle of this dispatch function.
67 DispatchContext - Pointer to the dispatch function's context.
68 The SwSmiInputValue field is filled in
69 by the software dispatch driver prior to
70 invoking this dispatch function.
71 The dispatch function will only be called
72 for input values for which it is registered.
73
74 Returns:
75 Nothing
76
77 --*/
78 typedef
79 EFI_STATUS
80 (EFIAPI *EFI_SMM_SW_REGISTER) (
81 IN EFI_SMM_SW_DISPATCH_PROTOCOL * This,
82 IN EFI_SMM_SW_DISPATCH DispatchFunction,
83 IN EFI_SMM_SW_DISPATCH_CONTEXT * DispatchContext,
84 OUT EFI_HANDLE * DispatchHandle
85 );
86
87 /*++
88
89 Routine Description:
90 Register a child SMI source dispatch function with a parent SMM driver
91
92 Arguments:
93 This - Protocol instance pointer.
94 DispatchFunction - Pointer to dispatch function to be invoked for
95 this SMI source
96 DispatchContext - Pointer to the dispatch function's context.
97 The caller fills this context in before calling
98 the register function to indicate to the register
99 function which Software SMI input value the
100 dispatch function should be invoked for.
101 DispatchHandle - Handle of dispatch function, for when interfacing
102 with the parent Sx state SMM driver.
103
104 Returns:
105 EFI_SUCCESS - The dispatch function has been successfully
106 registered and the SMI source has been enabled.
107 EFI_DEVICE_ERROR - The SW driver was unable to enable the SMI source.
108 EFI_OUT_OF_RESOURCES - Not enough memory (system or SMM) to manage this
109 child.
110 EFI_INVALID_PARAMETER - DispatchContext is invalid. The SW SMI input value
111 is not within valid range.
112
113 --*/
114 typedef
115 EFI_STATUS
116 (EFIAPI *EFI_SMM_SW_UNREGISTER) (
117 IN EFI_SMM_SW_DISPATCH_PROTOCOL * This,
118 IN EFI_HANDLE DispatchHandle
119 );
120
121 /*++
122
123 Routine Description:
124 Unregister a child SMI source dispatch function with a parent SMM driver
125
126 Arguments:
127 This - Protocol instance pointer.
128 DispatchHandle - Handle of dispatch function to deregister.
129
130 Returns:
131 EFI_SUCCESS - The dispatch function has been successfully
132 unregistered and the SMI source has been disabled
133 if there are no other registered child dispatch
134 functions for this SMI source.
135 EFI_INVALID_PARAMETER - Handle is invalid.
136 other - TBD
137
138 --*/
139
140 //
141 // Interface structure for the SMM Software SMI Dispatch Protocol
142 //
143 struct _EFI_SMM_SW_DISPATCH_PROTOCOL {
144 EFI_SMM_SW_REGISTER Register;
145 EFI_SMM_SW_UNREGISTER UnRegister;
146 UINTN MaximumSwiValue;
147 };
148
149 extern EFI_GUID gEfiSmmSwDispatchProtocolGuid;
150
151 #endif