wm: teppich

Download patch

ref: 40dcd63f5b1583af346e7d241211b2bf7026638a
parent: 3a52861b2d4179e7546c73bed693da37b752293e
author: mkf <mkf@cloud9p.org>
date: Sun Dec 3 16:12:36 EST 2023

pc/kern.c use adam, and cons

--- a/pc/kern.c
+++ b/pc/kern.c
@@ -1,18 +1,19 @@
 #include <u.h>
 #include <libc.h>
-#include "../cmd/rc.h"
-
 #include <mem.h>
+#include <cons.h>
+#include <user.h>
+#include <x86.h>
 
-#include <vga.h>
-#include <ps2.h>
+#include "../cmd/rc.h"
 
-
 /* abandon hope, all ye who enter here */
 void
 panic(void)
 {
-	vga_puts("panic: give up. it's over.\n");
+	cons_write(pccons, "PANIC!\n");
+	cons_write(serialcons, "PANIC!\n");
+	outb(KBC, 0xFE);
 }
 
 void
@@ -21,10 +22,10 @@
 	/* set up memory map */
 	memset(memap, FREE, MEM_MAX * (1024 / BLOCKSIZE));
 
-	vga_init();
-	ps2_init();
-	
-	printf("Teppich\n");
-	
+	cons_init(pccons);
+	cons_write(bitcons, "Teppich");
+	users_init();
+	cuser = adam;
+
 	rc_main();
 }