/DragonOS-0.1.3/kernel/src/driver/uart/ |
D | uart.rs | 76 port: UartPort, field 82 Self {port: UartPort::COM1, baud_rate: 115200} in default() 94 let port = uart_port.to_u16(); in uart_init() localVariable 101 io_out8(port + 1, 0x00); // Disable all interrupts in uart_init() 102 io_out8(port + 3, 0x80); // Enable DLAB (set baud rate divisor) in uart_init() 106 io_out8(port + 0, (divisor & 0xff) as u8); // Set divisor (lo byte) in uart_init() 107 io_out8(port + 1, ((divisor >> 8) & 0xff) as u8); // (hi byte) in uart_init() 108 io_out8(port + 3, 0x03); // 8 bits, no parity, one stop bit in uart_init() 109 … io_out8(port + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold in uart_init() 110 …io_out8(port + 4, 0x08); // IRQs enabled, RTS/DSR clear (现代计算机上一般都不需要hardware flow control,因此不需要置位… in uart_init() [all …]
|
D | uart.h | 15 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.3/kernel/src/driver/disk/ahci/ |
D | ahci.c | 24 static void start_cmd(HBA_PORT *port); 25 static void stop_cmd(HBA_PORT *port); 26 static void port_rebase(HBA_PORT *port, int portno); 30 static int ahci_find_cmdslot(HBA_PORT *port); 188 static int check_type(HBA_PORT *port) in check_type() argument 190 uint32_t ssts = port->ssts; in check_type() 200 switch (port->sig) in check_type() 257 static void start_cmd(HBA_PORT *port) in start_cmd() argument 260 while ((port->cmd) & HBA_PxCMD_CR) in start_cmd() 264 port->cmd |= HBA_PxCMD_FRE; in start_cmd() [all …]
|
D | ahci.h | 386 static bool ahci_read(HBA_PORT *port, uint32_t startl, uint32_t starth, uint32_t count, uint64_t bu… 399 static bool ahci_write(HBA_PORT *port, uint32_t startl, uint32_t starth, uint32_t count,
|
/DragonOS-0.1.3/kernel/src/common/ |
D | glib.h | 133 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.3/user/port/ |
D | README.md | 1 # port目录
|
/DragonOS-0.1.3/kernel/src/driver/usb/xhci/ |
D | xhci.c | 44 static uint64_t xhci_initialize_slot(const int id, const int port, const int speed, const int max_p… 780 static int xhci_reset_port(const int id, const int port) in xhci_reset_port() argument 784 uint64_t port_status_offset = XHCI_OPS_PRS + port * 16; in xhci_reset_port() 798 kdebug("cannot power on %d", port); in xhci_reset_port() 809 if (XHCI_PORT_IS_USB3(id, port)) in xhci_reset_port() 828 if (XHCI_PORT_IS_USB3(id, port) && (val & (1U << 31)) == 0) in xhci_reset_port() 830 else if (XHCI_PORT_IS_USB2(id, port) && (val & (1 << 4)) == 0) in xhci_reset_port() 862 if (retval == 0 && XHCI_PORT_IS_USB2(id, port)) in xhci_reset_port() 864 xhci_hc[id].ports[port].flags |= XHCI_PROTOCOL_ACTIVE; in xhci_reset_port() 865 if (XHCI_PORT_HAS_PAIR(id, port)) // 如果有对应的usb3端口,则将usb3端口设置为未激活 in xhci_reset_port() [all …]
|
/DragonOS-0.1.3/ |
D | bochsrc | 55 # gdbstub: enabled=1, port=1234, text_base=0, data_base=0, bss_base=0;
|
/DragonOS-0.1.3/docs/community/ChangeLog/V0.1.x/ |
D | V0.1.1.md | 30 - port kmalloc and printk to rust 262 port kmalloc and printk to rust (#83)
|