Close interrupt during trapframe construction.

This commit is contained in:
TXuian
2024-04-28 18:34:45 +08:00
parent e5df6012af
commit 695dd91201
10 changed files with 22 additions and 8 deletions

View File

@@ -53,6 +53,7 @@ void dabort_handler(struct trapframe* r)
{
if (r->pc >= DEV_VRTMEM_BASE && is_spinlock_hold_by_current_cpu(&whole_kernel_lock)) {
assert(is_spinlock_hold_by_current_cpu(&whole_kernel_lock));
ERROR("dabort in kernel, current task: %s\n", cur_cpu()->task == NULL ? "NULL" : cur_cpu()->task->name);
dabort_reason(r);
panic("data abort exception\n");
}
@@ -72,6 +73,7 @@ void iabort_handler(struct trapframe* r)
{
if (r->pc >= DEV_VRTMEM_BASE && is_spinlock_hold_by_current_cpu(&whole_kernel_lock)) {
assert(is_spinlock_hold_by_current_cpu(&whole_kernel_lock));
ERROR("iabort in kernel, current task: %s\n", cur_cpu()->task == NULL ? "NULL" : cur_cpu()->task->name);
iabort_reason(r);
panic("kernel prefetch abort exception\n");
}

View File

@@ -114,5 +114,4 @@ bool xizi_try_enter_kernel()
void xizi_leave_kernel()
{
spinlock_unlock(&whole_kernel_lock);
p_intr_driver->cpu_irq_enable();
}
}