~kris/9p

9hist

2ea7da9edd9353c391a1a5f94bac1989b28d61af — David du Colombier 25 years ago c47f810
Plan 9 from Bell Labs 2000-10-10
2 files changed, 12 insertions(+), 1 deletions(-)

M bitsy/l.s
M bitsy/main.c
M bitsy/l.s => bitsy/l.s +11 -1
@@ 56,7 56,17 @@ TEXT flushdcache(SB), $-4

/* flush i and d caches */
TEXT flushcache(SB), $-4
	/* write back any dirty data */
	MOVW	$0xe0000000,R0
	ADD	$(8*1024),R0,R1
_wbloop:
	MOVW.W	32(R0),R2
	CMP	R0,R1
	BNE	_wbloop
	
	/* flush cache contents */
	MCR	CpMMU, 0, R0, C(CpCacheFlush), C(0x7), 0

	/* drain prefetch */
	MOVW	R0,R0						
	MOVW	R0,R0


@@ 225,7 235,7 @@ _vswitch:

	/* interupted code kernel or user? */
	AND.S	$0xf, R1, R4
	B.EQ	_userexcep
	BEQ	_userexcep

	/* here for trap from SVC mode */
	MOVM.DB.W [R0-R2], (R13)	/* set ureg->{type, psr, pc}; r13 points to ureg->type  */

M bitsy/main.c => bitsy/main.c +1 -0
@@ 48,6 48,7 @@ exit(int ispanic)
	USED(ispanic);
	delay(1000);

	iprint("it's a wonderful day to die\n");
	mmudisable();
	f = nil;
	(*f)();