Browse Source

vga: can run acme/rio/clock, no mouse yet.

Currently
- bug in poolalloc, so we're not using it yet
- bug in addclock0link, so not soft cursor timer
- vmap is no longer panic'ing if m->machno > 0, don't know why that was set.

But it properly sets and blanks the display.

You can now run stuff like acme and keyboard input works. No mouse.

Do this:

bind -a '#m' /dev/mouse
aux/realemu
aux/mouse ps2
aux/vga -m vesa -l 1024x768x8 && acme
(or other -l of your choice -- aux/vga -m vesa -p for a list)

start typing. Note typing works. No screen output on console.

Change-Id: Ic1a2a3f63515d15019c5ad713360bf0ac8e1f325
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 8 years ago
parent
commit
056e05ba50

+ 4 - 0
sys/src/9/amd64/amd64cpu.json

@@ -94,8 +94,12 @@
 				"nvram": "/util/nvram",
 				"prep": "/$ARCH/bin/disk/prep",
 				"rc": "/$ARCH/bin/rc",
+				"ps": "/$ARCH/bin/ps",
+				"ed": "/$ARCH/bin/ed",
 				"rcmain": "/rc/lib/rcmain",
 				"screenconsole": "/$ARCH/bin/aux/screenconsole",
+				"realemu": "/$ARCH/bin/aux/realemu",
+				"vga": "/$ARCH/bin/aux/vga",
 				"srv": "/$ARCH/bin/srv",
 				"startdisk": "startdisk",
 				"usbd": "/$ARCH/bin/usb/usbd",

+ 1 - 2
sys/src/9/amd64/screen.c

@@ -700,11 +700,10 @@ swcursorinit(void)
 {
 	static int init, warned;
 	VGAscr *scr;
-
 	didswcursorinit = 1;
 	if(!init){
 		init = 1;
-		addclock0link(swcursorclock, 10);
+		//addclock0link(swcursorclock, 10);
 	}
 	scr = &vgascreen[0];
 	if(scr==nil || scr->gscreen==nil)

+ 8 - 1
sys/src/9/amd64/vga.c

@@ -198,8 +198,15 @@ vgascreenwin(VGAscr* scr)
 {
 	int h, w;
 
+	if (! scr)
+		error("vgascreenwin: no scr");
+
+	if (! scr->memdefont)
+		error("vgascreenwin: no scr->memdefont");
+
 	if (! scr->memdefont->info)
-		error("no memdefont info");
+		error("vgascreenwin: no memdefont info");
+
 	h = scr->memdefont->height;
 
 	if (h == 0){

+ 0 - 3
sys/src/9/port/devcoreboot.c

@@ -43,9 +43,6 @@
 
 /* === Parsing code === */
 /* This is the generic parsing code. */
-#define I_AM_HERE print("Core 0 is in %s() at %s:%d\n", \
-                         __FUNCTION__, __FILE__, __LINE__);
-
 static void cb_parse_memory(void *ptr, struct sysinfo_t *info)
 { print("%s\n", __func__);
 	struct cb_memory *mem = ptr;

+ 2 - 0
sys/src/9/port/devdraw.c

@@ -677,6 +677,8 @@ drawfreedimage(DImage *dimage)
 	int i;
 	Memimage *l;
 	DScreen *ds;
+	print("WARNING: NOT FREEING IMAGE. IF WE DO WE GET A DOUBLE FREE PANIC\n");
+return;
 
 	dimage->ref--;
 	if(dimage->ref < 0)

+ 4 - 0
sys/src/9/port/portfns.h

@@ -427,3 +427,7 @@ void oprof_alarm_handler(Ureg *u);
 void oprofile_add_backtrace(uintptr_t pc, uintptr_t fp);
 void oprofile_add_userpc(uintptr_t pc);
 int alloc_cpu_buffers(void);
+
+#define I_AM_HERE print("Core 0 is in %s() at %s:%d\n", \
+                         __FUNCTION__, __FILE__, __LINE__);
+

+ 2 - 2
sys/src/libmemdraw/alloc.c

@@ -93,8 +93,8 @@ allocmemimage(Rectangle r, uint32_t chan)
 		return nil;
 
 	md->ref = 1;
-	md->base = poolalloc(imagmem,
-			     sizeof(Memdata*)+(1+nw)*sizeof(uint32_t));
+	md->base = //poolalloc(imagmem,
+		malloc(	     sizeof(Memdata*)+(1+nw)*sizeof(uint32_t));
 	if(md->base == nil){
 		free(md);
 		return nil;

+ 1 - 1
util/QRUN

@@ -1,4 +1,4 @@
-sudo qemu-system-x86_64 -s -cpu Opteron_G1 -smp 8 -m 2048  \
+sudo qemu-system-x86_64 -s -cpu Haswell -smp 8 -m 2048  \
 -serial stdio \
 --machine pc \
 -net nic,model=rtl8139 \