Home
last modified time | relevance | path

Searched refs:address (Results 1 – 25 of 31) sorted by relevance

12

/DragonOS/user/apps/test_bind/
H A Dmain.c15 struct sockaddr_in address; variable
16 int addrlen = sizeof(address);
42 if (bind(tcp_sk_fd1, (struct sockaddr *)&address, sizeof(address)) < 0) in test_tcp_bind()
47 address.sin_port = htons(PORT+1); in test_tcp_bind()
48 if (bind(tcp_sk_fd2, (struct sockaddr *)&address, sizeof(address)) < 0) in test_tcp_bind()
56 address.sin_port = htons(PORT); in test_tcp_bind()
57 if (bind(tcp_sk_fd3, (struct sockaddr *)&address, sizeof(address)) < 0) in test_tcp_bind()
104 if (bind(udp_sk_fd1, (struct sockaddr *)&address, sizeof(address)) < 0) in test_udp_bind()
109 address.sin_port = htons(PORT+1); in test_udp_bind()
110 if (bind(udp_sk_fd2, (struct sockaddr *)&address, sizeof(address)) < 0) in test_udp_bind()
[all …]
/DragonOS/kernel/src/debug/kprobe/
H A Dmod.rs48 fn insert_break_point(&mut self, address: usize, kprobe: LockKprobe) { in insert_break_point()
49 let list = self.break_list.entry(address).or_default(); in insert_break_point()
58 fn insert_debug_point(&mut self, address: usize, kprobe: LockKprobe) { in insert_debug_point()
59 let list = self.debug_list.entry(address).or_default(); in insert_debug_point()
63 pub fn get_break_list(&self, address: usize) -> Option<&Vec<LockKprobe>> { in get_break_list()
64 self.break_list.get(&address) in get_break_list()
67 pub fn get_debug_list(&self, address: usize) -> Option<&Vec<LockKprobe>> { in get_debug_list()
68 self.debug_list.get(&address) in get_debug_list()
75 pub fn kprobe_num(&self, address: usize) -> usize { in kprobe_num()
76 self.break_list_len(address) in kprobe_num()
[all …]
/DragonOS/kernel/crates/kprobe/src/arch/rv64/
H A Dmod.rs54 let address = self.addr; in drop() localVariable
57 core::ptr::write(address as *mut u16, inst_16); in drop()
60 core::ptr::write(address as *mut u32, inst_32); in drop()
68 address, in drop()
90 let address = self.symbol_addr + self.offset; in replace_inst() localVariable
91 let inst_16 = unsafe { core::ptr::read(address as *const u16) }; in replace_inst()
101 addr: address, in replace_inst()
107 core::ptr::write(address as *mut u16, C_EBREAK_INST as u16); in replace_inst()
114 let inst_32 = unsafe { core::ptr::read(address as *const u32) }; in replace_inst()
117 core::ptr::write(address as *mut u32, EBREAK_INST); in replace_inst()
[all …]
/DragonOS/kernel/src/mm/
H A Dfault.rs53 address: VirtAddr, field
69 address: VirtAddr, in new()
75 ((address - guard.region().start()) >> MMArch::PAGE_SHIFT) + file_page_offset in new()
79 address: VirtAddr::new(crate::libs::align::page_align_down(address.data())), in new()
96 pub fn address(&self) -> VirtAddr { in address() method
97 self.address in address()
103 VirtAddr::new(crate::libs::align::page_align_down(self.address.data())) in address_aligned_down()
162 let address = pfm.address_aligned_down(); in handle_normal_fault() localVariable
165 if mapper.get_entry(address, 3).is_none() { in handle_normal_fault()
167 .allocate_table(address, 2) in handle_normal_fault()
[all …]
H A Dmod.rs167 pub const fn new(address: usize) -> Self { in new()
168 Self(address) in new()
286 pub const fn new(address: usize) -> Self { in new()
287 return Self(address); in new()
554 unsafe fn read<T>(address: VirtAddr) -> T { in read()
555 return ptr::read(address.data() as *const T); in read()
560 unsafe fn write<T>(address: VirtAddr, value: T) { in write()
561 ptr::write(address.data() as *mut T, value); in write()
565 unsafe fn write_bytes(address: VirtAddr, value: u8, count: usize) { in write_bytes()
566 ptr::write_bytes(address.data() as *mut u8, value, count); in write_bytes()
[all …]
H A Dslab.h29 extern unsigned long kfree(void *address);
H A Dno_init.rs117 unsafe fn free(&mut self, address: PhysAddr, count: PageFrameCount) { in free()
119 assert!(address.check_aligned(MMA::PAGE_SIZE)); in free()
121 let vaddr = MMA::phys_2_virt(address); in free()
H A Dpage.rs602 self.entry(index)?.address().ok()?, in next_level_table()
636 let old_phys = entry.address().unwrap(); in clone()
648 let old_phys = entry.address().unwrap(); in clone()
715 pub fn address(&self) -> Result<PhysAddr, PhysAddr> { in address() method
1476 let paddr = entry.address().ok()?; in translate()
1569 return Some((entry.address().ok()?, entry.flags())); in unmap_phys_inner()
/DragonOS/kernel/src/arch/x86_64/mm/
H A Dfault.rs73 address: VirtAddr, in show_fault_oops()
77 if let Some(entry) = mapper.get_entry(address, 0) { in show_fault_oops()
88 if address.data() < X86_64MMArch::PAGE_SIZE && !regs.is_from_user() { in show_fault_oops()
91 address.data() in show_fault_oops()
96 address.data() in show_fault_oops()
138 address: VirtAddr, in page_fault_oops()
141 Self::show_fault_oops(regs, error_code, address); in page_fault_oops()
155 address: VirtAddr, in do_kern_addr_fault()
162 address.data(), in do_kern_addr_fault()
178 address: VirtAddr, in do_user_addr_fault()
[all …]
H A Dmod.rs179 unsafe fn invalidate_page(address: VirtAddr) { in invalidate_page()
181 asm!("invlpg [{0}]", in(reg) address.data(), options(nostack, preserves_flags)); in invalidate_page()
286 unsafe fn read<T>(address: VirtAddr) -> T { in read()
287 return core::ptr::read(address.data() as *const T); in read()
290 unsafe fn write<T>(address: VirtAddr, value: T) { in write()
291 core::ptr::write(address.data() as *mut T, value); in write()
294 unsafe fn write_bytes(address: VirtAddr, value: u8, count: usize) { in write_bytes()
295 core::ptr::write_bytes(address.data() as *mut u8, value, count); in write_bytes()
660 unsafe fn free(&mut self, address: crate::mm::PhysAddr, count: PageFrameCount) { in free()
663 return allocator.free(address, count); in free()
/DragonOS/kernel/crates/kprobe/src/arch/loongarch64/
H A Dmod.rs43 let address = self.addr; in drop() localVariable
47 core::ptr::write(address as *mut u32, inst_32); in drop()
51 address, in drop()
73 let address = self.symbol_addr + self.offset; in replace_inst() localVariable
75 addr: address, in replace_inst()
79 let inst_32 = unsafe { core::ptr::read(address as *const u32) }; in replace_inst()
81 core::ptr::write(address as *mut u32, EBREAK_INST); in replace_inst()
89 address, in replace_inst()
/DragonOS/kernel/crates/kprobe/src/arch/x86/
H A Dmod.rs27 let address = self.addr; in drop() localVariable
31 address as *mut u8, in drop()
40 address, in drop()
85 let address = self.symbol_addr + self.offset; in replace_inst() localVariable
89 address as *const u8, in replace_inst()
99 addr: address, in replace_inst()
104 core::ptr::write_volatile(address as *mut u8, EBREAK_INST); in replace_inst()
109 address, in replace_inst()
/DragonOS/user/apps/http_server/
H A Dmain.c177 struct sockaddr_in address; in main() local
178 int addrlen = sizeof(address); in main()
197 address.sin_family = AF_INET; in main()
198 address.sin_addr.s_addr = INADDR_ANY; in main()
199 address.sin_port = htons(PORT); in main()
202 if (bind(server_fd, (struct sockaddr *)&address, sizeof(address)) < 0) in main()
220 … if ((new_socket = accept(server_fd, (struct sockaddr *)&address, (socklen_t *)&addrlen)) < 0) in main()
/DragonOS/kernel/src/driver/pci/
H A Droot.rs142 let address = in cam_offset() localVariable
149 assert!(address & 0x3 == 0); in cam_offset()
150 address in cam_offset()
167 let address = self.cam_offset(bus_device_function, register_offset); in read_config() localVariable
171 .add((address >> 2) as usize)) in read_config()
195 let address = self.cam_offset(bus_device_function, register_offset); in write_config() localVariable
201 .add((address >> 2) as usize)) in write_config()
H A Dpci.rs41 pub const fn new(address: usize) -> Self { in new()
42 Self(address) in new()
1186 address: u64,
1195 address: u32,
1209 if let Self::Memory { address, size, .. } = self { in memory_address_size()
1210 Some((*address, *size)) in memory_address_size()
1233 address, in fmt()
1239 address, size, address_type, prefetchable, mmio_guard in fmt()
1241 Self::IO { address, size } => { in fmt()
1242 write!(f, "I/O space at {:#010x}, size {}", address, size) in fmt()
[all …]
/DragonOS/kernel/src/exception/
H A Dmsi.rs33 pub const fn new(address: u64, data: u32) -> Self { in new()
35 address_lo: address as u32, in new()
36 address_hi: (address >> 32) as u32, in new()
51 pub const fn address(&self) -> u64 { in address() method
/DragonOS/kernel/src/arch/x86_64/pci/
H A Dpci.rs42 let address = ((bus_device_function.bus as u32) << 16) in read_config() localVariable
48 CurrentPortIOArch::out32(PORT_PCI_CONFIG_ADDRESS, address); in read_config()
56 let address = ((bus_device_function.bus as u32) << 16) in write_config() localVariable
62 CurrentPortIOArch::out32(PORT_PCI_CONFIG_ADDRESS, address); in write_config()
/DragonOS/kernel/src/mm/allocator/
H A Dpage_frame.rs314 unsafe fn free(&mut self, address: PhysAddr, count: PageFrameCount); in free()
320 unsafe fn free_one(&mut self, address: PhysAddr) { in free_one()
321 return self.free(address, PageFrameCount::new(1)); in free_one()
332 unsafe fn free(&mut self, address: PhysAddr, count: PageFrameCount) { in free()
333 return T::free(self, address, count); in free()
338 unsafe fn free_one(&mut self, address: PhysAddr) { in free_one()
339 return T::free_one(self, address); in free_one()
/DragonOS/kernel/crates/rbpf/src/
H A Dstack.rs57 pub fn save_return_address(&mut self, address: u16) { in save_return_address()
58 self.return_address = address; in save_return_address()
/DragonOS/kernel/src/libs/futex/
H A Dfutex.rs183 address: u64, field
188 self.address.hash(state); in hash()
197 return self.address == other.address; in eq()
204 && self.address == other.address; in eq()
506 let mut address = uaddr.data(); in get_futex_key() localVariable
509 let offset = address & (MMArch::PAGE_SIZE - 1); in get_futex_key()
516 address -= offset; in get_futex_key()
525 address: address as u64, in get_futex_key()
539 address: address as u64, in get_futex_key()
/DragonOS/kernel/src/arch/x86_64/interrupt/
H A Dtrap.rs404 let address = x86::controlregs::cr2(); in do_page_fault() localVariable
412 let address = VirtAddr::new(address); in do_page_fault() localVariable
414 if address.check_user() { in do_page_fault()
415 MMArch::do_user_addr_fault(regs, error_code, address); in do_page_fault()
417 MMArch::do_kern_addr_fault(regs, error_code, address); in do_page_fault()
/DragonOS/kernel/src/arch/riscv64/mm/
H A Dmod.rs49 address: VirtAddr, in remote_invalidate_page()
52 let r = sbi_rt::remote_sfence_vma(Into::into(cpu), address.data(), size); in remote_invalidate_page()
162 unsafe fn invalidate_page(address: VirtAddr) { in invalidate_page()
163 riscv::asm::sfence_vma(0, address.data()); in invalidate_page()
358 unsafe fn free(&mut self, address: crate::mm::PhysAddr, count: PageFrameCount) { in free()
361 return allocator.free(address, count); in free()
/DragonOS/kernel/src/driver/open_firmware/
H A Dfdt.rs316 let address = PhysAddr::new(node.address() as usize); in early_init_fdt_scan_reserved_mem() localVariable
318 debug!("Reserve memory: {:?}-{:?}", address, address + size); in early_init_fdt_scan_reserved_mem()
319 mem_block_manager().reserve_block(address, size).unwrap(); in early_init_fdt_scan_reserved_mem()
/DragonOS/tools/qemu/
H A Difup-nat53 --listen-address=$GATEWAY \
/DragonOS/kernel/src/net/
H A Dnet_core.rs84 .update_ip_addrs(&[wire::IpCidr::Ipv4(config.address)]) in dhcp_query()

12