Error when flashing Orin with 1 Cluster in Lock-step & 2 clusters in split

Hi,

I tried booting up the Orin in lock-step mode following the guide here:

https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxOrinSeries.html?#cpu-split-lock-feature

This works when all custers are in lock-step but when changing num_clusters_2core_pair_lockstep to 1 it will fail to flash giving this error:


[ 64.1684 ] tegrarcm_v2 --chip 0x23 --ismb2applet
[ 64.7479 ]
[ 64.7516 ] tegrarcm_v2 --chip 0x23 --ismb2
[ 64.9079 ]
[ 65.9138 ] tegrarcm_v2 --chip 0x23 --ismb2applet
[ 66.4921 ]
[ 66.4971 ] tegrarcm_v2 --chip 0x23 --ismb2
[ 67.0961 ]
[ 68.1019 ] tegrarcm_v2 --chip 0x23 --ismb2applet
[ 68.6801 ]
[ 68.6848 ] tegrarcm_v2 --chip 0x23 --ismb2
[ 69.2881 ]
Error: None of the bootloaders are running on device. Check the UART log.
Failed flashing t186ref.

Can you configure the Orin to have 1 cluster in lock-step while leaving the remaining 2 clusters in split and if so how can i get passed this error.

Hi user163011,

Are you using the devkit or custom board for AGX Orin?

Do you mean the board could be flashed successfully w/o any modification?
But it would flash failed after setting num_clusters_2core_pair_lockstep from 0 to 1?

hello user163011,

please refer to Topic 248134, it’s now unable to boot after enable lock/hybrid mode settings.
we’re still checking this internally.

Hi JerryChang,

I’m using 5.0.1 Jetpack which split-lock works on this version. To answer you question above:

It successfully flashes & boots when num_clusters_2core_pair_lockstep is 0 or 3

It will not flash and produce the error message above when setting num_clusters_2core_pair_lockstep to 1

hello user163011,

you may try below changes to revise ATF, and also the WAR to disable the GIC before enter
OPTEE in its suspend handler.
for example,

diff --git a/services/spd/opteed/opteed_common.c b/services/spd/opteed/opteed_common.c
index f913e11ef..b42d812dc 100644
--- a/services/spd/opteed/opteed_common.c
+++ b/services/spd/opteed/opteed_common.c
@@ -75,9 +75,6 @@ uint64_t opteed_synchronous_sp_entry(optee_context_t *optee_ctx)
        assert(optee_ctx != NULL);
        assert(optee_ctx->c_rt_ctx == 0);
 
-       /* Save the Non-Secure EL1 system register context */
-       cm_el1_sysregs_context_save(NON_SECURE);
-
        /* Apply the Secure EL1 system register context and switch to it */
        assert(cm_get_context(SECURE) == &optee_ctx->cpu_ctx);
        cm_el1_sysregs_context_restore(SECURE);
@@ -107,9 +104,6 @@ void opteed_synchronous_sp_exit(optee_context_t *optee_ctx, uint64_t ret)
        assert(cm_get_context(SECURE) == &optee_ctx->cpu_ctx);
        cm_el1_sysregs_context_save(SECURE);
 
-       /* Apply the Non-Secure EL1 system register context and switch to it */
-       cm_el1_sysregs_context_restore(NON_SECURE);
-
        assert(optee_ctx->c_rt_ctx != 0);
        opteed_exit_sp(optee_ctx->c_rt_ctx, ret);
 
diff --git a/services/spd/opteed/opteed_pm.c b/services/spd/opteed/opteed_pm.c
index 719eeb748..bac7199af 100644
--- a/services/spd/opteed/opteed_pm.c
+++ b/services/spd/opteed/opteed_pm.c
@@ -12,6 +12,7 @@
 #include <lib/el3_runtime/context_mgmt.h>
 #include <plat/common/platform.h>
 
+#include <tegra_gic.h>
 #include "opteed_private.h"
 
 /*******************************************************************************
@@ -68,6 +69,15 @@ static void opteed_cpu_suspend_handler(u_register_t max_off_pwrlvl)
        assert(optee_vector_table);
        assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_ON);
 
+       /*
+        * WAR for C7 fail.
+        * If a NS interrupt occur after PSCI check the pending irq and before
+        * ATF disable GIC in platform suspend handler, it will generate an FIQ
+        * to ATF, and make the system hang.
+        * This WAR disables the GIC before entering OPTEE to patch this issue.
+        */
+       tegra_gic_cpuif_deactivate();
+
        write_ctx_reg(get_gpregs_ctx(&optee_ctx->cpu_ctx), CTX_GPREG_X0,
                      max_off_pwrlvl);

you may see-also atf_and_optee_README.txt for the instructs to build the OP-TEE sources. also, the approaches to verify the image.

Thank you :) I’ll try this out and let you know

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.