Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-11 Thread Sergey Babkin

Warner Losh wrote:
 
 In message [EMAIL PROTECTED] Sergey Babkin writes:
 : Seems like most of the modern machines just don't have that
 : pin on the PCI bus connected anywhere. But on most of them
 : (though not all) the pin on ISA works. Some high-end machines
 : like Unisys or Compaq have an NMI button on the box (sometimes
 : under the cover).
 
 IOCHK* isn't on the PCI bus at all.  You have to do weird things for
 it to generate an NMI that I've never quite worked out.  I sure wish I

Probably SERR# is used instead. We have small cards
at work with a big button, ISA connector on one side and PCI
connector on the other one. I'm not sure exactly to which
signal on the bus is it connected. But the PCI side commonly
don't work for the modern machines.

 could get the pcccard bus (and/or cardbus) to genereate NMIs for
 laptop hacking at times.

If it's derived from PCI you can try to use SERR# or its analog.

-SB


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-10 Thread Sergey Babkin

Peter Jeremy wrote:
 
 On 2000-May-11 07:10:27 +1000, Wilko Bulte [EMAIL PROTECTED] wrote:
 And if you force the IOCHK* line on an AT slot to GND? Would that work
 on modern PCI machines?
 
 Grounding IOCHK* does cause an NMI on the only PCI machine I've tried
 it on.  It looks like this is maskable in the Intel PIIX3 (and
 presumably later) chips, so it may depend on the BIOS.

Seems like most of the modern machines just don't have that
pin on the PCI bus connected anywhere. But on most of them
(though not all) the pin on ISA works. Some high-end machines
like Unisys or Compaq have an NMI button on the box (sometimes
under the cover).
 
 I don't know whether this will still work if the PCI bus is hung.  I

Most probably it won't. The keyboard is connected on most machines
below PCI, so if PCI hangs you won't be able to do anything anyway.
The same problem would be in the other direction, for PCI video
card.

-SB


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-10 Thread Warner Losh

In message [EMAIL PROTECTED] Peter Jeremy writes:
: I thought the PCI bus was isolated from the CPU-memory bus so this
: couldn't occur.  The trap handler should start OK, but just can't do
: any I/O because the PCI bus is hung.

I'm not sure why things happen this way.  I just know that I've not
been able to get a NMI to break into the debugger when certain
hardware that I've worked on in the past when it desided to hang.  I
don't know if that's because this also hung the host bridge so that no
interrupt code could fetch it from memory, or what the deal was.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-10 Thread Wilko Bulte

On Thu, May 11, 2000 at 07:01:43AM +1000, Peter Jeremy wrote:
 On Fri, 05 May 2000 22:56:42 -0600, Warner Losh [EMAIL PROTECTED] wrote:
 In message [EMAIL PROTECTED] Warner Losh writes:
 : However, it won't work if you are hacking pci hardware and manage to
 : hang the PCI bus.
 
 Unless, of course, the trap handler is in cache as well as the
 debugger routines you need.
 
 I thought the PCI bus was isolated from the CPU-memory bus so this
 couldn't occur.  The trap handler should start OK, but just can't do
 any I/O because the PCI bus is hung.

And if you force the IOCHK* line on an AT slot to GND? Would that work
on modern PCI machines? I used to do this on older EISA boxes.

-- 
Wilko Bulte FreeBSD, the power to serve http://www.freebsd.org
http://www.tcja.nl


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-10 Thread Peter Jeremy

On Fri, 05 May 2000 22:56:42 -0600, Warner Losh [EMAIL PROTECTED] wrote:
In message [EMAIL PROTECTED] Warner Losh writes:
: However, it won't work if you are hacking pci hardware and manage to
: hang the PCI bus.

Unless, of course, the trap handler is in cache as well as the
debugger routines you need.

I thought the PCI bus was isolated from the CPU-memory bus so this
couldn't occur.  The trap handler should start OK, but just can't do
any I/O because the PCI bus is hung.

  There's not a good way to force it
either since if you knew you were about to hang the pci bus, you'd not
do the action that would hang it :-).

At least on the 486, it is possible to freeze data in the internal
cache by loading the cache (either via the test registers or by
judicious memory accesses) and then disabling it (CR0.CD = 1).  It's
not possible to freeze specific cache lines.  I presume similar
facilities are available in the later processors and for external
caches.

Peter



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-10 Thread Warner Losh

In message [EMAIL PROTECTED] Sergey Babkin writes:
: Seems like most of the modern machines just don't have that
: pin on the PCI bus connected anywhere. But on most of them
: (though not all) the pin on ISA works. Some high-end machines
: like Unisys or Compaq have an NMI button on the box (sometimes
: under the cover).

IOCHK* isn't on the PCI bus at all.  You have to do weird things for
it to generate an NMI that I've never quite worked out.  I sure wish I 
could get the pcccard bus (and/or cardbus) to genereate NMIs for
laptop hacking at times.

Warner




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-10 Thread Peter Jeremy

On Fri, 5 May 2000 12:20:29 -0700, Alfred Perlstein [EMAIL PROTECTED] wrote:
 How can I make a hanging kernel into DDB? Will grounding the NMI do it?

That's a bit extreme.

hit ctrl+alt+esc on the console, or send a serial break if using
a serial console, make sure you have BREAK_TO_DEBUGGER if you're
using a serial console.

Assuming that the kernel is still processing interrupts.

If your driver has managed something like "di(); while (1) {}"
or maybe "splhigh(); while (1) {}", then you need an NMI to get
you out of the loop so the console interrupt is seen.

Peter


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-10 Thread Peter Jeremy

On 2000-May-11 07:10:27 +1000, Wilko Bulte [EMAIL PROTECTED] wrote:
And if you force the IOCHK* line on an AT slot to GND? Would that work
on modern PCI machines?

Grounding IOCHK* does cause an NMI on the only PCI machine I've tried
it on.  It looks like this is maskable in the Intel PIIX3 (and
presumably later) chips, so it may depend on the BIOS.

I don't know whether this will still work if the PCI bus is hung.  I
know it doesn't work when I wedge that machine, but I'm not sure what
is wedging (since I'm not playing with untested PCI hardware, I think
it's not the PCI bus).

Peter


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-06 Thread Wes Peters

Warner Losh wrote:
 
 In message [EMAIL PROTECTED] Warner Losh writes:
 : However, it won't work if you are hacking pci hardware and manage to
 : hang the PCI bus.
 
 Unless, of course, the trap handler is in cache as well as the
 debugger routines you need.  On rare occasions this is true, but
 almsot all the time it isn't.  There's not a good way to force it
 either since if you knew you were about to hang the pci bus, you'd not
 do the action that would hang it :-).

No cache-line-locking on x86?  Sigh.

-- 
"Where am I, and what am I doing in this handbasket?"

Wes Peters Softweyr LLC
[EMAIL PROTECTED]   http://softweyr.com/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-05 Thread Alfred Perlstein

* Jin Guojun [EMAIL PROTECTED] [000505 12:03] wrote:
 Hi,
 
 I am currently experimenting kernel hanging problem even through I have 
 compiled the kernel with DDB enabled.
 
 How can I make a hanging kernel into DDB? Will grounding the NMI do it?
 
 Thanks for any suggestions,

That's a bit extreme.

hit ctrl+alt+esc on the console, or send a serial break if using
a serial console, make sure you have BREAK_TO_DEBUGGER if you're
using a serial console.

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-05 Thread Alfred Perlstein

* Alfred Perlstein [EMAIL PROTECTED] [000505 12:21] wrote:
 * Jin Guojun [EMAIL PROTECTED] [000505 12:03] wrote:
  Hi,
  
  I am currently experimenting kernel hanging problem even through I have 
  compiled the kernel with DDB enabled.
  
  How can I make a hanging kernel into DDB? Will grounding the NMI do it?
  
  Thanks for any suggestions,
 
 That's a bit extreme.
 
 hit ctrl+alt+esc on the console, or send a serial break if using
 a serial console, make sure you have BREAK_TO_DEBUGGER if you're
 using a serial console.

Forgot to mention that an NMI will also work.

-Alfred


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-05 Thread Warner Losh

In message [EMAIL PROTECTED] Alfred Perlstein writes:
: hit ctrl+alt+esc on the console, or send a serial break if using
: a serial console, make sure you have BREAK_TO_DEBUGGER if you're
: using a serial console.

Sometimes this isn't enough.

I use the NMI trick often.

However, it won't work if you are hacking pci hardware and manage to
hang the PCI bus.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-05 Thread Warner Losh

In message [EMAIL PROTECTED] Jin Guojun writes:
: In a normal operation, both work well. When system hangs, neither of them
: works. It looks that system is in some wiered status.
: 
: Does any one happen to know how to trace this kind of problem?

PCI bus analizer is one way.  Another is to have an ICE that will tell
you the last value of the progam counter.

Without some sort of hardware assist, these thing can be very hard to
track down.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Can NMI drop a hanging FreeBSD kernel into DDB?

2000-05-05 Thread Warner Losh

In message [EMAIL PROTECTED] Warner Losh writes:
: However, it won't work if you are hacking pci hardware and manage to
: hang the PCI bus.

Unless, of course, the trap handler is in cache as well as the
debugger routines you need.  On rare occasions this is true, but
almsot all the time it isn't.  There's not a good way to force it
either since if you knew you were about to hang the pci bus, you'd not
do the action that would hang it :-).

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message