mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
bug: AP处理器发生异常时无法正确处理
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
#include "glib.h"
|
||||
|
||||
#define CPU_NUM 8
|
||||
#define MAX_CPU_NUM 32 // 操作系统支持的最大处理器数量
|
||||
|
||||
// cpu支持的最大cpuid指令的基础主功能号
|
||||
uint Cpu_cpuid_max_Basic_mop;
|
||||
@ -53,3 +53,9 @@ void cpu_cpuid(uint mop, uint sop, uint *eax, uint*ebx, uint*ecx, uint*edx)
|
||||
*
|
||||
*/
|
||||
void cpu_init(void);
|
||||
|
||||
struct cpu_core_info
|
||||
{
|
||||
uint64_t stack_start; // 栈基地址
|
||||
uint64_t tss_vaddr; // tss地址
|
||||
}cpu_core_info[MAX_CPU_NUM];
|
@ -16,6 +16,7 @@
|
||||
#define cli() __asm__ __volatile__("cli\n\t" :: \
|
||||
: "memory") //关闭外部中断
|
||||
#define nop() __asm__ __volatile__("nop\n\t")
|
||||
#define hlt() __asm__ __volatile__("hlt\n\t")
|
||||
|
||||
//内存屏障
|
||||
#define io_mfence() __asm__ __volatile__("mfence\n\t" :: \
|
||||
|
Reference in New Issue
Block a user