From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: linuxppc-dev@ozlabs.org, arnd@arndb.de
Subject: Re: Hardware watchpoints on Cell/B.E. broken
Date: Sat, 10 Nov 2007 08:08:40 +1100 [thread overview]
Message-ID: <1194642520.21340.18.camel@pasglop> (raw)
In-Reply-To: <200711091854.lA9IsJEB027041@d12av02.megacenter.de.ibm.com>
On Fri, 2007-11-09 at 19:54 +0100, Ulrich Weigand wrote:
> Hello,
>
> I've noticed that GDB hardware watchpoints do not work at all on Cell/B.E.
> (when running without hypervisor); the kernel accepts the PTRACE_SET_DEBUGREG
> call without error, but watchpoints never trigger.
>
> This turns out to be caused by a new hardware feature in the PowerPC 2.02
> architecture level: the DABRX register. This register controls in which
> modes of operation (problem state, privileged state, hypervisor state)
> the DABR register takes effect. (See Book III v 2.02 page 40.)
>
> The default setting of that register on Cell/B.E. (at least on IBM blades),
> which the Linux kernel currently never modifies, is to ignore DABR in all
> modes -- thus watchpoints do not work at all.
>
> The following hack sets the bit in the DABRX that enables the DABR for
> problem state, whenever the DABR is set. With this patch on top of the
> current Fedora 8 update kernel (kernel-2.6.23.1-48.fc8) watchpoints work
> again -- all relevant test cases in the GDB test suite now pass.
>
> Obviously, the patch cannot be applied as-is; we need to make sure we are
> on a machine that supports the DABRX feature. Arnd asked me to post this
> anyway as a heads-up on that problem ...
Hrm, ok, something we missed, I'll have a look. The whole DABR / debug
register handling need work anyway.
Ben.
prev parent reply other threads:[~2007-11-09 21:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 18:54 Hardware watchpoints on Cell/B.E. broken Ulrich Weigand
2007-11-09 21:08 ` Benjamin Herrenschmidt [this message]
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=1194642520.21340.18.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=arnd@arndb.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=uweigand@de.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).