linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@cs.anu.edu.au>
To: paubert@iram.es
Cc: bh40@calva.net, linuxppc-dev@lists.linuxppc.org
Subject: Re: Blue G3 and machine check
Date: Tue, 30 Mar 1999 09:44:48 +1000	[thread overview]
Message-ID: <199903292344.JAA03278@tango.anu.edu.au> (raw)
In-Reply-To: <Pine.HPP.3.96.990325105034.1078R-100000@gra-ux1.iram.es> (message from Gabriel Paubert on Thu, 25 Mar 1999 12:20:33 +0100 (MET))


Gabriel Paubert <paubert@iram.es>

> No, the PCI connector also has a presence detect pin which should be used
> for this. The PCI specification is very clear that the only cycles
> which are expected to end with a Master Abort are the special cycles.
> Configuration cycles are like any other cycles and a Mater Abort may
> result in a device pulling the SERR line and taking exceptions in this
> case. 

The PCI spec says that the host bridge must unambiguously report
attempts to read the vendor ID of nonexistent devices, and that it is
adequate for the host bridge to return ~0 on read accesses to config
space registers of nonexistent devices.

I guess a machine check can be regarded as pretty unambiguous.
Sigh. :-(

> But the worst is that you are not guaranteed anything about SRR0, so an in
> memory per processor flag telling 'hey, I might actually get a machine
> check, might be required'. For the registers, I can't believe that after a
> sync/isync sequence, any implementation will ever randomly modify any
> other register than the destination for the loads (and the address
> register for update form instructions). 

Imagine that an interrupt occurs between the load/store and the sync.
The CPU could be in full superscalar flight when it gets the error
ack.  The registers could certainly be in an inconsistent state when
we get to the machine check handler.  So we at least need to disable
interrupts around the access.

> And yes, I just reread the following: "Note that if the error is caused by
> the memory subsystem, incorrect data could be loaded into the processor
> and register contents could be corrupted regardless of whether the
> exception is considered recoverable by the SRR1 bit corresponding to
> MSR[RI]." 
> 
> But I interpret it as the registers modified by the instruction and the
> potential use of the corrupted data by subsequent instructions, which
> should be bounded by following sync; if you interpret it very liberally
> all registers could be corrupted, not only GPR (including the stack
> pointer) but why not also LR, CTR, XER, CR, FPRs, FPSCR, BATS, segments,
> timebase, decrementer, SDR1, SPRGn, HID0 and others.

Indeed. :-)

I think it's likely that the following sequence will work OK:

	mtmsr to disable interrupts
	sync
	load/store
	sync
	re-enable interrupts if necessary

and if we get a machine check on the second sync, the registers should
be OK.

Thoughts?

Paul.

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

  parent reply	other threads:[~1999-03-29 23:44 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-14 13:35 Blue G3 and machine check Benjamin Herrenschmidt
1999-03-15 16:42 ` Ryuichi Oikawa
1999-03-15 17:09   ` Geert Uytterhoeven
1999-03-24  9:30 ` Gabriel Paubert
1999-03-24 23:12   ` Paul Mackerras
1999-03-25 11:20     ` Gabriel Paubert
1999-03-25 16:46       ` Apple Job Posting and Good News for LinuxPPC developers Kevin B. Hendricks
1999-03-25 19:12         ` David Edelsohn
1999-03-26 11:31           ` Gabriel Paubert
1999-03-26 16:13             ` David Edelsohn
1999-03-27  6:27               ` Guy Sotomayor
1999-03-27 20:44                 ` David Edelsohn
1999-04-02 12:11             ` Holger Bettag
1999-04-02 17:11               ` David Edelsohn
1999-04-02 22:19                 ` Douglas Godfrey
1999-04-03 17:42                 ` Holger Bettag
1999-04-05 16:11                   ` Gabriel Paubert
1999-04-05 16:06               ` Gabriel Paubert
1999-04-06  5:53                 ` Douglas Godfrey
1999-03-26  6:08         ` Nathan Hurst
1999-03-26 13:51           ` sean o'malley
1999-03-28  5:08             ` Cort Dougan
1999-03-26 20:33           ` N.G. Temme
1999-03-29 23:44       ` Paul Mackerras [this message]
1999-03-30 11:41         ` Blue G3 and machine check Gabriel Paubert
1999-03-31 16:20           ` Ryuichi Oikawa
1999-03-31 18:39             ` Gabriel Paubert
1999-04-05 16:36               ` Ryuichi Oikawa
1999-04-05 17:11                 ` Gabriel Paubert
1999-04-04  1:17             ` Joel Klecker
1999-04-09  5:58               ` Joel Klecker
1999-04-09 16:12                 ` Ryuichi Oikawa
1999-03-25 12:10     ` Benjamin Herrenschmidt

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=199903292344.JAA03278@tango.anu.edu.au \
    --to=paulus@cs.anu.edu.au \
    --cc=Paul.Mackerras@cs.anu.edu.au \
    --cc=bh40@calva.net \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=paubert@iram.es \
    /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).