X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Ffsl_sec.h;h=4cbdb2d65a0cb2d6a7a398ebbf0b0e98745a7740;hb=2144c74f684a8baa7f170a34fbcf13d551a6ae64;hp=a52110a625c2698233d71da848dbdb0eb661b926;hpb=f91e65a74eff93d5187a3b27e1badd80c2a35fed;p=u-boot diff --git a/include/fsl_sec.h b/include/fsl_sec.h index a52110a625..4cbdb2d65a 100644 --- a/include/fsl_sec.h +++ b/include/fsl_sec.h @@ -24,7 +24,7 @@ #define sec_in16(a) in_be16(a) #define sec_clrbits32 clrbits_be32 #define sec_setbits32 setbits_be32 -#else +#elif defined(CONFIG_SYS_FSL_HAS_SEC) #error Neither CONFIG_SYS_FSL_SEC_LE nor CONFIG_SYS_FSL_SEC_BE is defined #endif @@ -67,6 +67,9 @@ struct rng4tst { }; u32 rsvd1[40]; #define RNG_STATE0_HANDLE_INSTANTIATED 0x00000001 +#define RNG_STATE1_HANDLE_INSTANTIATED 0x00000002 +#define RNG_STATE_HANDLE_MASK \ + (RNG_STATE0_HANDLE_INSTANTIATED | RNG_STATE1_HANDLE_INSTANTIATED) u32 rdsta; /*RNG DRNG Status Register*/ u32 rsvd2[15]; }; @@ -215,6 +218,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 +279,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 @@ -294,8 +297,6 @@ struct sg_entry { #endif -int sec_init(void); - /* blob_dek: * Encapsulates the src in a secure blob and stores it dst * @src: reference to the plaintext @@ -305,6 +306,10 @@ int sec_init(void); */ int blob_dek(const u8 *src, u8 *dst, u8 len); +#if defined(CONFIG_ARCH_C29X) +int sec_init_idx(uint8_t); +#endif +int sec_init(void); #endif #endif /* __FSL_SEC_H */