Add blob type for DT overlay according to the update of Firmware
Handoff spec[1].
Add an inline header to represent the 'subtype' in a DT overlay
blob payload.

[1] Add Transfer Entry for Devicetree Overlay
https://github.com/FirmwareHandoff/firmware_handoff/pull/74

Signed-off-by: Raymond Mao <raymond....@linaro.org>
---
Changes in v2:
- Add inline header for 'subtype'.

 common/bloblist.c  |  1 +
 include/bloblist.h | 13 ++++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/common/bloblist.c b/common/bloblist.c
index 6e4f020d7c4..1c690f58b56 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -43,6 +43,7 @@ static struct tag_name {
        { BLOBLISTT_ACPI_TABLES, "ACPI tables for x86" },
        { BLOBLISTT_TPM_EVLOG, "TPM event log defined by TCG EFI" },
        { BLOBLISTT_TPM_CRB_BASE, "TPM Command Response Buffer address" },
+       { BLOBLISTT_FDT_OVERLAY, "DT overlay" },
 
        /* BLOBLISTT_AREA_FIRMWARE */
        { BLOBLISTT_TPM2_TCG_LOG, "TPM v2 log space" },
diff --git a/include/bloblist.h b/include/bloblist.h
index f32faf78560..c2d3065a43c 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -110,7 +110,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 +232,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
  *
-- 
2.25.1

Reply via email to