]> git.proxmox.com Git - mirror_edk2.git/blame - OldMdePkg/Include/Protocol/SmmUsbDispatch.h
Adding top-level Conf directory for next generation of EDK II build infrastructure...
[mirror_edk2.git] / OldMdePkg / Include / Protocol / SmmUsbDispatch.h
CommitLineData
878ddf1f 1/** @file\r
2 This file declares EFI Smm USB 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: SmmUsbDispatch.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#ifndef _EFI_SMM_USB_DISPATCH_H_\r
21#define _EFI_SMM_USB_DISPATCH_H_\r
22\r
23//\r
24// Global ID for the USB Protocol\r
25//\r
26#define EFI_SMM_USB_DISPATCH_PROTOCOL_GUID \\r
27 { \\r
28 0xa05b6ffd, 0x87af, 0x4e42, {0x95, 0xc9, 0x62, 0x28, 0xb6, 0x3c, 0xf3, 0xf3 } \\r
29 }\r
30\r
31typedef struct _EFI_SMM_USB_DISPATCH_PROTOCOL EFI_SMM_USB_DISPATCH_PROTOCOL;\r
32\r
33//\r
34// Related Definitions\r
35//\r
36typedef enum {\r
37 UsbLegacy,\r
38 UsbWake\r
39} EFI_USB_SMI_TYPE;\r
40\r
41typedef struct {\r
42 EFI_USB_SMI_TYPE Type;\r
43 EFI_DEVICE_PATH_PROTOCOL *Device;\r
44} EFI_SMM_USB_DISPATCH_CONTEXT;\r
45\r
46//\r
47// Member functions\r
48//\r
49/**\r
50 Dispatch function for a USB SMI handler.\r
51\r
0647c9ad
LG
52 @param DispatchHandle Handle of this dispatch function.\r
53 @param DispatchContext Pointer to the dispatch function's context.\r
54 The DispatchContext fields are filled in\r
55 by the dispatching driver prior to\r
56 invoking this dispatch function.\r
878ddf1f 57\r
58 Nothing\r
59\r
60**/\r
61typedef\r
62VOID\r
63(EFIAPI *EFI_SMM_USB_DISPATCH) (\r
64 IN EFI_HANDLE DispatchHandle,\r
65 IN EFI_SMM_USB_DISPATCH_CONTEXT *DispatchContext\r
66 );\r
67\r
68/**\r
69 Register a child SMI source dispatch function with a parent SMM driver\r
70\r
0647c9ad
LG
71 @param This Protocol instance pointer.\r
72 @param DispatchFunction Pointer to dispatch function to be invoked for\r
73 this SMI source\r
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 the USB SMI types for which the dispatch\r
78 function should be invoked.\r
79 @param DispatchHandle Handle of dispatch function, for when interfacing\r
80 with the parent Sx state SMM driver.\r
81\r
82 @retval EFI_SUCCESS The dispatch function has been successfully\r
83 registered and the SMI source has been enabled.\r
84 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
85 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
86 child.\r
87 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The USB SMI type\r
88 is not within valid range.\r
878ddf1f 89\r
90**/\r
91typedef\r
92EFI_STATUS\r
93(EFIAPI *EFI_SMM_USB_REGISTER) (\r
94 IN EFI_SMM_USB_DISPATCH_PROTOCOL *This,\r
95 IN EFI_SMM_USB_DISPATCH DispatchFunction,\r
96 IN EFI_SMM_USB_DISPATCH_CONTEXT *DispatchContext,\r
97 OUT EFI_HANDLE *DispatchHandle\r
98 );\r
99\r
100/**\r
101 Unregister a child SMI source dispatch function with a parent SMM driver\r
102\r
0647c9ad
LG
103 @param This Protocol instance pointer.\r
104 @param DispatchHandle Handle of dispatch function to deregister.\r
878ddf1f 105\r
0647c9ad
LG
106 @retval EFI_SUCCESS The dispatch function has been successfully\r
107 unregistered and the SMI source has been disabled\r
108 if there are no other registered child dispatch\r
109 functions for this SMI source.\r
110 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
878ddf1f 111\r
112**/\r
113typedef\r
114EFI_STATUS\r
115(EFIAPI *EFI_SMM_USB_UNREGISTER) (\r
116 IN EFI_SMM_USB_DISPATCH_PROTOCOL *This,\r
117 IN EFI_HANDLE DispatchHandle\r
118 );\r
119\r
120//\r
121// Interface structure for the SMM USB SMI Dispatch Protocol\r
122//\r
123/**\r
124 @par Protocol Description:\r
125 Provides the parent dispatch service for the USB SMI source generator.\r
126\r
127 @param Register\r
128 Installs a child service to be dispatched by this protocol.\r
129\r
130 @param UnRegister\r
131 Removes a child service dispatched by this protocol.\r
132\r
133**/\r
134struct _EFI_SMM_USB_DISPATCH_PROTOCOL {\r
135 EFI_SMM_USB_REGISTER Register;\r
136 EFI_SMM_USB_UNREGISTER UnRegister;\r
137};\r
138\r
139extern EFI_GUID gEfiSmmUsbDispatchProtocolGuid;\r
140\r
141#endif\r