cpu_ops接口
驅(qū)動初始化完成后,cpu的cpu_ops就可以調(diào)用這些回調(diào)實現(xiàn)psci功能的調(diào)用。如下所示,當devicetree中cpu的enable-method設(shè)置為psci時,該cpu的cpu_ops將指向cpu_psci_ops。
cpu0: cpu@0 {
...
enable-method = "psci";
…
}
其中cpu_psci_ops的定義如下:
const struct cpu_operations cpu_psci_ops = {
.name = "psci",
.cpu_init = cpu_psci_cpu_init,
.cpu_prepare = cpu_psci_cpu_prepare,
.cpu_boot = cpu_psci_cpu_boot,
#ifdef CONFIG_HOTPLUG_CPU
.cpu_can_disable = cpu_psci_cpu_can_disable,
.cpu_disable = cpu_psci_cpu_disable,
.cpu_die = cpu_psci_cpu_die,
.cpu_kill = cpu_psci_cpu_kill,
#endif
}
如啟動cpu的接口為cpu_psci_cpu_boot,它會通過以下流程最終調(diào)用psci驅(qū)動中的psci_ops函數(shù):
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;
}
-
內(nèi)核
+關(guān)注
關(guān)注
3文章
1410瀏覽量
41100 -
cpu
+關(guān)注
關(guān)注
68文章
11036瀏覽量
216005 -
驅(qū)動
+關(guān)注
關(guān)注
12文章
1900瀏覽量
86529 -
SMP
+關(guān)注
關(guān)注
0文章
78瀏覽量
20168
發(fā)布評論請先 登錄
ARM電源管理中的PSCI是什么意思呢
請教大神qemu模擬cortex-A53運行rt-thread出錯怎么解決呢?
OPS常見問題的故障定位思路
CPU 拓撲中的SMP架構(gòu)
基于ARM架構(gòu)的PSCI接口規(guī)范
如何在內(nèi)核中啟動secondary cpu

SMP多核啟動cpu操作函數(shù)

psci電源管理接口可以用于什么場景
psci接口規(guī)范介紹
bl31中的psci架構(gòu)介紹

SMP多核secondary cpu啟動流程

評論