2 Provides the parent dispatch service for the USB SMI source generator.
4 Copyright (c) 2007 - 2009, 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 @par Revision Reference:
14 This Protocol is defined in Framework of EFI SMM Core Interface Spec
19 #ifndef _EFI_SMM_USB_DISPATCH_H_
20 #define _EFI_SMM_USB_DISPATCH_H_
25 // Global ID for the USB Protocol
27 #define EFI_SMM_USB_DISPATCH_PROTOCOL_GUID \
29 0xa05b6ffd, 0x87af, 0x4e42, {0x95, 0xc9, 0x62, 0x28, 0xb6, 0x3c, 0xf3, 0xf3 } \
32 typedef struct _EFI_SMM_USB_DISPATCH_PROTOCOL EFI_SMM_USB_DISPATCH_PROTOCOL
;
35 // Related Definitions
44 /// Describes whether this child handler will be invoked in response to a USB legacy
45 /// emulation event, such as port-trap on the PS/2* keyboard control registers, or to a
46 /// USB wake event, such as resumption from a sleep state.
48 EFI_USB_SMI_TYPE Type
;
50 /// The device path is part of the context structure and describes the location of the
51 /// particular USB host controller in the system for which this register event will occur.
52 /// This location is important because of the possible integration of several USB host
53 /// controllers in a system.
55 EFI_DEVICE_PATH_PROTOCOL
*Device
;
56 } EFI_SMM_USB_DISPATCH_CONTEXT
;
62 Dispatch function for a USB SMI handler.
64 @param DispatchHandle Handle of this dispatch function.
65 @param DispatchContext Pointer to the dispatch function's context.
66 The DispatchContext fields are filled in
67 by the dispatching driver prior to
68 invoking this dispatch function.
73 (EFIAPI
*EFI_SMM_USB_DISPATCH
)(
74 IN EFI_HANDLE DispatchHandle
,
75 IN EFI_SMM_USB_DISPATCH_CONTEXT
*DispatchContext
79 Register a child SMI source dispatch function with a parent SMM driver.
81 @param This Pointer to the EFI_SMM_USB_DISPATCH_PROTOCOL instance.
82 @param DispatchFunction Pointer to dispatch function to be invoked
84 @param DispatchContext Pointer to the dispatch function's context.
85 The caller fills this context in before calling
86 the register function to indicate to the register
87 function the USB SMI types for which the dispatch
88 function should be invoked.
89 @param DispatchHandle Handle generated by the dispatcher to track the
92 @retval EFI_SUCCESS The dispatch function has been successfully
93 registered and the SMI source has been enabled.
94 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.
95 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this
97 @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The USB SMI type
98 is not within valid range.
103 (EFIAPI
*EFI_SMM_USB_REGISTER
)(
104 IN EFI_SMM_USB_DISPATCH_PROTOCOL
*This
,
105 IN EFI_SMM_USB_DISPATCH DispatchFunction
,
106 IN EFI_SMM_USB_DISPATCH_CONTEXT
*DispatchContext
,
107 OUT EFI_HANDLE
*DispatchHandle
111 Unregisters a USB service.
113 @param This Pointer to the EFI_SMM_USB_DISPATCH_PROTOCOL instance.
114 @param DispatchHandle Handle of the service to remove.
116 @retval EFI_SUCCESS The dispatch function has been successfully
117 unregistered and the SMI source has been disabled
118 if there are no other registered child dispatch
119 functions for this SMI source.
120 @retval EFI_INVALID_PARAMETER The DispatchHandle was not valid.
125 (EFIAPI
*EFI_SMM_USB_UNREGISTER
)(
126 IN EFI_SMM_USB_DISPATCH_PROTOCOL
*This
,
127 IN EFI_HANDLE DispatchHandle
131 /// The EFI_SMM_USB_DISPATCH_PROTOCOL provides the ability to install child handlers for the
132 /// given event types.
134 struct _EFI_SMM_USB_DISPATCH_PROTOCOL
{
135 EFI_SMM_USB_REGISTER Register
;
136 EFI_SMM_USB_UNREGISTER UnRegister
;
139 extern EFI_GUID gEfiSmmUsbDispatchProtocolGuid
;