TianoCore EDK2 master
Loading...
Searching...
No Matches
EmuBusDriverDxe.h
1/*++ @file
2
3Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4Portions copyright (c) 2011, Apple Inc. All rights reserved.
5SPDX-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>
21#include <Library/UefiLib.h>
22#include <Library/PcdLib.h>
27
28extern EFI_DRIVER_BINDING_PROTOCOL gEmuBusDriverBinding;
29extern EFI_COMPONENT_NAME_PROTOCOL gEmuBusDriverComponentName;
30extern 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
37typedef struct {
38 UINT64 Signature;
39 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
41
42//
43// Unix Child Device Controller Structure
44//
45#define EMU_IO_DEVICE_SIGNATURE SIGNATURE_32 ('L', 'X', 'V', 'D')
46
47typedef 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;
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//
69EFIAPI
70EmuBusDriverBindingSupported (
72 IN EFI_HANDLE Handle,
73 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
74 );
75
77EFIAPI
78EmuBusDriverBindingStart (
80 IN EFI_HANDLE ParentHandle,
81 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
82 );
83
85EFIAPI
86EmuBusDriverBindingStop (
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//
97EmuBusCreateDevicePath (
98 IN EFI_DEVICE_PATH_PROTOCOL *RootDevicePath,
99 IN EFI_GUID *Guid,
100 IN UINT16 InstanceNumber
101 );
102
103#endif
UINT64 UINTN
#define IN
Definition: Base.h:279
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
Definition: Base.h:213