文章目录
3. sbi_init()函数
- 函数位置:lib/sbi/sbi_init.c
- 函数参数:scratch为每个hartid的私有的struct sbi_scratch结构体
- 函数作用:
- 获取hardid并从scratch结构中得到platform
- 确定next_mode是否有效
- 调用init_coldboot或init_warmboot,这里我们debug,肯定要从init_coldboot函数入手
- 函数源码:
void __noreturn sbi_init(struct sbi_scratch *scratch)
{
bool next_mode_supported = FALSE;
bool coldboot = FALSE;