]> code.delx.au - refind/blob - refind/driver_support.h
Changes to ext4fs driver to support 64-bit pointers.
[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 #ifndef _DRIVER_SUPPORT
21 #define _DRIVER_SUPPORT
22
23 #ifdef __MAKEWITH_GNUEFI
24 #include <efi.h>
25 #else
26 #include "../include/tiano_includes.h"
27 #endif
28 #include "global.h"
29
30 #define EFI_HANDLE_TYPE_UNKNOWN 0x000
31 #define EFI_HANDLE_TYPE_IMAGE_HANDLE 0x001
32 #define EFI_HANDLE_TYPE_DRIVER_BINDING_HANDLE 0x002
33 #define EFI_HANDLE_TYPE_DEVICE_DRIVER 0x004
34 #define EFI_HANDLE_TYPE_BUS_DRIVER 0x008
35 #define EFI_HANDLE_TYPE_DRIVER_CONFIGURATION_HANDLE 0x010
36 #define EFI_HANDLE_TYPE_DRIVER_DIAGNOSTICS_HANDLE 0x020
37 #define EFI_HANDLE_TYPE_COMPONENT_NAME_HANDLE 0x040
38 #define EFI_HANDLE_TYPE_DEVICE_HANDLE 0x080
39 #define EFI_HANDLE_TYPE_PARENT_HANDLE 0x100
40 #define EFI_HANDLE_TYPE_CONTROLLER_HANDLE 0x200
41 #define EFI_HANDLE_TYPE_CHILD_HANDLE 0x400
42
43 // Below is from http://git.etherboot.org/?p=mirror/efi/shell/.git;a=commitdiff;h=b1b0c63423cac54dc964c2930e04aebb46a946ec;
44 // Seems to have been replaced by ParseHandleDatabaseByRelationshipWithType(), but the latter isn't working for me....
45 EFI_STATUS
46 LibScanHandleDatabase (
47 EFI_HANDLE DriverBindingHandle, OPTIONAL
48 UINT32 *DriverBindingHandleIndex, OPTIONAL
49 EFI_HANDLE ControllerHandle, OPTIONAL
50 UINT32 *ControllerHandleIndex, OPTIONAL
51 UINTN *HandleCount,
52 EFI_HANDLE **HandleBuffer,
53 UINT32 **HandleType
54 );
55 EFI_STATUS ConnectAllDriversToAllControllers(VOID);
56 VOID ConnectFilesystemDriver(EFI_HANDLE DriverHandle);
57 VOID LoadDrivers(VOID);
58
59 #endif