~kris/9p

9hist

b5339d68dcd76af376286bb3ef4e5a9c32947aad — David du Colombier 33 years ago 745f9eb
Plan 9 from Bell Labs 1992-09-30
2 files changed, 7 insertions(+), 10 deletions(-)

M pc/mem.h
M pc/mmu.c
M pc/mem.h => pc/mem.h +1 -0
@@ 49,6 49,7 @@
#define	USTKTOP		(TSTKTOP-TSTKSIZ*BY2PG)	/* byte just beyond user stack */
#define	USTKSIZE	(16*1024*1024 - TSTKSIZ*BY2PG)	/* size of user stack */
#define ROMBIOS		(KZERO|0xF0000)
#define	ISAMEMSIZE	(4*MB)			/* mem space reserved for ISA */

#define	MACHSIZE	4096


M pc/mmu.c => pc/mmu.c +6 -10
@@ 130,16 130,12 @@ mmuinit(void)
	ktoppg.va = (ulong)top;
	ktoppg.pa = ktoppg.va & ~KZERO;

	/*  map all memory to KZERO (plus 1 meg for PCMCIA window) */
	npage = conf.topofmem/BY2PG;
	if(conf.topofmem < 64*MB){
		/* for ISA bus memory */
		isamemalloc.addr = conf.topofmem;
		isamemalloc.end = conf.topofmem + 2*MB;
		if(isamemalloc.end > 64*MB)
			isamemalloc.end = 64*MB;
		npage += (isamemalloc.end - isamemalloc.addr)/BY2PG;
	}
	/*  map all memory to KZERO (add some address space for ISA memory) */
	isamemalloc.addr = conf.topofmem;
	isamemalloc.end = conf.topofmem + ISAMEMSIZE;
	if(isamemalloc.end > 64*MB)
		isamemalloc.end = 64*MB;	/* ISA can only access 64 meg */
	npage = isamemalloc.end/BY2PG;
	nbytes = PGROUND(npage*BY2WD);		/* words of page map */
	nkpt = nbytes/BY2PG;			/* pages of page map */
	kpt = xspanalloc(nbytes, BY2PG, 0);