TianoCore EDK2
master
Loading...
Searching...
No Matches
EmuBusDriverDxe.h
1
/*++ @file
2
3
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4
Portions copyright (c) 2011, Apple Inc. All rights reserved.
5
SPDX-License-Identifier: BSD-2-Clause-Patent
6
7
**/
8
9
#ifndef __EMU_BUS_DRIVER_H__
10
#define __EMU_BUS_DRIVER_H__
11
12
#include <
PiDxe.h
>
13
14
#include <
Protocol/DevicePath.h
>
15
#include <
Protocol/EmuThunk.h
>
16
#include <
Protocol/EmuIoThunk.h
>
17
18
#include <
Library/DebugLib.h
>
19
#include <
Library/BaseLib.h
>
20
#include <
Library/UefiDriverEntryPoint.h
>
21
#include <
Library/UefiLib.h
>
22
#include <
Library/PcdLib.h
>
23
#include <
Library/BaseMemoryLib.h
>
24
#include <
Library/MemoryAllocationLib.h
>
25
#include <
Library/UefiBootServicesTableLib.h
>
26
#include <
Library/DevicePathLib.h
>
27
28
extern
EFI_DRIVER_BINDING_PROTOCOL
gEmuBusDriverBinding;
29
extern
EFI_COMPONENT_NAME_PROTOCOL
gEmuBusDriverComponentName;
30
extern
EFI_COMPONENT_NAME2_PROTOCOL
gEmuBusDriverComponentName2;
31
32
//
33
// Unix Bus Controller Structure
34
//
35
#define EMU_BUS_DEVICE_SIGNATURE SIGNATURE_32 ('L', 'X', 'B', 'D')
36
37
typedef
struct
{
38
UINT64 Signature;
39
EFI_UNICODE_STRING_TABLE
*ControllerNameTable;
40
}
EMU_BUS_DEVICE
;
41
42
//
43
// Unix Child Device Controller Structure
44
//
45
#define EMU_IO_DEVICE_SIGNATURE SIGNATURE_32 ('L', 'X', 'V', 'D')
46
47
typedef
struct
{
48
UINT64 Signature;
49
EFI_HANDLE
Handle;
50
EMU_IO_THUNK_PROTOCOL
EmuIoThunk;
51
EFI_DEVICE_PATH_PROTOCOL
*DevicePath;
52
53
//
54
// Private data about the parent
55
//
56
EFI_HANDLE
ControllerHandle;
57
EFI_DEVICE_PATH_PROTOCOL
*ParentDevicePath;
58
59
EFI_UNICODE_STRING_TABLE
*ControllerNameTable;
60
}
EMU_IO_DEVICE
;
61
62
#define EMU_IO_DEVICE_FROM_THIS(a) \
63
CR(a, EMU_IO_DEVICE, EmuIoThunk, EMU_IO_DEVICE_SIGNATURE)
64
65
//
66
// Driver Binding Protocol function prototypes
67
//
68
EFI_STATUS
69
EFIAPI
70
EmuBusDriverBindingSupported (
71
IN
EFI_DRIVER_BINDING_PROTOCOL
*This,
72
IN
EFI_HANDLE
Handle,
73
IN
EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
74
);
75
76
EFI_STATUS
77
EFIAPI
78
EmuBusDriverBindingStart (
79
IN
EFI_DRIVER_BINDING_PROTOCOL
*This,
80
IN
EFI_HANDLE
ParentHandle,
81
IN
EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
82
);
83
84
EFI_STATUS
85
EFIAPI
86
EmuBusDriverBindingStop (
87
IN
EFI_DRIVER_BINDING_PROTOCOL
*This,
88
IN
EFI_HANDLE
Handle,
89
IN
UINTN
NumberOfChildren,
90
IN
EFI_HANDLE
*ChildHandleBuffer
91
);
92
93
//
94
// Unix Bus Driver private worker functions
95
//
96
EFI_DEVICE_PATH_PROTOCOL
*
97
EmuBusCreateDevicePath (
98
IN
EFI_DEVICE_PATH_PROTOCOL
*RootDevicePath,
99
IN
EFI_GUID
*Guid,
100
IN
UINT16 InstanceNumber
101
);
102
103
#endif
UINTN
UINT64 UINTN
Definition:
ProcessorBind.h:112
BaseLib.h
BaseMemoryLib.h
DevicePath.h
DevicePathLib.h
EmuIoThunk.h
IN
#define IN
Definition:
Base.h:279
DebugLib.h
MemoryAllocationLib.h
PcdLib.h
PiDxe.h
EmuThunk.h
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_HANDLE
VOID * EFI_HANDLE
Definition:
UefiBaseType.h:33
UefiBootServicesTableLib.h
UefiDriverEntryPoint.h
UefiLib.h
_EFI_COMPONENT_NAME2_PROTOCOL
Definition:
ComponentName2.h:148
_EFI_COMPONENT_NAME_PROTOCOL
Definition:
ComponentName.h:108
_EFI_DRIVER_BINDING_PROTOCOL
Definition:
DriverBinding.h:157
_EMU_IO_THUNK_PROTOCOL
Definition:
EmuIoThunk.h:30
EFI_DEVICE_PATH_PROTOCOL
Definition:
DevicePath.h:43
EFI_UNICODE_STRING_TABLE
Definition:
UefiLib.h:41
EMU_BUS_DEVICE
Definition:
EmuBusDriverDxe.h:37
EMU_IO_DEVICE
Definition:
EmuBusDriverDxe.h:47
GUID
Definition:
Base.h:213
EmulatorPkg
EmuBusDriverDxe
EmuBusDriverDxe.h
Generated on Fri Nov 15 2024 18:01:07 for TianoCore EDK2 by
1.9.6