tegrarcm: Add odm production secure mode support
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
@@ -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
@@ -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 0x5int rcm_init (uint32_t version);
Signature · 1 line
1.9.1
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
-0if (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?
Allen Martin
Acked-byQuoted 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
-0if (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