aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-04-23 16:17:36 -0400
committerTom Rini <trini@konsulko.com>2018-04-23 16:17:36 -0400
commit49f8849de9cf4855f48a85f015f9f80250a3b2aa (patch)
tree9f01297ac517494dc0a5fa83998b2494ee785d07 /include
parentec360e64862ae0ab271296e786917e5f9a04e9fb (diff)
parente83222bfc3ad2d7b2ecb1f1e559d78ec0d1f03cd (diff)
downloadu-boot-49f8849de9cf4855f48a85f015f9f80250a3b2aa.zip
u-boot-49f8849de9cf4855f48a85f015f9f80250a3b2aa.tar.gz
u-boot-49f8849de9cf4855f48a85f015f9f80250a3b2aa.tar.bz2
Merge tag 'signed-efi-2018.05' of git://github.com/agraf/u-boot
Patch queue for efi - 2018-04-23 Some last minute fixes for 2018.05. Most of them are minor fixes. On top we have some functional improvements for the device path logic which should also help us be more compatible.
Diffstat (limited to 'include')
-rw-r--r--include/efi_api.h1
-rw-r--r--include/efi_loader.h19
-rw-r--r--include/efi_selftest.h2
-rw-r--r--include/log.h2
4 files changed, 21 insertions, 3 deletions
diff --git a/include/efi_api.h b/include/efi_api.h
index ae93061..64c27e4 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -343,6 +343,7 @@ struct efi_loaded_image {
0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b )
#define DEVICE_PATH_TYPE_END 0x7f
+# define DEVICE_PATH_SUB_TYPE_INSTANCE_END 0x01
# define DEVICE_PATH_SUB_TYPE_END 0xff
struct efi_device_path {
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 17f9d3d..8d21ba7 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -324,13 +324,28 @@ int efi_dp_match(const struct efi_device_path *a,
const struct efi_device_path *b);
struct efi_object *efi_dp_find_obj(struct efi_device_path *dp,
struct efi_device_path **rem);
-unsigned efi_dp_size(const struct efi_device_path *dp);
+/* get size of the first device path instance excluding end node */
+efi_uintn_t efi_dp_instance_size(const struct efi_device_path *dp);
+/* size of multi-instance device path excluding end node */
+efi_uintn_t efi_dp_size(const struct efi_device_path *dp);
struct efi_device_path *efi_dp_dup(const struct efi_device_path *dp);
struct efi_device_path *efi_dp_append(const struct efi_device_path *dp1,
const struct efi_device_path *dp2);
struct efi_device_path *efi_dp_append_node(const struct efi_device_path *dp,
const struct efi_device_path *node);
-
+/* Create a device path node of given type, sub-type, length */
+struct efi_device_path *efi_dp_create_device_node(const u8 type,
+ const u8 sub_type,
+ const u16 length);
+/* Append device path instance */
+struct efi_device_path *efi_dp_append_instance(
+ const struct efi_device_path *dp,
+ const struct efi_device_path *dpi);
+/* Get next device path instance */
+struct efi_device_path *efi_dp_get_next_instance(struct efi_device_path **dp,
+ efi_uintn_t *size);
+/* Check if a device path contains muliple instances */
+bool efi_dp_is_multi_instance(const struct efi_device_path *dp);
struct efi_device_path *efi_dp_from_dev(struct udevice *dev);
struct efi_device_path *efi_dp_from_part(struct blk_desc *desc, int part);
diff --git a/include/efi_selftest.h b/include/efi_selftest.h
index 08dd8e4..c23bc24 100644
--- a/include/efi_selftest.h
+++ b/include/efi_selftest.h
@@ -114,6 +114,7 @@ u16 efi_st_get_key(void);
* @setup: set up the unit test
* @teardown: tear down the unit test
* @execute: execute the unit test
+ * @setup_ok: setup was successful (set at runtime)
* @on_request: test is only executed on request
*/
struct efi_unit_test {
@@ -123,6 +124,7 @@ struct efi_unit_test {
const struct efi_system_table *systable);
int (*execute)(void);
int (*teardown)(void);
+ int setup_ok;
bool on_request;
};
diff --git a/include/log.h b/include/log.h
index 20dc528..3cf08de 100644
--- a/include/log.h
+++ b/include/log.h
@@ -46,7 +46,7 @@ enum log_category_t {
LOGC_CORE,
LOGC_DM, /* Core driver-model */
LOGC_DT, /* Device-tree */
- LOGL_EFI, /* EFI implementation */
+ LOGC_EFI, /* EFI implementation */
LOGC_COUNT,
LOGC_END,