Home
last modified time | relevance | path

Searched refs:uint64_t (Results 1 – 25 of 109) sorted by relevance

12345

/DragonOS-0.1.7/kernel/src/ktest/
Dtest-kfifo.c7 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.7/user/libs/libsystem/
Dsyscall.c4 …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()
Dsyscall.h66 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.7/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);
27 extern uint64_t sys_socket(struct pt_regs *regs);
[all …]
/DragonOS-0.1.7/kernel/src/process/
Dfork.c10 extern uint64_t rs_procfs_register_pid(uint64_t);
11 extern uint64_t rs_procfs_unregister_pid(uint64_t);
14 extern int process_copy_files(uint64_t clone_flags, struct process_control_block *pcb);
15 int process_copy_flags(uint64_t clone_flags, struct process_control_block *pcb);
16 int process_copy_mm(uint64_t clone_flags, struct process_control_block *pcb);
17 int process_copy_thread(uint64_t clone_flags, struct process_control_block *pcb, uint64_t stack_sta…
18 uint64_t stack_size, struct pt_regs *current_regs);
20 extern int process_copy_sighand(uint64_t clone_flags, struct process_control_block *pcb);
21 extern int process_copy_signal(uint64_t clone_flags, struct process_control_block *pcb);
172 int process_copy_flags(uint64_t clone_flags, struct process_control_block *pcb) in process_copy_flags()
[all …]
/DragonOS-0.1.7/user/libs/libc/src/include/export/sys/
Dstat.h10 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.7/kernel/src/arch/x86_64/include/asm/
Dasm.h37 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.7/kernel/src/mm/
Dmmap.c7 extern uint64_t mm_total_2M_pages;
27 static void mm_calculate_entry_num(uint64_t length, mm_pgt_entry_num_t *ent) in mm_calculate_entry_num()
48 uint64_t global_CR3 = (uint64_t)get_CR3(); in mm_map_phys_addr()
55 uint64_t global_CR3 = (uint64_t)get_CR3(); in mm_map_phys_addr_user()
79 uint64_t length_mapped = 0; in mm_map_proc_page_table()
87 uint64_t pml4e_id = ((virt_addr_start >> PAGE_GDT_SHIFT) & 0x1ff); in mm_map_proc_page_table()
88 uint64_t *pml4_ptr; in mm_map_proc_page_table()
110 uint64_t pdpte_id = (((virt_addr_start + length_mapped) >> PAGE_1G_SHIFT) & 0x1ff); in mm_map_proc_page_table()
111 uint64_t *pdpt_ptr = (uint64_t *)phys_2_virt(*pml4e_ptr & (~0xfffUL)); in mm_map_proc_page_table()
117 uint64_t *pdpte_ptr = (pdpt_ptr + pdpte_id); in mm_map_proc_page_table()
[all …]
Dmm-stat.c21 static uint64_t __count_kmalloc_free();
22 static uint64_t __count_kmalloc_using();
23 static uint64_t __count_kmalloc_total();
24 uint64_t sys_mm_stat(struct pt_regs *regs);
36 uint64_t attr = 0; in __count_empty_2m_pages()
62 uint64_t result = 0; in __count_empty_2m_pages()
80 uint64_t attr = 0; in __count_in_using_2m_pages()
106 uint64_t result = 0; in __count_in_using_2m_pages()
119 static uint64_t __count_kmalloc_free() in __count_kmalloc_free()
121 uint64_t result = 0; in __count_kmalloc_free()
[all …]
Dmm.h166 uint64_t total; // 计算机的总内存数量大小
167 uint64_t used; // 已使用的内存大小
168 uint64_t free; // 空闲物理页所占的内存大小
169 uint64_t shared; // 共享的内存大小
170 uint64_t cache_used; // 位于slab缓冲区中的已使用的内存大小
171 uint64_t cache_free; // 位于slab缓冲区中的空闲的内存大小
172 uint64_t available; // 系统总空闲内存大小(包括kmalloc缓冲区)
381 struct vm_area_struct *vma_find(struct mm_struct *mm, uint64_t addr);
442 #define mm_unmap_addr(virt_addr, length) ({ mm_unmap_proc_table((uint64_t)get_CR3(), true, virt_add…
455 int mm_create_vma(struct mm_struct *mm, uint64_t vaddr, uint64_t length, vm_flags_t vm_flags,
[all …]
Dmm-types.h9 typedef uint64_t vm_flags_t;
66 uint64_t start_brk; // 堆地址的起始位置
123 uint64_t vm_start; // 区域的起始地址
124 uint64_t vm_end; // 区域的结束地址
147 uint64_t code_addr_start, code_addr_end;
149 uint64_t data_addr_start, data_addr_end;
151 uint64_t rodata_addr_start, rodata_addr_end;
153 uint64_t bss_start, bss_end;
155 uint64_t brk_start, brk_end;
157 uint64_t stack_start;
/DragonOS-0.1.7/kernel/src/common/
Dglib.h201 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 …]
Dblk_types.h30 …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号
/DragonOS-0.1.7/user/libs/libc/src/
Dunistd.c30 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()
95 uint64_t brk(uint64_t end_brk) in brk()
97 uint64_t x = (uint64_t)syscall_invoke(SYS_BRK, (uint64_t)end_brk, 0, 0, 0, 0, 0, 0, 0); in brk()
113 void *retval = (void *)syscall_invoke(SYS_SBRK, (uint64_t)increment, 0, 0, 0, 0, 0, 0, 0); in sbrk()
138 return syscall_invoke(SYS_CHDIR, (uint64_t)dest_path, 0, 0, 0, 0, 0, 0, 0); in chdir()
156 int retval = syscall_invoke(SYS_EXECVE, (uint64_t)path, (uint64_t)argv, 0, 0, 0, 0, 0, 0); in execv()
171 return syscall_invoke(SYS_UNLINK_AT, 0, (uint64_t)path, AT_REMOVEDIR, 0, 0, 0, 0, 0); in rmdir()
182 return syscall_invoke(SYS_UNLINK_AT, 0, (uint64_t)path, 0, 0, 0, 0, 0, 0); in rm()
Dmalloc.c32 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()
182 if (((uint64_t)(ptr->prev) + ptr->prev->length == (uint64_t)ptr)) in malloc_merge_free_chunk()
219 if ((uint64_t)ptr < (uint64_t)ck) in malloc_insert_free_list()
229 else if ((uint64_t)(ptr->next) > (uint64_t)ck) in malloc_insert_free_list()
[all …]
/DragonOS-0.1.7/kernel/src/debug/traceback/
Dtraceback.c5 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.7/kernel/src/driver/interrupt/apic/
Dapic_timer.c9 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.7/kernel/src/common/math/
Dlibm.h12 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.7/user/libs/libc/src/include/export/
Dlibm.h16 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.7/kernel/src/driver/timers/HPET/
DHPET.c18 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.7/kernel/src/debug/
Dkallsyms.c29 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.7/kernel/src/common/sys/
Dtypes.h22 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.7/docs/kernel/ktest/
Dktest-framework.md25 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.7/kernel/src/arch/x86_64/
Dx86_64_ipi.h43 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.7/kernel/src/smp/
Dipi.h37 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);

12345