All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Jon Smirl <jonsmirl@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	benh@kernel.crashing.org, linux-kernel@vger.kernel.org,
	greg@kroah.com, helgehaf@aitel.hist.no
Subject: Re: Ignore disabled ROM resources at setup
Date: Tue, 30 Aug 2005 17:29:01 +0200	[thread overview]
Message-ID: <43147B3D.1030309@vc.cvut.cz> (raw)
In-Reply-To: <Pine.LNX.4.58.0508292207330.3243@g5.osdl.org>

Linus Torvalds wrote:
> 
> On Tue, 30 Aug 2005, Jon Smirl wrote:
> 
>>I was reading the status out of the PCI config space to account for
>>our friend X which enables ROMs without informing the OS. With X
>>around PCI config space can get out of sync with the kernel
>>structures.
> 
> 
> Well, yes, except that we use the in-kernel resource address for the
> actual ioremap() _anyway_ in the routine that calls this, so if X has
> remapped the ROM somewhere else, that wouldn't work in the first place.
> 
> I'm sure X plays games with this register (I suspect that's why the Matrox 
> thing broke in the first place), but I don't think it should do so while 
> the kernel uses it. 

Matrox broke because some of their chips have ROM base bits 31-1 reserved
(read as 0) when bit 0 is cleared.  So if you read valid ROM resource,
clear enable bit, write it to the device, and later it read from device,
enable it, and write back, you'll end up with ROM enabled at bus address
zero.  Probably not what you want.

And FYI, on my Tyan S2885 box 2.6.13 relocates all (as far as I can tell)
ROMs because BIOS assigns them into 'MEM window' (non-prefetchable) while
kernel reassigns then to the 'PREFETCH window'.  In the past code was
even allocating ROM resources above 4GB (which is nonsense for ROM region,
unfortunately pci_bus_alloc_resource does not seem to know about difference
between 64bit and 32bit BARs, and it always uses -1 as max address, which
is wrong on 64bit kernel), but it does not happen since I went from 4GB
of memory back to 2GB...
						Petr Vandrovec


  parent reply	other threads:[~2005-08-30 15:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200508261859.j7QIxT0I016917@hera.kernel.org>
2005-08-30  2:38 ` Ignore disabled ROM resources at setup Benjamin Herrenschmidt
2005-08-30  3:15   ` Linus Torvalds
2005-08-30  4:47     ` Jon Smirl
2005-08-30  3:19   ` Benjamin Herrenschmidt
2005-08-30  3:52     ` Linus Torvalds
2005-08-30  4:09       ` Linus Torvalds
2005-08-30  4:20         ` David S. Miller
2005-08-30  4:37           ` Benjamin Herrenschmidt
2005-08-30  4:40           ` Linus Torvalds
2005-08-30  4:49             ` Benjamin Herrenschmidt
2005-08-30  5:29               ` Linus Torvalds
2005-08-30  6:46                 ` Benjamin Herrenschmidt
2005-08-31  4:16                 ` Benjamin Herrenschmidt
2005-08-30  4:51             ` Jon Smirl
2005-08-30  4:54               ` Benjamin Herrenschmidt
2005-08-30  5:15               ` Linus Torvalds
2005-08-30 14:39                 ` Alan Cox
2005-08-30 15:29                 ` Petr Vandrovec [this message]
2005-08-30  4:33       ` Benjamin Herrenschmidt
2005-08-30  5:03         ` Linus Torvalds
2005-08-30  6:40           ` Benjamin Herrenschmidt
2005-08-30  4:35   ` Jon Smirl
2005-08-30  5:32     ` David S. Miller
2005-08-30  6:43       ` 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=43147B3D.1030309@vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=helgehaf@aitel.hist.no \
    --cc=jonsmirl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 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.