/DragonOS-0.1.8/kernel/src/process/ |
D | proc-types.h | 47 ul rbp; // in tss rsp0 49 ul rip; 51 ul rsp; 53 ul fs, gs; 55 ul cr2; 57 ul trap_num; 59 ul err_code; 146 ul stack[STACK_SIZE / sizeof(ul)]; 152 ul rsp0; 153 ul rsp1; [all …]
|
D | process.h | 36 ….reserved0 = 0, .rsp0 = (ul)(initial_proc_union.stack + STACK_SIZE / sizeof(ul)), … 37 ….rsp1 = (ul)(initial_proc_union.stack + STACK_SIZE / sizeof(ul)), … 38 ….rsp2 = (ul)(initial_proc_union.stack + STACK_SIZE / sizeof(ul)), .reserved1 = 0, .ist1 = 0xffff80… 129 ul process_do_exit(ul code); 170 extern ul _stack_start;
|
D | process.c | 40 ul _stack_start; // initial proc的栈基地址(虚拟地址) 65 .rbp = (ul)(initial_proc_union.stack + STACK_SIZE / sizeof(ul)), 66 .rsp = (ul)(initial_proc_union.stack + STACK_SIZE / sizeof(ul)), 176 ul initial_kernel_thread(ul arg) in initial_kernel_thread() 205 current_pcb->thread->rip = (ul)ret_from_intr; in initial_kernel_thread() 206 current_pcb->thread->rsp = (ul)current_pcb + STACK_SIZE - sizeof(struct pt_regs); in initial_kernel_thread() 246 ul process_do_exit(ul code) in process_do_exit() 284 regs.rbx = (ul)fn; in kernel_thread() 286 regs.rdx = (ul)arg; in kernel_thread() 301 regs.rip = (ul)kernel_thread_func; in kernel_thread()
|
/DragonOS-0.1.8/kernel/src/exception/ |
D | irq.h | 24 extern void do_IRQ(struct pt_regs *regs, ul number); 112 void (*enable)(ul irq_num); 114 void (*disable)(ul irq_num); 117 ul (*install)(ul irq_num, void *arg); 119 void (*uninstall)(ul irq_num); 121 void (*ack)(ul irq_num); 131 ul parameter; 133 void (*handler)(ul irq_num, ul parameter, struct pt_regs *regs); 136 ul flags; 157 int irq_register(ul irq_num, void *arg, void (*handler)(ul irq_num, ul parameter, struct pt_regs *r… [all …]
|
D | gate.h | 53 void set_gate(ul *gate_selector_addr, ul attr, unsigned char ist, ul *code_addr) in set_gate() 55 ul __d0 = 0, __d1 = 0; in set_gate() 56 ul tmp_code_addr = *code_addr; in set_gate() 59 __d0 |= ((ul)(ist) << 32); // 设置ist in set_gate()
|
D | irq.c | 188 int irq_register(ul irq_num, void *arg, void (*handler)(ul irq_num, ul parameter, struct pt_regs *r… in irq_register() 229 int irq_unregister(ul irq_num) in irq_unregister()
|
/DragonOS-0.1.8/kernel/src/syscall/ |
D | syscall.h | 20 long enter_syscall_int(ul syscall_id, ul arg0, ul arg1, ul arg2, ul arg3, ul arg4, ul arg5, ul arg6…
|
D | syscall.c | 38 long enter_syscall_int(ul syscall_id, ul arg0, ul arg1, ul arg2, ul arg3, ul arg4, ul arg5, ul arg6… in enter_syscall_int() 69 ul do_put_string(char *s, uint32_t front_color, uint32_t background_color) in do_put_string()
|
/DragonOS-0.1.8/kernel/src/driver/pci/ |
D | pci_irq.h | 4 …nstall(ul irq_num,void (*pci_irq_handler)(ul irq_num, ul parameter, struct pt_regs *regs),ul param… 5 void c_irq_uninstall(ul irq_num);
|
D | pci_irq.c | 6 void pci_irq_enable(ul irq_num) in pci_irq_enable() 10 void pci_irq_disable(ul irq_num) in pci_irq_disable() 14 void pci_irq_install(ul irq_num) in pci_irq_install() 18 void pci_irq_uninstall(ul irq_num) in pci_irq_uninstall() 28 …nstall(ul irq_num,void (*pci_irq_handler)(ul irq_num, ul parameter, struct pt_regs *regs),ul param… in c_irq_install() 64 void c_irq_uninstall(ul irq_num) in c_irq_uninstall()
|
/DragonOS-0.1.8/kernel/src/ |
D | main.c | 42 ul bsp_idt_size, bsp_gdt_size; 52 gdtp.gdt_vaddr = (ul)phys_2_virt((ul)&GDT_Table); in reload_gdt() 62 idtp.idt_vaddr = (ul)phys_2_virt((ul)&IDT_Table); in reload_idt() 79 ul tss_item_addr = (ul)phys_2_virt(0x7c00); in system_initialize() 110 initial_tss[0].ist1 = (ul)ptr; in system_initialize() 111 initial_tss[0].ist2 = (ul)ptr; in system_initialize() 112 initial_tss[0].ist3 = (ul)ptr; in system_initialize() 113 initial_tss[0].ist4 = (ul)ptr; in system_initialize() 114 initial_tss[0].ist5 = (ul)ptr; in system_initialize() 115 initial_tss[0].ist6 = (ul)ptr; in system_initialize() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/acpi/ |
D | acpi.c | 19 static ul acpi_RSDT_offset = 0; 20 static ul acpi_XSDT_offset = 0; 24 static ul acpi_RSDT_entry_phys_base = 0; // RSDT中的第一个entry所在物理页的基地址 44 ul *ent = &(xsdt->Entry); in acpi_iter_SDT() 49 …sdt_header = (struct acpi_system_description_table_header_t *)((ul)(acpi_description_header_base +… in acpi_iter_SDT() 61 …r = (struct acpi_system_description_table_header_t *)(acpi_get_RSDT_entry_vaddr((ul)(*(ent + i)))); in acpi_iter_SDT() 86 *(ul *)_data = (ul)_iter_data; in acpi_get_MADT() 87 acpi_madt_vaddr = (ul)_iter_data; in acpi_get_MADT() 103 *(ul *)_data = (ul)_iter_data; in acpi_get_HPET() 119 *(ul *)_data = (ul)_iter_data; in acpi_get_MCFG() [all …]
|
D | acpi.h | 52 ul XsdtAddress; 164 ul Entry;
|
/DragonOS-0.1.8/kernel/src/driver/interrupt/apic/ |
D | apic.h | 264 void do_IRQ(struct pt_regs *rsp, ul number); 272 ul apic_ioapic_read_rte(unsigned char index); 280 void apic_ioapic_write_rte(unsigned char index, ul value); 302 uint apic_get_ics(const uint type, ul ret_vaddr[], uint *total); 305 void apic_ioapic_enable(ul irq_num); 306 void apic_ioapic_disable(ul irq_num); 307 ul apic_ioapic_install(ul irq_num, void *arg); 308 void apic_ioapic_uninstall(ul irq_num); 309 void apic_ioapic_level_ack(ul irq_num); // ioapic电平触发 应答 310 void apic_ioapic_edge_ack(ul irq_num); // ioapic边沿触发 应答 [all …]
|
D | apic.c | 57 ul madt_addr; in apic_io_apic_init() 89 rs_map_phys((ul)apic_ioapic_map.virtual_index_addr, apic_ioapic_map.addr_phys, PAGE_2M_SIZE, in apic_io_apic_init() 410 void do_IRQ(struct pt_regs *rsp, ul number) in do_IRQ() 487 ul apic_ioapic_read_rte(unsigned char index) in apic_ioapic_read_rte() 490 ul ret; in apic_ioapic_read_rte() 514 void apic_ioapic_write_rte(unsigned char index, ul value) in apic_ioapic_write_rte() 532 void apic_ioapic_enable(ul irq_num) in apic_ioapic_enable() 534 ul index = 0x10 + ((irq_num - 32) << 1); in apic_ioapic_enable() 535 ul value = apic_ioapic_read_rte(index); in apic_ioapic_enable() 540 void apic_ioapic_disable(ul irq_num) in apic_ioapic_disable() [all …]
|
D | apic_timer.c | 52 uint64_t apic_timer_install(ul irq_num, void *arg) in apic_timer_install() 69 void apic_timer_uninstall(ul irq_num) in apic_timer_uninstall()
|
/DragonOS-0.1.8/kernel/src/common/ |
D | glib.h | 37 typedef unsigned long ul; typedef 50 ul round(double x) in round() 52 return (ul)(x + 0.5); in round() 62 static __always_inline ul ALIGN(const ul addr, const ul _align) in ALIGN() 64 return (ul)((addr + _align - 1) & (~(_align - 1))); in ALIGN() 68 void *memset(void *dst, unsigned char C, ul size) in memset()
|
D | blk_types.h | 44 void (*end_handler)(ul num, ul arg); 54 ul request_count;
|
D | semaphore.h | 34 static __always_inline void semaphore_init(semaphore_t *sema, ul count) in semaphore_init()
|
/DragonOS-0.1.8/kernel/src/driver/interrupt/8259A/ |
D | 8259A.h | 30 void do_IRQ(struct pt_regs* rsp, ul number);
|
D | 8259A.c | 45 void do_IRQ(struct pt_regs *regs, ul number) in do_IRQ()
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/ |
D | x86_64_ipi.c | 33 …*(uint32_t *)(APIC_LOCAL_APIC_VIRT_BASE_ADDR + 0x310) = (uint32_t)(((*(ul *)&icr_entry) >> 32) & 0… in ipi_send_IPI() 34 …*(uint32_t *)(APIC_LOCAL_APIC_VIRT_BASE_ADDR + 0x300) = (uint32_t)((*(ul *)&icr_entry) & 0xfffffff… in ipi_send_IPI()
|
/DragonOS-0.1.8/kernel/src/driver/disk/ |
D | ata.c | 14 void ata_disk_handler(ul irq_num, ul param, struct pt_regs *regs) in ata_disk_handler()
|
/DragonOS-0.1.8/kernel/src/driver/keyboard/ |
D | ps2_keyboard.c | 144 void ps2_keyboard_handler(ul irq_num, ul buf_vaddr, struct pt_regs *regs) in ps2_keyboard_handler() 203 …irq_register(PS2_KEYBOARD_INTR_VECTOR, &entry, &ps2_keyboard_handler, (ul)&kb_buf, &ps2_keyboard_i… in ps2_keyboard_init()
|
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/ |
D | ahci.c | 29 rs_map_phys(AHCI_MAPPING_BASE, (ul)(bar5)&PAGE_2M_MASK, PAGE_2M_SIZE, PAGE_KERNEL_PAGE); in ahci_cpp_init()
|