Home
last modified time | relevance | path

Searched refs:port (Results 1 – 11 of 11) sorted by relevance

/DragonOS-0.1.7/kernel/src/driver/uart/
Duart.rs76 port: UartPort, field
83 port: UartPort::COM1, in default()
97 let port = uart_port.to_u16(); in uart_init() localVariable
104 io_out8(port + 1, 0x00); // Disable all interrupts in uart_init()
105 io_out8(port + 3, 0x80); // Enable DLAB (set baud rate divisor) in uart_init()
109 io_out8(port + 0, (divisor & 0xff) as u8); // Set divisor (lo byte) in uart_init()
110 io_out8(port + 1, ((divisor >> 8) & 0xff) as u8); // (hi byte) in uart_init()
111 io_out8(port + 3, 0x03); // 8 bits, no parity, one stop bit in uart_init()
112 io_out8(port + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold in uart_init()
113 …io_out8(port + 4, 0x08); // IRQs enabled, RTS/DSR clear (现代计算机上一般都不需要hardware flow control,因此不需要置位… in uart_init()
[all …]
Duart.h15 extern int c_uart_init(uint16_t port, uint32_t baud_rate);
16 extern void c_uart_send(uint16_t port, char c);
17 extern void c_uart_send_str(uint16_t port, const char *str);
/DragonOS-0.1.7/kernel/src/common/
Dglib.h133 unsigned char io_in8(unsigned short port) in io_in8() argument
139 : "d"(port) in io_in8()
145 unsigned int io_in32(unsigned short port) in io_in32() argument
151 : "d"(port) in io_in32()
157 void io_out8(unsigned short port, unsigned char value) in io_out8() argument
162 : "a"(value), "d"(port) in io_out8()
167 void io_out32(unsigned short port, unsigned int value) in io_out32() argument
172 : "a"(value), "d"(port) in io_out32()
180 #define io_insw(port, buffer, nr) \ argument
181 __asm__ __volatile__("cld;rep;insw;mfence;" ::"d"(port), "D"(buffer), "c"(nr) \
[all …]
/DragonOS-0.1.7/kernel/src/driver/disk/ahci/
Dahcidisk.rs68 let port = _port(self.ctrl_num, self.port_num); in read_at() localVariable
69 volatile_write!(port.is, u32::MAX); // Clear pending interrupt bits in read_at()
71 let slot = port.find_cmdslot().unwrap_or(u32::MAX); in read_at()
80 volatile_read!(port.clb) as usize in read_at()
156 while (volatile_read!(port.tfd) as u8 & (ATA_DEV_BUSY | ATA_DEV_DRQ)) > 0 in read_at()
167 volatile_set_bit!(port.ci, 1 << slot, true); // Issue command in read_at()
171 if (volatile_read!(port.ci) & (1 << slot)) == 0 { in read_at()
174 if (volatile_read!(port.is) & HBA_PxIS_TFES) > 0 { in read_at()
200 let port = _port(self.ctrl_num, self.port_num); in write_at() localVariable
202 volatile_write!(port.is, u32::MAX); // Clear pending interrupt bits in write_at()
[all …]
Dmod.rs186 let port: &HbaPort = &list[ctrl_num as usize].ports[port_num as usize]; in _port() localVariable
188 return unsafe { (port as *const HbaPort as *mut HbaPort).as_mut().unwrap() }; in _port()
/DragonOS-0.1.7/user/port/
DREADME.md1 # port目录
/DragonOS-0.1.7/kernel/src/driver/usb/xhci/
Dxhci.c44 static uint64_t xhci_initialize_slot(const int id, const int port, const int speed, const int max_p…
782 static int xhci_reset_port(const int id, const int port) in xhci_reset_port() argument
786 uint64_t port_status_offset = XHCI_OPS_PRS + port * 16; in xhci_reset_port()
800 kdebug("cannot power on %d", port); in xhci_reset_port()
811 if (XHCI_PORT_IS_USB3(id, port)) in xhci_reset_port()
830 if (XHCI_PORT_IS_USB3(id, port) && (val & (1U << 31)) == 0) in xhci_reset_port()
832 else if (XHCI_PORT_IS_USB2(id, port) && (val & (1 << 4)) == 0) in xhci_reset_port()
864 if (retval == 0 && XHCI_PORT_IS_USB2(id, port)) in xhci_reset_port()
866 xhci_hc[id].ports[port].flags |= XHCI_PROTOCOL_ACTIVE; in xhci_reset_port()
867 if (XHCI_PORT_HAS_PAIR(id, port)) // 如果有对应的usb3端口,则将usb3端口设置为未激活 in xhci_reset_port()
[all …]
/DragonOS-0.1.7/kernel/src/net/
Dsocket.rs175 port: 0, in read()
330 socket.bind(ip.port) in do_bind()
390 if socket.endpoint().port == 0 { in write()
476 if listen_endpoint.port == 0 { in endpoint()
486 listen_endpoint.port, in endpoint()
544 socket.listen(local_endpoint.port) in do_listen()
739 if ip.port == 0 { in bind()
740 ip.port = get_ephemeral_port(); in bind()
Dsyscall.rs696 let port = u16::from_be(addr_in.sin_port); in to_endpoint() localVariable
698 return Ok(Endpoint::Ip(Some(wire::IpEndpoint::new(ip, port)))); in to_endpoint()
787 sin_port: ip_endpoint.port.to_be(), in from()
/DragonOS-0.1.7/
Dbochsrc55 # gdbstub: enabled=1, port=1234, text_base=0, data_base=0, bss_base=0;
/DragonOS-0.1.7/docs/community/ChangeLog/V0.1.x/
DV0.1.1.md30 - port kmalloc and printk to rust
262 port kmalloc and printk to rust (#83)