plan 9 kernel history: overview | file list | diff list

1994/0513/pc/trap.c (diff list | history)

1994/0512/sys/src/9/pc/trap.c:183,1891994/0513/sys/src/9/pc/trap.c:183,189 (short | long | prev | next)
1991/0709    
	 *  Set the 8259 as master with edge triggered 
	 *  input with fully nested interrupts. 
1991/0704    
	 */ 
1994/0512    
	outb(Int0ctl, (1<<4)|(1<<3)|(1<<0));	/* ICW1 - master, level triggered, 
1994/0513    
	outb(Int0ctl, (1<<4)|(0<<3)|(1<<0));	/* ICW1 - master, level triggered, 
1994/0512    
					  	 ICW4 will be sent */ 
1991/0709    
	outb(Int0aux, Int0vec);		/* ICW2 - interrupt vector offset */ 
1991/0731    
	outb(Int0aux, 0x04);		/* ICW3 - have slave on level 2 */ 
1994/0512/sys/src/9/pc/trap.c:192,1981994/0513/sys/src/9/pc/trap.c:192,198
1991/0731    
	/* 
	 *  Set up the second 8259 interrupt processor. 
	 *  Make 8259 interrupts start at CPU vector Int0vec. 
	 *  Set the 8259 as master with edge triggered 
1994/0513    
	 *  Set the 8259 as master with level triggered 
1991/0731    
	 *  input with fully nested interrupts. 
	 */ 
1994/0512    
	outb(Int1ctl, (1<<4)|(1<<3)|(1<<0));	/* ICW1 - master, level triggered, 
1994/0512/sys/src/9/pc/trap.c:529,5491994/0513/sys/src/9/pc/trap.c:529,551
1991/0710    
{ 
1991/0720    
	Ureg *nur; 
 
1993/0915    
	nur = up->ureg;		/* pointer to user returned Ureg struct */ 
	if(nur->cs!=up->svcs || nur->ss!=up->svss 
	|| (nur->flags&0xff00)!=(up->svflags&0xff00)){ 
1991/0720    
		pprint("bad noted ureg cs %ux ss %ux flags %ux\n", nur->cs, nur->ss, 
			nur->flags); 
1991/0814    
    Die: 
1991/0720    
		pexit("Suicide", 0); 
	} 
1993/0915    
	qlock(&up->debug); 
	if(!up->notified){ 
1991/0814    
		pprint("call to noted() when not notified\n"); 
1994/0513    
	if(!up->notified) { 
1993/0915    
		qunlock(&up->debug); 
1994/0513    
		pprint("call to noted() when not notified\n"); 
1991/0720    
		return; 
	} 
1993/0915    
	up->notified = 0; 
1994/0513    
 
	nur = up->ureg;		/* pointer to user returned Ureg struct */ 
	if(nur->cs!=up->svcs || nur->ss!=up->svss || 
	  (nur->flags&0xff00)!=(up->svflags&0xff00)) { 
		qunlock(&up->debug); 
		pprint("bad noted ureg cs %ux ss %ux flags %ux\n", 
				nur->cs, nur->ss, nur->flags); 
			pexit("Suicide", 0); 
	} 
 
1993/0915    
	nur->flags = (up->svflags&0xffffff00) | (nur->flags&0xff); 
1992/0609    
	memmove(ur, nur, sizeof(Ureg)); 
1991/0720    
	switch(arg0){ 
1994/0512/sys/src/9/pc/trap.c:551,5571994/0513/sys/src/9/pc/trap.c:553,559
1992/0616    
		if(!okaddr(nur->pc, 1, 0) || !okaddr(nur->usp, BY2WD, 0)){ 
1991/0814    
			pprint("suicide: trap in noted\n"); 
1993/0915    
			qunlock(&up->debug); 
1991/0814    
			goto Die; 
1994/0513    
			pexit("Suicide", 0); 
1991/0814    
		} 
1993/0915    
		qunlock(&up->debug); 
1991/0722    
		return; 
1994/0512/sys/src/9/pc/trap.c:581,5871994/0513/sys/src/9/pc/trap.c:583,589
1993/1113    
	ur = up->dbgreg; 
	ur->usp = (ulong)sp; 
	ur->pc = entry; 
	return USTKTOP-BY2WD;			/* address of user-level clock */ 
1994/0513    
	return USTKTOP-BY2WD;		/* address of user-level clock */ 
1993/1113    
} 
 
ulong 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)