Add ATA PIO IRQ handler, documentation
Still WIP, doesn't look like IRQ handler works yet.
diff --git a/src/kernel/io.c b/src/kernel/io.c
index c53ef17..0ba13ae 100644
--- a/src/kernel/io.c
+++ b/src/kernel/io.c
@@ -26,22 +26,32 @@
ushort inw(ushort port)
{
ushort ret;
- asm volatile("inw %1, %0" : "=a"(ret) : "dN"(port));
+ asm("inw %1, %0" : "=a"(ret) : "dN"(port));
return ret;
}
void outl(ushort port, uint val)
{
- asm volatile("outl %1, %0" : : "dN"(port), "a"(val));
+ asm("outl %1, %0" : : "dN"(port), "a"(val));
}
uint inl(ushort port)
{
uint ret;
- asm volatile("inl %1, %0" : "=a"(ret) : "dN"(port));
+ asm("inl %1, %0" : "=a"(ret) : "dN"(port));
return ret;
}
+void outw(ushort port, ushort val)
+{
+ asm("outw %1, %0" :: "dN"(port), "a"(val));
+}
+
+void __attribute__((noinline)) nop()
+{
+ asm("nop");
+}
+
void *memset(void *s, int c, size_t n)
{
for (size_t i = 0; i < n; i++)