git: 9front

Download patch

ref: 2c866f48bf0224e5771c7ec4922ed09218fc475f
parent: b95e8e2293c90cfd3dde478ecbe0179f97114f28
author: cinap_lenrek <cinap_lenrek@localhost>
date: Fri Apr 15 03:25:45 EDT 2011

let the kernel set dma mode for ata by default

--- a/rc/bin/termrc
+++ b/rc/bin/termrc
@@ -9,30 +9,6 @@
 for(i in f t m v L P u U '$' Σ κ)
 	/bin/bind -a '#'^$i /dev >/dev/null >[2=1]
 
-fn ask {
-	if(~ $"$1 ask){
-		echo -n $1
-		echo -n $2
-		echo -n ' ['
-		echo -n $3
-		echo -n '] '
-		$1=`{read}
-		if(~ $"$1 '!rc'){
-			rc -i
-			$1=ask
-		}
-		if(~ $#$1 0)
-			$1=$3
-		ask $*
-	}
-}
-
-ask dmamode ' is (on, off)' on
-if(~ $"dmamode on off){
-	for(c in `{ls /dev/sd*/ctl >[2]/dev/null})
-		echo dma $dmamode >$c
-}
-
 # set up any partitions
 diskparts
 
@@ -89,6 +65,24 @@
 	if(! ~ `{cat /dev/user} none)
 		if(test -e /bin/aux/vmware)
 			aux/vmware
+}
+
+fn ask {
+	if(~ $"$1 ask){
+		echo -n $1
+		echo -n $2
+		echo -n ' ['
+		echo -n $3
+		echo -n '] '
+		$1=`{read}
+		if(~ $"$1 '!rc'){
+			rc -i
+			$1=ask
+		}
+		if(~ $#$1 0)
+			$1=$3
+		ask $*
+	}
 }
 
 ask vgasize ' is (text, 640x480x8, 1024x768x16, ...)' 1024x768x16
--- a/sys/lib/dist/pc/plan9.ini.cd
+++ b/sys/lib/dist/pc/plan9.ini.cd
@@ -2,17 +2,11 @@
 # very cautious settings to get started.
 # will defeat booting from usb devices.
 *nomp=1
-# *noahciload=1
-# *debugload=1
 *nodumpstack=1
-# this would disable ether and usb probing.
-# *nousbprobe=1
-# *noetherprobe=1
 partition=new
 mouseport=ask
 monitor=ask
 vgasize=ask
-dmamode=ask
 adisk=/dev/sdD0/data
 cdboot=yes
 # console=0
--- a/sys/src/9/pc/sdata.c
+++ b/sys/src/9/pc/sdata.c
@@ -570,7 +570,8 @@
 		if(drive->dma)
 			drive->dma |= 'U'<<16;
 	}
-
+	if(!getconf("*nodma"))
+		drive->dmactl = drive->dma;
 	return dma;
 }
 
--- a/sys/src/boot/pc/mkfile
+++ b/sys/src/boot/pc/mkfile
@@ -54,17 +54,11 @@
 test.iso: 9bootiso
 	rm -fr tmp $target
 	mkdir tmp
-	touch tmp/foo
-	touch tmp/bar
-	touch tmp/baz
-	touch tmp/386aaa
 	mkdir tmp/386
-	cp 386/9bootiso tmp/386
-	cp /386/9pc tmp/386
-	cp /386/9pcload tmp/386
-	cp /386/9pcf tmp/386
+	cp 9bootiso tmp/386
+	cp /386/9pccd tmp/386
 	mkdir tmp/cfg
-	echo 'bootfile=/386/9pc' >tmp/cfg/plan9.ini
+	echo 'bootfile=/386/9pccd' >tmp/cfg/plan9.ini
 	disk/mk9660 -B 386/9bootiso -p /sys/lib/sysconfig/proto/allproto -s tmp $target
 	rm -fr tmp
 
--