Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Pete Popov <ppopov@embeddedalley.com>
To: "'linux-mips@linux-mips.org'" <linux-mips@linux-mips.org>
Subject: mips64 kgdb fpu access bug
Date: Thu, 13 Apr 2006 13:54:59 -0700	[thread overview]
Message-ID: <1144961699.8372.127.camel@localhost.localdomain> (raw)


I'm running into a random problem with a mips64 kernel (2.6.14 based). I
see the problem on the MIPS Malta 5kf board but it seems like a generic
bug to me. What happens is that CP0 FR bit is zero and an add register
is accessed by an instruction whose datatype is 64 bits. That results in
a reserved instruction kernel fault. I see this bug in gdb-low.S - the
code checks to see if CU1 is enabled but then it seems to assume that FR
is always 1 when running a 64bit kernel. However, I also randomly see
the bug without kgdb being enabled when we hit _save_fp and this macro:

.macro  fpu_save_double thread status tmp1 tmp2
        sll     \tmp2, \tmp1, 5
        bgez    \tmp2, 2f
        fpu_save_16odd \thread
2:
        fpu_save_16even \thread \tmp1                   # clobbers t1
        .endm

tmp1 is "t0" and it's not clear to me why we're checking t0 instead of
status in order to decide whether to save the odd registers or not. I
must be missing something because others would have hit this bug by now.
Any clues would be appreciated.

Thanks,

Pete

             reply	other threads:[~2006-04-13 20:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-13 20:54 Pete Popov [this message]
2006-04-14  3:09 ` mips64 kgdb fpu access bug Atsushi Nemoto
2006-04-14  9:50   ` Pete Popov
2006-04-27 14:29   ` [PATCH] fix fpu_save_double on 64-bit (Was: mips64 kgdb fpu access bug) Atsushi Nemoto
2006-05-22 15:47     ` [PATCH] fix fpu_save_double on 64-bit Atsushi Nemoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1144961699.8372.127.camel@localhost.localdomain \
    --to=ppopov@embeddedalley.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox