LKML Archive on
 help / color / Atom feed
From: Petr Vandrovec <>
To: Linus Torvalds <>
Cc: Jon Smirl <>,
	"David S. Miller" <>,,,,
Subject: Re: Ignore disabled ROM resources at setup
Date: Tue, 30 Aug 2005 17:29:01 +0200
Message-ID: <> (raw)
In-Reply-To: <>

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
> 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 index

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2005-08-30  2:38 ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone