From b5339d68dcd76af376286bb3ef4e5a9c32947aad Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 30 Sep 1992 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1992-09-30 --- pc/mem.h | 1 + pc/mmu.c | 16 ++++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/pc/mem.h b/pc/mem.h index 1a8672e50ac9a5c1221b2c87a0f491bcbefebc68..a9e3a0dfefc4a10f49a9bb5edeb102c9c1c8d055 100644 --- a/pc/mem.h +++ b/pc/mem.h @@ -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 diff --git a/pc/mmu.c b/pc/mmu.c index f189bb48cac352aa77f9d93b53e363a5987f7771..a8679fff4921e3ab50ec62f12cf68e88274072b8 100644 --- a/pc/mmu.c +++ b/pc/mmu.c @@ -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);