summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-04-30 22:11:06 +0300
committerTom Rini <trini@konsulko.com>2020-04-30 22:11:06 +0300
commit78021b63373de32335bd204471d6cb7c7e18bc52 (patch)
tree2595e84a2a15ad82f99c298259ff3c2b4b31c0d9 /include
parent9f0a6df3a57469061582c6b27fc869829681beca (diff)
parentf9f5f92bc54b035223e447bc5740544efd0569d9 (diff)
downloadu-boot-78021b63373de32335bd204471d6cb7c7e18bc52.tar.xz
Merge tag 'efi-2020-07-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-07-rc2 This pull request contains bug fixes needed due to the merged changes for EFI secure boot. Patches are supplied to identify EFI system partitions.
Diffstat (limited to 'include')
-rw-r--r--include/efi_loader.h12
-rw-r--r--include/part.h11
2 files changed, 18 insertions, 5 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 0ba9a1f702..f92bfe57e6 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -11,6 +11,7 @@
#include <common.h>
#include <part_efi.h>
#include <efi_api.h>
+#include <image.h>
#include <pe.h>
static inline int guidcmp(const void *g1, const void *g2)
@@ -47,6 +48,13 @@ static inline void *guidcpy(void *dst, const void *src)
/* Root node */
extern efi_handle_t efi_root;
+/* EFI system partition */
+extern struct efi_system_partition {
+ enum if_type if_type;
+ int devnum;
+ u8 part;
+} efi_system_partition;
+
int __efi_entry_check(void);
int __efi_exit_check(void);
const char *__efi_nesting(void);
@@ -695,9 +703,6 @@ void efi_deserialize_load_option(struct efi_load_option *lo, u8 *data);
unsigned long efi_serialize_load_option(struct efi_load_option *lo, u8 **data);
efi_status_t efi_bootmgr_load(efi_handle_t *handle);
-#ifdef CONFIG_EFI_SECURE_BOOT
-#include <image.h>
-
/**
* efi_image_regions - A list of memory regions
*
@@ -767,7 +772,6 @@ bool efi_secure_boot_enabled(void);
bool efi_image_parse(void *efi, size_t len, struct efi_image_regions **regp,
WIN_CERTIFICATE **auth, size_t *auth_len);
-#endif /* CONFIG_EFI_SECURE_BOOT */
#else /* CONFIG_IS_ENABLED(EFI_LOADER) */
diff --git a/include/part.h b/include/part.h
index 0b5cf3d5e8..3693527397 100644
--- a/include/part.h
+++ b/include/part.h
@@ -51,13 +51,22 @@ struct block_drvr {
#define PART_TYPE_LEN 32
#define MAX_SEARCH_PARTITIONS 64
+#define PART_BOOTABLE ((int)BIT(0))
+#define PART_EFI_SYSTEM_PARTITION ((int)BIT(1))
+
typedef struct disk_partition {
lbaint_t start; /* # of first block in partition */
lbaint_t size; /* number of blocks in partition */
ulong blksz; /* block size in bytes */
uchar name[PART_NAME_LEN]; /* partition name */
uchar type[PART_TYPE_LEN]; /* string type description */
- int bootable; /* Active/Bootable flag is set */
+ /*
+ * The bootable is a bitmask with the following fields:
+ *
+ * PART_BOOTABLE the MBR bootable flag is set
+ * PART_EFI_SYSTEM_PARTITION the partition is an EFI system partition
+ */
+ int bootable;
#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
char uuid[UUID_STR_LEN + 1]; /* filesystem UUID as string, if exists */
#endif