cpu_ops接口
驅(qū)動(dòng)初始化完成后,cpu的cpu_ops就可以調(diào)用這些回調(diào)實(shí)現(xiàn)psci功能的調(diào)用。如下所示,當(dāng)devicetree中cpu的enable-method設(shè)置為psci時(shí),該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
}
如啟動(dòng)cpu的接口為cpu_psci_cpu_boot,它會(huì)通過以下流程最終調(diào)用psci驅(qū)動(dòng)中的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文章
1416瀏覽量
41402 -
cpu
+關(guān)注
關(guān)注
68文章
11075瀏覽量
216958 -
驅(qū)動(dòng)
+關(guān)注
關(guān)注
12文章
1916瀏覽量
86884 -
SMP
+關(guān)注
關(guān)注
0文章
78瀏覽量
20275
發(fā)布評(píng)論請(qǐng)先 登錄
ARM電源管理中的PSCI是什么意思呢
請(qǐng)教大神qemu模擬cortex-A53運(yùn)行rt-thread出錯(cuò)怎么解決呢?
OPS常見問題的故障定位思路
CPU 拓?fù)?b class='flag-5'>中的SMP架構(gòu)
基于ARM架構(gòu)的PSCI接口規(guī)范
如何在內(nèi)核中啟動(dòng)secondary cpu

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

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

SMP多核secondary cpu啟動(dòng)流程

評(píng)論