smp: enable smp
This is a very large patch. Don't feel like splitting it up. Deal with it, :P Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
33d6f72cfe
commit
e5b97c2576
19 changed files with 129 additions and 52 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#include <kernel/common.h>
|
||||
#include <lib/stdio.h>
|
||||
#include <arch/proc.h>
|
||||
#include "arch/reg.h"
|
||||
|
||||
static const char *exception_names[] = {
|
||||
|
|
@ -37,11 +38,11 @@ static const char *exception_names[] = {
|
|||
"Triple Fault",
|
||||
};
|
||||
|
||||
void exception_handler(u64 no, u64 err)
|
||||
void exception_handler(u64 no, u64 err, u64 rip)
|
||||
{
|
||||
if (no == 0x0e) {
|
||||
panic("(Page fault) addr: 0x%16x err: %x\n", cr2_read(), err);
|
||||
panic("(Page fault) cpu%d ip:0x%016lx addr:0x%016lx err:%x\n", cpu_id(), rip, cr2_read(), err);
|
||||
}
|
||||
|
||||
panic("(Exception) %s(%02xh) err: %x\n", exception_names[no], no, err);
|
||||
panic("(Exception) cpu%d ip:0x%016lx %s(%02xh) err: %x\n", cpu_id(), rip, exception_names[no], no, err);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue