Add stack frame to panic
This commit is contained in:
parent
b337e5193b
commit
cfcb806ebf
16 changed files with 169 additions and 103 deletions
|
|
@ -65,6 +65,8 @@ void ap_init(struct limine_smp_info *smp_info){
|
|||
memset(cpu_struct, 0, sizeof(cpu_state));
|
||||
cpu_struct->lapic_id = smp_info->lapic_id;
|
||||
|
||||
cpu_struct->scheduler_context = (context*)kmalloc(sizeof(context));
|
||||
|
||||
wrmsr(KERNELGSBASE, (uint64_t)cpu_struct);
|
||||
wrmsr(GSBASE, (uint64_t)cpu_struct);
|
||||
|
||||
|
|
@ -100,6 +102,8 @@ void smp_init(){
|
|||
cpu_state *cpu_struct = (cpu_state*)kmalloc(sizeof(cpu_state));
|
||||
cpu_struct->lapic_id = smp_response->cpus[0]->lapic_id;
|
||||
|
||||
cpu_struct->scheduler_context = (context*)kmalloc(sizeof(context));
|
||||
|
||||
wrmsr(KERNELGSBASE, (uint64_t)cpu_struct);
|
||||
wrmsr(GSBASE, (uint64_t)cpu_struct);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue