Skip to contentSkip to conversation

tegrarcm: Add odm production secure mode support

PATCH In review Penny Chiu 3 participants 3 messages Apr 2, 2014 2 messages not in the archive Tegra architecture support

lore
Share & tools
lore

Penny Chiu

author
#0 lore raw

PATCH 1/1 tegrarcm: Add odm production secure mode support

tegrarcm should work if the operating mode is ODM production secure mode. Add the operating mode definition and description.

---
 src/main.c | 4 +++-
 src/rcm.h  | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
src/main.c +3 -1
index fe29df0..50adc14 100644
@@ -290,8 +290,9 @@ int main(int argc, char **argv)
 
 	if (info.op_mode != RCM_OP_MODE_DEVEL &&
 	    info.op_mode != RCM_OP_MODE_ODM_OPEN &&
+	    info.op_mode != RCM_OP_MODE_ODM_SECURE &&
 	    info.op_mode != RCM_OP_MODE_PRE_PRODUCTION)
-		error(1, ENODEV, "device is not in developer, open, "
+		error(1, ENODEV, "device is not in developer, open, secure, "
 		      "or pre-production mode, cannot flash");
 
 	// download the BCT
@@ -654,6 +655,7 @@ static void dump_platform_info(nv3p_platform_info_t *info)
 	case RCM_OP_MODE_PRE_PRODUCTION:    op_mode = "pre-production mode"; break;
 	case RCM_OP_MODE_DEVEL:             op_mode = "developer mode"; break;
 	case RCM_OP_MODE_ODM_OPEN:          op_mode = "odm open mode"; break;
+	case RCM_OP_MODE_ODM_SECURE:        op_mode = "odm secure mode"; break;
 	default:                            op_mode = "unknown"; break;
 	}
 	printf(" (%s)\n", op_mode);
src/rcm.h +1 -0
index 505547c..ab4bea2 100644
@@ -107,6 +107,7 @@ typedef struct {
 // security operating modes
 #define RCM_OP_MODE_PRE_PRODUCTION  0x1
 #define RCM_OP_MODE_DEVEL           0x3
+#define RCM_OP_MODE_ODM_SECURE      0x4
 #define RCM_OP_MODE_ODM_OPEN        0x5
 
 int rcm_init(uint32_t version);
Signature · 1 line
1.9.1

A message that is not in the archive (sent off-list or not yet received): 1396403868-14479-1-git-send-email-pchiu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org

#2 lore raw

src/main.c int main(int argc, char **argv) · line 294

Quoted 9 lines · Penny Chiu

tegrarcm should work if the operating mode is ODM production secure mode. Add the operating mode definition and description.

src/main.c +1 -0
 
 	if (info.op_mode != RCM_OP_MODE_DEVEL &&
 	    info.op_mode != RCM_OP_MODE_ODM_OPEN &&
+	    info.op_mode != RCM_OP_MODE_ODM_SECURE &&
 	    info.op_mode != RCM_OP_MODE_PRE_PRODUCTION)

Are there even more modes beyond those? I wonder if that check is even necessary any more, or whether tegrarcm should just try to communicate no matter what.

Still, any changes here can be addressed in a separate patch.

Acked-by:
Stephen Warren <[email protected]>

Allen, will you apply this or do you want me to?

A message that is not in the archive (sent off-list or not yet received): [email protected]

Acked-by
#4 lore raw
Quoted 6 lines · Stephen Warren
Quoted 4 lines · Penny Chiu

tegrarcm should work if the operating mode is ODM production secure mode. Add the operating mode definition and description.

src/main.c +0 -0
Quoted 8 lines

src/main.c int main(int argc, char **argv) · line 294

Quoted 4 lines
src/main.c +1 -0
 	if (info.op_mode != RCM_OP_MODE_DEVEL &&
 	    info.op_mode != RCM_OP_MODE_ODM_OPEN &&
+	    info.op_mode != RCM_OP_MODE_ODM_SECURE &&
 	    info.op_mode != RCM_OP_MODE_PRE_PRODUCTION)

Are there even more modes beyond those? I wonder if that check is even necessary any more, or whether tegrarcm should just try to communicate no matter what.

There are other modes, but they are all secure modes, and tegrarcm has no support for encrypting RCM payloads today, so the proper thing to do is fail if its not one of these modes.

Quoted 6 lines

Still, any changes here can be addressed in a separate patch.

Acked-by:
Stephen Warren <[email protected]>

Allen, will you apply this or do you want me to?

I will apply.

-Allen

nvpublic