Home
last modified time | relevance | path

Searched refs:io_out8 (Results 1 – 10 of 10) sorted by relevance

/DragonOS-0.1.2/kernel/src/driver/interrupt/8259A/
D8259A.c17 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.2/kernel/src/driver/uart/
Duart.rs1 use crate::include::bindings::bindings::{io_in8, io_out8};
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()
109io_out8(port + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold in uart_init()
110io_out8(port + 4, 0x08); // IRQs enabled, RTS/DSR clear (现代计算机上一般都不需要hardware flow control,因此不需要置位… in uart_init()
111 io_out8(port + 4, 0x1E); // Set in loopback mode, test the serial chip in uart_init()
112io_out8(port + 0, 0xAE); // Test serial chip (send byte 0xAE and check if serial returns same byte) in uart_init()
[all …]
/DragonOS-0.1.2/kernel/src/driver/disk/
Data.c71 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.2/kernel/src/libs/
Dglib.c11 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.2/kernel/src/driver/mouse/
Dps2_mouse.c95 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.2/kernel/src/driver/timers/rtc/
Drtc.c7 io_out8(0x70, 0x80 | addr); \
41 io_out8(0x70, 0x00); in rtc_get_cmos_time()
/DragonOS-0.1.2/kernel/src/driver/interrupt/apic/
Dapic.c358 io_out8(0x21, 0xff); in apic_init()
360 io_out8(0xa1, 0xff); in apic_init()
363 io_out8(0x20, 0x20); in apic_init()
364 io_out8(0xa0, 0x20); in apic_init()
369 io_out8(0x22, 0x70); in apic_init()
370 io_out8(0x23, 0x01); in apic_init()
/DragonOS-0.1.2/kernel/src/driver/keyboard/
Dps2_keyboard.c188 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.2/kernel/src/common/
Dglib.h157 void io_out8(unsigned short port, unsigned char value) in io_out8() function
/DragonOS-0.1.2/kernel/src/syscall/
Dsyscall.c343 io_out8(0x64, 0xfe); in sys_reboot()