feat: started pci driver structure and ide driver structure
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user