[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:
@@ -149,6 +149,7 @@ kernel_main(args::header *header)
|
||||
}
|
||||
}
|
||||
|
||||
syscall_initialize();
|
||||
|
||||
device_manager &devices = device_manager::get();
|
||||
devices.parse_acpi(header->acpi_table);
|
||||
@@ -184,7 +185,6 @@ kernel_main(args::header *header)
|
||||
}
|
||||
*/
|
||||
|
||||
syscall_enable();
|
||||
scheduler *sched = new scheduler(devices.get_lapic());
|
||||
|
||||
// Skip program 0, which is the kernel itself
|
||||
|
||||
Reference in New Issue
Block a user