S32G - Online BIST not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32G - Online BIST not working

446 Views
khan_misbah
Contributor II

Hello Community,

I wrote a linux driver to test online BIST for S32G3. While running it on A53 core its either crashing or BIST status shows "BUSY" for ever. Below is the code for reference & output. I tried to back port the NXP's code sample from "S32G_SPD_2.0.1\S32_Config_Tool\Bist"

 

Below is the code snippet & output:

BistRDs = BIST_RESET_DOMAIN3; // hardcoding <fix me>
reg_write32(BIST_GPR_TOP_ST_EN, BistRDs);

reg_write32(BIST_STCU_CFG_REG, 0x1001E000);
reg_write32(BIST_STCU_WDG_REG, (BIST_STCU_WDG_VAL));

reg_write32(BIST_STCU_LB_CTRL_REG(0), 0x7FE01108);
reg_write32(BIST_STCU_LB_PCS_REG(0), 0x000005DC);
reg_write32(BIST_STCU_LB_MICREL_REG(0), 0x73D053B5);
reg_write32(BIST_STCU_LB_MICREH_REG(0), 0x253B0C27);

reg_write32(BIST_STCU_MB_CTRL_REG(0), 0x90300000);
reg_write32(BIST_STCU_MB_CTRL_REG(1), 0x90500000);
reg_write32(BIST_STCU_MB_CTRL_REG(2), 0x90700000);
reg_write32(BIST_STCU_MB_CTRL_REG(3), 0x90900000);
reg_write32(BIST_STCU_MB_CTRL_REG(4), 0x90B00000);
reg_write32(BIST_STCU_MB_CTRL_REG(5), 0x90D00000);
reg_write32(BIST_STCU_MB_CTRL_REG(6), 0x90F00000);
reg_write32(BIST_STCU_MB_CTRL_REG(7), 0x91100000);
reg_write32(BIST_STCU_MB_CTRL_REG(8), 0x91300000);
reg_write32(BIST_STCU_MB_CTRL_REG(9), 0x91500000);
reg_write32(BIST_STCU_MB_CTRL_REG(10), 0x00100000);
reg_write32(BIST_STCU_MB_CTRL_REG(11), 0x00000000);

reg_write32(BIST_STCU_RUNSW_REG, (uint32_t)(BIST_STCU_RUNSW_RUN_BIT + BIST_STCU_RUNSW_INT_EN));
do
{
udelay(10);
BistTimeout++;
status = Bist_ValidateHwStatus();
if(status == E_OK)
pr_info("---->>>> 1. Bist_ValidateHwStatus = %x \n",status);
} while(((Std_ReturnType)E_NOT_OK == status) && (BistTimeout < BIST_HW_TIMEOUT_VAL));

 

/==============================================================/

                                                                 Output

/==============================================================/

[ 82.799589] ++Bist_Specific_GetFailLists()
[ 82.803371] --Bist_Specific_GetFailLists()
[ 82.807523] Bist_Specific_GetFailLists = 1
BIST_KM_IOCTL_GET_FAIL_LIST status = 0
LBistList[0] = 0x0
LBistList[1] = 0x0
LBistList[2] = 0x0
MBistList[0] = 0x0
MBistList[1] = 0x0
MBistList[2] = 0x0
[ 92.811784] ++Bist_Specific_GetExecStatus()
[ 92.815625] ++Bist_IntegrityTest()
[ 92.819102] ++Bist_LbistIntegrityTest()
[ 92.823020] STCU WDG reg read, addr=0x40028014 data=0xffffffff
[ 92.828914] At address 0x4002805c value read 0x0
[ 92.833600] At address 0x40028060 value read 0x0
[ 92.838289] --Bist_LbistIntegrityTest()
[ 92.842188] ++Bist_MbistIntegrityTest()
[ 92.846098] At address 0x4002814c value read 0x1
[ 92.850785] At address 0x40028150 value read 0x0
[ 92.855471] At address 0x40028154 value read 0x0
[ 92.860156] --Bist_MbistIntegrityTest()
[ 92.864064] --Bist_IntegrityTest()
[ 92.867543] Bist_HasBistRun() MBIST ret=0
[ 92.871536] BIST_STCU_RUNSW_REG = 0x40028004, value =0x801
[ 92.877085] BIST_STCU_ERR_STAT = 0x40028024, value =0x0
[ 92.882405] BIST status busy
[ 92.885230] BistStatus = 0
BIST_KM_IOCTL_GET_STATUS = 0
BIST_BUSY

 

When i try to config the reset domain to "BIST_RESET_DOMAIN0 + BIST_RESET_DOMAIN2 + BIST_RESET_DOMAIN3" OR "BIST_RESET_DOMAIN0 + BIST_RESET_DOMAIN1 + BIST_RESET_DOMAIN2 + BIST_RESET_DOMAIN3". The same code gives core dump.

 

[ 72.550252] ++Bist_Run()
[ 72.550253] Bist_Specific_Run
[ 72.550256] ++Bist_Specific_Run()
[ 72.550257] ++Bist_SelftestGprCfg()
[ 72.550259] address = 0x4001cfe4, data=0xf0000
[ 72.550285] ++Bist_GprTopCfg()
[ 72.550287] address = 0x4001cfe0, data=0x4
[ 72.550297] --Bist_GprTopCfg() 0
[ 72.550299] --Bist_SelftestGprCfg() 0
[ 72.550302] BistTest = BIST_DIAGNOSTICPFE_CFG
[ 72.550308] BIST_STCU_RUNSW_REG read WRP_BIT is clear, E_OK !!!
[ 72.550309] ++Bist_StcuUnlock()
[ 72.550311] address = 0x40028008, data=0x753f924e
[ 72.550317] address = 0x40028008, data=0x8ac06db1
[ 72.550326] BIST_STCU_CFG_REG read WRP_BIT is clear, E_OK !!!
[ 72.550328] --Bist_StcuUnlock() 0
[ 72.550331] address = 0x4002a200, data=0x2008
[ 72.550336] address = 0x4002a210, data=0x80000005
[ 72.550342] ++Bist_GetPtrVal()
[ 72.550344] --Bist_GetPtrVal()
[ 72.550345] 1. BistCtrl = 0x10000000
[ 72.550348] 2. BistCtrl = 0x1001e001
[ 72.550350] address = 0x4002800c, data=0x1001e001
[ 72.550356] address = 0x40028014, data=0xffffffff
[ 72.550362] ++Bist_ChannelConfig()
[ 72.550364] BistChannelNum = 5
[ 72.550366] 1. CurentBistChannel = 43
[ 72.550369] 2. CurentBistChannel = 0
[ 72.550371] address = 0x4002a214, data=0x90300000
[ 72.550377] address = 0x40028190, data=0x0
[ 72.550383] address = 0x40028194, data=0x0
[ 72.550389] address = 0x40028198, data=0x0
[ 72.550395] --Bist_ChannelConfig()
[ 72.550397] ++Bist_SelfTestTrigger()
[ 72.550402] ++Bist_StcuUnlock()
[ 72.550403] address = 0x40028008, data=0x753f924e
[ 72.550409] address = 0x40028008, data=0x8ac06db1
[ 72.550418] BIST_STCU_CFG_REG read WRP_BIT is clear, E_OK !!!
[ 72.550420] --Bist_StcuUnlock() 0
[ 72.550422] address = 0x40028004, data=0x801
[ 72.799475] ---->>> 2. Bist_ValidateHwStatus = 1
[ 72.799494] ++Bist_SelfTestTrigger()
[ 72.799495] --Bist_Specific_Run()
[ 72.799497] --Bist_Run()
[ 72.946063] Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
[ 72.953116] Modules linked in: bist_drv(O) scst_drv(O) llce_can llce_mailbox pfeng(O) llce_core fir_pci(O) can_isotp(O)
[ 72.963878] CPU: 1 PID: 227 Comm: Global polling Tainted: G O 5.10.120-rt70+g0b76731696c1 #1
[ 72.973682] Hardware name: s32g3-tpf-platform (DT)
[ 72.978458] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
[ 72.984446] pc : pfe_parity_cfg_irq_mask+0x8/0x30 [pfeng]
[ 72.989827] lr : pfe_parity_irq_mask+0x30/0x48 [pfeng]
[ 72.994949] sp : ffffffc014003de0
[ 72.998246] x29: ffffffc014003de0 x28: 0000000000000000
[ 73.003541] x27: ffffff88036ef3c8 x26: ffffffc010d35898
[ 73.008836] x25: ffffff88035f7a00 x24: ffffffc0088d17e0
[ 73.014131] x23: ffffffc010a3ea68 x22: ffffffc013e037a8
[ 73.019425] x21: ffffff8803644d80 x20: ffffff88037f4c00
[ 73.024720] x19: ffffff8802048f80 x18: 0000000000000000
[ 73.030015] x17: 0000000000000002 x16: 0000000000000002
[ 73.035310] x15: 02bf9bb40768cf38 x14: 02bf9bb40768cf38
[ 73.040604] x13: 00000000000002df x12: 00000000f5257d14
[ 73.045899] x11: 000000000000024c x10: 00000000000008e0
[ 73.051194] x9 : ffffffc014003cc0 x8 : ffffff88036456c0
[ 73.056489] x7 : 0000000000000001 x6 : 0000000002a01341
[ 73.061785] x5 : 0000000000000000 x4 : ffffff8803644d80
[ 73.067079] x3 : ffffff88037f4c00 x2 : ffffff8803644d80
[ 73.072373] x1 : 0000000000000000 x0 : ffffffc015094050
[ 73.077669] Call trace:
[ 73.080100] pfe_parity_cfg_irq_mask+0x8/0x30 [pfeng]
[ 73.085133] pfe_poller_func+0x64/0x27c [pfeng]
[ 73.089648] thread_func+0x28/0x60 [pfeng]
[ 73.093727] kthread+0x178/0x180
[ 73.096938] ret_from_fork+0x10/0x30
[ 73.100503] Code: 52800040 17fffff6 d503233f 91014000 (b9400001)

 

 

Did anyone tried Online BIST running on A53 ? Can you point out what is going wrong ?

 

 

Regards,
Misbah
0 Kudos
Reply
0 Replies