Subject: CPU specific idle routine
To: NetBSD port-mips <port-mips@netbsd.org>
From: TAKEMURA, Shin <takemura@netbsd.org>
List: port-mips
Date: 01/16/2000 20:32:05
I found that our MIPS compatible CPU VR has unique instruction - 'STANDBY'.
And other CPU which designed for PDA have their own instruction similarly.
(Please see #ifdef VR41_STANDBY_IDLE in arch/mips/mips/locore.S)
Thereby I want to select idle routine on booting dynamically.
I 've made a patch. Please review and comment.
------ BEGIN
RCS file: /cvsroot/syssrc/sys/arch/mips/mips/locore.S,v
retrieving revision 1.84
diff -r1.84 locore.S
262c262
< LEAF(idle)
---
> LEAF(mips_idle)
288c288,293
< END(idle)
---
> END(mips_idle)
>
> .data
> _C_LABEL(idle):
> .word mips_idle
> .text
318c323,328
< beq t1, zero, _C_LABEL(idle)
---
> bne t1, zero, 1f
> la t2, _C_LABEL(idle)
> lw t2, (t2)
> jal ra, t2
> nop
> 1:
331c341,346
< beq t0, zero, _C_LABEL(idle) # if none, idle
---
> bne t0, zero, 1f
> la t3, _C_LABEL(idle)
> lw t3, (t3)
> jal ra, t3
> nop
> 1:
------ END