File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1281,8 +1281,14 @@ ioc_parse(const char *opts)
1281
1281
snprintf (virtual_uart_path , sizeof (virtual_uart_path ), "%s" , param );
1282
1282
if (tmp != NULL ) {
1283
1283
tmp = strtok (NULL , "," );
1284
- if (tmp != NULL )
1284
+ if (tmp != NULL ) {
1285
1285
ioc_boot_reason = strtoul (tmp , 0 , 0 );
1286
+
1287
+ /*
1288
+ * Mask invalid bits of wakeup reason for IOC mediator
1289
+ */
1290
+ ioc_boot_reason &= CBC_WK_RSN_ALL ;
1291
+ }
1286
1292
}
1287
1293
free (param );
1288
1294
return 0 ;
@@ -1302,9 +1308,12 @@ ioc_init(struct vmctx *ctx)
1302
1308
if (ioc_is_platform_supported () != 0 )
1303
1309
goto ioc_err ;
1304
1310
1305
- /* Check IOC boot reason */
1311
+ /*
1312
+ * Set default boot wakeup reason as ignition button active if met
1313
+ * invalid parameter.
1314
+ */
1306
1315
if (ioc_boot_reason == 0 )
1307
- goto ioc_err ;
1316
+ ioc_boot_reason = CBC_WK_RSN_BTN ;
1308
1317
ioc = (struct ioc_dev * )calloc (1 , sizeof (struct ioc_dev ));
1309
1318
if (!ioc )
1310
1319
goto ioc_err ;
You can’t perform that action at this time.
0 commit comments