diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/blk.h | 1 | ||||
-rw-r--r-- | include/config_fallbacks.h | 1 | ||||
-rw-r--r-- | include/dm/uclass-id.h | 1 | ||||
-rw-r--r-- | include/efi_driver.h | 30 | ||||
-rw-r--r-- | include/efi_loader.h | 2 |
5 files changed, 35 insertions, 0 deletions
diff --git a/include/blk.h b/include/blk.h index 41b4d7efa8..69b5a98e56 100644 --- a/include/blk.h +++ b/include/blk.h @@ -34,6 +34,7 @@ enum if_type { IF_TYPE_HOST, IF_TYPE_SYSTEMACE, IF_TYPE_NVME, + IF_TYPE_EFI, IF_TYPE_COUNT, /* Number of interface types */ }; diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h index 2c4d43d672..524313d5aa 100644 --- a/include/config_fallbacks.h +++ b/include/config_fallbacks.h @@ -52,6 +52,7 @@ defined(CONFIG_MMC) || \ defined(CONFIG_NVME) || \ defined(CONFIG_SYSTEMACE) || \ + (defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD)) || \ defined(CONFIG_SANDBOX) #define HAVE_BLOCK_DEVICE #endif diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 3fc20834ae..07fabc3ce6 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -34,6 +34,7 @@ enum uclass_id { UCLASS_CROS_EC, /* Chrome OS EC */ UCLASS_DISPLAY, /* Display (e.g. DisplayPort, HDMI) */ UCLASS_DMA, /* Direct Memory Access */ + UCLASS_EFI, /* EFI managed devices */ UCLASS_ETH, /* Ethernet device */ UCLASS_GPIO, /* Bank of general-purpose I/O pins */ UCLASS_FIRMWARE, /* Firmware */ diff --git a/include/efi_driver.h b/include/efi_driver.h new file mode 100644 index 0000000000..2bbe26c6e3 --- /dev/null +++ b/include/efi_driver.h @@ -0,0 +1,30 @@ +/* + * EFI application loader + * + * Copyright (c) 2017 Heinrich Schuchardt + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _EFI_DRIVER_H +#define _EFI_DRIVER_H 1 + +#include <common.h> +#include <dm.h> +#include <efi_loader.h> + +struct efi_driver_ops { + const efi_guid_t *protocol; + const efi_guid_t *child_protocol; + int (*bind)(efi_handle_t handle, void *interface); +}; + +/* + * This structure adds internal fields to the driver binding protocol. + */ +struct efi_driver_binding_extended_protocol { + struct efi_driver_binding_protocol bp; + const struct efi_driver_ops *ops; +}; + +#endif /* _EFI_DRIVER_H */ diff --git a/include/efi_loader.h b/include/efi_loader.h index 563c7ba3cf..21c03c5c28 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -271,6 +271,8 @@ efi_status_t efi_get_memory_map(efi_uintn_t *memory_map_size, /* Adds a range into the EFI memory map */ uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type, bool overlap_only_ram); +/* Called by board init to initialize the EFI drivers */ +int efi_driver_init(void); /* Called by board init to initialize the EFI memory map */ int efi_memory_init(void); /* Adds new or overrides configuration table entry to the system table */ |