]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Protocol/SmmUsbDispatch/SmmUsbDispatch.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Protocol / SmmUsbDispatch / SmmUsbDispatch.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 1999 - 2002, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials\r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12\r
13Module Name:\r
14\r
15 SmmUsbDispatch.h\r
16\r
17Abstract:\r
18\r
19 EFI Smm USB Smi Child Protocol\r
20\r
21Revision History\r
22\r
23--*/\r
24\r
25#ifndef _EFI_SMM_USB_DISPATCH_H_\r
26#define _EFI_SMM_USB_DISPATCH_H_\r
27\r
28//\r
29// Global ID for the USB Protocol\r
30//\r
31#define EFI_SMM_USB_DISPATCH_PROTOCOL_GUID \\r
32 { \\r
7ccf38a3 33 0xa05b6ffd, 0x87af, 0x4e42, {0x95, 0xc9, 0x62, 0x28, 0xb6, 0x3c, 0xf3, 0xf3} \\r
3eb9473e 34 }\r
35\r
36EFI_FORWARD_DECLARATION (EFI_SMM_USB_DISPATCH_PROTOCOL);\r
37\r
38//\r
39// Related Definitions\r
40//\r
41typedef enum {\r
42 UsbLegacy,\r
43 UsbWake\r
44} EFI_USB_SMI_TYPE;\r
45\r
46typedef struct {\r
47 EFI_USB_SMI_TYPE Type;\r
48 EFI_DEVICE_PATH_PROTOCOL *Device;\r
49} EFI_SMM_USB_DISPATCH_CONTEXT;\r
50\r
51//\r
52// Member functions\r
53//\r
54typedef\r
55VOID\r
56(EFIAPI *EFI_SMM_USB_DISPATCH) (\r
57 IN EFI_HANDLE DispatchHandle,\r
58 IN EFI_SMM_USB_DISPATCH_CONTEXT * DispatchContext\r
59 );\r
60\r
61/*++\r
62\r
63 Routine Description:\r
64 Dispatch function for a USB SMI handler.\r
65\r
66 Arguments:\r
67 DispatchHandle - Handle of this dispatch function.\r
68 DispatchContext - Pointer to the dispatch function's context.\r
69 The DispatchContext fields are filled in\r
70 by the dispatching driver prior to\r
71 invoking this dispatch function.\r
72\r
73 Returns:\r
74 Nothing\r
75\r
76--*/\r
77typedef\r
78EFI_STATUS\r
79(EFIAPI *EFI_SMM_USB_REGISTER) (\r
80 IN EFI_SMM_USB_DISPATCH_PROTOCOL * This,\r
81 IN EFI_SMM_USB_DISPATCH DispatchFunction,\r
82 IN EFI_SMM_USB_DISPATCH_CONTEXT * DispatchContext,\r
83 OUT EFI_HANDLE * DispatchHandle\r
84 );\r
85\r
86/*++\r
87\r
88 Routine Description:\r
89 Register a child SMI source dispatch function with a parent SMM driver\r
90\r
91 Arguments:\r
92 This - Protocol instance pointer.\r
93 DispatchFunction - Pointer to dispatch function to be invoked for\r
94 this SMI source\r
95 DispatchContext - Pointer to the dispatch function's context.\r
96 The caller fills this context in before calling\r
97 the register function to indicate to the register\r
98 function the USB SMI types for which the dispatch\r
99 function should be invoked.\r
100 DispatchHandle - Handle of dispatch function, for when interfacing\r
101 with the parent Sx state SMM driver.\r
102\r
103 Returns:\r
104 EFI_SUCCESS - The dispatch function has been successfully\r
105 registered and the SMI source has been enabled.\r
106 EFI_DEVICE_ERROR - The driver was unable to enable the SMI source.\r
107 EFI_OUT_OF_RESOURCES - Not enough memory (system or SMM) to manage this\r
108 child.\r
109 EFI_INVALID_PARAMETER - DispatchContext is invalid. The USB SMI type\r
110 is not within valid range.\r
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\r
122 Routine Description:\r
123 Unregister a child SMI source dispatch function with a parent SMM driver\r
124\r
125 Arguments:\r
126 This - Protocol instance pointer.\r
127 DispatchHandle - Handle of dispatch function to deregister.\r
128\r
129 Returns:\r
130 EFI_SUCCESS - The dispatch function has been successfully \r
131 unregistered and the SMI source has been disabled\r
132 if there are no other registered child dispatch\r
133 functions for this SMI source.\r
134 EFI_INVALID_PARAMETER - Handle is invalid.\r
135 other - TBD\r
136\r
137--*/\r
138\r
139//\r
140// Interface structure for the SMM USB SMI Dispatch Protocol\r
141//\r
5d46191d 142struct _EFI_SMM_USB_DISPATCH_PROTOCOL {\r
3eb9473e 143 EFI_SMM_USB_REGISTER Register;\r
144 EFI_SMM_USB_UNREGISTER UnRegister;\r
5d46191d 145};\r
3eb9473e 146\r
147extern EFI_GUID gEfiSmmUsbDispatchProtocolGuid;\r
148\r
149#endif\r