summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-08-09 16:03:21 -0600
committerTom Rini <[email protected]>2024-08-09 16:03:21 -0600
commitf4f845b859266790b97421f0740efce36bc9b8d2 (patch)
tree72a80e6e3a5e4b19c2c4ccdc5876da035bd745fb /include/asm-generic
parent49d7b206fb3a30553795fb5c1dd21573d82a98aa (diff)
parent3403422767650d3ff4f3129ee959e1b5de525161 (diff)
Merge patch series "Universal Payload initial series"
Simon Glass <[email protected]> says: Universal Payload (UPL) is an Industry Standard for firmware components[1]. UPL is designed to improve interoperability within the firmware industry, allowing mixing and matching of projects with less friction and fewer project-specific implementations. UPL is cross-platform, supporting ARM, x86 and RISC-V initially. This series provides some initial support for this, targeting 0.9.1 and sandbox only. Features still to come include: - Support for architectures - FIT validation - Handoff validation - Interoperability tests
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/global_data.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 27aa75e7036..19c66e1fe5d 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -30,6 +30,7 @@
struct acpi_ctx;
struct driver_rt;
+struct upl;
typedef struct global_data gd_t;
@@ -491,6 +492,12 @@ struct global_data {
* @dmtag_list: List of DM tags
*/
struct list_head dmtag_list;
+#if CONFIG_IS_ENABLED(UPL)
+ /**
+ * @upl: Universal Payload-handoff information
+ */
+ struct upl *upl;
+#endif
};
#ifndef DO_DEPS_ONLY
static_assert(sizeof(struct global_data) == GD_SIZE);
@@ -590,6 +597,14 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#define gd_malloc_ptr() 0L
#endif
+#if CONFIG_IS_ENABLED(UPL)
+#define gd_upl() gd->upl
+#define gd_set_upl(_val) gd->upl = (_val)
+#else
+#define gd_upl() NULL
+#define gd_set_upl(val)
+#endif
+
/**
* enum gd_flags - global data flags
*
@@ -701,6 +716,10 @@ enum gd_flags {
* @GD_FLG_HUSH_MODERN_PARSER: Use hush 2021 parser.
*/
GD_FLG_HUSH_MODERN_PARSER = 0x2000000,
+ /**
+ * @GD_FLG_UPL: Read/write a Universal Payload (UPL) handoff
+ */
+ GD_FLG_UPL = 0x4000000,
};
#endif /* __ASSEMBLY__ */