2 Provides the parent dispatch service for the USB SMI source generator.
4 Copyright (c) 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 Module Name: SmmUsbDispatch.h
15 @par Revision Reference:
16 This Protocol is defined in Framework of EFI SMM Core Interface Spec
20 #ifndef _EFI_SMM_USB_DISPATCH_H_
21 #define _EFI_SMM_USB_DISPATCH_H_
26 // Global ID for the USB Protocol
28 #define EFI_SMM_USB_DISPATCH_PROTOCOL_GUID \
30 0xa05b6ffd, 0x87af, 0x4e42, {0x95, 0xc9, 0x62, 0x28, 0xb6, 0x3c, 0xf3, 0xf3 } \
33 typedef struct _EFI_SMM_USB_DISPATCH_PROTOCOL EFI_SMM_USB_DISPATCH_PROTOCOL
;
36 // Related Definitions
45 /// Describes whether this child handler will be invoked in response to a USB legacy
46 /// emulation event, such as port-trap on the PS/2* keyboard control registers, or to a
47 /// USB wake event, such as resumption from a sleep state.
49 EFI_USB_SMI_TYPE Type
;
51 /// The device path is part of the context structure and describes the location of the
52 /// particular USB host controller in the system for which this register event will occur.
53 /// This location is important because of the possible integration of several USB host
54 /// controllers in a system.
56 EFI_DEVICE_PATH_PROTOCOL
*Device
;
57 } EFI_SMM_USB_DISPATCH_CONTEXT
;
63 Dispatch function for a USB SMI handler.
65 @param DispatchHandle Handle of this dispatch function.
66 @param DispatchContext Pointer to the dispatch function's context.
67 The DispatchContext fields are filled in
68 by the dispatching driver prior to
69 invoking this dispatch function.
76 (EFIAPI
*EFI_SMM_USB_DISPATCH
)(
77 IN EFI_HANDLE DispatchHandle
,
78 IN EFI_SMM_USB_DISPATCH_CONTEXT
*DispatchContext
82 Register a child SMI source dispatch function with a parent SMM driver
84 @param This Pointer to the EFI_SMM_USB_DISPATCH_PROTOCOL instance.
85 @param DispatchFunction Pointer to dispatch function to be invoked
87 @param DispatchContext Pointer to the dispatch function's context.
88 The caller fills this context in before calling
89 the register function to indicate to the register
90 function the USB SMI types for which the dispatch
91 function should be invoked.
92 @param DispatchHandle Handle generated by the dispatcher to track the
95 @retval EFI_SUCCESS The dispatch function has been successfully
96 registered and the SMI source has been enabled.
97 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
98 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
100 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The USB SMI type
101 is not within valid range.
106 (EFIAPI
*EFI_SMM_USB_REGISTER
)(
107 IN EFI_SMM_USB_DISPATCH_PROTOCOL
*This
,
108 IN EFI_SMM_USB_DISPATCH DispatchFunction
,
109 IN EFI_SMM_USB_DISPATCH_CONTEXT
*DispatchContext
,
110 OUT EFI_HANDLE
*DispatchHandle
114 Unregisters a USB service
116 @param This Pointer to the EFI_SMM_USB_DISPATCH_PROTOCOL instance.
117 @param DispatchHandle Handle of the service to remove.
119 @retval EFI_SUCCESS The dispatch function has been successfully
120 unregistered and the SMI source has been disabled
121 if there are no other registered child dispatch
122 functions for this SMI source.
123 @retval EFI_INVALID_PARAMETER Handle is invalid.
128 (EFIAPI
*EFI_SMM_USB_UNREGISTER
)(
129 IN EFI_SMM_USB_DISPATCH_PROTOCOL
*This
,
130 IN EFI_HANDLE DispatchHandle
134 // Interface structure for the SMM USB SMI Dispatch Protocol
137 @par Protocol Description:
138 Provides the parent dispatch service for the USB SMI source generator.
141 Installs a child service to be dispatched by this protocol.
144 Removes a child service dispatched by this protocol.
147 struct _EFI_SMM_USB_DISPATCH_PROTOCOL
{
148 EFI_SMM_USB_REGISTER Register
;
149 EFI_SMM_USB_UNREGISTER UnRegister
;
152 extern EFI_GUID gEfiSmmUsbDispatchProtocolGuid
;