Home
last modified time | relevance | path

Searched refs:regs (Results 1 – 25 of 30) sorted by relevance

12

/DragonOS-0.1.5/kernel/src/exception/
Dtrap.c12 void do_divide_error(struct pt_regs *regs, unsigned long error_code) in do_divide_error() argument
16 regs->rsp, regs->rip, proc_current_cpu_id, current_pcb->pid); in do_divide_error()
17 traceback(regs); in do_divide_error()
23 void do_debug(struct pt_regs *regs, unsigned long error_code) in do_debug() argument
27 …tError Code:%#18lx,\tRSP:%#18lx,\tRIP:%#18lx\t CPU:%d, pid:%d\n", error_code, regs->rsp, regs->rip, in do_debug()
35 void do_nmi(struct pt_regs *regs, unsigned long error_code) in do_nmi() argument
40 …nmi(2),\tError Code:%#18lx,\tRSP:%#18lx,\tRIP:%#18lx\t CPU:%d\n", error_code, regs->rsp, regs->rip, in do_nmi()
48 void do_int3(struct pt_regs *regs, unsigned long error_code) in do_int3() argument
53 …nt3(3),\tError Code:%#18lx,\tRSP:%#18lx,\tRIP:%#18lx\t CPU:%d\n", error_code, regs->rsp, regs->rip, in do_int3()
61 void do_overflow(struct pt_regs *regs, unsigned long error_code) in do_overflow() argument
[all …]
Dirq.h24 extern void do_IRQ(struct pt_regs *regs, ul number);
133 void (*handler)(ul irq_num, ul parameter, struct pt_regs *regs);
157 …num, void *arg, void (*handler)(ul irq_num, ul parameter, struct pt_regs *regs), ul paramater, har…
/DragonOS-0.1.5/kernel/src/syscall/
Dsyscall.c16 extern uint64_t sys_clock(struct pt_regs *regs);
17 extern uint64_t sys_mstat(struct pt_regs *regs);
18 extern uint64_t sys_open(struct pt_regs *regs);
19 extern uint64_t sys_unlink_at(struct pt_regs *regs);
20 extern uint64_t sys_kill(struct pt_regs *regs);
21 extern uint64_t sys_sigaction(struct pt_regs *regs);
22 extern uint64_t sys_rt_sigreturn(struct pt_regs *regs);
23 extern uint64_t sys_getpid(struct pt_regs *regs);
24 extern uint64_t sys_sched(struct pt_regs *regs);
34 extern uint64_t sys_close(struct pt_regs *regs);
[all …]
Dsyscall.h13 typedef unsigned long (*system_call_t)(struct pt_regs *regs);
20 #define SYSCALL_FROM_USER(regs) (user_mode(regs)) argument
22 #define SYSCALL_FROM_KERNEL(regs) (!SYSCALL_FROM_USER(regs)) argument
44 ul system_call_not_exists(struct pt_regs *regs);
57 ul sys_printf(struct pt_regs *regs);
68 uint64_t sys_brk(struct pt_regs *regs);
76 uint64_t sys_sbrk(struct pt_regs *regs);
85 uint64_t sys_mkdir(struct pt_regs *regs);
94 uint64_t sys_pipe(struct pt_regs *regs);
96 ul sys_ahci_end_req(struct pt_regs *regs);
[all …]
/DragonOS-0.1.5/kernel/src/filesystem/vfs/
Dsyscall.rs28 pub extern "C" fn sys_open(regs: &pt_regs) -> u64 { in sys_open()
29 let path: &CStr = unsafe { CStr::from_ptr(regs.r8 as usize as *const c_char) }; in sys_open()
35 let flags = regs.r9; in sys_open()
50 pub extern "C" fn sys_close(regs: &pt_regs) -> u64 { in sys_close()
51 let fd = regs.r8 as i32; in sys_close()
67 pub extern "C" fn sys_read(regs: &pt_regs) -> u64 { in sys_read()
68 let fd = regs.r8 as i32; in sys_read()
69 let buf_vaddr = regs.r9 as usize; in sys_read()
70 let len = regs.r10 as usize; in sys_read()
73 if user_mode(regs) && unsafe { !verify_area(buf_vaddr as u64, len as u64) } { in sys_read()
[all …]
/DragonOS-0.1.5/kernel/src/debug/traceback/
Dtraceback.c34 void traceback(struct pt_regs *regs) in traceback() argument
37 if (verify_area(regs->rbp, 0)) in traceback()
39 …BLACK, "Kernel traceback: Fault in userland. pid=%ld, rbp=%#018lx\n", current_pcb->pid, regs->rbp); in traceback()
43 uint64_t *rbp = (uint64_t *)regs->rbp; in traceback()
50 uint64_t ret_addr = regs->rip; in traceback()
59 if((uint64_t)(rbp) >= current_pcb->thread->rbp || ((uint64_t)rbp<regs->rsp)) in traceback()
Dtraceback.h17 void traceback(struct pt_regs * regs);
/DragonOS-0.1.5/kernel/src/arch/x86_64/asm/
Dptrace.rs6 pub fn user_mode(regs: *const pt_regs) -> bool { in user_mode()
7 if (unsafe { (*regs).cs } & 0x3) != 0 { in user_mode()
/DragonOS-0.1.5/kernel/src/process/
Dprocess.c157 static int process_load_elf_file(struct pt_regs *regs, char *path) in process_load_elf_file() argument
226 regs->rip = ehdr.e_entry; in process_load_elf_file()
371 regs->rsp = current_pcb->mm->stack_start; in process_load_elf_file()
372 regs->rbp = current_pcb->mm->stack_start; in process_load_elf_file()
410 ul do_execve(struct pt_regs *regs, char *path, char *argv[], char *envp[]) in do_execve() argument
464 int tmp = process_load_elf_file(regs, path); in do_execve()
495 regs->rsp = regs->rbp = stack_start_addr; in do_execve()
498 regs->rdi = argc; in do_execve()
499 regs->rsi = (uint64_t)dst_argv; in do_execve()
503 regs->cs = USER_CS | 3; in do_execve()
[all …]
Dptrace.h39 static inline int user_mode(struct pt_regs *regs) in user_mode() argument
41 return !!(regs->cs & 3); in user_mode()
Dprocess.h88 unsigned long do_fork(struct pt_regs *regs, unsigned long clone_flags, unsigned long stack_start,
124 ul do_execve(struct pt_regs *regs, char *path, char *argv[], char *envp[]);
/DragonOS-0.1.5/kernel/src/mm/
Dmm-stat.c24 uint64_t sys_mm_stat(struct pt_regs *regs);
185 uint64_t sys_mstat(struct pt_regs *regs) in sys_mstat() argument
187 if (regs->r8 == NULL) in sys_mstat()
190 if (regs->cs == (USER_CS | 0x3)) in sys_mstat()
191 copy_to_user((void *)regs->r8, &stat, sizeof(struct mm_stat_t)); in sys_mstat()
193 memcpy((void *)regs->r8, &stat, sizeof(struct mm_stat_t)); in sys_mstat()
/DragonOS-0.1.5/kernel/src/ipc/
Dsignal.rs64 pub extern "C" fn sys_kill(regs: &pt_regs) -> u64 { in sys_kill()
65 let pid: pid_t = regs.r8 as pid_t; in sys_kill()
66 let sig: SignalNumber = SignalNumber::from(regs.r9 as i32); in sys_kill()
429 pub extern "C" fn do_signal(regs: &mut pt_regs) { in do_signal()
431 if current_pcb().sig_pending.signal == 0 || (!user_mode(regs)) { in do_signal()
442 let (sig_number, info, ka) = get_signal_to_deliver(regs.clone()); in do_signal()
452 let res = handle_signal(sig_number, ka.unwrap(), &info.unwrap(), &oldset, regs); in do_signal()
622 regs: &mut pt_regs, in handle_signal()
625 let retval = setup_frame(sig, ka, info, oldset, regs); in handle_signal()
640 regs: &mut pt_regs, in setup_frame()
[all …]
/DragonOS-0.1.5/docs/kernel/debug/
Dtraceback.md11 ### `void traceback(struct pt_regs * regs)`
19 ##### regs l4subsection
/DragonOS-0.1.5/kernel/src/arch/x86_64/
Dx86_64_ipi.h44 void (*handler)(uint64_t irq_num, uint64_t param, struct pt_regs *regs),
Dx86_64_ipi.c39 void (*handler)(uint64_t irq_num, uint64_t param, struct pt_regs *regs), in ipi_regiserIPI() argument
/DragonOS-0.1.5/kernel/src/smp/
Dipi.h38 void (*handler)(uint64_t irq_num, uint64_t param, struct pt_regs *regs),
Dsmp.c16 static void __smp_kick_cpu_handler(uint64_t irq_num, uint64_t param, struct pt_regs *regs);
218 static void __smp_kick_cpu_handler(uint64_t irq_num, uint64_t param, struct pt_regs *regs) in __smp_kick_cpu_handler() argument
220 if (user_mode(regs)) in __smp_kick_cpu_handler()
/DragonOS-0.1.5/kernel/src/driver/interrupt/8259A/
D8259A.c45 void do_IRQ(struct pt_regs *regs, ul number) in do_IRQ() argument
/DragonOS-0.1.5/kernel/src/driver/interrupt/apic/
Dapic_timer.c90 void apic_timer_handler(uint64_t number, uint64_t param, struct pt_regs *regs) in apic_timer_handler() argument
/DragonOS-0.1.5/kernel/src/driver/disk/
Data.c14 void ata_disk_handler(ul irq_num, ul param, struct pt_regs *regs) in ata_disk_handler() argument
/DragonOS-0.1.5/kernel/src/sched/
Dcore.rs175 pub extern "C" fn sys_sched(regs: &'static mut pt_regs) -> u64 { in sys_sched()
178 if user_mode(regs) { in sys_sched()
/DragonOS-0.1.5/kernel/src/driver/timers/HPET/
DHPET.c64 void HPET_handler(uint64_t number, uint64_t param, struct pt_regs *regs) in HPET_handler() argument
105 void HPET_measure_handler(uint64_t number, uint64_t param, struct pt_regs *regs) in HPET_measure_handler() argument
/DragonOS-0.1.5/kernel/src/time/
Dtimer.c126 uint64_t sys_clock(struct pt_regs *regs) in sys_clock() argument
/DragonOS-0.1.5/kernel/src/driver/keyboard/
Dps2_keyboard.c143 void ps2_keyboard_handler(ul irq_num, ul buf_vaddr, struct pt_regs *regs) in ps2_keyboard_handler() argument

12