[U-Boot] [PATCH] crypto/fsl: fix BLOB encapsulation and decapsulation

Fabio Estevam festevam at gmail.com
Thu Jan 4 21:31:45 UTC 2018


Hi York,

On Thu, Jan 4, 2018 at 7:12 PM, York Sun <york.sun at nxp.com> wrote:

> This patch causes errors in almost all Freescale secure boot targets,
...

> The error is undefined reference to `BLOB_SIZE'. Please fix.

You are right. The BLOB_SIZE() macro is currently only defined for imx.

Clemens,

Please include the change below within your patch:

--- a/include/fsl_sec.h
+++ b/include/fsl_sec.h
@@ -215,6 +215,8 @@ struct sg_entry {
 #define SG_ENTRY_OFFSET_SHIFT  0
 };

+#define BLOB_SIZE(x)       (x + 32 + 16) /* Blob buffer size */
+
 #if defined(CONFIG_MX6) || defined(CONFIG_MX7)
 /* Job Ring Base Address */
 #define JR_BASE_ADDR(x) (CONFIG_SYS_FSL_SEC_ADDR + 0x1000 * (x + 1))
@@ -274,8 +276,6 @@ struct sg_entry {
 #define PERM                   0x0000B008      /* Clear on release, lock SMAP
                                                 * lock SMAG group 1 Blob */

-#define BLOB_SIZE(x)       (x + 32 + 16) /* Blob buffer size */
-
 /* HAB WRAPPED KEY header */
 #define WRP_HDR_SIZE           0x08
 #define HDR_TAG                        0x81

Thanks


More information about the U-Boot mailing list