Add paging
diff --git a/src/io.c b/src/io.c
index 1b35f71..52e5d04 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1,22 +1,21 @@
#include "io.h"
-
void outb(ushort port, uchar val)
{
- asm volatile("outb %1, %0" : : "dN" (port), "a" (val));
+ asm volatile("outb %1, %0" : : "dN"(port), "a"(val));
}
uchar inb(ushort port)
{
uchar ret;
- asm volatile("inb %1, %0" : "=a" (ret) : "dN" (port));
+ asm volatile("inb %1, %0" : "=a"(ret) : "dN"(port));
return ret;
}
ushort inw(ushort port)
{
ushort ret;
- asm volatile("inw %1, %0" : "=a" (ret) : "dN" (port));
+ asm volatile("inw %1, %0" : "=a"(ret) : "dN"(port));
return ret;
}
@@ -26,6 +25,7 @@
{
((uchar *)s)[i] = c;
}
+ return s;
}
void *memcpy(void *dest, const void *src, size_t n)
@@ -34,9 +34,10 @@
{
((uchar *)dest)[i] = ((uchar *)src)[i];
}
+ return dest;
}
void io_wait()
{
- asm volatile("outb %0, $0x80" :: "a"(0));
+ asm volatile("outb %0, $0x80" ::"a"(0));
}