Home
last modified time | relevance | path

Searched refs:addr (Results 1 – 19 of 19) sorted by relevance

/DragonOS-0.1.7/kernel/src/exception/
Dgate.h100 void set_tss_descriptor(unsigned int n, void *addr) in set_tss_descriptor() argument
105addr & 0xffff) << 16) | ((((unsigned long)addr >> 16) & 0xff) << 32) | ((unsigned long)0x89 << 40)… in set_tss_descriptor()
106 …*(unsigned long *)(phys_2_virt(GDT_Table + n + 1)) = (((unsigned long)addr >> 32) & 0xffffffff) | … in set_tss_descriptor()
127 void set_intr_gate(unsigned int n, unsigned char ist, void *addr) in set_intr_gate() argument
129 _set_gate(phys_2_virt(IDT_Table + n), 0x8E, ist, addr); // p=1,DPL=0, type=E in set_intr_gate()
141 void set_trap_gate(unsigned int n, unsigned char ist, void *addr) in set_trap_gate() argument
146 _set_gate(phys_2_virt(IDT_Table + n), 0x8F, ist, addr); // p=1,DPL=0, type=F in set_trap_gate()
156 void set_system_trap_gate(unsigned int n, unsigned char ist, void *addr) in set_system_trap_gate() argument
161 _set_gate(phys_2_virt(IDT_Table + n), 0xEF, ist, addr); // p=1,DPL=3, type=F in set_system_trap_gate()
165 static inline void set_system_intr_gate(unsigned int n,unsigned char ist,void * addr) //int3 in set_system_intr_gate() argument
[all …]
/DragonOS-0.1.7/kernel/src/mm/
Dmod.rs9 pub fn virt_2_phys(addr: usize) -> usize { in virt_2_phys()
10 addr - PAGE_OFFSET as usize in virt_2_phys()
15 pub fn phys_2_virt(addr: usize) -> usize { in phys_2_virt()
16 addr + PAGE_OFFSET as usize in phys_2_virt()
Dmm.h36 #define PAGE_4K_ALIGN(addr) (((unsigned long)(addr) + PAGE_4K_SIZE - 1) & PAGE_4K_MASK) argument
37 #define PAGE_2M_ALIGN(addr) (((unsigned long)(addr) + PAGE_2M_SIZE - 1) & PAGE_2M_MASK) argument
40 #define virt_2_phys(addr) ((unsigned long)(addr)-PAGE_OFFSET) argument
41 #define phys_2_virt(addr) ((unsigned long *)((unsigned long)(addr) + PAGE_OFFSET)) argument
281 #define mk_pml4t(addr, attr) ((unsigned long)(addr) | (unsigned long)(attr)) argument
289 #define mk_pdpt(addr, attr) ((unsigned long)(addr) | (unsigned long)(attr)) argument
292 #define mk_pdt(addr, attr) ((unsigned long)(addr) | (unsigned long)(attr)) argument
295 #define mk_pt(addr, attr) ((unsigned long)(addr) | (unsigned long)(attr)) argument
381 struct vm_area_struct *vma_find(struct mm_struct *mm, uint64_t addr);
Dslab.h119 ul slab_free(struct slab *slab_pool, void *addr, ul arg);
Dvma.c98 struct vm_area_struct *vma_find(struct mm_struct *mm, uint64_t addr) in vma_find() argument
104 if (vma->vm_end > addr) in vma_find()
Dslab.c289 ul slab_free(struct slab *slab_pool, void *addr, ul arg) in slab_free() argument
296 if (!(slab_obj_ptr->vaddr <= addr && addr <= (slab_obj_ptr->vaddr + PAGE_2M_SIZE))) in slab_free()
304 int index = (addr - slab_obj_ptr->vaddr) / slab_pool->size; in slab_free()
Dmm.c71 memory_management_struct.e820[i].BaseAddr = mb2_mem_info[i].addr; in mm_init()
/DragonOS-0.1.7/kernel/src/debug/traceback/
Dtraceback.c5 static int lookup_kallsyms(uint64_t addr, int level) in lookup_kallsyms() argument
15 if (addr > kallsyms_address[index] && addr <= kallsyms_address[index + 1]) in lookup_kallsyms()
22 … %04d address:%#018lx\n", &str[kallsyms_names_index[index]], addr - kallsyms_address[index], addr); in lookup_kallsyms()
/DragonOS-0.1.7/user/apps/test_relibc/
Dmain.c194 struct sockaddr_in addr; in udp_client() local
207 bzero(&addr, sizeof(addr)); in udp_client()
208 addr.sin_family = AF_INET; in udp_client()
209 addr.sin_port = htons(12581); in udp_client()
210 addr.sin_addr.s_addr = inet_addr("192.168.199.129"); in udp_client()
213 sendto(sockfd, logo, sizeof(logo), 0, (struct sockaddr *)&addr, addr_len); in udp_client()
225 sendto(sockfd, buffer, len, 0, (struct sockaddr *)&addr, addr_len); in udp_client()
228 len = recvfrom(sockfd, buffer, sizeof(buffer), 0, (struct sockaddr *)&addr, &addr_len); in udp_client()
/DragonOS-0.1.7/kernel/src/net/
Dsyscall.rs216 let addr = regs.r9 as usize; in sys_connect() localVariable
218 return do_connect(fd, addr as *const SockAddr, addrlen) in sys_connect()
230 pub fn do_connect(fd: usize, addr: *const SockAddr, addrlen: usize) -> Result<i64, SystemError> { in do_connect()
231 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in do_connect()
244 let addr = regs.r9 as usize; in sys_bind() localVariable
246 return do_bind(fd, addr as *const SockAddr, addrlen) in sys_bind()
258 pub fn do_bind(fd: usize, addr: *const SockAddr, addrlen: usize) -> Result<i64, SystemError> { in do_bind()
259 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in do_bind()
274 let addr = regs.r12 as usize; in sys_sendto() localVariable
281 addr as *const SockAddr, in sys_sendto()
[all …]
Dsocket.rs174 addr: wire::IpAddress::Ipv4(packet.src_addr()), in read()
224 if let wire::IpAddress::Ipv4(ipv4_dst) = endpoint.addr { in write()
329 let bind_res = if ip.addr.is_unspecified() { in do_bind()
393 let local_ep = match remote_endpoint.addr { in write()
484 .addr in endpoint()
542 let listen_result = if local_endpoint.addr.is_unspecified() { in do_listen()
/DragonOS-0.1.7/kernel/src/driver/multiboot2/
Dmultiboot2.c12 uintptr_t *addr = (uintptr_t *)multiboot2_boot_info_addr; in multiboot2_init() local
17 multiboot2_boot_info_size = *(unsigned int *)addr; in multiboot2_init()
25 uintptr_t addr = multiboot2_boot_info_addr; in multiboot2_iter() local
27 struct iter_data_t *tag = (struct iter_data_t *)((void*)addr + 8); in multiboot2_iter()
Dmultiboot2.h204 uint64_t addr; member
/DragonOS-0.1.7/kernel/src/libs/libUI/
Dtextui-render.c123 unsigned int *addr; in __textui_render_chromatic() local
138 addr = (uint32_t *)(fb + textui_framework.buf->width * (y + i) + x); in __textui_render_chromatic()
146 *addr = FRcolor; // 字,显示前景色 in __textui_render_chromatic()
148 *addr = BKcolor; // 背景色 in __textui_render_chromatic()
150 ++addr; in __textui_render_chromatic()
/DragonOS-0.1.7/kernel/src/driver/timers/rtc/
Drtc.rs92 fn read_cmos(addr: u8) -> u8 { in read_cmos()
94 io_out8(0x70, 0x80 | addr); in read_cmos()
/DragonOS-0.1.7/user/libs/libc/src/
Dmalloc.c23 #define PAGE_4K_ALIGN(addr) (((unsigned long)(addr) + PAGE_4K_SIZE - 1) & PAGE_4K_MASK) argument
24 #define PAGE_2M_ALIGN(addr) (((unsigned long)(addr) + PAGE_2M_SIZE - 1) & PAGE_2M_MASK) argument
/DragonOS-0.1.7/kernel/src/common/
Dglib.h62 static __always_inline ul ALIGN(const ul addr, const ul _align) in ALIGN() argument
64 return (ul)((addr + _align - 1) & (~(_align - 1))); in ALIGN()
/DragonOS-0.1.7/kernel/src/driver/usb/xhci/
Dinternal.h50 #define xhci_is_aligned64(addr) (((addr)&0x3f) == 0) // 是否64bytes对齐 argument
/DragonOS-0.1.7/kernel/src/io/
Ddevice.rs325 pub fn __bytes_to_lba(addr: usize, blk_size: usize) -> BlockId { in __bytes_to_lba()
326 return addr / blk_size; in __bytes_to_lba()