概述
子系统发生异常时,是如何通过中断通知AP主系统?
AP主系统在kernel代码中subsystem_restart.c 提供子系统中断注册接口:subsys_register。
比如,为modem子系统注意异常中断注册:
static int pil_subsys_init(struct modem_data *drv,
struct platform_device *pdev)
{
int ret;
drv->subsys_desc.name = "modem";
drv->subsys_desc.dev = &pdev->dev;
drv->subsys_desc.owner = THIS_MODULE;
drv->subsys_desc.shutdown = modem_shutdown;
drv->subsys_desc.powerup = modem_powerup;
drv->subsys_desc.ramdump = modem_ramdump;
drv->subsys_desc.crash_shutdown = modem_crash_shutdown;
drv->subsys_desc.err_fatal_handler = modem_err_fatal_intr_handler;
drv->subsys_desc.stop_ack_handler = modem_stop_ack_intr_handler;
drv->subsys_desc.wdog_bite_handler = modem_wdog_bite_intr_handler;
drv->subsys = subsys_register(&drv->subsys_desc);
子系统异常中断发生时,AP主系统相应的irq handler被调用。
异常中断重启,分为两个级别:
static const char * const restart_levels[] = { (subsystem_restart.c )
[RESET_SOC] = "SYSTEM",
[RESET_SUBSYS_COUPLED] = "RELATED",
};
处理级别,可能过restart_level_store函数提供的sys接口修改,比如:
write /sys/module/msm_poweroff/parameters/emergent_restart 1
write /sys/module/msm_poweroff/parameters/download_mode 1
write /sys/bus/msm_subsys/devices/subsys0/restart_level system
write /sys/bus/msm_subsys/devices/subsys1/restart_level system
write /sys/bus/msm_subsys/devices/subsys2/restart_level related
/proprietary/ss-restart/subsystem_ramdump/subsystem_ramdump.c
qcom/common/rootdir/etc/init.qcom.rc:service ss_ramdump /system/bin/subsystem_ramdump
这个service启动后会收集子系统的 ramdumps and logs .
最后
以上就是想人陪心情为你收集整理的QCOM平台子系统通过AP处理异常的全部内容,希望文章能够帮你解决QCOM平台子系统通过AP处理异常所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复