From: Grant Grundler <grundler@cup.hp.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: parisc-linux@thepuffingroup.com
Subject: Re: [parisc-linux] Oopser
Date: Sat, 13 Jan 2001 09:08:38 -0800 [thread overview]
Message-ID: <200101131708.JAA08678@milano.cup.hp.com> (raw)
In-Reply-To: Your message of "Sat, 13 Jan 2001 07:34:08 PST." <20010113073408.B16185@parcelfarce.linux.theplanet.co.uk>
Matthew Wilcox wrote:
>
> I'm interested in having a useful debugging tool written by someone who
> knows the processor really well. What I basically want to be able to
> do is call oopser(10 * HZ) and have the machine reliably crash in 10
> seconds time (and do a register dump). that would at least tell me
> where the kernel's got to.
static inline void oopser(unsigned long t)
{
unsigned long flags;
unsigned long addr=(unsigned long) -8L;
mdelay((t * 1000)/HZ);
/* Oopsy doopsy willy fall down and go boom :^) */
asm volatile(
" rsm 2,%0
ldwx 0(%2),%1"
: "=&r" (flags), "=r" (t) : "r" (addr) );
}
mdelay watches CR16 and doesn't need (or even want) interrupts
enabled. If you want a register dump to console, call panic
or steal^H^H^H^H^Hborrow code from panic.
Otherwise it'll be in the HPMC portion of the PIM dump.
If it's truly inlined, GR2 and PC will be preserved.
I'm pretty sure -8L (reset vector?) won't work - but anything in
0xF-space (I/O space) which isn't ever used by platform devices
should work. Offhand I can't pick an address for all platforms.
grant
> it'd be most useful if it worked with interrupts disabled, but even
> something which required interrupts to be enabled would be of some use.
>
> --
> Revolutions do not require corporate support.
>
> ---------------------------------------------------------------------------
> To unsubscribe: send e-mail to parisc-linux-request@thepuffingroup.com with
> `unsubscribe' as the subject.
>
Grant Grundler
Unix Systems Enablement Lab
+1.408.447.7253
next prev parent reply other threads:[~2001-01-13 17:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-13 7:34 [parisc-linux] Oopser Matthew Wilcox
2001-01-13 17:08 ` Grant Grundler [this message]
2001-01-13 18:13 ` Matthew Wilcox
2001-01-13 21:45 ` LaMont Jones
2001-01-14 1:53 ` Matthew Wilcox
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=200101131708.JAA08678@milano.cup.hp.com \
--to=grundler@cup.hp.com \
--cc=matthew@wil.cx \
--cc=parisc-linux@thepuffingroup.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.