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

1995/0223/pc/trap.c (diff list | history)

1995/0222/sys/src/9/pc/trap.c:259,2651995/0223/sys/src/9/pc/trap.c:259,265 (short | long | prev | next)
1991/1113    
	char buf[ERRLEN]; 
1993/0217    
	Handler *h; 
1993/1116    
	static int iret_traps; 
1995/0222    
	uchar isr0, isr1; 
1995/0223    
	ushort isr; 
1991/0703    
 
1991/0731    
	v = ur->trap; 
 
1995/0222/sys/src/9/pc/trap.c:279,2901995/0223/sys/src/9/pc/trap.c:279,290
1991/0801    
	 *  off at this point) 
1991/0709    
	 */ 
1991/0731    
	c = v&~0x7; 
1995/0222    
	isr0 = isr1 = 0x00; 
1995/0223    
	isr = 0; 
1991/0731    
	if(c==Int0vec || c==Int1vec){ 
1995/0222    
		isr0 = inb(Int0ctl); 
1995/0223    
		isr = inb(Int0ctl); 
1993/0225    
		outb(Int0ctl, EOI); 
1995/0222    
		if(c == Int1vec){ 
			isr1 = inb(Int1ctl); 
1995/0223    
			isr |= inb(Int1ctl)<<8; 
1991/0731    
			outb(Int1ctl, EOI); 
1995/0222    
		} 
1991/1113    
	} 
1995/0222/sys/src/9/pc/trap.c:308,3141995/0223/sys/src/9/pc/trap.c:308,314
1991/1113    
			} 
		} 
1993/0224    
 
		if(v >= Int0vec || v < Int0vec+16){ 
1995/0223    
		if(v >= Int0vec && v < Int0vec+16){ 
1994/0722    
			/* an unknown interrupt */ 
1993/0224    
			v -= Int0vec; 
1995/0222    
			/* 
1995/0222/sys/src/9/pc/trap.c:316,3281995/0223/sys/src/9/pc/trap.c:316,329
1995/0222    
			 * the IRQ input goes away before the acknowledge. 
			 * In this case, a 'default IRQ7' is generated, but 
			 * the corresponding bit in the ISR isn't set. 
1995/0223    
			 * In fact, just ignore all such interrupts. 
1995/0222    
			 */ 
			if(v == 7 && (isr0 & 0x80) == 0) 
1995/0223    
			if((isr & (1<<v)) == 0) 
1995/0222    
				goto out; 
			if(badintr[v]++ == 0 || (badintr[v]%100000) == 0){ 
1993/0224    
				print("unknown interrupt %d pc=0x%lux: total %d\n", v, 
					ur->pc, badintr[v]); 
1995/0222    
				print("isr0 = 0x%2.2ux, isr1 = 0x%2.2ux\n", isr0, isr1); 
1995/0223    
				print("isr = 0x%4.4ux\n", isr); 
1995/0222    
			} 
1993/0224    
		} else { 
			/* unimplemented traps */ 


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