* Réf. : does the linux kernel use k0, k1 regs?
@ 2006-01-16 7:24 Florian DELIZY
2006-01-16 12:01 ` zhuzhenhua
0 siblings, 1 reply; 3+ messages in thread
From: Florian DELIZY @ 2006-01-16 7:24 UTC (permalink / raw)
To: linux-mips
[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]
k0, k1 registers are used in SAVE_ALL and RESTORE_ALL macros mainly, to
save all registers on the kernel stack,
once all registered are properly saved, you can use them, and restore them
after, that's why kernel interrupt code does not
uise k0,k1, and let them for critical interruption code (save/restore
context)
Have a look in include/asm-mips/stackframe.h (grep is your friend)
-- Florian Delizy
zhuzhenhua <zzh.hust@gmail.com>
Envoyé par : linux-mips-bounce@linux-mips.org
13/01/2006 03:39
Remis le : 15/01/2006 19:29
Pour : linux-mips <linux-mips@linux-mips.org>
cc : (ccc : Florian DELIZY/EXT/SAGEM)
Objet : does the linux kernel use k0, k1 regs?
i have to handle a NMI interrupt in bootloader(0xBFC00000),
and i want to return to linux after the NMI interrupt, i think other
regs maybe be useing by linux-kernel, i think the NMI handle only can
use K0, K1.
and i do not find the use of K0, K1 in linux-kernel interrupt or
exception handle
so i think if the NMI interrupt a linux interrupt handle, there is
still no conflict.
i am not sure my thinking is right, anyone can give some hints?
Best regards
zhuzhenhua
[-- Attachment #2: Type: text/html, Size: 2166 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Réf. : does the linux kernel use k0, k1 regs?
2006-01-16 7:24 Réf. : does the linux kernel use k0, k1 regs? Florian DELIZY
@ 2006-01-16 12:01 ` zhuzhenhua
2006-01-16 12:26 ` Kevin D. Kissell
0 siblings, 1 reply; 3+ messages in thread
From: zhuzhenhua @ 2006-01-16 12:01 UTC (permalink / raw)
To: Florian DELIZY; +Cc: linux-mips
[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]
thanks for all
now in my NMI interrupt, i first move k0 value to Desave, then use k0 to
handle, and then eret.
it can work.
On 1/16/06, Florian DELIZY <florian.delizy@sagem.com> wrote:
>
>
> k0, k1 registers are used in SAVE_ALL and RESTORE_ALL macros mainly, to
> save all registers on the kernel stack,
> once all registered are properly saved, you can use them, and restore them
> after, that's why kernel interrupt code does not
> uise k0,k1, and let them for critical interruption code (save/restore
> context)
>
>
> Have a look in include/asm-mips/stackframe.h (grep is your friend)
>
> -- Florian Delizy
>
>
>
>
>
> *zhuzhenhua <zzh.hust@gmail.com>*
>
> Envoyé par : linux-mips-bounce@linux-mips.org
>
> 13/01/2006 03:39
> Remis le : 15/01/2006 19:29
>
> Pour : linux-mips <linux-mips@linux-mips.org>
> cc : (ccc : Florian DELIZY/EXT/SAGEM)
> Objet : does the linux kernel use k0, k1 regs?
>
>
>
> i have to handle a NMI interrupt in bootloader(0xBFC00000),
> and i want to return to linux after the NMI interrupt, i think other
> regs maybe be useing by linux-kernel, i think the NMI handle only can
> use K0, K1.
>
> and i do not find the use of K0, K1 in linux-kernel interrupt or
> exception handle
> so i think if the NMI interrupt a linux interrupt handle, there is
> still no conflict.
>
> i am not sure my thinking is right, anyone can give some hints?
>
> Best regards
>
> zhuzhenhua
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 3088 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Réf. : does the linux kernel use k0, k1 regs?
2006-01-16 12:01 ` zhuzhenhua
@ 2006-01-16 12:26 ` Kevin D. Kissell
0 siblings, 0 replies; 3+ messages in thread
From: Kevin D. Kissell @ 2006-01-16 12:26 UTC (permalink / raw)
To: zhuzhenhua; +Cc: Florian DELIZY, linux-mips
zhuzhenhua wrote:
> thanks for all
> now in my NMI interrupt, i first move k0 value to Desave, then use k0 to
> handle, and then eret.
> it can work.
It can work as long as you understand that you can't use
EJTAG breakpoints or (more difficult to avoid) handle DINT
events that happen during your NMI handler.
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-01-16 12:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-16 7:24 Réf. : does the linux kernel use k0, k1 regs? Florian DELIZY
2006-01-16 12:01 ` zhuzhenhua
2006-01-16 12:26 ` Kevin D. Kissell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox