mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Tvrtko Ursulin <tvrtko@ursulin.net>,
	Tvrtko Ursulin <tvrtko.ursulin@sophos.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Are these MTRR settings correct?
Date: Tue, 15 Dec 2009 18:14:52 -0600	[thread overview]
Message-ID: <51f3faa70912151614w30d1839cq66e8673ee5712e55@mail.gmail.com> (raw)
In-Reply-To: <20091215130957.22047f92@jbarnes-piketon>

On Tue, Dec 15, 2009 at 3:09 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Tue, 15 Dec 2009 14:50:44 -0600
> Robert Hancock <hancockrwd@gmail.com> wrote:
>> I wouldn't have a problem with the E820 check being removed, since
>> it's not actually reliable by itself anyway. In fact I'm not sure that
>> we need any of the reservation checks at all.
>>
>> The whole reason we have this junk in there is because early on it was
>> thought that a bunch of problems people were seeing with systems not
>> working with MMCONFIG turned on were because their MMCONFIG was
>> broken, and the reservation checks were there to try to weed this out
>> by making sure the MCFG data pointed to a memory area that was marked
>> as reserved. Originally it was checking E820 only, which turned out to
>> be invalid because the firmware specification only told BIOS people to
>> reserve the space in ACPI motherboard resources, not E820.
>>
>>  Later on it was discovered that most of the problems were because we
>> did all config-space access using MMCONFIG, including the base access,
>> and combined with the fact that we don't disable decode on PCI devices
>> when sizing memory BARs, the BAR location during sizing would overlap
>> the MMCONFIG space and result in the device sucking up the MMCONFIG
>> accesses, usually causing a lockup. So it wasn't actually due to any
>> broken MMCONFIG motherboards at all. This was solved by using MMCONFIG
>> for extended config space access only, so that when we move the BAR
>> temporarily during sizing, we're not trying to access the MMCONFIG
>> region it overlaps (since BAR sizing requires only base access).
>>
>> (Lesson: yes, BIOSes are broken a lot, but you can't jump to
>> conclusions.)
>>
>> It would be interesting to know if there are any systems where the
>> code reports the MCFG area is not reserved in the ACPI motherboard
>> resources. I would tend to suspect not, because if it wasn't, Windows
>> would potentially assign devices to that memory area on such boards
>> and cause things to fail horribly, which presumably isn't happening.
>> We might be able to just get rid of all that code.
>
> Yeah, that sounds like an accurate summary.  I'd be in favor of ripping
> out the e820 check (it's totally useless and just confusing) and moving
> to using mmconfig for everything, not just extended space, provided we
> disable decode around our BAR sizing (some bridges needed quirks there
> though).

That may be viable, yes. Linus was opposed to the decode-disable last
time he weighed in, though, although he did seem like he could be
convinced if suitable exceptions were in place where it might break
things..

> The ACPI resource checks seem harmless; as you say I'd expect every
> machine running Windows to already have that part of the firmware
> tested with the "Windows boots, ship it" validation.

  reply	other threads:[~2009-12-16  0:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-13  8:07 Are there " Tvrtko Ursulin
2009-12-13  8:26 ` Are these " Tvrtko Ursulin
2009-12-13  9:25   ` Yinghai Lu
2009-12-13 17:19     ` Tvrtko Ursulin
2009-12-13 22:56       ` Yinghai Lu
2009-12-14 11:19         ` Tvrtko Ursulin
2009-12-14 11:25           ` Yinghai Lu
2009-12-14 19:34             ` Tvrtko Ursulin
2009-12-14 19:47               ` Yinghai Lu
2009-12-14 20:16                 ` Tvrtko Ursulin
2009-12-14 20:26                   ` Yinghai Lu
2009-12-15  1:22                     ` Robert Hancock
2009-12-15  1:42                       ` Yinghai Lu
2009-12-15 16:55                         ` Bjorn Helgaas
2009-12-15 18:01                           ` Yinghai Lu
2009-12-15 20:50                           ` Robert Hancock
2009-12-15 21:09                             ` Jesse Barnes
2009-12-16  0:14                               ` Robert Hancock [this message]
2009-12-16  6:26                             ` Yinghai Lu
2009-12-15  2:47                       ` [PATCH] x86/pci: don't check mmconf again if it is from MSR with amd faml0h Yinghai Lu
2009-12-16 20:06                         ` Jesse Barnes
2009-12-16 22:18                           ` Yinghai Lu
2009-12-13 20:26     ` Are these MTRR settings correct? Robert Hancock

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=51f3faa70912151614w30d1839cq66e8673ee5712e55@mail.gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tvrtko.ursulin@sophos.com \
    --cc=tvrtko@ursulin.net \
    --cc=yinghai@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®