mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-07-11 02:53:25 +00:00
支持syscall快速系统调用指令 (#417)
* 支持syscall快速系统调用指令 --------- Co-authored-by: LoGin <longjin@DragonOS.org>
This commit is contained in:
@ -10,8 +10,15 @@
|
||||
#include <process/preempt.h>
|
||||
#include <sched/sched.h>
|
||||
#include <driver/acpi/acpi.h>
|
||||
#include "exception/trap.h"
|
||||
#include "ipi.h"
|
||||
|
||||
/* x86-64 specific MSRs */
|
||||
#define MSR_EFER 0xc0000080 /* extended feature register */
|
||||
#define MSR_STAR 0xc0000081 /* legacy mode SYSCALL target */
|
||||
#define MSR_LSTAR 0xc0000082 /* long mode SYSCALL target */
|
||||
#define MSR_SYSCALL_MASK 0xc0000084 /* EFLAGS mask for syscall */
|
||||
|
||||
static void __smp_kick_cpu_handler(uint64_t irq_num, uint64_t param, struct pt_regs *regs);
|
||||
static void __smp__flush_tlb_ipi_handler(uint64_t irq_num, uint64_t param, struct pt_regs *regs);
|
||||
|
||||
@ -25,6 +32,7 @@ int num_cpu_started = 1;
|
||||
|
||||
extern void smp_ap_start();
|
||||
extern uint64_t rs_get_idle_stack_top(uint32_t cpu_id);
|
||||
extern void rs_init_syscall_64();
|
||||
|
||||
// 在head.S中定义的,APU启动时,要加载的页表
|
||||
// 由于内存管理模块初始化的时候,重置了页表,因此我们要把当前的页表传给APU
|
||||
@ -146,8 +154,11 @@ void smp_ap_start_stage2()
|
||||
io_mfence();
|
||||
spin_unlock_no_preempt(&multi_core_starting_lock);
|
||||
|
||||
rs_init_syscall_64();
|
||||
|
||||
apic_timer_ap_core_init();
|
||||
|
||||
|
||||
sti();
|
||||
sched();
|
||||
|
||||
|
Reference in New Issue
Block a user