diff options
| author | Tom Rini <[email protected]> | 2022-04-23 18:42:00 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-04-23 18:42:00 -0400 |
| commit | 46a06ed82a81dfcb451fe82381c59c1d0a6667a1 (patch) | |
| tree | a4b23b20380a7850521338c5dfe5a5ab6ae47d09 /include | |
| parent | 9bb99fa95826d1a608737ca821977b4136a1a278 (diff) | |
| parent | d97e98c887ed8fa4a339350c02f093f03cd1cf4d (diff) | |
Merge tag 'efi-2022-07-rc1-3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-07-rc1-3
Documentation:
* Document image size parameter of bootefi command
UEFI:
* avoid building partition support in SPL/TPL where not required
* improve integration of EFI subsystem and driver model
* restore ability to boot arbitrary blob
Diffstat (limited to 'include')
| -rw-r--r-- | include/dm/uclass-id.h | 1 | ||||
| -rw-r--r-- | include/efi_loader.h | 6 | ||||
| -rw-r--r-- | include/part.h | 39 | ||||
| -rw-r--r-- | include/sandboxblockdev.h | 2 |
4 files changed, 43 insertions, 5 deletions
diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 0e26e1d1382..230b1ea528c 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -83,6 +83,7 @@ enum uclass_id { UCLASS_P2SB, /* (x86) Primary-to-Sideband Bus */ UCLASS_PANEL, /* Display panel, such as an LCD */ UCLASS_PANEL_BACKLIGHT, /* Backlight controller for panel */ + UCLASS_PARTITION, /* Logical disk partition device */ UCLASS_PCH, /* x86 platform controller hub */ UCLASS_PCI, /* PCI bus */ UCLASS_PCI_EP, /* PCI endpoint device */ diff --git a/include/efi_loader.h b/include/efi_loader.h index c52ea59ec7a..ba79a9afb40 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -493,6 +493,8 @@ struct efi_register_notify_event { /* List of all events registered by RegisterProtocolNotify() */ extern struct list_head efi_register_notify_events; +/* called at pre-initialization */ +int efi_init_early(void); /* Initialize efi execution environment */ efi_status_t efi_init_obj_list(void); /* Install device tree */ @@ -523,8 +525,8 @@ void efi_carve_out_dt_rsv(void *fdt); void efi_try_purge_kaslr_seed(void *fdt); /* Called by bootefi to make console interface available */ efi_status_t efi_console_register(void); -/* Called by bootefi to make all disk storage accessible as EFI objects */ -efi_status_t efi_disk_register(void); +/* Called by efi_init_obj_list() to initialize efi_disks */ +efi_status_t efi_disk_init(void); /* Called by efi_init_obj_list() to install EFI_RNG_PROTOCOL */ efi_status_t efi_rng_register(void); /* Called by efi_init_obj_list() to install EFI_TCG2_PROTOCOL */ diff --git a/include/part.h b/include/part.h index 53cfbdd8767..3a6958dcb2a 100644 --- a/include/part.h +++ b/include/part.h @@ -10,6 +10,7 @@ #include <ide.h> #include <uuid.h> #include <linker_lists.h> +#include <linux/errno.h> #include <linux/list.h> struct block_drvr { @@ -86,7 +87,7 @@ struct disk_part { }; /* Misc _get_dev functions */ -#ifdef CONFIG_PARTITIONS +#if CONFIG_IS_ENABLED(PARTITIONS) /** * blk_get_dev() - get a pointer to a block device given its type and number * @@ -103,7 +104,6 @@ struct disk_part { struct blk_desc *blk_get_dev(const char *ifname, int dev); struct blk_desc *mg_disk_get_dev(int dev); -int host_get_dev_err(int dev, struct blk_desc **blk_devp); /* disk/part.c */ int part_get_info(struct blk_desc *dev_desc, int part, @@ -275,6 +275,22 @@ static inline int blk_get_device_part_str(const char *ifname, struct disk_partition *info, int allow_whole_dev) { *dev_desc = NULL; return -1; } + +static inline int part_get_info_by_name_type(struct blk_desc *dev_desc, + const char *name, + struct disk_partition *info, + int part_type) +{ + return -ENOENT; +} + +static inline int part_get_info_by_name(struct blk_desc *dev_desc, + const char *name, + struct disk_partition *info) +{ + return -ENOENT; +} + static inline int part_get_info_by_dev_and_name_or_num(const char *dev_iface, const char *dev_part_str, @@ -287,6 +303,23 @@ part_get_info_by_dev_and_name_or_num(const char *dev_iface, } #endif +struct udevice; +/** + * part_create_block_devices - Create block devices for disk partitions + * + * Create UCLASS_PARTITION udevices for each of disk partitions in @parent + * + * @blk_dev: Whole disk device + */ +int part_create_block_devices(struct udevice *blk_dev); + +unsigned long dev_read(struct udevice *dev, lbaint_t start, + lbaint_t blkcnt, void *buffer); +unsigned long dev_write(struct udevice *dev, lbaint_t start, + lbaint_t blkcnt, const void *buffer); +unsigned long dev_erase(struct udevice *dev, lbaint_t start, + lbaint_t blkcnt); + /* * We don't support printing partition information in SPL and only support * getting partition information in a few cases. @@ -496,7 +529,7 @@ int layout_mbr_partitions(struct disk_partition *p, int count, #endif -#ifdef CONFIG_PARTITIONS +#if CONFIG_IS_ENABLED(PARTITIONS) /** * part_driver_get_count() - get partition driver count * diff --git a/include/sandboxblockdev.h b/include/sandboxblockdev.h index 4ca9554e38a..dc983f0417b 100644 --- a/include/sandboxblockdev.h +++ b/include/sandboxblockdev.h @@ -26,4 +26,6 @@ struct host_block_dev { */ int host_dev_bind(int dev, char *filename, bool removable); +int host_get_dev_err(int dev, struct blk_desc **blk_devp); + #endif |
