Plan 9 from Bell Labs’s /usr/web/sources/extra/changes/2005/1107

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


Figure out KZERO.
 [rsc] --rw-rw-r-- M 489211 glenda sys 6370 Nov  7 10:00 sys/lib/acid/kernel
	/n/sourcesdump/2005/1107/plan9/sys/lib/acid/kernel:319,329 - 
	/n/sourcesdump/2005/1108/plan9/sys/lib/acid/kernel:319,332
	  	}
	  
	  	complex Page pg;
	- 	return (0x80000000|(pg.pa+(a%BY2PG)))\X;
	+ 	return (KZERO|(pg.pa+(a%BY2PG)))\X;
	  }
	  
	+ defn kzero() {
	+ 	return main - (main & 0x0FFFFFFF);
	+ }
	+ 
	  // PC only
	- MACHADDR = 0x80004000;
	  PTEMAPMEM = (1024*1024);
	  BY2PG = 4096;
	  PTEPERTAB = (PTEMAPMEM/BY2PG);
	/n/sourcesdump/2005/1107/plan9/sys/lib/acid/kernel:330,335 - 
	/n/sourcesdump/2005/1108/plan9/sys/lib/acid/kernel:333,339
	  defn up() {
	  	local mach;
	  
	+ 	MACHADDR = KZERO+0x4000;
	  	mach = MACHADDR;
	  	complex Mach mach;
	  	return mach.externup;
	/n/sourcesdump/2005/1107/plan9/sys/lib/acid/kernel:362,372 - 
	/n/sourcesdump/2005/1108/plan9/sys/lib/acid/kernel:366,378
	  	print("\tinclude(\"/sys/src/9/", kdir, "/", s, ".acid\")\n");
	  }
	  
	+ defn kinit() {
	  if (map()[2]) != {} then {	// map has more than two elements -> active proc
	  	kdir = "unknown";
	- 
	+ 	KZERO = kzero();
	+ 	
	  	if objtype == "386" then {
	- 		map({"*data", 0x80000000, 0xffffffff, 0x80000000});
	+ 		map({"*data", KZERO, 0xffffffff, KZERO});
	  		kdir="pc";
	  	}
	  	if (objtype == "mips" || objtype == "mips2") then {
	/n/sourcesdump/2005/1107/plan9/sys/lib/acid/kernel:373,381 - 
	/n/sourcesdump/2005/1108/plan9/sys/lib/acid/kernel:379,387
	  		kdir = "ch";
	  	}
	  	if objtype == "alpha" then {
	- 		map({"*data", 0x80000000, 0xffffffff, 0x80000000});
	+ 		map({"*data", KZERO, 0xffffffff, KZERO});
	  		kdir = "alpha";
	  	}
	  	needacid("proc");
	  }
	- 
	+ }

Add missing prototype.
 [rsc] --rw-rw-r-- M 489211 glenda sys 21210 Nov  7 09:55 sys/src/9/pc/trap.c
	/n/sourcesdump/2005/1107/plan9/sys/src/9/pc/trap.c:591,596 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/9/pc/trap.c:591,597
	  	print("unexpected trap %lud; ignoring\n", ureg->trap);
	  }
	  
	+ extern void checkpages(void);
	  static void
	  fault386(Ureg* ureg, void*)
	  {
 [rsc] --rw-rw-r-- M 489211 rsc sys 2396 Nov  7 17:27 sys/src/9/pc/vgavesa.c
	/n/sourcesdump/2005/1107/plan9/sys/src/9/pc/vgavesa.c:23,33 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/9/pc/vgavesa.c:23,36
	  static uchar*
	  vbesetup(Ureg *u, int ax)
	  {
	+ 	ulong pa;
	+ 	
	+ 	pa = PADDR(RMBUF);
	  	memset(u, 0, sizeof *u);
	  	u->ax = ax;
	- 	u->es = (RMBUF>>4)&0xF000;
	- 	u->di = RMBUF&0xFFFF;
	- 	return KADDR(RMBUF);
	+ 	u->es = (pa>>4)&0xF000;
	+ 	u->di = pa&0xFFFF;
	+ 	return (void*)RMBUF;
	  }
	  
	  static void
 [rsc] --rw-rw-r-- M 489211 glenda sys 10255 Nov  7 22:58 sys/src/9/pc/vganeomagic.c
	/n/sourcesdump/2005/1107/plan9/sys/src/9/pc/vganeomagic.c:34,39 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/9/pc/vganeomagic.c:34,41
	  	 * scr->mmio holds the virtual address of the cursor registers
	  	 * in the MMIO space. This may need to change for older chips
	  	 * which have the MMIO space offset in the framebuffer region.
	+ 	 *
	+ 	 * scr->io holds the offset into mmio of the CursorNM struct.
	  	 */
	  	if(scr->mmio)
	  		return;
	/n/sourcesdump/2005/1107/plan9/sys/src/9/pc/vganeomagic.c:88,94 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/9/pc/vganeomagic.c:90,96
	  	 * last 2KB of the framebuffer.
	  	 */
	  	scr->storage = vmsize-2*1024;
	- 	scr->mmio = (ulong*)((uchar*)scr->mmio + curoff);
	+ 	scr->io = curoff;
	  	vgalinearpci(scr);
	  	if(scr->paddr)
	  		addvgaseg("neomagicscreen", scr->paddr, scr->apsize);
	/n/sourcesdump/2005/1107/plan9/sys/src/9/pc/vganeomagic.c:101,107 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/9/pc/vganeomagic.c:103,109
	  
	  	if(scr->mmio == 0)
	  		return;
	- 	cursornm = (void*)scr->mmio;
	+ 	cursornm = (void*)((char*)scr->mmio + scr->io);
	  	cursornm->enable = 0;
	  }
	  
	/n/sourcesdump/2005/1107/plan9/sys/src/9/pc/vganeomagic.c:112,118 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/9/pc/vganeomagic.c:114,120
	  	uint p0, p1;
	  	int x, y;
	  
	- 	p = (uchar*)scr->mmio;
	+ 	p = (uchar*)scr->vaddr;
	  	p += scr->storage + index*1024;
	  
	  	for(y = yo; y < 16; y++){
	/n/sourcesdump/2005/1107/plan9/sys/src/9/pc/vganeomagic.c:156,162 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/9/pc/vganeomagic.c:158,164
	  
	  	if(scr->mmio == 0)
	  		return;
	- 	cursornm = (void*)scr->mmio;
	+ 	cursornm = (void*)((char*)scr->mmio + scr->io);
	  
	  	cursornm->enable = 0;
	  	memmove(&scr->Cursor, curs, sizeof(Cursor));
	/n/sourcesdump/2005/1107/plan9/sys/src/9/pc/vganeomagic.c:172,178 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/9/pc/vganeomagic.c:174,180
	  
	  	if(scr->mmio == 0)
	  		return 1;
	- 	cursornm = (void*)scr->mmio;
	+ 	cursornm = (void*)((char*)scr->mmio + scr->io);
	  
	  	index = 0;
	  	if((x = p.x+scr->offset.x) < 0){
	/n/sourcesdump/2005/1107/plan9/sys/src/9/pc/vganeomagic.c:211,217 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/9/pc/vganeomagic.c:213,219
	  	neomagicenable(scr);
	  	if(scr->mmio == 0)
	  		return;
	- 	cursornm = (void*)scr->mmio;
	+ 	cursornm = (void*)((char*)scr->mmio + scr->io);
	  	cursornm->enable = 0;
	  
	  	/*

Use soft cursor instead of no cursor.
 [rsc] --rw-rw-r-- M 489211 glenda sys 9584 Nov  7 10:01 sys/src/cmd/aux/vga/main.c
	/n/sourcesdump/2005/1107/plan9/sys/src/cmd/aux/vga/main.c:455,461 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/cmd/aux/vga/main.c:455,461
	  			vgactlw("drawinit", "");
	  
	  			if(vga->hwgc == 0 || cflag)
	- 				vgactlw("hwgc", "off");
	+ 				vgactlw("hwgc", "soft");
	  			else
	  				vgactlw("hwgc", vga->hwgc->name);
	  

Cut and paste missed newline.
 [rsc] --rw-rw-r-- M 489211 glenda sys 22143 Nov  7 10:01 sys/src/cmd/rio/rio.c
	/n/sourcesdump/2005/1107/plan9/sys/src/cmd/rio/rio.c:639,645 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/cmd/rio/rio.c:639,646
	  			wsendctlmesg(w, Reshaped, r, im);
	  	}
	  	viewr = screen->r;
	- 	flushimage(display, 1);}
	+ 	flushimage(display, 1);
	+ }
	  
	  void
	  button3menu(void)

Add elf.h obj.h dependencies.
 [rsc] --rw-rw-r-- M 489211 glenda sys 479 Nov  7 10:01 sys/src/libmach/mkfile
	/n/sourcesdump/2005/1107/plan9/sys/src/libmach/mkfile:38,44 - 
	/n/sourcesdump/2005/1108/plan9/sys/src/libmach/mkfile:38,44
	  	qobj\
	  	vcodas\
	  
	- HFILES=/sys/include/mach.h
	+ HFILES=/sys/include/mach.h elf.h obj.h
	  
	  CFILES=${FILES:%=%.c}
	  


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.