显然,power state的睡眠程度从run到power down逐步加深。而高层级power domain的power state不应低于低层级power domain。 如以上例子中core 0 – core 2都为power down状态,而core 3为standby状态,则cluster 0不能为retention或power down状态。同样若cluster 0为standby状态,而cluster 1为run状态,则整个系统必须为...
static int cpu_psci_cpu_boot(unsigned int cpu){phys_addr_t pa_secondary_entry = __pa_symbol(function_nocfi(secondary_entry));int err = psci_ops.cpu_on(cpu_logical_map(cpu), pa_secondary_entry);if (err)pr_err("failed to boot CPU%d (%d)\n", cpu, err);return err;} 3 bl31中...
&ep)//ep入口地址->psci_plat_pm_ops->pwr_domain_on(target_cpu)->qemu_pwr_domain_on//实现核上电(平台实现)/* Store the re-entry information for the non-secure world. */->cm_init_context_by_index()//重点: 会通过cpu
INFO("PSCI Power Domain Map:\n"); for (idx = 0; idx < (PSCI_NUM_PWR_DOMAINS - platform_core_count); idx++) { state_type = find_local_state_type( psci_non_cpu_pd_nodes[idx].local_state); INFO(" Domain Node : Level %u, parent_node %d," " State %s (0x%x)\n",...
cpu_on(cpu_logical_map(cpu), __pa_symbol(secondary_entry)); 49 if (err) 50 pr_err("failed to boot CPU%d (%d)\n", cpu, err); 51 52 return err; 53 } 启动从处理的时候最终调用到psci的cpu操作集的cpu_psci_cpu_boot函数,会调用上面的psci_cpu_on,最终调用smc,传递第一个参数为cpu的...
(cpu)->cpu_psci_ops.cpu_boot->cpu_psci_cpu_boot//arch/arm64/kernel/psci.c46staticintcpu_psci_cpu_boot(unsigned int cpu)47{48int err = psci_ops.cpu_on(cpu_logical_map(cpu), __pa_symbol(secondary_entry));49if(err)50pr_err("failed to boot CPU%d (%d)\n", cpu, err);5152...
可以看到,在遍历每一个注册的运行时服务的时候,会导致std_svc_setup调用,其中会做psci操作集的设置,操作集中我们可以看到对核电源的管理的接口如:核上电,下电,挂起等,我们主要关注上电.pwr_domain_on = qemu_pwr_domain_on,这个接口当我们主处理器boot从处理器的时候会用到。
* Given that BL2 does not map BL1 regions, MMU needs * to be disabled in order to go back to BL1. */disable_mmu_icache_secure(); #endif /* AARCH32 */ /* * Run next BL image via an SMC to BL1. Information on how to pass ...
->psci_cpu_on()//lib/psci/psci_main.c->psci_validate_entry_point()//验证入口地址有效性并 保存入口点到一个结构ep中->psci_cpu_on_start(target_cpu,&ep)//ep入口地址->psci_plat_pm_ops->pwr_domain_on(target_cpu)->qemu_pwr_domain_on//实现核上电(平台实现)/* Store the re-entry info...
48 int err = psci_ops.cpu_on(cpu_logical_map(cpu), __pa_symbol(secondary_entry)); 49 if (err) 50 pr_err("failed to boot CPU%d (%d)\n", cpu, err); 51 52 return err; 53 } 启动从处理的时候最终调用到psci的cpu操作集的cpu_psci_cpu_boot函数,会调用上面的psci_cpu_on,最终调用smc...