~kris/9p

9hist

1ecf91769597650193456f989768e546512c7245 — David du Colombier 31 years ago 103b223
Plan 9 from Bell Labs 1995-04-18
2 files changed, 8 insertions(+), 1 deletions(-)

M pc/mem.h
M pc/mmu.c
M pc/mem.h => pc/mem.h +2 -1
@@ 109,7 109,8 @@
 *  physical MMU
 */
#define	PTEVALID	(1<<0)
#define	PTEUNCACHED	(1<<4)	
#define	PTEWT		(1<<3)
#define	PTEUNCACHED	(1<<4)
#define PTEWRITE	(1<<1)
#define	PTERONLY	(0<<1)
#define	PTEKERNEL	(0<<2)

M pc/mmu.c => pc/mmu.c +6 -0
@@ 168,6 168,12 @@ mmuinit(void)
	kpt = xspanalloc(nbytes, BY2PG, 0);
	for(i = 0; i < npage; i++)
		kpt[i] = (0+i*BY2PG) | PTEVALID | PTEKERNEL | PTEWRITE;
	for(i = 0xa0000/BY2PG; i < 0xC0000/BY2PG; i++)
		kpt[i] = (0+i*BY2PG) | PTEVALID | PTEKERNEL | PTEWRITE | PTEWT;
	for(i = 0xC0000/BY2PG; i < MB/BY2PG; i++)
		kpt[i] = (0+i*BY2PG) | PTEVALID | PTEKERNEL | PTEWRITE | PTEUNCACHED;
	for(i = conf.topofmem/BY2PG; i < 128*MB/BY2PG; i++)
		kpt[i] = (0+i*BY2PG) | PTEVALID | PTEKERNEL | PTEWRITE | PTEUNCACHED;
	x = TOPOFF(KZERO);
	y = ((ulong)kpt)&~KZERO;
	for(i = 0; i < nkpt; i++)