Index: kernel/arch/ppc32/src/drivers/cuda.c
===================================================================
--- kernel/arch/ppc32/src/drivers/cuda.c	(revision f74bbaf20e8d8be55495c56affc5b17ef6ea2bf0)
+++ kernel/arch/ppc32/src/drivers/cuda.c	(revision 1e241723f8bf25509356cb56bbf4d3a477c3fac5)
@@ -237,11 +237,13 @@
 int cuda_get_scancode(void)
 {
-	uint8_t kind;
-	uint8_t data[4];
-	
-	receive_packet(&kind, 4, data);
-	
-	if ((kind == PACKET_ADB) && (data[0] == 0x40) && (data[1] == 0x2c))
-		return data[2];
+	if (cuda) {
+		uint8_t kind;
+		uint8_t data[4];
+		
+		receive_packet(&kind, 4, data);
+		
+		if ((kind == PACKET_ADB) && (data[0] == 0x40) && (data[1] == 0x2c))
+			return data[2];
+	}
 	
 	return -1;
@@ -272,9 +274,11 @@
 void cuda_grab(void)
 {
-	ipl_t ipl = interrupts_disable();
-	spinlock_lock(&cuda_irq.lock);
-	cuda_irq.notif_cfg.notify = false;
-	spinlock_unlock(&cuda_irq.lock);
-	interrupts_restore(ipl);
+	if (cuda) {
+		ipl_t ipl = interrupts_disable();
+		spinlock_lock(&cuda_irq.lock);
+		cuda_irq.notif_cfg.notify = false;
+		spinlock_unlock(&cuda_irq.lock);
+		interrupts_restore(ipl);
+	}
 }
 
@@ -283,10 +287,12 @@
 void cuda_release(void)
 {
-	ipl_t ipl = interrupts_disable();
-	spinlock_lock(&cuda_irq.lock);
-	if (cuda_irq.notif_cfg.answerbox)
-		cuda_irq.notif_cfg.notify = true;
-	spinlock_unlock(&cuda_irq.unlock);
-	interrupts_restore(ipl);
+	if (cuda) {
+		ipl_t ipl = interrupts_disable();
+		spinlock_lock(&cuda_irq.lock);
+		if (cuda_irq.notif_cfg.answerbox)
+			cuda_irq.notif_cfg.notify = true;
+		spinlock_unlock(&cuda_irq.unlock);
+		interrupts_restore(ipl);
+	}
 }
 
@@ -294,5 +300,5 @@
 void cuda_init(devno_t devno, uintptr_t base, size_t size)
 {
-	cuda = (uint8_t *) hw_map(base, size);	
+	cuda = (uint8_t *) hw_map(base, size);
 	
 	chardev_initialize("cuda_kbd", &kbrd, &ops);
@@ -307,5 +313,5 @@
 	
 	pic_enable_interrupt(CUDA_IRQ);
-
+	
 	sysinfo_set_item_val("kbd", NULL, true);
 	sysinfo_set_item_val("kbd.devno", NULL, devno);
@@ -346,5 +352,7 @@
 
 void arch_reboot(void) {
-	send_packet(PACKET_CUDA, 1, CUDA_RESET);
+	if (cuda)
+		send_packet(PACKET_CUDA, 1, CUDA_RESET);
+	
 	asm volatile (
 		"b 0\n"
Index: kernel/arch/ppc32/src/drivers/pic.c
===================================================================
--- kernel/arch/ppc32/src/drivers/pic.c	(revision f74bbaf20e8d8be55495c56affc5b17ef6ea2bf0)
+++ kernel/arch/ppc32/src/drivers/pic.c	(revision 1e241723f8bf25509356cb56bbf4d3a477c3fac5)
@@ -39,5 +39,5 @@
 #include <bitops.h>
 
-static volatile uint32_t *pic;
+static volatile uint32_t *pic = NULL;
 
 void pic_init(uintptr_t base, size_t size)
@@ -48,8 +48,9 @@
 void pic_enable_interrupt(int intnum)
 {
-	if (intnum < 32) {
-		pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] | (1 << intnum);
-	} else {
-		pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] | (1 << (intnum - 32));
+	if (pic) {
+		if (intnum < 32)
+			pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] | (1 << intnum);
+		else
+			pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] | (1 << (intnum - 32));
 	}
 	
@@ -58,8 +59,9 @@
 void pic_disable_interrupt(int intnum)
 {
-	if (intnum < 32) {
-		pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] & (~(1 << intnum));
-	} else {
-		pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] & (~(1 << (intnum - 32)));
+	if (pic) {
+		if (intnum < 32)
+			pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] & (~(1 << intnum));
+		else
+			pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] & (~(1 << (intnum - 32)));
 	}
 }
@@ -67,8 +69,10 @@
 void pic_ack_interrupt(int intnum)
 {
-	if (intnum < 32) 
-		pic[PIC_ACK_LOW] = 1 << intnum;
-	else 
-		pic[PIC_ACK_HIGH] = 1 << (intnum - 32);
+	if (pic) {
+		if (intnum < 32) 
+			pic[PIC_ACK_LOW] = 1 << intnum;
+		else
+			pic[PIC_ACK_HIGH] = 1 << (intnum - 32);
+	}
 }
 
@@ -76,13 +80,15 @@
 int pic_get_pending(void)
 {
-	int pending;
-
-	pending = pic[PIC_PENDING_LOW];
-	if (pending)
-		return fnzb32(pending);
-	
-	pending = pic[PIC_PENDING_HIGH];
-	if (pending)
-		return fnzb32(pending) + 32;
+	if (pic) {
+		int pending;
+		
+		pending = pic[PIC_PENDING_LOW];
+		if (pending)
+			return fnzb32(pending);
+		
+		pending = pic[PIC_PENDING_HIGH];
+		if (pending)
+			return fnzb32(pending) + 32;
+	}
 	
 	return -1;
