bugfix: 解决了ignore_int在运行时可能破坏进程执行上下文的问题。 (#61)

This commit is contained in:
login
2022-10-16 19:38:46 +08:00
committed by GitHub
parent fbe1e23e97
commit bf8f61b500
6 changed files with 76 additions and 96 deletions

View File

@ -344,7 +344,7 @@ void apic_local_apic_init()
* @brief 初始化apic控制器
*
*/
void apic_init()
int apic_init()
{
// 初始化中断门, 中断使用rsp0防止在软中断时发生嵌套然后处理器重新加载导致数据被抹掉
for (int i = 32; i <= 55; ++i)
@ -386,6 +386,7 @@ void apic_init()
kwarn("Cannot get RCBA address. RCBA_phys=%#010lx", RCBA_phys);
}
sti();
return 0;
}
/**
* @brief 中断服务程序

View File

@ -290,7 +290,7 @@ void apic_init_ap_core_local_apic();
* @brief 初始化apic控制器
*
*/
void apic_init();
int apic_init();
/**
* @brief 读取指定类型的 Interrupt Control Structure