Plan 9 from Bell Labs’s /usr/web/sources/extra/changes/2006/0321

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


C: set -r by default
 [rsc] --rwxrwxr-x M 951118 glenda sys 889 Mar 21 11:31 rc/bin/C
	/n/sourcesdump/2006/0321/plan9/rc/bin/C:2,7 - 
	/n/sourcesdump/2006/0322/plan9/rc/bin/C:2,8
	  
	  rfork n
	  oflag=()
	+ opt=-r
	  while(~ $1 -*)
	  	switch($1){
	  	case -r
	/n/sourcesdump/2006/0321/plan9/rc/bin/C:18,23 - 
	/n/sourcesdump/2006/0322/plan9/rc/bin/C:19,26
	  switch($1){
	  case fs
	  	server=edith
	+ case sources
	+ 	server=ethel
	  case ella
	  	exec C office0
	  	exit

/sys/lib/dist/pc/mkfile: just staying in sync
 [rsc] --rw-rw-r-- M 951118 glenda sys 2193 Mar 21 11:29 sys/lib/dist/pc/mkfile
	/n/sourcesdump/2006/0321/plan9/sys/lib/dist/pc/mkfile:62,68 - 
	/n/sourcesdump/2006/0322/plan9/sys/lib/dist/pc/mkfile:62,68
	  # cannot list both 9pcflop.gz and 9pccd.gz because they cannot be built 
	  # in parallel.  stupid mk
	  cddisk:D: 9load /sys/src/9/pc/9pcflop.gz plan9.ini.cd /lib/vgadb
	- 	mk /sys/src/9/pc/9pccd.gz
	+ 	mk -a /sys/src/9/pc/9pccd.gz
	  	rfork n
	  	bind plan9.ini.cd plan9.ini
	  	dd -if /dev/zero -of cddisk -bs 1024 -count 2880 >[2]/dev/null
	/n/sourcesdump/2006/0321/plan9/sys/lib/dist/pc/mkfile:74,81 - 
	/n/sourcesdump/2006/0322/plan9/sys/lib/dist/pc/mkfile:74,83
	  	rm -rf boot boot.bz2 boot.bflz boot.raw root.bz2 9pcflop ndisk 9load cddisk proto.cp 9loaddebug
	  
	  install:V: ndisk 9loaddebug
	- 	cp 9loaddebug ../web.protect2
	- 	cp ndisk ../web.protect2/disk
	+ 	9fs outside
	+ 	dst=/n/outside/sys/lib/dist/web.protect
	+ 	cp 9loaddebug $dst
	+ 	cp ndisk $dst/disk
	  	#mk clean
	  
	  test:V: ndisk 9loaddebug

syscall: much larger buffer
 [rsc] --rw-rw-r-- M 951118 glenda sys 3954 Mar 21 11:21 sys/src/cmd/syscall/syscall.c
	/n/sourcesdump/2006/0321/plan9/sys/src/cmd/syscall/syscall.c:3,9 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/cmd/syscall/syscall.c:3,9
	  #include <sys.h>
	  #include <fcall.h>
	  
	- char	buf[8192];
	+ char	buf[1048576];
	  #define	NARG	5
	  uintptr	arg[NARG];
	  

kernel: allocate DMA bounce buffers early; various comment / print fixes
 [rsc] --rw-rw-r-- M 951118 glenda sys 532 Mar 21 11:31 sys/src/9/alphapc/apccpu
	/n/sourcesdump/2006/0321/plan9/sys/src/9/alphapc/apccpu:33,39 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/alphapc/apccpu:33,39
	  	arch164
	  
	  	sdata		pci sdscsi
	- 	sd53c8xx	pci sdscsi
	+ #	sd53c8xx	pci sdscsi
	  
	  	uarti8250
	  
 [rsc] --rw-rw-r-- M 951118 glenda sys 3805 Mar 21 11:28 sys/src/9/mtx/dat.h
	/n/sourcesdump/2006/0321/plan9/sys/src/9/mtx/dat.h:30,36 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/mtx/dat.h:30,36
	  
	  struct Lock
	  {
	- 	ulong	key;			/* semaphore (non-zero = locked) */
	+ 	ulong	key;
	  	ulong	sr;
	  	ulong	pc;
	  	Proc	*p;
 [rsc] --rw-rw-r-- M 951118 glenda sys 6628 Mar 21 11:25 sys/src/9/pc/dat.h
	/n/sourcesdump/2006/0321/plan9/sys/src/9/pc/dat.h:113,119 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/pc/dat.h:113,119
	  	Page*	mmuused;		/* used page table pages */
	  	Page*	kmaptable;		/* page table used by kmap */
	  	uint	lastkmap;		/* last entry used by kmap */
	- 	int	nkmap;		/* number of current kmaps */
	+ 	int	nkmap;			/* number of current kmaps */
	  };
	  
	  /*
	/n/sourcesdump/2006/0321/plan9/sys/src/9/pc/dat.h:136,142 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/pc/dat.h:136,142
	  	ulong	ss1;			/* privilege level 1 stack selector */
	  	ulong	esp2;			/* privilege level 2 stack pointer */
	  	ulong	ss2;			/* privilege level 2 stack selector */
	- 	ulong	cr3;			/* page directory base register */
	+ 	ulong	xcr3;			/* page directory base register - not used because we don't use trap gates */
	  	ulong	eip;			/* instruction pointer */
	  	ulong	eflags;			/* flags register */
	  	ulong	eax;			/* general registers */
 [rsc] --rw-rw-r-- M 951118 glenda sys 20139 Mar 21 11:25 sys/src/9/pc/devfloppy.c
	/n/sourcesdump/2006/0321/plan9/sys/src/9/pc/devfloppy.c:180,185 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/pc/devfloppy.c:180,190
	  			maxtsize = t->tsize;
	  	}
	  
	+ 	/*
	+ 	 * Should check if this fails. Can do so
	+ 	 * if there is no space <= 16MB for the DMA
	+ 	 * bounce buffer.
	+ 	 */
	  	dmainit(DMAchan, maxtsize);
	  
	  	/*
 [jmk] --rw-rw-r-- M 951118 glenda sys 5332 Mar 21 13:39 sys/src/9/pc/dma.c
	/n/sourcesdump/2006/0321/plan9/sys/src/9/pc/dma.c:62,72 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/pc/dma.c:62,107
	  	 1 },
	  };
	  
	+ extern int i8237dma;
	+ static void* i8237bva[2];
	+ static int i8237used;
	+ 
	  /*
	   *  DMA must be in the first 16MB.  This gets called early by the
	   *  initialisation routines of any devices which require DMA to ensure
	   *  the allocated bounce buffers are below the 16MB limit.
	   */
	+ void
	+ _i8237alloc(void)
	+ {
	+ 	void* bva;
	+ 
	+ 	if(i8237dma <= 0)
	+ 		return;
	+ 	if(i8237dma > 2)
	+ 		i8237dma = 2;
	+ 
	+ 	bva = xspanalloc(64*1024*i8237dma, BY2PG, 64*1024);
	+ 	if(bva == nil || PADDR(bva)+64*1024*i8237dma > 16*MB){
	+ 		/*
	+ 		 * This will panic with the current
	+ 		 * implementation of xspanalloc().
	+ 		if(bva != nil)
	+ 			xfree(bva);
	+ 		 */
	+ 		return;
	+ 	}
	+ 
	+ 	i8237bva[0] = bva;
	+ 	if(i8237dma == 2)
	+ 		i8237bva[1] = ((uchar*)i8237bva[0])+64*1024;
	+ }
	+ 
	+ /*
	+  *  DMA must be in the first 16MB.  This gets called early by the
	+  *  initialisation routines of any devices which require DMA to ensure
	+  *  the allocated bounce buffers are below the 16MB limit.
	+  */
	  int
	  dmainit(int chan, int maxtransfer)
	  {
	/n/sourcesdump/2006/0321/plan9/sys/src/9/pc/dma.c:94,112 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/pc/dma.c:129,140
	  		return 0;
	  	}
	  
	- 	xp->bva = xspanalloc(maxtransfer, BY2PG, 64*1024);
	- 	if(xp->bva == nil)
	+ 	if(i8237used >= i8237dma || i8237bva[i8237used] == nil){
	+ 		print("no i8237 DMA bounce buffer < 16MB\n");
	  		return 1;
	- 	xp->bpa = PADDR(xp->bva);
	- 	if(xp->bpa >= 16*MB){
	- 		/*
	- 		 * This will panic with the current
	- 		 * implementation of xspanalloc().
	- 		xfree(xp->bva);
	- 		 */
	- 		xp->bva = nil;
	- 		return 1;
	  	}
	+ 	xp->bva = i8237bva[i8237used++];
	+ 	xp->bpa = PADDR(xp->bva);
	  	xp->blen = maxtransfer;
	  	xp->len = 0;
	  	xp->isread = 0;
 [rsc] --rw-rw-r-- M 951118 glenda sys 15304 Mar 21 11:25 sys/src/9/pc/main.c
	/n/sourcesdump/2006/0321/plan9/sys/src/9/pc/main.c:70,76 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/pc/main.c:70,78
	  	}
	  }
	  
	- void mmuinit0(void);
	+ extern void mmuinit0(void);
	+ extern void (*i8237alloc)(void);
	+ 
	  void
	  main(void)
	  {
	/n/sourcesdump/2006/0321/plan9/sys/src/9/pc/main.c:93,98 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/pc/main.c:95,102
	  	confinit();
	  	archinit();
	  	xinit();
	+ 	if(i8237alloc != nil)
	+ 		i8237alloc();
	  	trapinit();
	  	printinit();
	  	cpuidprint();
 [rsc] --rwxrwxr-x M 951118 glenda sys 4242 Mar 21 11:24 sys/src/9/port/mkdevc
	/n/sourcesdump/2006/0321/plan9/sys/src/9/port/mkdevc:25,30 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/port/mkdevc:25,34
	  			devuart = 1;
	  		else if($1 ~ "vga")
	  			devvga = 1;
	+ 		for(i = 2; i <= NF; i++){
	+ 			if($i ~ "dma" && objtype ~ "(386|alpha|amd64)")
	+ 				i8237dma++;
	+ 		}
	  }
	  collect && section ~ "ip"{
	  		ip[nip++] = $1;
	/n/sourcesdump/2006/0321/plan9/sys/src/9/port/mkdevc:84,89 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/port/mkdevc:88,102
	  			printf "\t&%sdevtab,\n", dev[i];
	  		printf "\tnil,\n};\n\n";
	  
	+ 		if(objtype ~ "(386|alpha|amd64)"){
	+ 			alloc = "nil";
	+ 			if(i8237dma){
	+ 				printf "extern void _i8237alloc(void);\n";
	+ 				alloc = "_i8237alloc";
	+ 			}
	+ 			printf "void (*i8237alloc)(void) = %s;\n", alloc;
	+ 			printf "int i8237dma = %d;\n\n", i8237dma;
	+ 		}
	  
	  		for(i = 0; i < nlink; i++)
	  			printf "extern void %slink(void);\n", link[i];
 [rsc] --rw-rw-r-- M 951118 glenda sys 3928 Mar 21 11:17 sys/src/9/port/taslock.c
	/n/sourcesdump/2006/0321/plan9/sys/src/9/port/taslock.c:26,32 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/port/taslock.c:26,32
	  
	  	x = _xdec(&r->ref);
	  	if(x < 0)
	- 		panic("decref pc=0x%lux", getcallerpc(&r));
	+ 		panic("deccnt pc=0x%lux", getcallerpc(&r));
	  	return x;
	  }
	  
 [rsc] --rw-rw-r-- M 951118 glenda sys 3804 Mar 21 12:07 sys/src/9/pc/mkfile
	/n/sourcesdump/2006/0321/plan9/sys/src/9/pc/mkfile:77,84 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/pc/mkfile:77,94
	  	$LD -o $target -T$KTZERO -l $OBJ $CONF.$O $LIB
	  	size $target
	  
	- $p$CONF.gz:	$p$CONF
	- 	strip -o /fd/1 $p$CONF | gzip -9 > $p$CONF.gz
	+ # don't strip the gzipped kernels -- too frustrating when that's all you have!
	+ $p%.gz:	$p%
	+ 	gzip -9 <$p$stem >$p$stem.gz
	+ 
	+ 
	+ # pcflop and pccd need all the space they can get
	+ 9pcflop.gz: 9pcflop
	+ 	strip -o /fd/1 9pcflop | gzip -9 >9pcflop.gz
	+ 
	+ 9pccd.gz: 9pccd
	+ 	strip -o /fd/1 9pccd | gzip -9 >9pccd.gz
	+ 
	  
	  install:V:	$p$CONF $p$CONF.gz
	  	cp $p$CONF $p$CONF.gz /$objtype/
 [jmk] --rw-rw-r-- M 951118 glenda sys 6526 Mar 21 13:39 sys/src/9/alphapc/dma.c
	/n/sourcesdump/2006/0321/plan9/sys/src/9/alphapc/dma.c:64,69 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/alphapc/dma.c:64,104
	  	 1 },
	  };
	  
	+ extern int i8237dma;
	+ static void* i8237bva[2];
	+ static int i8237used;
	+ 
	+ /*
	+  *  DMA must be in the first 16MB.  This gets called early by the
	+  *  initialisation routines of any devices which require DMA to ensure
	+  *  the allocated bounce buffers are below the 16MB limit.
	+  */
	+ void
	+ _i8237alloc(void)
	+ {
	+ 	void* bva;
	+ 
	+ 	if(i8237dma <= 0)
	+ 		return;
	+ 	if(i8237dma > 2)
	+ 		i8237dma = 2;
	+ 
	+ 	bva = xspanalloc(64*1024*i8237dma, BY2PG, 64*1024);
	+ 	if(bva == nil || PADDR(bva)+64*1024*i8237dma > 16*MB){
	+ 		/*
	+ 		 * This will panic with the current
	+ 		 * implementation of xspanalloc().
	+ 		if(bva != nil)
	+ 			xfree(bva);
	+ 		 */
	+ 		return;
	+ 	}
	+ 
	+ 	i8237bva[0] = bva;
	+ 	if(i8237dma == 2)
	+ 		i8237bva[1] = ((uchar*)i8237bva[0])+64*1024;
	+ }
	+ 
	  static void
	  dmastatus(DMA *dp, int chan, char c)
	  {
	/n/sourcesdump/2006/0321/plan9/sys/src/9/alphapc/dma.c:83,93 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/alphapc/dma.c:118,123
	  	print("%c: addr %uX len %uX stat %uX\n", c, a, l, s);
	  }
	  
	- /*
	-  *  DMA must be in the first 16MB.  This gets called early by the
	-  *  initialisation routines of any devices which require DMA to ensure
	-  *  the allocated bounce buffers are below the 16MB limit.
	-  */
	  int
	  dmainit(int chan, int maxtransfer)
	  {
	/n/sourcesdump/2006/0321/plan9/sys/src/9/alphapc/dma.c:121,139 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/9/alphapc/dma.c:151,162
	  	}
	  //dmastatus(dp, chan, 'I');
	  
	- 	xp->bva = xspanalloc(maxtransfer, BY2PG, 64*1024);
	- 	if(xp->bva == nil)
	+ 	if(i8237used >= i8237dma || i8237bva[i8237used] == nil){
	+ 		print("no i8237 DMA bounce buffer < 16MB\n");
	  		return 1;
	- 	xp->bpa = PADDR(xp->bva);
	- 	if(xp->bpa >= 16*MB){
	- 		/*
	- 		 * This will panic with the current
	- 		 * implementation of xspanalloc().
	- 		xfree(xp->bva);
	- 		 */
	- 		xp->bva = nil;
	- 		return 1;
	  	}
	+ 	xp->bva = i8237bva[i8237used++];
	+ 	xp->bpa = PADDR(xp->bva);
	  	xp->blen = maxtransfer;
	  	xp->len = 0;
	  	xp->isread = 0;
 [jmk] --rw-rw-r-- M 951118 glenda sys 5332 Mar 21 13:39 sys/src/9/pc/dma.c

/sys/src/cmd/mkfile: infer list of compilers
 [rsc] --rw-rw-r-- M 951118 glenda sys 2451 Mar 21 11:35 sys/src/cmd/mkfile
	/n/sourcesdump/2006/0321/plan9/sys/src/cmd/mkfile:8,14 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/cmd/mkfile:8,14
	  YFLAGS=-d
	  
	  NOTSYS=sml|dup
	- BUGGERED=gc|lmlvideo|dwb|unix|perl|celp|mosml|ovac|vfs|aviation|_vnc|postscript
	+ BUGGERED=gc|lmlvideo|dwb|unix|perl|celp|mosml|ovac|vfs|aviation|_vnc|postscript|nventi|cvsold|cvs
	  OUTOFDATE=old|ssls
	  
	  NOMK=$NOTSYS|$BUGGERED|$OUTOFDATE
	/n/sourcesdump/2006/0321/plan9/sys/src/cmd/mkfile:116,126 - 
	/n/sourcesdump/2006/0322/plan9/sys/src/cmd/mkfile:116,129
	  compilers:V:
	  	@{
	  		cd cc
	+ 		mk clean
	  		mk installall
	  		mk clean
	  	}
	- 	for(i in 1c 2c 5c 7c 8c kc qc vc) @{
	+ 	for(i in ?c)
	+ 	if(! ~ $i cc rc) @{
	  		cd $i;
	+ 		mk clean
	  		mk installall
	  		mk clean
	  	}


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.