[kernel] Update syscall MSRs for all CPUs
Since SYSCALL/SYSRET rely on MSRs to control their function, split out syscall_enable() into syscall_initialize() and syscall_enable(), the latter being called on all CPUs. This affects not just syscalls but also the kernel_to_user_trampoline. Additionally, do away with the max syscalls, and just make a single page of syscall pointers and name pointers. Max syscalls was fragile and needed to be kept in sync in multiple places.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "log.h"
|
||||
#include "msr.h"
|
||||
#include "objects/vm_area.h"
|
||||
#include "syscall.h"
|
||||
#include "tss.h"
|
||||
|
||||
cpu_data g_bsp_cpu_data;
|
||||
@@ -98,6 +99,8 @@ init_cpu(bool bsp)
|
||||
|
||||
tss->ist_stack(ist) = stack_top;
|
||||
}
|
||||
// Set up the syscall MSRs
|
||||
syscall_enable();
|
||||
|
||||
// Set up the page attributes table
|
||||
uint64_t pat = rdmsr(msr::ia32_pat);
|
||||
|
||||
Reference in New Issue
Block a user