/DragonOS-0.1.8/kernel/src/driver/interrupt/8259A/ |
D | 8259A.c | 17 io_out8(0x20, 0x11); // 初始化主芯片的icw1 in init_8259A() 18 io_out8(0x21, 0x20); // 设置主芯片的中断向量号为0x20(0x20-0x27) in init_8259A() 19 io_out8(0x21, 0x04); // 设置int2端口级联从芯片 in init_8259A() 20 io_out8(0x21, 0x01); // 设置为AEOI模式、FNM、无缓冲 in init_8259A() 23 io_out8(0xa0, 0x11); in init_8259A() 24 io_out8(0xa1, 0x28); // 设置从芯片的中断向量号为0x28(0x28-0x2f) in init_8259A() 25 io_out8(0xa1, 0x02); // 设置从芯片连接到主芯片的int2 in init_8259A() 26 io_out8(0xa1, 0x01); in init_8259A() 30 io_out8(0x21, 0x00); in init_8259A() 31 io_out8(0xa1, 0x00); in init_8259A() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/disk/ |
D | ata.c | 71 io_out8(PORT_DISK0_STATUS_CTRL_REG, 0); // 使能中断请求 in ata_init() 73 io_out8(PORT_DISK0_ERR_STATUS, 0); in ata_init() 74 io_out8(PORT_DISK0_SECTOR_CNT, 0); in ata_init() 75 io_out8(PORT_DISK0_LBA_7_0, 0); in ata_init() 76 io_out8(PORT_DISK0_LBA_15_8, 0); in ata_init() 77 io_out8(PORT_DISK0_LBA_23_16, 0); in ata_init() 78 io_out8(PORT_DISK0_DEVICE_CONFIGURE_REG, 0); in ata_init() 80 io_out8(PORT_DISK0_CONTROLLER_STATUS_CMD, 0xec); // 获取硬件设备识别信息 in ata_init()
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | glib.c | 11 io_out8(0x43, 182&0xff); in __experimental_beep() 12 io_out8(0x42, 2280&0xff); in __experimental_beep() 13 io_out8(0x42, (2280>>8)&0xff); in __experimental_beep() 16 io_out8(0x61, x&0xff); in __experimental_beep() 23 io_out8(0x61, x&0xff); in __experimental_beep()
|
/DragonOS-0.1.8/kernel/src/driver/uart/ |
D | uart.rs | 14 include::bindings::bindings::{io_in8, io_out8}, 288 io_out8(port + 1, 0x00); // Disable all interrupts in uart_init() 289 io_out8(port + 3, 0x80); // Enable DLAB (set baud rate divisor) in uart_init() 293 io_out8(port + 0, (divisor & 0xff) as u8); // Set divisor (lo byte) in uart_init() 294 io_out8(port + 1, ((divisor >> 8) & 0xff) as u8); // (hi byte) in uart_init() 295 io_out8(port + 3, 0x03); // 8 bits, no parity, one stop bit in uart_init() 296 io_out8(port + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold in uart_init() 297 …io_out8(port + 4, 0x08); // IRQs enabled, RTS/DSR clear (现代计算机上一般都不需要hardware flow control,因此不需要置位… in uart_init() 298 io_out8(port + 4, 0x1E); // Set in loopback mode, test the serial chip in uart_init() 299 …io_out8(port + 0, 0xAE); // Test serial chip (send byte 0xAE and check if serial returns same byte) in uart_init() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/mouse/ |
D | ps2_mouse.c | 95 io_out8(PORT_KEYBOARD_CONTROL, KEYBOARD_COMMAND_SEND_TO_PS2_MOUSE); in ps2_mouse_get_mouse_ID() 97 io_out8(PORT_KEYBOARD_DATA, PS2_MOUSE_GET_ID); in ps2_mouse_get_mouse_ID() 125 io_out8(PORT_KEYBOARD_CONTROL, KEYBOARD_COMMAND_SEND_TO_PS2_MOUSE); in ps2_mouse_set_sample_rate() 127 io_out8(PORT_KEYBOARD_DATA, PS2_MOUSE_SET_SAMPLING_RATE); in ps2_mouse_set_sample_rate() 135 io_out8(PORT_KEYBOARD_CONTROL, KEYBOARD_COMMAND_SEND_TO_PS2_MOUSE); in ps2_mouse_set_sample_rate() 137 io_out8(PORT_KEYBOARD_DATA, hz); in ps2_mouse_set_sample_rate() 230 io_out8(PORT_KEYBOARD_CONTROL, KEYBOARD_COMMAND_ENABLE_PS2_MOUSE_PORT); // 开启鼠标端口 in ps2_mouse_init() 237 io_out8(PORT_KEYBOARD_CONTROL, KEYBOARD_COMMAND_SEND_TO_PS2_MOUSE); in ps2_mouse_init() 239 io_out8(PORT_KEYBOARD_DATA, PS2_MOUSE_ENABLE); // 允许鼠标设备发送数据包 in ps2_mouse_init() 247 io_out8(PORT_KEYBOARD_CONTROL, KEYBOARD_COMMAND_WRITE); in ps2_mouse_init() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/timers/rtc/ |
D | rtc.rs | 4 include::bindings::bindings::{io_in8, io_out8}, 66 io_out8(0x70, 0x00); in get() 95 io_out8(0x70, 0x80 | addr); in read_cmos()
|
/DragonOS-0.1.8/kernel/src/driver/interrupt/apic/ |
D | apic.c | 370 io_out8(0x21, 0xff); in apic_init() 372 io_out8(0xa1, 0xff); in apic_init() 375 io_out8(0x20, 0x20); in apic_init() 376 io_out8(0xa0, 0x20); in apic_init() 381 io_out8(0x22, 0x70); in apic_init() 382 io_out8(0x23, 0x01); in apic_init()
|
/DragonOS-0.1.8/kernel/src/driver/keyboard/ |
D | ps2_keyboard.c | 188 io_out8(PORT_PS2_KEYBOARD_CONTROL, PS2_KEYBOARD_COMMAND_WRITE); in ps2_keyboard_init() 190 io_out8(PORT_PS2_KEYBOARD_DATA, PS2_KEYBOARD_PARAM_INIT); in ps2_keyboard_init()
|
/DragonOS-0.1.8/kernel/src/common/ |
D | glib.h | 157 void io_out8(unsigned short port, unsigned char value) in io_out8() function
|