feat: started pci driver structure and ide driver structure

This commit is contained in:
2021-02-03 22:50:39 +01:00
parent e8816cfdfd
commit 706147c123
9 changed files with 373 additions and 1 deletions

View File

@@ -28,6 +28,15 @@ unsigned short port_word_in(unsigned short port) {
return result;
}
void port_wordt_out(unsigned short port, unsigned short data) {
void port_word_out(unsigned short port, unsigned short data) {
__asm__("out %%ax, %%dx" : : "a" (data), "d" (port));
}
unsigned int port_double_word_in(unsigned int port) {
unsigned int result;
__asm__("in %%dx, %%eax" : "=a" (result) : "d" (port));
return result;
}
void port_double_word_out(unsigned short port, unsigned int data) {
__asm__("out %%eax, %%dx" : : "a" (data), "d" (port));
}