amd64: add syscall entry mechanism
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
a73fc47664
commit
d7477ae860
8 changed files with 103 additions and 87 deletions
|
|
@ -42,8 +42,13 @@ void arch_early_init()
|
|||
|
||||
void arch_init()
|
||||
{
|
||||
void _syscall_enter();
|
||||
|
||||
gdt_init();
|
||||
idt_init();
|
||||
wrmsr(IA32_STAR, ((u64)GDT_SEGMENT_CODE_RING0 << 48) | ((u64)GDT_SEGMENT_CODE_RING3 << 32));
|
||||
wrmsr(IA32_LSTAR, (u64)_syscall_enter);
|
||||
wrmsr(IA32_FMASK, RFLAGS_IF);
|
||||
}
|
||||
|
||||
void arch_ap_startup()
|
||||
|
|
|
|||
Loading…
Reference in a new issue