diff options
| author | Tom Rini <[email protected]> | 2026-04-27 09:44:40 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-04-27 09:44:40 -0600 |
| commit | d7b23b2477ee6e966b0f9b8ae304b0bf9df58297 (patch) | |
| tree | e4c28ee4b77dc3182cda06cc3f66b2a196298dbd /include | |
| parent | e0991f42aa7f973e09f38bbe60cd12b28a46e491 (diff) | |
| parent | d3935134c9d597b57cebb954615cf3b80eaf85d7 (diff) | |
Merge patch series "Add support for DT overlays handoff"
Raymond Mao <[email protected]> says:
The series include refactoring on bloblist and fdtdec to support handoff
of multiple DT overlays and applying them into the DT base during setup.
All changes are aligned to the spec update for supporting DT overlay
handoff[1].
Notes for testing:
Currently DT overlay is not yet enabled in TF-A, but with the test
patches I provided for TF-A and OP-TEE build, importing a DT overlay
blob file from QEMU to TF-A reserved memory is supported.
Follow below instructions to build and run for test:
$ repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml
Replace your local qemu_v8.xml with [2], which contains all necessary
changes in both TF-A and OP-TEE build.
$ repo sync
$ cd build
$ make toolchains
$ make ARM_FIRMWARE_HANDOFF=y all
Copy and rename your DT overlay blob as 'qemu_v8.dtb' into out/bin
$ make ARM_FIRMWARE_HANDOFF=y run-only
[1] Add Transfer Entry for Devicetree Overlay
https://github.com/FirmwareHandoff/firmware_handoff/pull/74
[2] https://github.com/raymo200915/optee_manifest/blob/dt_overlay_handoff/qemu_v8.xml
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include')
| -rw-r--r-- | include/bloblist.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/include/bloblist.h b/include/bloblist.h index f32faf78560..e67b2a76358 100644 --- a/include/bloblist.h +++ b/include/bloblist.h @@ -73,6 +73,7 @@ #define __BLOBLIST_H #include <mapmem.h> +#include <linux/errno.h> enum { BLOBLIST_VERSION = 1, @@ -110,7 +111,8 @@ enum bloblist_tag_t { BLOBLISTT_ACPI_TABLES = 4, BLOBLISTT_TPM_EVLOG = 5, BLOBLISTT_TPM_CRB_BASE = 6, - BLOBLISTT_ACPI_PP = 7, + BLOBLISTT_FDT_OVERLAY = 7, + BLOBLISTT_ACPI_PP = 8, /* Standard area to allocate blobs used across firmware components */ BLOBLISTT_AREA_FIRMWARE = 0x10, @@ -231,6 +233,16 @@ enum { BLOBLIST_REC_HDR_SIZE = sizeof(struct bloblist_rec), }; +/* + * struct dto_blob_hdr - Blob inline header for BLOBLISTT_FDT_OVERLAY + * + * @subtype: IMP-DEF per the agreement between the DT overlay producer and + * consumer. Default value is 0. + */ +struct dto_blob_hdr { + u64 subtype; +}; + /** * bloblist_check_magic() - return a bloblist if the magic matches * @@ -268,6 +280,26 @@ static inline void *bloblist_get_blob(uint tag, int *sizep) } #endif +#if CONFIG_IS_ENABLED(BLOBLIST) +/** + * bloblist_apply_blobs() - Apply the data of blobs by tag + * + * Scan the bloblist, find the blobs with the matching tag and apply the data + * of blobs + * + * @tag: Tag to search for (enum bloblist_tag_t) + * @func: Function to apply the data of blobs + * Return: 0 if OK, otherwise error. + */ +int bloblist_apply_blobs(uint tag, int (*func)(void **data, int size)); +#else +static inline int bloblist_apply_blobs(uint tag, + int (*func)(void **data, int size)) +{ + return -EPERM; +} +#endif + /** * bloblist_find() - Find a blob * |
