]> code.delx.au - refind/blob - refind/driver_support.h
0c64f5e4d0d96b01d5dd00b508a52c03d91d7976
[refind] / refind / driver_support.h
1 /*
2 * File to implement LibScanHandleDatabase(), which is used by rEFInd's
3 * driver-loading code (inherited from rEFIt), but which has not been
4 * implemented in GNU-EFI and seems to have been dropped from current
5 * versions of the Tianocore library. This function was taken from a git
6 * site with EFI code. The original file bore the following copyright
7 * notice:
8 *
9 * Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
10 * This program and the accompanying materials are licensed and made available under
11 * the terms and conditions of the BSD License that accompanies this distribution.
12 * The full text of the license may be found at
13 * http://opensource.org/licenses/bsd-license.php.
14 *
15 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 *
18 */
19
20 #include <efi/efi.h>
21 #include <efi/efilib.h>
22
23 #ifndef _DRIVER_SUPPORT
24 #define _DRIVER_SUPPORT
25
26 // Below is from http://git.etherboot.org/?p=mirror/efi/shell/.git;a=commitdiff;h=b1b0c63423cac54dc964c2930e04aebb46a946ec;
27 // Seems to have been replaced by ParseHandleDatabaseByRelationshipWithType(), but the latter isn't working for me....
28 EFI_STATUS
29 LibScanHandleDatabase (
30 EFI_HANDLE DriverBindingHandle, OPTIONAL
31 UINT32 *DriverBindingHandleIndex, OPTIONAL
32 EFI_HANDLE ControllerHandle, OPTIONAL
33 UINT32 *ControllerHandleIndex, OPTIONAL
34 UINTN *HandleCount,
35 EFI_HANDLE **HandleBuffer,
36 UINT32 **HandleType
37 );
38
39
40 #define EFI_HANDLE_TYPE_UNKNOWN 0x000
41 #define EFI_HANDLE_TYPE_IMAGE_HANDLE 0x001
42 #define EFI_HANDLE_TYPE_DRIVER_BINDING_HANDLE 0x002
43 #define EFI_HANDLE_TYPE_DEVICE_DRIVER 0x004
44 #define EFI_HANDLE_TYPE_BUS_DRIVER 0x008
45 #define EFI_HANDLE_TYPE_DRIVER_CONFIGURATION_HANDLE 0x010
46 #define EFI_HANDLE_TYPE_DRIVER_DIAGNOSTICS_HANDLE 0x020
47 #define EFI_HANDLE_TYPE_COMPONENT_NAME_HANDLE 0x040
48 #define EFI_HANDLE_TYPE_DEVICE_HANDLE 0x080
49 #define EFI_HANDLE_TYPE_PARENT_HANDLE 0x100
50 #define EFI_HANDLE_TYPE_CONTROLLER_HANDLE 0x200
51 #define EFI_HANDLE_TYPE_CHILD_HANDLE 0x400
52
53 #endif