lkml.org 
[lkml]   [2007]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pci-disable-decode-of-io-memory-during-bar-sizing.patch


On Tue, 30 Oct 2007, Robert Hancock wrote:
> >
> > You have to, anyway. Even now the MMCONFIG stuff uses CONF1 cycles for
> > startup.
>
> If it does, it's not by necessity. As soon as you read the table location out
> of the ACPI tables you can start using it, and that shouldn't require any
> config space accesses.

Don't be silly. Exactly _BECAUSE_ we cannot trust the firmware, we have to
use conf1 (which we can trust) to verify it and/or fix things up.

Also, there are several devices that don't show up in the MMCFG things, or
just otherwise get it wrong.

So just take a look at arch/x86/pci/mmconfig-shared.c and look for
"conf1".

Really. Damn, I'm nervous taking any MMCFG patches that has you as an
author, if you aren't even aware of these kinds of fundamnetal issues. You
probably read the standards about how things are "supposed" to work, and
then just believed them?

Rule #1 in kernel programming: don't *ever* think that things actually
work the way they are documented to work. The documentation is a starting
point, nothing else.

And please be defensive in programming. We *know* conf1 cycles work. The
hardware has been extensively tested, and there are no firmware
interactions. There is *zero* reasons to use MMCONF cycles for normal
devices. Ergo: switching over to MMCONF when not needed is stupid and
fragile.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-31 01:03    [from the cache]
©2003-2011 Jasper Spaans