Skip to contentSkip to conversation

fsl_sfp : Modify macros as per changes in SFP v3.4

PATCH New Sumit Garg 2 participants 4 messages Aug 31, 2016 – Sep 1, 2016

lore
Share & tools
lore

Sumit Garg

author
#0 lore raw

PATCH 1/1 fsl_sfp : Modify macros as per changes in SFP v3.4

In SFP v3.4 support for 8 keys in SRK table has been added which leads to corresponding changes in OSPR key revocation field. So modify OSPR_KEY_REVOC_XXX macros accordingly.

---
 include/fsl_sfp.h | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
include/fsl_sfp.h +15 -8
index 2976a2c..42ff942 100644
@@ -32,7 +32,7 @@
 /* Number of SRKH registers */
 #define NUM_SRKH_REGS	8
 
-#if	defined(CONFIG_SYS_FSL_SFP_VER_3_2) ||	\
+#if defined(CONFIG_SYS_FSL_SFP_VER_3_2) ||	\
 	defined(CONFIG_SYS_FSL_SFP_VER_3_4)
 struct ccsr_sfp_regs {
 	u32 ospr;		/* 0x200 */
@@ -57,7 +57,7 @@ struct ccsr_sfp_regs {
 	u32 srk_hash[NUM_SRKH_REGS];	/* 0x23c Super Root Key Hash */
 	u32 oem_uid;		/* 0x9c OEM Unique ID */
 	u8 reserved2[0x04];
-	u32 ovpr;			/* 0xA4  Intent To Secure */
+	u32 ovpr;		/* 0xA4  Intent To Secure */
 	u8 reserved4[0x08];
 	u32 fsl_uid;		/* 0xB0  FSL Unique ID */
 	u8 reserved5[0x04];
@@ -68,19 +68,26 @@ struct ccsr_sfp_regs {
 #else
 struct ccsr_sfp_regs {
 	u8 reserved0[0x40];
-	u32 ospr;	/* 0x40  OEM Security Policy Register */
+	u32 ospr;		/* 0x40  OEM Security Policy Register */
 	u8 reserved2[0x38];
 	u32 srk_hash[8];	/* 0x7c  Super Root Key Hash */
-	u32 oem_uid;	/* 0x9c  OEM Unique ID */
+	u32 oem_uid;		/* 0x9c  OEM Unique ID */
 	u8 reserved4[0x4];
-	u32 ovpr;	/* 0xA4  OEM Validation Policy Register */
+	u32 ovpr;		/* 0xA4  OEM Validation Policy Register */
 	u8 reserved8[0x8];
-	u32 fsl_uid;	/* 0xB0  FSL Unique ID */
+	u32 fsl_uid;		/* 0xB0  FSL Unique ID */
 };
 #endif
+
 #define ITS_MASK	0x00000004
 #define ITS_BIT		2
-#define OSPR_KEY_REVOC_SHIFT	13
-#define OSPR_KEY_REVOC_MASK	0x0000e000
+
+#if defined(CONFIG_SYS_FSL_SFP_VER_3_4)
+#define OSPR_KEY_REVOC_SHIFT    9
+#define OSPR_KEY_REVOC_MASK     0x0000fe00
+#else
+#define OSPR_KEY_REVOC_SHIFT    13
+#define OSPR_KEY_REVOC_MASK     0x0000e000
+#endif /* CONFIG_SYS_FSL_SFP_VER_3_4 */
 
 #endif
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH 1/1 fsl_sfp : Modify macros as per changes in SFP v3.4

Quoted 1 line · Sumit Garg

In SFP v3.4 support for 8 keys in SRK table has been added which leads

I guess you mean "SFP v3.4 supports 8 keys ...".

Quoted 22 lines

to corresponding changes in OSPR key revocation field. So modify OSPR_KEY_REVOC_XXX macros accordingly.

---
 include/fsl_sfp.h | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
include/fsl_sfp.h +1 -1
index 2976a2c..42ff942 100644
@@ -32,7 +32,7 @@
 /* Number of SRKH registers */
 #define NUM_SRKH_REGS	8
 
-#if	defined(CONFIG_SYS_FSL_SFP_VER_3_2) ||	\
+#if defined(CONFIG_SYS_FSL_SFP_VER_3_2) ||	\
 	defined(CONFIG_SYS_FSL_SFP_VER_3_4)
 struct ccsr_sfp_regs {
 	u32 ospr;		/* 0x200 */

include/fsl_sfp.h struct ccsr_sfp_regs { · line 60

Quoted 5 lines
include/fsl_sfp.h +1 -1
@@ -57,7 +57,7 @@ struct ccsr_sfp_regs {
 	u32 srk_hash[NUM_SRKH_REGS];	/* 0x23c Super Root Key Hash */
 	u32 oem_uid;		/* 0x9c OEM Unique ID */
 	u8 reserved2[0x04];
-	u32 ovpr;			/* 0xA4  Intent To Secure */
+	u32 ovpr;		/* 0xA4  Intent To Secure */

Please don't mix whitespace change in this patch.

York

author
#2 lore raw

PATCH 1/1 fsl_sfp : Modify macros as per changes in SFP v3.4

Quoted 9 lines

-----Original Message-----
From: york sun
Sent: Wednesday, August 31, 2016 9:04 PM
To: Sumit Garg <[email protected]>; u-boot at lists.denx.de
Cc: Prabhakar Kushwaha <[email protected]>; Ruchika Gupta <[email protected]>
Subject: Re: [u-boot-release] [PATCH] fsl_sfp : Modify macros as per changes in SFP v3.4

Quoted 5 lines
Quoted 1 line · Sumit Garg

In SFP v3.4 support for 8 keys in SRK table has been added which leads

I guess you mean "SFP v3.4 supports 8 keys ...".

I will correct this.

Quoted 24 lines
Quoted 22 lines

to corresponding changes in OSPR key revocation field. So modify OSPR_KEY_REVOC_XXX macros accordingly.

---
 include/fsl_sfp.h | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
include/fsl_sfp.h index renamed from include/fsl_sfp.h +0 -0

2976a2c..42ff942 100644

include/fsl_sfp.h +1 -1
@@ -32,7 +32,7 @@
 /* Number of SRKH registers */
 #define NUM_SRKH_REGS	8
 
-#if	defined(CONFIG_SYS_FSL_SFP_VER_3_2) ||	\
+#if defined(CONFIG_SYS_FSL_SFP_VER_3_2) ||	\
 	defined(CONFIG_SYS_FSL_SFP_VER_3_4)
 struct ccsr_sfp_regs {
 	u32 ospr;		/* 0x200 */

include/fsl_sfp.h struct ccsr_sfp_regs { · line 57

Quoted 1 line
include/fsl_sfp.h +0 -0
@@ -57,7 +57,7 @@ struct ccsr_sfp_regs {
 	u32 srk_hash[NUM_SRKH_REGS];	/* 0x23c Super Root Key Hash

*/

Quoted 8 lines

include/fsl_sfp.h struct ccsr_sfp_regs { · line 60

Quoted 4 lines
include/fsl_sfp.h +1 -1
 	u32 oem_uid;		/* 0x9c OEM Unique ID */
 	u8 reserved2[0x04];
-	u32 ovpr;			/* 0xA4  Intent To Secure */
+	u32 ovpr;		/* 0xA4  Intent To Secure */

Please don't mix whitespace change in this patch.

York

Should I split this patch and make a separate patch for the cleanup?

-Sumit

#3 lore raw

PATCH 1/1 fsl_sfp : Modify macros as per changes in SFP v3.4

Quoted 47 lines · Sumit Garg
Quoted 9 lines

-----Original Message-----
From: york sun
Sent: Wednesday, August 31, 2016 9:04 PM
To: Sumit Garg <[email protected]>; u-boot at lists.denx.de
Cc: Prabhakar Kushwaha <[email protected]>; Ruchika Gupta <[email protected]>
Subject: Re: [u-boot-release] [PATCH] fsl_sfp : Modify macros as per changes in SFP v3.4

Quoted 5 lines
Quoted 1 line · Sumit Garg

In SFP v3.4 support for 8 keys in SRK table has been added which leads

I guess you mean "SFP v3.4 supports 8 keys ...".

I will correct this.

Quoted 31 lines
Quoted 22 lines

to corresponding changes in OSPR key revocation field. So modify OSPR_KEY_REVOC_XXX macros accordingly.

---
 include/fsl_sfp.h | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)
include/fsl_sfp.h index renamed from include/fsl_sfp.h +0 -0

2976a2c..42ff942 100644

include/fsl_sfp.h +1 -1
@@ -32,7 +32,7 @@
 /* Number of SRKH registers */
 #define NUM_SRKH_REGS	8
 
-#if	defined(CONFIG_SYS_FSL_SFP_VER_3_2) ||	\
+#if defined(CONFIG_SYS_FSL_SFP_VER_3_2) ||	\
 	defined(CONFIG_SYS_FSL_SFP_VER_3_4)
 struct ccsr_sfp_regs {
 	u32 ospr;		/* 0x200 */

include/fsl_sfp.h struct ccsr_sfp_regs { · line 57

Quoted 1 line
include/fsl_sfp.h +0 -0
@@ -57,7 +57,7 @@ struct ccsr_sfp_regs {
 	u32 srk_hash[NUM_SRKH_REGS];	/* 0x23c Super Root Key Hash

*/

include/fsl_sfp.h struct ccsr_sfp_regs { · line 60

Quoted 4 lines
include/fsl_sfp.h +1 -1
 	u32 oem_uid;		/* 0x9c OEM Unique ID */
 	u8 reserved2[0x04];
-	u32 ovpr;			/* 0xA4  Intent To Secure */
+	u32 ovpr;		/* 0xA4  Intent To Secure */

Please don't mix whitespace change in this patch.

Quoted 3 lines
Quoted 1 line

York

Should I split this patch and make a separate patch for the cleanup?

A cleanup is welcomed. If needed, it should be in a separated patch.

York