Add start of PCI and AHCI drivers
diff --git a/src/kernel/dri/ahci/Jmk b/src/kernel/dri/ahci/Jmk
new file mode 100644
index 0000000..dd2d4be
--- /dev/null
+++ b/src/kernel/dri/ahci/Jmk
@@ -0,0 +1,17 @@
+init(ahci, ahci.a)
+
+preset(freestanding)
+preset(optimize)
+preset(debug)
+preset(32)
+preset(warn)
+
+CFLAGS += -I $(ROOT)/include/kernel
+
+archetype(c)
+
+OBJECTS = ahci.o
+
+type(static_lib)
+
+finish
diff --git a/src/kernel/dri/ahci/ahci.c b/src/kernel/dri/ahci/ahci.c
new file mode 100644
index 0000000..1f5e1c3
--- /dev/null
+++ b/src/kernel/dri/ahci/ahci.c
@@ -0,0 +1 @@
+#include <dri/ahci.h>
diff --git a/src/kernel/dri/pci/Jmk b/src/kernel/dri/pci/Jmk
new file mode 100644
index 0000000..07b50d2
--- /dev/null
+++ b/src/kernel/dri/pci/Jmk
@@ -0,0 +1,17 @@
+init(pci, pci.a)
+
+preset(freestanding)
+preset(optimize)
+preset(debug)
+preset(32)
+preset(warn)
+
+CFLAGS += -I $(ROOT)/include/kernel
+
+archetype(c)
+
+OBJECTS = pci.o
+
+type(static_lib)
+
+finish
diff --git a/src/kernel/dri/pci/pci.c b/src/kernel/dri/pci/pci.c
new file mode 100644
index 0000000..09c9056
--- /dev/null
+++ b/src/kernel/dri/pci/pci.c
@@ -0,0 +1,13 @@
+#include <dri/pci.h>
+
+ushort pci_config_readw(uchar bus, uchar slot, uchar func, uchar offset)
+{
+	struct pci_config_address address =
+	{
+		.enabled = 1,
+		.bus = bus,
+		.device = slot,
+		.function = func,
+		.offset = offset ^ 0b11,
+	};
+}
diff --git a/src/kernel/io.c b/src/kernel/io.c
index 4f7d3d3..90a365c 100644
--- a/src/kernel/io.c
+++ b/src/kernel/io.c
@@ -30,6 +30,18 @@
 	return ret;
 }
 
+void outl(ushort port, uint val)
+{
+	asm volatile("outl %1, %0" : : "dN"(port), "a"(val));
+}
+
+uint inl(ushort port)
+{
+	uint ret;
+	asm volatile("inl %1, %0" : "=a"(ret) : "dN"(port));
+	return ret;
+}
+
 void *memset(void *s, int c, size_t n)
 {
 	for (size_t i = 0; i < n; i++)