SCCS-vsn: sys/hp300/hp300/locore.s 7.22
*
* from: Utah $Hdr: locore.s 1.66 92/12/22$
*
*
* from: Utah $Hdr: locore.s 1.66 92/12/22$
*
- * @(#)locore.s 7.21 (Berkeley) %G%
+ * @(#)locore.s 7.22 (Berkeley) %G%
#endif
moveml #0xC0C0,sp@- | save scratch registers
CLKADDR(a0)
#endif
moveml #0xC0C0,sp@- | save scratch registers
CLKADDR(a0)
- lea sp@(16),a1 | a1 = &clockframe
movb a0@(CLKSR),d0 | read clock status
movb a0@(CLKSR),d0 | read clock status
+Lclkagain:
+ btst #0,d0 | clear timer1 int immediately to
+ jeq Lnotim1 | minimize chance of losing another
+ movpw a0@(CLKMSB1),d1 | due to statintr processing delay
+Lnotim1:
btst #2,d0 | timer3 interrupt?
btst #2,d0 | timer3 interrupt?
- jeq 1f | no, skip statintr
- movb a0@(CLKMSB3),d1 | clear timer3 interrupt
- addql #1,_intrcnt+32 | count statclock interrupts
+ jeq Lnotim3 | no, skip statclock
+ movpw a0@(CLKMSB3),d1 | clear timer3 interrupt
+ addql #1,_intrcnt+32 | count clock interrupts
+ lea sp@(16),a1 | a1 = &clockframe
movl d0,sp@- | save status
movl a1,sp@-
jbsr _statintr | statintr(&frame)
addql #4,sp
movl d0,sp@- | save status
movl a1,sp@-
jbsr _statintr | statintr(&frame)
addql #4,sp
- movl sp@+,d0 | restore status
+ movl sp@+,d0 | restore pre-statintr status
btst #0,d0 | timer1 interrupt?
btst #0,d0 | timer1 interrupt?
- jeq 2f | no, skip hardclock
- movb a0@(CLKMSB1),d1 | clear timer1 interrupt
+ jeq Lrecheck | no, skip hardclock
addql #1,_intrcnt+28 | count hardclock interrupts
addql #1,_intrcnt+28 | count hardclock interrupts
+ lea sp@(16),a1 | a1 = &clockframe
movl a1,sp@-
#ifdef USELEDS
.globl _ledaddr, _inledcontrol, _ledcontrol, _hz
movl a1,sp@-
#ifdef USELEDS
.globl _ledaddr, _inledcontrol, _ledcontrol, _hz
#endif
jbsr _hardclock | hardclock(&frame)
addql #4,sp
#endif
jbsr _hardclock | hardclock(&frame)
addql #4,sp
-2:
- moveml sp@+,#0x0303 | restore scratch registers
addql #1,_cnt+V_INTR | chalk up another interrupt
addql #1,_cnt+V_INTR | chalk up another interrupt
+ movb a0@(CLKSR),d0 | see if anything happened
+ jmi Lclkagain | while we were in hardclock/statintr
+ moveml sp@+,#0x0303 | restore scratch registers
jra rei | all done
_lev7intr:
jra rei | all done
_lev7intr: