From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 16 Jan 2006 07:21:25 +0000 (GMT) Received: from ns1.sagem.com ([62.160.59.65]:6068 "EHLO mx1.sagem.com") by ftp.linux-mips.org with ESMTP id S8133351AbWAPHVF (ORCPT ); Mon, 16 Jan 2006 07:21:05 +0000 To: linux-mips Subject: =?ISO-8859-1?Q?R=E9f=2E_=3A_does_the_linux_kernel_use_k0=2C_k1_regs=3F?= MIME-Version: 1.0 Message-ID: From: Florian DELIZY Date: Mon, 16 Jan 2006 08:24:27 +0100 Content-Type: multipart/alternative; boundary="=_alternative 0028B1A5C12570F8_=" Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 9880 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: florian.delizy@sagem.com Precedence: bulk X-list: linux-mips Message en plusieurs parties au format MIME --=_alternative 0028B1A5C12570F8_= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable k0, k1 registers are used in SAVE=5FALL and RESTORE=5FALL macros mainly, to= =20 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=20 uise k0,k1, and let them for critical interruption code (save/restore=20 context) Have a look in include/asm-mips/stackframe.h (grep is your friend) -- Florian Delizy zhuzhenhua Envoy=E9 par : linux-mips-bounce@linux-mips.org 13/01/2006 03:39 Remis le : 15/01/2006 19:29 =20 Pour : linux-mips 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 --=_alternative 0028B1A5C12570F8_= Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
k0, k1 registers are used in SAVE=5F= ALL and RESTORE=5FALL macros mainly, to save all registers on the kernel st= ack,
once all registered are properly sav= ed, you can use them, and restore them after, that's why kernel interrupt c= ode does not
uise k0,k1, and let them for critica= l interruption code (save/restore context)


Have a look in include/asm-mips/stac= kframe.h (grep is your friend)

-- Florian Delizy




zhuzhenhua <zzh.hust@gmail.com= >

Envoy=E9 par : linux-mips-bounce@lin= ux-mips.org

13/01/2006 03:39
Remis le : 15/01/2006 19:29

       
        Pour : &= nbsp;      linux-mips <linux-mips@linux-mips.org>
        cc : &nb= sp;      (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



--=_alternative 0028B1A5C12570F8_=-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 16 Jan 2006 11:58:39 +0000 (GMT) Received: from wproxy.gmail.com ([64.233.184.202]:36801 "EHLO wproxy.gmail.com") by ftp.linux-mips.org with ESMTP id S8133443AbWAPL6T (ORCPT ); Mon, 16 Jan 2006 11:58:19 +0000 Received: by wproxy.gmail.com with SMTP id 36so1147524wra for ; Mon, 16 Jan 2006 04:01:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=n6MjQek7XczpBZ47AxDHBbcftZ7cfba97ejI4Q+JRXnl/TeC1eesE0V6dTlK8bMdMKSL8SCRXUdHuKUBI3H5mVIbBaozfEA0UK0tDPfwu7bcZB7kBJdirFY8/lFflO30Wa8CTYjwcfO5KLav5ACdgLz0Kvhw47pn1FLmPw7Ldi8= Received: by 10.54.104.14 with SMTP id b14mr949085wrc; Mon, 16 Jan 2006 04:01:49 -0800 (PST) Received: by 10.54.156.1 with HTTP; Mon, 16 Jan 2006 04:01:49 -0800 (PST) Message-ID: <50c9a2250601160401ifa8337cs2f8638f0077f37ed@mail.gmail.com> Date: Mon, 16 Jan 2006 20:01:49 +0800 From: zhuzhenhua To: Florian DELIZY Subject: =?ISO-8859-1?Q?Re:_R=E9f._:_does_the_linux_kernel_use_k0,_k1_regs=3F?= Cc: linux-mips In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11679_22905433.1137412909940" References: Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 9883 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: zzh.hust@gmail.com Precedence: bulk X-list: linux-mips ------=_Part_11679_22905433.1137412909940 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 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 the= m > 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 * > > Envoy=E9 par : linux-mips-bounce@linux-mips.org > > 13/01/2006 03:39 > Remis le : 15/01/2006 19:29 > > Pour : linux-mips > 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 > > > > ------=_Part_11679_22905433.1137412909940 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline thanks for all
now in my NMI interrupt, i first move k0 value to Desave, then use k0 to ha= ndle, 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 stac= k,
once all registered are properly s= aved, you can use them, and restore them after, that's why kernel interrupt= code does not
uise k0,k1, and let them for criti= cal interruption code (save/restore context)


Have a look in include/asm-mips/st= ackframe.h (grep is your friend)

-- Florian Delizy





zhuzhenhua <zzh.hust@gmail.com>

Envoy=E9 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 : &= nbsp;      (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




------=_Part_11679_22905433.1137412909940-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 16 Jan 2006 12:21:58 +0000 (GMT) Received: from 209-232-97-206.ded.pacbell.net ([209.232.97.206]:60811 "EHLO dns0.mips.com") by ftp.linux-mips.org with ESMTP id S8133495AbWAPMVi (ORCPT ); Mon, 16 Jan 2006 12:21:38 +0000 Received: from mercury.mips.com (sbcns-dmz [209.232.97.193]) by dns0.mips.com (8.12.11/8.12.11) with ESMTP id k0GCOw53018813; Mon, 16 Jan 2006 04:24:58 -0800 (PST) Received: from [192.168.236.16] (grendel [192.168.236.16]) by mercury.mips.com (8.12.9/8.12.11) with ESMTP id k0GCOtYr014855; Mon, 16 Jan 2006 04:24:55 -0800 (PST) Message-ID: <43CB9110.7040003@mips.com> Date: Mon, 16 Jan 2006 13:26:56 +0100 From: "Kevin D. Kissell" User-Agent: Thunderbird 1.5 (X11/20051025) MIME-Version: 1.0 To: zhuzhenhua CC: Florian DELIZY , linux-mips Subject: Re: =?ISO-8859-1?Q?R=E9f=2E_=3A_does_the_linux_kernel_?= =?ISO-8859-1?Q?use_k0=2C_k1_regs=3F?= References: <50c9a2250601160401ifa8337cs2f8638f0077f37ed@mail.gmail.com> In-Reply-To: <50c9a2250601160401ifa8337cs2f8638f0077f37ed@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.39 Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 9887 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: kevink@mips.com Precedence: bulk X-list: 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.