Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0211/7

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


Various mmu cleanups.
 [rsc] --rw-rw-r-- M 771144 glenda sys 55143 Feb 11 09:13 sys/src/9/pc/sd53c8xx.c
	/n/sourcesdump/2006/0211/plan9/sys/src/9/pc/sd53c8xx.c:1941,1948 - 
	/n/sourcesdump/2006/0212/plan9/sys/src/9/pc/sd53c8xx.c:1941,1946
	  	return r->status = status;
	  }
	  
	- #define	vpt ((ulong*)VPT)
	- #define	VPTX(va)		(((ulong)(va))>>12)
	  static void
	  cribbios(Controller *c)
	  {
 [rsc] --rw-rw-r-- M 771144 rsc sys 2678 Feb 11 09:10 sys/src/9/pc/realmode.c
	/n/sourcesdump/2006/0211/plan9/sys/src/9/pc/realmode.c:28,33 - 
	/n/sourcesdump/2006/0212/plan9/sys/src/9/pc/realmode.c:28,34
	  realmode(Ureg *ureg)
	  {
	  	int s;
	+ 	ulong cr3;
	  	extern void realmode0(void);	/* in l.s */
	  	extern void i8259off(void), i8259on(void);
	  
	/n/sourcesdump/2006/0211/plan9/sys/src/9/pc/realmode.c:42,47 - 
	/n/sourcesdump/2006/0212/plan9/sys/src/9/pc/realmode.c:43,49
	  
	  	s = splhi();
	  	m->pdb[PDX(0)] = m->pdb[PDX(KZERO)];	/* identity map low */
	+ 	cr3 = getcr3();
	  	putcr3(PADDR(m->pdb));
	  	i8259off();
	  	realmode0();
	/n/sourcesdump/2006/0211/plan9/sys/src/9/pc/realmode.c:51,59 - 
	/n/sourcesdump/2006/0212/plan9/sys/src/9/pc/realmode.c:53,61
	  		 * Don't turn interrupts on before the kernel is ready!
	  		 */
	  		i8259on();
	- 		putcr3(m->tss->cr3);
	  	}
	  	m->pdb[PDX(0)] = 0;	/* remove low mapping */
	+ 	putcr3(cr3);
	  	splx(s);
	  	*ureg = realmoderegs;
	  	unlock(&rmlock);
 [rsc] --rw-rw-r-- M 771144 glenda sys 23014 Feb 11 09:13 sys/src/9/port/devcons.c
	/n/sourcesdump/2006/0211/plan9/sys/src/9/port/devcons.c:289,300 - 
	/n/sourcesdump/2006/0212/plan9/sys/src/9/port/devcons.c:289,300
	  	va_start(arg, fmt);
	  	n = vseprint(buf+strlen(buf), buf+sizeof(buf), fmt, arg) - buf;
	  	va_end(arg);
	- 	buf[n] = '\n';
	- 	uartputs(buf, n+1);
	+ 	iprint("%s\n", buf);
	  	if(consdebug)
	  		(*consdebug)();
	  	spllo();
	  	prflush();
	+ 	buf[n] = '\n';
	  	putstrn(buf, n+1);
	  	dumpstack();
	  
 [rsc] --rw-rw-r-- M 771144 glenda sys 3200 Feb 11 09:09 sys/src/9/port/qlock.c
	/n/sourcesdump/2006/0211/plan9/sys/src/9/port/qlock.c:19,27 - 
	/n/sourcesdump/2006/0212/plan9/sys/src/9/port/qlock.c:19,27
	  	Proc *p;
	  
	  	if(m->ilockdepth != 0)
	- 		print("qlock: %lux: ilockdepth %d", getcallerpc(&q), m->ilockdepth);
	+ 		print("qlock: %lux: ilockdepth %d\n", getcallerpc(&q), m->ilockdepth);
	  	if(up != nil && up->nlocks.ref)
	- 		print("qlock: %lux: nlocks %lud", getcallerpc(&q), up->nlocks.ref);
	+ 		print("qlock: %lux: nlocks %lud\n", getcallerpc(&q), up->nlocks.ref);
	  
	  	if(q->use.key == 0x55555555)
	  		panic("qlock: q %p, key 5*\n", q);
 [rsc] --rw-rw-r-- M 771144 glenda sys 6236 Feb 11 13:09 sys/src/9/pc/i8253.c
	/n/sourcesdump/2006/0211/plan9/sys/src/9/pc/i8253.c:201,207 - 
	/n/sourcesdump/2006/0212/plan9/sys/src/9/pc/i8253.c:201,207
	  		period = want - now;
	  		if(period < MinPeriod)
	  			period = MinPeriod;
	- 		else if(period > (4*MaxPeriod)/5)	/* strong attraction to MaxPeriod */
	+ 		else if(period > MaxPeriod)
	  			period = MaxPeriod;
	  	}
	  


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].