solution

来源:互联网 发布:人工智能女友 编辑:程序博客网 时间:2024/04/29 03:45

How to get initial log from SSC

Below method is about how to get initial log from SSC:

 HAL and ADSP re-start
a.    adb shell stop sensors
b.    adb shell "echo 'related' > /sys/bus/msm_subsys/devices/subsys0/restart_level"
c.    adb shell "echo 'restart' > /sys/kernel/debug/msm_subsys/adsp"
d.    adb shell start sensors

Since both ADSP and HAL restart, it is able to see the early logs such as driver init logs .


How to restart subsystem through ADB


subsys0 - subsys3 are in /sys/bus/msm_subsys/devices

For 8926
subsys0 -> adsp
subsys1 -> modem
subsys2 -> wcnss
subsys3 -> venus

For other platform, the number and name mapping may be different. You can double check the name under each subsys folder.
cat /sys/bus/msm_subsys/devices/subsys1/name

Take modem ssr as example:

enable modem ssr first:
echo related > /sys/bus/msm_subsys/devices/subsys1/restart_level

restart modem:
echo restart > /sys/kernel/debug/msm_subsys/modem


How to collect ADSP SSR dump

1.enable ADSP SSR.
echo RELATED > /sys/bus/msm_subsys/devices/subsysX/restart_level  X:{0,1,2,3}
(X:0-Venus, 1-adsp, 2-modem, 3-AR6302)
you can get subsys id name by: cat /sys/bus/msm_subsys/devices/subsysX/name

root@msm8952_64:/ # echo RELATED > /sys/bus/msm_subsys/devices/subsys1/restart_level

2. Enable ramdump by adb command
root@msm8952_64:/ # echo 1 > /sys/module/subsystem_restart/parameters/enable_ramdumps

3.push enable_ramdumps app to target
get it from AP build ..out\target\product\msm8952_64\system\bin
adb push ..\subsystem_ramdump /system/bin
126|root@msm8952_64:/ # chmod 777 /system/bin/subsystem_ramdump

4. Execute subsystem_ramdump by adb command
root@msm8952_64:/ # ./system/bin/subsystem_ramdump

5. trigger a ADSP SSR by QXDM 
send_data 75 37 03 48

SSR dump will save udner /data/ramdump/



how to get ADSP sensor init log


how to get ADSP sensor init log
how to get ADSP sensor init log
1.If ADSP SSR works, you can see the init message using SSR
a. adb shell stop sensors
b. adb shell "echo 'related' > /sys/bus/msm_subsys/devices/subsys1/restart_level"
c. adb shell "echo 'restart' > /sys/kernel/debug/msm_subsys/adsp"
d. adb shell start sensors
note : before the try, need to check "adsp" subsystem number as  “cat /sys/bus/msm_subsys/devices/subsys1/name”


for msm8994:
root@msm8994:/ # cat /sys/bus/msm_subsys/devices/subsys1/name
adsp


2. If ADSP SSR can not work, you can add delay in the sensor init code (it is just for debug ADSP init issue, need remove it after finish debug);
sns_smgr_main.c
void sns_smgr_task(void* p_arg)
{
  /* --------------------------------------------------------------------- */
  /* Start initializing SMGR modules */
  smgr_init();
  sns_smgr_sensor_init();


  /* Start RH thread */
  sns_rh_task_init();


  /* Message Router init only returns after successfully connecting to services */
  sns_smgr_mr_init(sns_smgr.sig_grp);


  SMGR_DELAY_US(6000000);  ////// adding 6s delay for checking init message


  /* HW init only returns after all device drivers are initialized */
  sns_smgr_hw_init();


  /* Inform init code that SMGR init is done */
  sns_init_done();


  //SMGR_DELAY_US(1000000);


  /* Run the main task loop, no return */
  sns_smgr_task_main();


}

how to get ADSP sensor init log
how to get ADSP sensor init log
0 0
原创粉丝点击