TianoCore EDK2 master
Loading...
Searching...
No Matches
Driver.h
Go to the documentation of this file.
1
9#ifndef _HASH2_DRIVER_H_
10#define _HASH2_DRIVER_H_
11
12#include <Uefi.h>
13
15#include <Protocol/Hash2.h>
16
17#include <Library/BaseLib.h>
19#include <Library/DebugLib.h>
24#include <Library/UefiLib.h>
25
26#define HASH2_SERVICE_DATA_SIGNATURE SIGNATURE_32 ('H', 'S', '2', 'S')
27
28typedef struct {
29 UINT32 Signature;
30 EFI_HANDLE ServiceHandle;
31 EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;
32
33 LIST_ENTRY ChildrenList;
35
36#define HASH2_SERVICE_DATA_FROM_THIS(a) \
37 CR ( \
38 (a), \
39 HASH2_SERVICE_DATA, \
40 ServiceBinding, \
41 HASH2_SERVICE_DATA_SIGNATURE \
42 )
43
44#define HASH2_INSTANCE_DATA_SIGNATURE SIGNATURE_32 ('H', 's', '2', 'I')
45
46typedef struct {
47 UINT32 Signature;
48 HASH2_SERVICE_DATA *Hash2ServiceData;
49 EFI_HANDLE Handle;
50 LIST_ENTRY InstEntry;
51 EFI_HASH2_PROTOCOL Hash2Protocol;
52 VOID *HashContext;
53 VOID *HashInfoContext;
54 BOOLEAN Updated;
56
57#define HASH2_INSTANCE_DATA_FROM_THIS(a) \
58 CR ( \
59 (a), \
60 HASH2_INSTANCE_DATA, \
61 Hash2Protocol, \
62 HASH2_INSTANCE_DATA_SIGNATURE \
63 )
64
65#define HASH2_INSTANCE_DATA_FROM_LINK(a) \
66 CR ( \
67 (a), \
68 HASH2_INSTANCE_DATA, \
69 InstEntry, \
70 HASH2_INSTANCE_DATA_SIGNATURE \
71 )
72
90EFIAPI
93 IN OUT EFI_HANDLE *ChildHandle
94 );
95
118EFIAPI
121 IN EFI_HANDLE ChildHandle
122 );
123
124extern EFI_HASH2_PROTOCOL mHash2Protocol;
125
126#endif
EFI_STATUS EFIAPI Hash2ServiceBindingCreateChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN OUT EFI_HANDLE *ChildHandle)
Definition: Driver.c:34
EFI_STATUS EFIAPI Hash2ServiceBindingDestroyChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle)
Definition: Driver.c:113
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33