TianoCore EDK2 master
Loading...
Searching...
No Matches
Handle.h
Go to the documentation of this file.
1
9#ifndef _HAND_H_
10#define _HAND_H_
11
12#define EFI_HANDLE_SIGNATURE SIGNATURE_32('h','n','d','l')
13
17typedef struct {
18 UINTN Signature;
23 UINTN LocateRequest;
25 UINT64 Key;
26} IHANDLE;
27
28#define ASSERT_IS_HANDLE(a) ASSERT((a)->Signature == EFI_HANDLE_SIGNATURE)
29
30#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('p','r','t','e')
31
37typedef struct {
38 UINTN Signature;
48
49#define PROTOCOL_INTERFACE_SIGNATURE SIGNATURE_32('p','i','f','c')
50
55typedef struct {
56 UINTN Signature;
66 VOID *Interface;
69 UINTN OpenListCount;
71
72#define OPEN_PROTOCOL_DATA_SIGNATURE SIGNATURE_32('p','o','d','l')
73
74typedef struct {
75 UINTN Signature;
78
79 EFI_HANDLE AgentHandle;
80 EFI_HANDLE ControllerHandle;
81 UINT32 Attributes;
82 UINT32 OpenCount;
84
85#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('p','r','t','n')
86
90typedef struct {
91 UINTN Signature;
92 PROTOCOL_ENTRY *Protocol;
100
113 IN EFI_GUID *Protocol,
114 IN BOOLEAN Create
115 );
116
123VOID
125 IN PROTOCOL_ENTRY *ProtEntry
126 );
127
142 IN IHANDLE *Handle,
143 IN EFI_GUID *Protocol,
144 IN VOID *Interface
145 );
146
159 IN IHANDLE *Handle,
160 IN EFI_GUID *Protocol,
161 IN VOID *Interface
162 );
163
187 IN EFI_HANDLE ControllerHandle,
188 IN EFI_HANDLE *ContextDriverImageHandles OPTIONAL,
189 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
190 );
191
208 IN EFI_HANDLE UserHandle,
210 );
211
216VOID
218 VOID
219 );
220
225VOID
227 VOID
228 );
229
242 IN EFI_HANDLE UserHandle
243 );
244
245//
246// Externs
247//
248extern EFI_LOCK gProtocolDatabaseLock;
249extern LIST_ENTRY gHandleList;
250extern UINT64 gHandleDatabaseKey;
251
252#endif
UINT64 UINTN
EFI_STATUS CoreConnectSingleController(IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE *ContextDriverImageHandles OPTIONAL, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
PROTOCOL_INTERFACE * CoreFindProtocolInterface(IN IHANDLE *Handle, IN EFI_GUID *Protocol, IN VOID *Interface)
Definition: Handle.c:214
PROTOCOL_ENTRY * CoreFindProtocolEntry(IN EFI_GUID *Protocol, IN BOOLEAN Create)
Definition: Handle.c:144
PROTOCOL_INTERFACE * CoreRemoveInterfaceFromProtocol(IN IHANDLE *Handle, IN EFI_GUID *Protocol, IN VOID *Interface)
Definition: Notify.c:47
EFI_STATUS CoreDisconnectControllersUsingProtocolInterface(IN EFI_HANDLE UserHandle, IN PROTOCOL_INTERFACE *Prot)
Definition: Handle.c:727
VOID CoreNotifyProtocolEntry(IN PROTOCOL_ENTRY *ProtEntry)
Definition: Notify.c:21
VOID CoreReleaseProtocolLock(VOID)
Definition: Handle.c:41
EFI_STATUS CoreValidateHandle(IN EFI_HANDLE UserHandle)
Definition: Handle.c:113
VOID CoreAcquireProtocolLock(VOID)
Definition: Handle.c:29
#define IN
Definition: Base.h:279
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
Definition: Base.h:213
Definition: Handle.h:17
LIST_ENTRY AllHandles
All handles list of IHANDLE.
Definition: Handle.h:20
UINT64 Key
The Handle Database Key value when this handle was last created or modified.
Definition: Handle.h:25
LIST_ENTRY Protocols
List of PROTOCOL_INTERFACE's for this handle.
Definition: Handle.h:22
LIST_ENTRY Link
Link on PROTOCOL_INTERFACE.OpenList.
Definition: Handle.h:77
LIST_ENTRY Notify
Registerd notification handlers.
Definition: Handle.h:46
LIST_ENTRY AllEntries
Link Entry inserted to mProtocolDatabase.
Definition: Handle.h:40
EFI_GUID ProtocolID
ID of the protocol.
Definition: Handle.h:42
LIST_ENTRY Protocols
All protocol interfaces.
Definition: Handle.h:44
LIST_ENTRY Link
Link on IHANDLE.Protocols.
Definition: Handle.h:58
IHANDLE * Handle
Back pointer.
Definition: Handle.h:60
LIST_ENTRY OpenList
OPEN_PROTOCOL_DATA list.
Definition: Handle.h:68
PROTOCOL_ENTRY * Protocol
The protocol ID.
Definition: Handle.h:64
VOID * Interface
The interface value.
Definition: Handle.h:66
LIST_ENTRY ByProtocol
Link on PROTOCOL_ENTRY.Protocols.
Definition: Handle.h:62
LIST_ENTRY Link
All notifications for this protocol.
Definition: Handle.h:94
EFI_EVENT Event
Event to notify.
Definition: Handle.h:96
LIST_ENTRY * Position
Last position notified.
Definition: Handle.h:98