I have been trying to move my Rust kernel from identity mapping to instead map the kernel at 0xffffffff80000000. There have been a bunch of problems with this, all of which I've fixed except a weird page fault when trying to create the IDT. I'm using spin::Once to create the IDT which is just a `[IdtEntry; 256]` primitive like so:
Code: Select all
static IDT : Once<Idt> = Once::new();
pub fn init()
{
...
IDT.call_once(
|| {
let mut idt = Idt::new();
idt
});
...
}
Code: Select all
check_exception old: 0xffffffff new 0xe
0: v=0e e=0002 i=0 cpl=0 IP=0008:ffffffff801119fe pc=ffffffff801119fe SP=0010:ffffffff80120db0 CR2=ffffffff80120dd0
I suspect I'm just being dim, but I don't know where to proceed from here?