/DragonOS-0.1.8/kernel/src/ktest/ |
D | test-kfifo.c | 7 static long ktest_kfifo_case0_1(uint64_t arg0, uint64_t arg1) in ktest_kfifo_case0_1() 33 uint64_t tmp = i; in ktest_kfifo_case0_1() 34 assert(kfifo_in(&fifo, &tmp, sizeof(uint64_t)) == sizeof(uint64_t)); in ktest_kfifo_case0_1() 36 assert(fifo.in_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1() 38 assert(fifo.size == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1() 44 uint64_t tmp = 0; in ktest_kfifo_case0_1() 45 assert(kfifo_out(&fifo, &tmp, sizeof(uint64_t)) == sizeof(uint64_t)); in ktest_kfifo_case0_1() 47 assert(fifo.size == (10 - i) * sizeof(uint64_t)); in ktest_kfifo_case0_1() 48 assert(fifo.in_offset == 10 * sizeof(uint64_t)); in ktest_kfifo_case0_1() 49 assert(fifo.out_offset == i * sizeof(uint64_t)); in ktest_kfifo_case0_1() [all …]
|
/DragonOS-0.1.8/user/libs/libsystem/ |
D | syscall.c | 4 …l_invoke(uint64_t syscall_id, uint64_t arg0, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t… in syscall_invoke() 6 uint64_t __err_code; in syscall_invoke()
|
D | syscall.h | 66 long syscall_invoke(uint64_t syscall_id, uint64_t arg0, uint64_t arg1, uint64_t arg2, uint64_t arg3… 67 uint64_t arg5, uint64_t arg6, uint64_t arg7);
|
/DragonOS-0.1.8/kernel/src/process/ |
D | fork.c | 10 extern uint64_t rs_procfs_register_pid(uint64_t); 11 extern uint64_t rs_procfs_unregister_pid(uint64_t); 13 extern uint64_t rs_process_copy_mm(bool clone_vm, struct process_control_block *new_pcb); 15 extern int process_copy_files(uint64_t clone_flags, struct process_control_block *pcb); 16 int process_copy_flags(uint64_t clone_flags, struct process_control_block *pcb); 17 int process_copy_mm(uint64_t clone_flags, struct process_control_block *pcb); 18 int process_copy_thread(uint64_t clone_flags, struct process_control_block *pcb, uint64_t stack_sta… 19 uint64_t stack_size, struct pt_regs *current_regs); 21 extern int process_copy_sighand(uint64_t clone_flags, struct process_control_block *pcb); 22 extern int process_copy_signal(uint64_t clone_flags, struct process_control_block *pcb); [all …]
|
/DragonOS-0.1.8/user/libs/libc/src/include/export/sys/ |
D | stat.h | 10 uint64_t total; // 计算机的总内存数量大小 11 uint64_t used; // 已使用的内存大小 12 uint64_t free; // 空闲物理页所占的内存大小 13 uint64_t shared; // 共享的内存大小 14 uint64_t cache_used; // 位于slab缓冲区中的已使用的内存大小 15 uint64_t cache_free; // 位于slab缓冲区中的空闲的内存大小 16 uint64_t available; // 系统总空闲内存大小(包括kmalloc缓冲区)
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/include/asm/ |
D | asm.h | 37 uint64_t tmp1 = 0, tmp2 = 0; \ 50 uint64_t *tmp; in get_rsp() 64 uint64_t *tmp; in get_rbp() 78 uint64_t *tmp; in get_ds() 92 uint64_t *tmp; in get_rax() 105 uint64_t *tmp; in get_rbx() 119 void wrmsr(uint64_t address, uint64_t value) in wrmsr() 131 uint64_t rdmsr(uint64_t address) in rdmsr() 138 return ((uint64_t)tmp0 << 32) | tmp1; in rdmsr() 141 uint64_t get_rflags() in get_rflags()
|
/DragonOS-0.1.8/kernel/src/common/ |
D | glib.h | 201 bool verify_area(uint64_t addr_start, uint64_t length) in verify_area() 217 static inline uint64_t copy_from_user(void *dst, void *src, uint64_t size) in copy_from_user() 219 uint64_t tmp0, tmp1; in copy_from_user() 220 if (!verify_area((uint64_t)src, size)) in copy_from_user() 246 static inline uint64_t copy_to_user(void *dst, void *src, uint64_t size) in copy_to_user() 248 uint64_t tmp0, tmp1; in copy_to_user() 249 if (verify_area((uint64_t)src, size)) in copy_to_user() 275 void __experimental_beep(uint64_t times); 284 static __always_inline void __write8b(uint64_t vaddr, uint64_t value) in __write8b() 298 static __always_inline void __write4b(uint64_t vaddr, uint32_t value) in __write4b() [all …]
|
D | blk_types.h | 30 …long (*transfer)(struct blk_gendisk *gd, long cmd, uint64_t base_addr, uint64_t count, uint64_t bu… 40 uint64_t LBA_start; 42 uint64_t buffer_vaddr; 64 uint64_t bd_start_LBA; // 起始LBA号
|
D | cpu.h | 33 extern uint64_t Cpu_tsc_freq; 57 uint64_t stack_start; // 栈基地址 58 uint64_t ist_stack_start; // IST栈基地址 59 uint64_t tss_vaddr; // tss地址 76 uint64_t cpu_get_tsc_freq();
|
/DragonOS-0.1.8/user/libs/libc/src/ |
D | unistd.c | 30 return (ssize_t)syscall_invoke(SYS_READ, fd, (uint64_t)buf, count, 0, 0, 0, 0, 0); in read() 43 return (ssize_t)syscall_invoke(SYS_WRITE, fd, (uint64_t)buf, count, 0, 0, 0, 0, 0); in write() 96 uint64_t brk(uint64_t end_brk) in brk() 98 uint64_t x = (uint64_t)syscall_invoke(SYS_BRK, (uint64_t)end_brk, 0, 0, 0, 0, 0, 0, 0); in brk() 115 void *retval = (void *)syscall_invoke(SYS_SBRK, (uint64_t)increment, 0, 0, 0, 0, 0, 0, 0); in sbrk() 140 return syscall_invoke(SYS_CHDIR, (uint64_t)dest_path, 0, 0, 0, 0, 0, 0, 0); in chdir() 158 int retval = syscall_invoke(SYS_EXECVE, (uint64_t)path, (uint64_t)argv, 0, 0, 0, 0, 0, 0); in execv() 173 return syscall_invoke(SYS_UNLINK_AT, 0, (uint64_t)path, AT_REMOVEDIR, 0, 0, 0, 0, 0); in rmdir() 184 return syscall_invoke(SYS_UNLINK_AT, 0, (uint64_t)path, 0, 0, 0, 0, 0, 0); in rm()
|
D | malloc.c | 32 uint64_t length; // 整个块所占用的内存区域的大小 37 static uint64_t brk_base_addr = 0; // 堆区域的内存基地址 38 static uint64_t brk_max_addr = 0; // 堆区域的内存最大地址 39 static uint64_t brk_managed_addr = 0; // 堆区域已经被管理的地址 46 static uint64_t count_last_free_size = 0; // 统计距离上一次回收内存,已经free了多少内存 67 static malloc_mem_chunk_t *malloc_query_free_chunk_bf(uint64_t size) in malloc_query_free_chunk_bf() 107 static malloc_mem_chunk_t *malloc_query_free_chunk_ff(uint64_t size) in malloc_query_free_chunk_ff() 183 if (((uint64_t)(ptr->prev) + ptr->prev->length == (uint64_t)ptr)) in malloc_merge_free_chunk() 220 if ((uint64_t)ptr < (uint64_t)ck) in malloc_insert_free_list() 230 else if ((uint64_t)(ptr->next) > (uint64_t)ck) in malloc_insert_free_list() [all …]
|
/DragonOS-0.1.8/kernel/src/debug/traceback/ |
D | traceback.c | 5 static int lookup_kallsyms(uint64_t addr, int level) in lookup_kallsyms() 12 uint64_t index = 0; in lookup_kallsyms() 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() 67 rbp = (uint64_t *)(*rbp); in traceback()
|
/DragonOS-0.1.8/kernel/src/driver/interrupt/apic/ |
D | apic_timer.c | 9 uint64_t apic_timer_ticks_result = 0; 28 void apic_timer_enable(uint64_t irq_num) in apic_timer_enable() 32 uint64_t val = apic_timer_get_LVT(); in apic_timer_enable() 40 void apic_timer_disable(uint64_t irq_num) in apic_timer_disable() 52 uint64_t apic_timer_install(ul irq_num, void *arg) in apic_timer_install() 62 apic_timer_set_init_cnt(*(uint64_t *)arg); in apic_timer_install() 90 void apic_timer_handler(uint64_t number, uint64_t param, struct pt_regs *regs) in apic_timer_handler()
|
/DragonOS-0.1.8/user/libs/libc/src/include/export/ |
D | libm.h | 16 uint64_t m; 26 uint64_t lo; 33 uint64_t lo; 34 uint64_t hi; 46 uint64_t lo; 50 uint64_t hi; 51 uint64_t lo;
|
/DragonOS-0.1.8/kernel/src/common/math/ |
D | libm.h | 12 uint64_t m; 22 uint64_t lo; 29 uint64_t lo; 30 uint64_t hi; 42 uint64_t lo; 46 uint64_t hi; 47 uint64_t lo;
|
/DragonOS-0.1.8/kernel/src/driver/timers/HPET/ |
D | HPET.c | 18 static uint64_t HPET_REG_BASE = 0; 20 static uint64_t HPET_freq = 0; // 主计时器频率 25 static uint64_t test_tsc_start = 0; 26 static uint64_t test_tsc_end = 0; 27 extern uint64_t Cpu_tsc_freq; // 导出自cpu.c 64 void HPET_handler(uint64_t number, uint64_t param, struct pt_regs *regs) in HPET_handler() 105 void HPET_measure_handler(uint64_t number, uint64_t param, struct pt_regs *regs) in HPET_measure_handler() 122 const uint64_t interval = APIC_TIMER_INTERVAL; // 测量给定时间内的计数 in HPET_measure_freq() 129 uint64_t clks_to_intr = 0.001 * interval * HPET_freq; in HPET_measure_freq() 170 *(uint64_t *)(HPET_REG_BASE + GEN_CONF) = 0; // 停用HPET定时器 in HPET_measure_freq() [all …]
|
/DragonOS-0.1.8/kernel/src/debug/ |
D | kallsyms.c | 29 uint64_t vaddr; 37 uint64_t table_size = 0; 39 uint64_t entry_count = 0; 41 uint64_t text_vaddr, etext_vaddr; 97 for (uint64_t i = 0; i < entry_count; ++i) in read_map() 118 uint64_t last_vaddr = 0; in generate_result() 119 uint64_t total_syms_to_write = 0; // 真正输出的符号的数量 in generate_result() 122 for (uint64_t i = 0; i < entry_count; ++i) in generate_result() 152 uint64_t position = 0; in generate_result() 154 for (uint64_t i = 0; i < entry_count; ++i) in generate_result() [all …]
|
/DragonOS-0.1.8/kernel/src/common/sys/ |
D | types.h | 22 typedef uint64_t ino_t; 36 typedef uint64_t fsblkcnt_t; 37 typedef uint64_t fsfilcnt_t; 39 typedef uint64_t sector_t; 78 typedef uint64_t pthread_rwlock_t; 89 typedef uint64_t gfp_t; 93 #define __aligned_u64 uint64_t __attribute__((aligned(8)))
|
/DragonOS-0.1.8/docs/kernel/ktest/ |
D | ktest-framework.md | 25 uint64_t ktest_test_kfifo(uint64_t arg) 44 static long ktest_kfifo_case0_1(uint64_t arg0, uint64_t arg1) 68 `pid_t ktest_start(uint64_t (*func)(uint64_t arg), uint64_t arg)` 111 `typedef long (*ktest_case_table)(uint64_t arg0, uint64_t arg1)`
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/ |
D | x86_64_ipi.h | 43 int ipi_regiserIPI(uint64_t irq_num, void *arg, 44 void (*handler)(uint64_t irq_num, uint64_t param, struct pt_regs *regs), 45 uint64_t param, hardware_intr_controller *controller, char *irq_name);
|
/DragonOS-0.1.8/kernel/src/smp/ |
D | ipi.h | 37 extern int ipi_regiserIPI(uint64_t irq_num, void *arg, 38 void (*handler)(uint64_t irq_num, uint64_t param, struct pt_regs *regs), 39 uint64_t param, hardware_intr_controller *controller, char *irq_name);
|
/DragonOS-0.1.8/kernel/src/mm/ |
D | mmio.h | 4 extern void mmio_create(uint32_t size, uint64_t vm_flagsu, uint64_t* res_vaddr, uint64_t* res_lengt…
|
D | mm.h | 8 extern void rs_pseudo_map_phys(uint64_t virt_addr, uint64_t phys_addr, uint64_t size); 9 extern void rs_map_phys(uint64_t virt_addr, uint64_t phys_addr, uint64_t size, uint64_t flags); 10 extern uint64_t rs_unmap_at_low_addr();
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/asm/ |
D | cmpxchg.c | 3 bool __try_cmpxchg_q(uint64_t *ptr, uint64_t *old_ptr, uint64_t *new_ptr) in __try_cmpxchg_q()
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | crc64.c | 6 uint64_t const crc64_table[256] = { 50 uint64_t crc64(uint64_t crc, uint8_t const *buffer, size_t len) in crc64()
|