code: 9ferno

Download patch

ref: 03be3a131ed2dcda25fed07258e5f39e5dda9fb2
parent: ed147e0d61ce066a1c18bae4d0ec0dc0a9b90280
author: 9ferno <gophone2015@gmail.com>
date: Thu Oct 14 03:53:01 EDT 2021

testing with pxe boot

--- a/os/pc/devkbd.c
+++ b/os/pc/devkbd.c
@@ -379,7 +379,6 @@
 	static char initfailed[] = "i8042: kbd init failed\n";
 	int c, try;
 
-	print("kbdreset\n");
 	kbd.q = qopen(1024, Qcoalesce, 0, 0);
 	if(kbd.q == nil)
 		panic("kbdreset");
--- a/os/pc64/mkfile
+++ b/os/pc64/mkfile
@@ -67,6 +67,7 @@
 
 install:V: i$CONF
 	cp i$CONF $INSTALLDIR/i$CONF
+	test -d /amd64/ && cp i$CONF /amd64/i$CONF
 
 # copies generated by the rule below
 PCHEADERS=usbehci.h mp.h ahci.h yukdump.h vga.h audio.h
--- a/os/port/dis.c
+++ b/os/port/dis.c
@@ -95,8 +95,6 @@
 {
 	Prog *p;
 
-	print("accountant isched 0x%p isched.runhd 0x%p\n",
-		isched, isched.runhd);
 	p = isched.runhd;
 	if(p != nil)
 		p->ticks++;
@@ -296,14 +294,14 @@
 	DP("tellsomeone after waserror() pid %d buf %s\n", p->pid, buf);
 	o = p->osenv;
 	if(o->childq != nil){
-		qproduce(o->childq, buf, strlen(buf));
+		ret = qproduce(o->childq, buf, strlen(buf));
 		if(ret != strlen(buf))
-			print("tellsomeone qproduce on childq sent %d bytes out of %d\n", ret, strlen(buf));
+			print("tellsomeone qproduce on childq sent %d bytes out of %ld\n", ret, strlen(buf));
 	}
 	if(o->waitq != nil){
 		ret = qproduce(o->waitq, buf, strlen(buf));
 		if(ret != strlen(buf))
-			print("tellsomeone qproduce on waitq sent %d bytes out of %d\n", ret, strlen(buf));
+			print("tellsomeone qproduce on waitq sent %d bytes out of %ld\n", ret, strlen(buf));
 	}
 	poperror();
 }
@@ -1104,9 +1102,6 @@
 				delrunq(up->prog);
 			} else
 				print("up->iprog not nil (%lux)\n", up->iprog);
-		/*} else {
-			print("completed running the program - TODO\n");
-			for(;;){}*/
 		}
 	}
 }
@@ -1126,7 +1121,7 @@
 
 	fmtinstall('D', Dconv);
 
-	// TODO addclock0link(accountant, MS2HZ);
+	addclock0link(accountant, MS2HZ);
 
 	// TODO obsolete? cpuidentify calls fpuinit() fpinit();
 	// TODO obsolete? fpsave(&up->env->fpu);
--- a/os/port/proc.c
+++ b/os/port/proc.c
@@ -94,7 +94,7 @@
 		splhi();
 		procsave(up);
 		if(setlabel(&up->sched)) {
-			/*procrestore(up);*/
+			/* procrestore(up); */
 			spllo();
 			return;
 		}