Index: kernel/arch/amd64/include/asm.h
===================================================================
--- kernel/arch/amd64/include/asm.h	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
+++ kernel/arch/amd64/include/asm.h	(revision 7919cd502f95d0601ec48760744af644656dfb4f)
@@ -82,4 +82,34 @@
 }
 
+/** Word from port
+ *
+ * Get word from port
+ *
+ * @param port Port to read from
+ * @return Value read
+ */
+static inline uint16_t pio_read_16(ioport16_t *port)
+{
+	uint16_t val;
+	
+	asm volatile ("inw %w1, %w0 \n" : "=a" (val) : "d" (port));
+	return val;
+}
+
+/** Double word from port
+ *
+ * Get double word from port
+ *
+ * @param port Port to read from
+ * @return Value read
+ */
+static inline uint32_t pio_read_32(ioport32_t *port)
+{
+	uint32_t val;
+	
+	asm volatile ("inl %w1, %0 \n" : "=a" (val) : "d" (port));
+	return val;
+}
+
 /** Byte to port
  *
@@ -92,4 +122,28 @@
 {
 	asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port));
+}
+
+/** Word to port
+ *
+ * Output word to port
+ *
+ * @param port Port to write to
+ * @param val Value to write
+ */
+static inline void pio_write_16(ioport16_t *port, uint16_t val)
+{
+	asm volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port));
+}
+
+/** Double word to port
+ *
+ * Output double word to port
+ *
+ * @param port Port to write to
+ * @param val Value to write
+ */
+static inline void pio_write_32(ioport32_t *port, uint32_t val)
+{
+	asm volatile ("outl %0, %w1\n" : : "a" (val), "d" (port));
 }
 
Index: kernel/arch/amd64/src/amd64.c
===================================================================
--- kernel/arch/amd64/src/amd64.c	(revision 9979acb60a5eb42e08938818e5cc4fd945626555)
+++ kernel/arch/amd64/src/amd64.c	(revision 7919cd502f95d0601ec48760744af644656dfb4f)
@@ -215,6 +215,4 @@
 	ega_redraw();
 #endif
-	
-	i8042_grab();
 }
 
@@ -224,5 +222,4 @@
 void arch_release_console(void)
 {
-	i8042_release();
 }
 
