Remove FlashMap Ppi that has been replaced by Flash related PCDs.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmUsbDispatch.h
CommitLineData
79964ac8 1/** @file\r
8411f1c0 2 Provides the parent dispatch service for the USB SMI source generator.\r
79964ac8 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: 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
b80fbe85 23#include <PiDxe.h>\r
24\r
79964ac8 25//\r
26// Global ID for the USB Protocol\r
27//\r
28#define EFI_SMM_USB_DISPATCH_PROTOCOL_GUID \\r
29 { \\r
30 0xa05b6ffd, 0x87af, 0x4e42, {0x95, 0xc9, 0x62, 0x28, 0xb6, 0x3c, 0xf3, 0xf3 } \\r
31 }\r
32\r
33typedef struct _EFI_SMM_USB_DISPATCH_PROTOCOL EFI_SMM_USB_DISPATCH_PROTOCOL;\r
34\r
35//\r
36// Related Definitions\r
37//\r
38typedef enum {\r
39 UsbLegacy,\r
40 UsbWake\r
41} EFI_USB_SMI_TYPE;\r
42\r
43typedef struct {\r
44 EFI_USB_SMI_TYPE Type;\r
45 EFI_DEVICE_PATH_PROTOCOL *Device;\r
46} EFI_SMM_USB_DISPATCH_CONTEXT;\r
47\r
48//\r
49// Member functions\r
50//\r
51/**\r
52 Dispatch function for a USB 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 DispatchContext fields are filled in\r
57 by the dispatching driver prior to\r
58 invoking this dispatch function.\r
59\r
60 Nothing\r
61\r
62**/\r
63typedef\r
64VOID\r
69686d56 65(EFIAPI *EFI_SMM_USB_DISPATCH)(\r
79964ac8 66 IN EFI_HANDLE DispatchHandle,\r
67 IN EFI_SMM_USB_DISPATCH_CONTEXT *DispatchContext\r
68 );\r
69\r
70/**\r
71 Register a child SMI source dispatch function with a parent SMM driver\r
72\r
73 @param This Protocol instance pointer.\r
74 @param DispatchFunction Pointer to dispatch function to be invoked for\r
75 this SMI source\r
76 @param DispatchContext Pointer to the dispatch function's context.\r
77 The caller fills this context in before calling\r
78 the register function to indicate to the register\r
79 function the USB SMI types for which the dispatch\r
80 function should be invoked.\r
81 @param DispatchHandle Handle of dispatch function, for when interfacing\r
82 with the parent Sx state SMM driver.\r
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 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 USB SMI type\r
90 is not within valid range.\r
91\r
92**/\r
93typedef\r
94EFI_STATUS\r
69686d56 95(EFIAPI *EFI_SMM_USB_REGISTER)(\r
79964ac8 96 IN EFI_SMM_USB_DISPATCH_PROTOCOL *This,\r
97 IN EFI_SMM_USB_DISPATCH DispatchFunction,\r
98 IN EFI_SMM_USB_DISPATCH_CONTEXT *DispatchContext,\r
99 OUT EFI_HANDLE *DispatchHandle\r
100 );\r
101\r
102/**\r
103 Unregister a child SMI source dispatch function with a parent SMM driver\r
104\r
105 @param This Protocol instance pointer.\r
106 @param DispatchHandle Handle of dispatch function to deregister.\r
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
113\r
114**/\r
115typedef\r
116EFI_STATUS\r
69686d56 117(EFIAPI *EFI_SMM_USB_UNREGISTER)(\r
79964ac8 118 IN EFI_SMM_USB_DISPATCH_PROTOCOL *This,\r
119 IN EFI_HANDLE DispatchHandle\r
120 );\r
121\r
122//\r
123// Interface structure for the SMM USB SMI Dispatch Protocol\r
124//\r
125/**\r
126 @par Protocol Description:\r
127 Provides the parent dispatch service for the USB SMI source generator.\r
128\r
129 @param Register\r
130 Installs a child service to be dispatched by this protocol.\r
131\r
132 @param UnRegister\r
133 Removes a child service dispatched by this protocol.\r
134\r
135**/\r
136struct _EFI_SMM_USB_DISPATCH_PROTOCOL {\r
137 EFI_SMM_USB_REGISTER Register;\r
138 EFI_SMM_USB_UNREGISTER UnRegister;\r
139};\r
140\r
141extern EFI_GUID gEfiSmmUsbDispatchProtocolGuid;\r
142\r
143#endif\r