Support armv8 smp

This commit is contained in:
TXuian
2024-05-28 15:11:38 +08:00
parent 6114b4618f
commit bd7966c5a3
9 changed files with 26 additions and 76 deletions
@@ -26,9 +26,9 @@ Author: AIIT XUOS Lab
Modification:
1. first version
*************************************************/
#include <assert.h>
#include <stdio.h>
#include <stdint.h>
#include "assert.h"
#include "core.h"
#include "exception_registers.h"
#include "multicores.h"
@@ -50,7 +50,7 @@ void kernel_abort_handler(struct trapframe* tf)
case 0b100001:
iabort_handler(tf);
break;
default:
default: {
uint64_t ec = (esr >> 26) & 0x3f;
uint64_t iss = esr & 0x1ffffff;
ERROR("esr: %016lx %016lx %016lx\n", esr, ec, iss);
@@ -58,6 +58,7 @@ void kernel_abort_handler(struct trapframe* tf)
ERROR("Current Task: %s.\n", cur_cpu()->task->name);
panic("Unimplemented Error Occured.\n");
}
}
panic("Return from abort handler.\n");
}
@@ -85,9 +86,9 @@ void syscall_arch_handler(struct trapframe* tf)
case 0b100001:
iabort_handler(tf);
break;
default:
printf("USYSCALL: unexpected ec: %016lx", esr);
printf(" elr = %016lx far = %016lx\n", r_elr_el1(), r_far_el1());
default: {
ERROR("USYSCALL: unexpected ec: %016lx", esr);
ERROR(" elr = %016lx far = %016lx\n", r_elr_el1(), r_far_el1());
// kill error task
xizi_enter_kernel();
assert(cur_cpu()->task != NULL);
@@ -95,4 +96,5 @@ void syscall_arch_handler(struct trapframe* tf)
context_switch(&cur_cpu()->task->thread_context.context, cur_cpu()->scheduler);
panic("dabort end should never be reashed.\n");
}
}
}