/DragonOS/kernel/src/arch/x86_64/asm/ |
H A D | pio.rs | 7 unsafe fn in8(port: u16) -> u8 { in in8() 8 x86::io::inb(port) in in8() 12 unsafe fn in16(port: u16) -> u16 { in in16() 13 x86::io::inw(port) in in16() 17 unsafe fn in32(port: u16) -> u32 { in in32() 18 x86::io::inl(port) in in32() 22 unsafe fn out8(port: u16, data: u8) { in out8() 23 x86::io::outb(port, data) in out8() 27 unsafe fn out16(port: u16, data: u16) { in out16() 28 x86::io::outw(port, data) in out16() [all …]
|
/DragonOS/kernel/src/arch/ |
H A D | io.rs | 4 unsafe fn in8(port: u16) -> u8; in in8() 5 unsafe fn in16(port: u16) -> u16; in in16() 6 unsafe fn in32(port: u16) -> u32; in in32() 7 unsafe fn out8(port: u16, data: u8); in out8() 8 unsafe fn out16(port: u16, data: u16); in out16() 9 unsafe fn out32(port: u16, data: u32); in out32()
|
/DragonOS/kernel/src/driver/serial/serial8250/ |
H A D | serial8250_pio.rs | 55 for port in unsafe { &PIO_PORTS }.iter().flatten() { in bind_pio_ports() 56 port.set_device(Some(devs)); in bind_pio_ports() 57 self.uart_add_one_port(uart_driver, port).ok(); in bind_pio_ports() 65 let port = Serial8250PIOPort::new( localVariable 79 if let Ok(port) = port { 80 if port.init().is_ok() { 81 PIO_PORTS[$port_num - 1] = Some(port); 134 let port = self.iobase as u16; in init() localVariable 136 CurrentPortIOArch::out8(port + 1, 0x00); // Disable all interrupts in init() 140 … CurrentPortIOArch::out8(port + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold in init() [all …]
|
/DragonOS/kernel/src/arch/x86_64/include/asm/ |
H A D | asm.h | 207 unsigned char io_in8(unsigned short port) in io_in8() argument 213 : "d"(port) in io_in8() 219 unsigned int io_in32(unsigned short port) in io_in32() argument 225 : "d"(port) in io_in32() 231 void io_out8(unsigned short port, unsigned char value) in io_out8() argument 236 : "a"(value), "d"(port) in io_out8() 241 void io_out32(unsigned short port, unsigned int value) in io_out32() argument 246 : "a"(value), "d"(port) in io_out32() 254 #define io_insw(port, buffer, nr) \ argument 255 __asm__ __volatile__("cld;rep;insw;mfence;" ::"d"(port), "D"(buffer), "c"(nr) \ [all …]
|
/DragonOS/kernel/src/arch/riscv64/include/asm/ |
H A D | asm.h | 29 unsigned char io_in8(unsigned short port) { in io_in8() argument 35 unsigned int io_in32(unsigned short port) { in io_in32() argument 41 void io_out8(unsigned short port, unsigned char value) { in io_out8() argument 47 void io_out32(unsigned short port, unsigned int value) { in io_out32() argument
|
/DragonOS/kernel/src/driver/acpi/ |
H A D | pmtmr.rs | 15 let port = PMTMR_IO_PORT.load(Ordering::SeqCst); in acpi_pm_read_early() localVariable 18 if port == 0 { in acpi_pm_read_early()
|
/DragonOS/kernel/src/driver/disk/ahci/ |
H A D | ahcidisk.rs | 87 let port = _port(self.ctrl_num, self.port_num); in read_at() localVariable 88 volatile_write!(port.is, u32::MAX); // Clear pending interrupt bits in read_at() 90 let slot = port.find_cmdslot().unwrap_or(u32::MAX); in read_at() 99 volatile_read!(port.clb) as usize + slot as usize * size_of::<HbaCmdHeader>(), in read_at() 194 while (volatile_read!(port.tfd) as u8 & (ATA_DEV_BUSY | ATA_DEV_DRQ)) > 0 in read_at() 205 volatile_set_bit!(port.ci, 1 << slot, true); // Issue command in read_at() 209 if (volatile_read!(port.ci) & (1 << slot)) == 0 { in read_at() 212 if (volatile_read!(port.is) & HBA_PxIS_TFES) > 0 { in read_at() 242 let port = _port(self.ctrl_num, self.port_num); in write_at() localVariable 244 volatile_write!(port.is, u32::MAX); // Clear pending interrupt bits in write_at() [all …]
|
H A D | mod.rs | 139 let port: &HbaPort = &list[ctrl_num as usize].ports[port_num as usize]; in _port() localVariable 141 return unsafe { (port as *const HbaPort as *mut HbaPort).as_mut().unwrap() }; in _port()
|
/DragonOS/kernel/src/driver/tty/virtual_terminal/ |
H A D | mod.rs | 69 port: Arc<dyn TtyPort>, field 82 port: Arc::new(DefaultTtyPort::new()), in new() 92 pub fn port(&self) -> Arc<dyn TtyPort> { in port() method 93 self.port.clone() in port() 102 .port in devfs_setup() 197 .and_then(|vc| vc.port().port_data().internal_tty()) in current_vc_tty_name() 216 .port in lookup_vc_by_tty_name() 344 vc.port().setup_internal_tty(Arc::downgrade(&tty)); in do_install() 345 tty.set_port(vc.port()); in do_install()
|
/DragonOS/kernel/src/net/socket/ |
H A D | mod.rs | 312 PORT_MANAGER.unbind_port(socket.metadata().socket_type, ip.port); in do_close() 522 let mut port: u16; in get_ephemeral_port() localVariable 530 port = EPHEMERAL_PORT; in get_ephemeral_port() 539 if listen_table_guard.get(&port).is_none() { in get_ephemeral_port() 541 return Ok(port); in get_ephemeral_port() 551 pub fn bind_port(&self, socket_type: SocketType, port: u16) -> Result<(), SystemError> { in bind_port() 552 if port > 0 { in bind_port() 558 match listen_table_guard.get(&port) { in bind_port() 560 None => listen_table_guard.insert(port, ProcessManager::current_pid()), in bind_port() 569 pub fn unbind_port(&self, socket_type: SocketType, port: u16) { in unbind_port() [all …]
|
H A D | inet.rs | 122 port: 0, in read() 299 if ip.port == 0 { in do_bind() 300 ip.port = PORT_MANAGER.get_ephemeral_port(self.metadata.socket_type)?; in do_bind() 303 PORT_MANAGER.bind_port(self.metadata.socket_type, ip.port)?; in do_bind() 306 socket.bind(ip.port) in do_bind() 453 if listen_endpoint.port == 0 { in endpoint() 463 listen_endpoint.port, in endpoint() 546 socket.listen(local_endpoint.port) in do_listen() 855 if ip.port == 0 { in bind() 856 ip.port = PORT_MANAGER.get_ephemeral_port(self.metadata.socket_type)?; in bind() [all …]
|
/DragonOS/kernel/src/libs/ |
H A D | printk.rs | 43 let port = current_vc.port(); in __write_string() localVariable 44 let tty = port.port_data().internal_tty(); in __write_string()
|
/DragonOS/user/port/ |
H A D | README.md | 1 # port目录
|
/DragonOS/kernel/src/driver/tty/ |
H A D | tty_core.rs | 68 port: RwLock::new(None), in new() 135 pub fn set_port(&self, port: Arc<dyn TtyPort>) { in set_port() 136 *self.core.port.write() = Some(port); in set_port() 318 port: RwLock<Option<Arc<dyn TtyPort>>>, field 347 pub fn port(&self) -> Option<Arc<dyn TtyPort>> { in port() method 348 self.port.read().clone() in port()
|
H A D | kthread.rs | 54 .port() in tty_refresh_thread()
|
H A D | tty_driver.rs | 319 if core.port().is_none() { in init_tty_device() 346 if t.core().port().is_none() { in open_tty() 348 } else if t.core().port().unwrap().state() == TtyPortState::KOPENED { in open_tty()
|
/DragonOS/kernel/src/driver/video/console/ |
H A D | dummycon.rs | 67 let tty = vc.port().port_data().tty().unwrap(); in con_init()
|
/DragonOS/docs/community/ChangeLog/V0.1.x/ |
H A D | V0.1.1.md | 30 - port kmalloc and printk to rust 262 port kmalloc and printk to rust (#83)
|
/DragonOS/kernel/src/net/ |
H A D | syscall.rs | 582 let port = u16::from_be(addr_in.sin_port); in to_endpoint() localVariable 584 return Ok(Endpoint::Ip(Some(wire::IpEndpoint::new(ip, port)))); in to_endpoint() 697 sin_port: ip_endpoint.port.to_be(), in from()
|
/DragonOS/kernel/src/libs/lib_ui/ |
H A D | textui.rs | 1039 let port = current_vc.port(); in rs_textui_putchar() localVariable 1040 let tty = port.port_data().internal_tty(); in rs_textui_putchar()
|
/DragonOS/kernel/src/driver/tty/pty/ |
H A D | unix98pty.rs | 53 to.core().port().unwrap().receive_buf(buf, &[], nr) in write()
|
/DragonOS/docs/kernel/debug/ |
H A D | debug-kernel-with-gdb.md | 103 0xffff800000140c21 in io_in8 (port=113) at common/glib.h:136
|