Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Steven Newbury <steve@snewbury.org.uk>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Yinghai Lu <yinghai@kernel.org>, linux-pci@vger.kernel.org
Subject: Re: PCI resources above 4GB
Date: Wed, 11 Apr 2012 06:33:24 +0100	[thread overview]
Message-ID: <1334122404.28676.2.camel@Nokia-N900> (raw)
In-Reply-To: <CAErSpo6GTarMUySce+n6x=TtqgfryzA5-88aKwL7L4snDp4MTA@mail.gmail.com>

On Wed, 11 Apr 2012, 04:37:21 BST, Bjorn Helgaas <bhelgaas@google.com> wrote:

> On Tue, Apr 10, 2012 at 3:19 PM, Steven Newbury <steve@snewbury.org.uk>
> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > On 10/04/12 21:45, Yinghai Lu wrote:
> > > On Tue, Apr 10, 2012 at 1:26 PM, Steven Newbury
> > > <steve@snewbury.org.uk> wrote:
> > > > > 
> > > > So far I'm concluding the BIOS isn't sane.  Is it possible to
> > > > define a custom memory map from the linux boot cmdline to set
> > > > TOP_OF_LOW_MEM?
> > > 
> > > The BIOS have MMIO and memory overlapping...
> > > 
> > > > 
> > Another thought, normally the integrated graphics has an "AGP"
> > aperture of 256M @0xe0000000, which is detected by agpgart-intel, this
> > will need to be moved up above 4G to free up 0xe0000000 for the
> > radeon, assuming the "agp_bridge" has a 64bit base register...  I
> > noticed in my docked dmesg, "AGP aperture is 256M @ 0x20000000", but
> > the PCI base: "120000000-12fffffff : 0000:00:02.0" so only 32bits have
> > been set in agpgart-intel.  Explains why i915 wasn't initialised.
> > 
> > > > Obviously, I'd prefer getting everything allocated into the
> > > > address space available, and working, but if it comes down to it
> > > > I'd accept a hack like the above if there's no other way.
> > > 
> > > Could try to reduce carbus preallocated size.... boot with
> > > pci=cbmemsize=16M
> > > 
> > > Please apply attached patch in addtition to allocate_high_at_first
> > > 
> > I'll try first thing tomorrow.  I'm away from the docking station now.
> 
> Why are we messing around with resources above 4G?   The host bridge
> _CRS reports no apertures above 4G, and you can't just try random
> things and hope they work.
> 
The BIOS doesn't always know best, there's no reason to think Dell put any effort into 64bit OS support, the only supported OS options were WinXP (32bit), and (new at the time) Vista (32bit), as such they tried to minimize the PCI hole so most of the maximum supported 4GB is available, but severely limiting MMIO space for additional devices.  Reproducing what the BIOS should have done may be the only option.

> If the host bridge has a _PRS with settings above 4G that we could
> enable, that might be worthwhile.   I haven't seen _PRS on a host
> bridge yet, and Linux would ignore it if it existed, but that would be
> a plausible approach.   (Turn on CONFIG_PNP_DEBUG_MESSAGES and boot
> with pnp.debug=1 to see if you have any _PRS.)
> 
I will try this, but I'll be surprised if it has anything useful.

> I think it would be helpful to break this down and look at one issue
> at a time, e.g., by removing the dock/undock hotplug issues.

The hotplug detection of the card devices doesn't work on mainline, only the bridge device shows up, but it does work with Yinghai's for-pci-busn-alloc branch, but resource allocation does not.  No different to booting docked.
> 
> In https://bugzilla.kernel.org/show_bug.cgi?id=10461#c12, I think the
> problem you're seeing is that when you boot while docked, the
> integrated i915 works, but the radeon in the dock does not.   That
> makes sense to me because they each want 256M of space, and according
> to your _CRS info, there's only one possible location with that much
> space (0xe0000000).   Do you happen to know what Windows does in that

That's why I'm hoping to be able to reallocate the i915 aperture above 4GB, but this depends on what the chipset is capable of rather than what the BIOS exposes.

> situation?   Does the radeon work and the i915 not, or does it somehow
> make both work?   Is there any way you could collect the device info
> under Windows, using AIDA64 (http://www.aida64.com/) or similar?
> 
>From reading Microsoft documents, they always try putting PCI resources above 4GB on 64bit Windows since Vista, even using bounce buffers where necessary, and supported by the hardware, only falling back below 4GB when all else fails.  I only have the 32bit Windows Vista shipped with the laptop to test on, and in that case it just fails badly, BSOD if booting docked, or unable to allocate resources just like Linux on hotplug.

Despite this, the reason I bought this card is a positive report from a Windows user of success, most VGA cards don't work in the d/dock, and I was hoping to experiment with prime. :)

  reply	other threads:[~2012-04-11  5:31 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09 10:49 PCI resources above 4GB Steven Newbury
2012-04-10  0:51 ` Bjorn Helgaas
2012-04-10 10:53   ` Steven Newbury
2012-04-10 15:16     ` Yinghai Lu
     [not found]       ` <4F8467AA.90305@snewbury.org.uk>
2012-04-10 17:29         ` Steven Newbury
2012-04-10 18:40         ` Yinghai Lu
2012-04-10 18:44           ` Steven Newbury
2012-04-10 19:00           ` Steven Newbury
2012-04-10 19:04             ` Steven Newbury
2012-04-10 19:16             ` Yinghai Lu
2012-04-10 19:46               ` Steven Newbury
2012-04-10 20:07                 ` Yinghai Lu
2012-04-10 20:26                   ` Steven Newbury
2012-04-10 20:45                     ` Yinghai Lu
2012-04-10 21:19                       ` Steven Newbury
2012-04-11  3:37                         ` Bjorn Helgaas
2012-04-11  5:33                           ` Steven Newbury [this message]
2012-04-11  9:03                             ` Steven Newbury
2012-04-11 14:33                           ` Steven Newbury
2012-04-11 23:59                             ` Bjorn Helgaas
2012-04-12 11:39                               ` Steven Newbury
2012-04-12  0:57                         ` Yinghai Lu
2012-04-12 11:22                           ` Steven Newbury
2012-04-12 16:07                             ` Yinghai Lu
2012-04-12 16:40                               ` Steven Newbury
2012-04-13  8:26                                 ` Yinghai Lu
2012-04-13  8:34                                   ` Steven Newbury
2012-04-13 11:45                                   ` Steven Newbury
2012-04-13 11:58                                     ` Steven Newbury
2012-04-13 12:49                                       ` Steven Newbury
2012-04-13 13:26                                         ` Steven Newbury
2012-04-13 13:52                                           ` drm-next i915 regression? ( was: Re: PCI resources above 4GB) Steven Newbury
2012-04-13 14:08                                             ` Steven Newbury
2012-04-13 14:13                                               ` Daniel Vetter
2012-04-13 14:19                                                 ` Steven Newbury
2012-04-13 15:23                                                   ` Steven Newbury
2012-04-13 15:49                                                     ` Steven Newbury
2012-04-13 16:17                                                       ` Yinghai Lu
2012-04-13 17:12                                                         ` btrfs oops [was Re: drm-next i915 regression? ( was: Re: PCI resources above 4GB)] Steven Newbury
2012-04-13 17:38                                                         ` drm-next i915 regression? ( was: Re: PCI resources above 4GB) Steven Newbury
2012-04-13 18:12                                                           ` Steven Newbury
2012-04-13 21:51                                                             ` Btrfs corruption Oops " Steven Newbury
2012-04-14 17:37                                 ` PCI resources above 4GB Steven Newbury
2012-04-14 18:05                                   ` Steven Newbury
2012-04-14 18:42                                     ` Steven Newbury
2012-04-14 19:08                                       ` Steven Newbury
2012-04-14 19:21                                         ` Steven Newbury
2012-04-14 20:48                                           ` Yinghai Lu
2012-04-15 10:19                                             ` Steven Newbury
2012-04-15 10:20                                             ` Steven Newbury
2012-04-15 11:37                                               ` Steven Newbury
2012-04-15 17:25                                                 ` Steven Newbury
2012-04-15 17:31                                                   ` Steven Newbury
2012-04-15 20:05                                                     ` Yinghai Lu
2012-04-15 20:06                                                       ` Yinghai Lu
2012-04-16  6:54                                                         ` Yinghai Lu
2012-04-16  7:01                                                           ` Steven Newbury
2012-04-16 17:29                                                           ` Yinghai Lu
2012-04-18  7:21                                                             ` Steven Newbury
2012-04-24  9:49                                                             ` Steven Newbury
     [not found]                                                               ` <4FB227D3.7090002@snewbury.org.uk>
     [not found]                                                                 ` <CAE9FiQX48eCS85eWMFxm6fCWgu2zwxvSywtQhsf-35WEvBfJVQ@mail.gmail.com>
2012-05-17 12:27                                                                   ` Steven Newbury
2012-05-17 12:34                                                                     ` Steven Newbury
2012-05-17 16:36                                                                       ` Yinghai Lu
2012-05-18  7:45                                                                         ` Yinghai Lu
2012-05-18  9:08                                                                           ` Yinghai Lu
2012-05-21 17:27                                                                             ` Steven Newbury
2012-05-29 23:19                                                                               ` Bjorn Helgaas
2012-06-01 23:06                                                                                 ` Bjorn Helgaas
2012-04-15  3:21                                   ` Yinghai Lu
2012-04-15 10:18                                     ` Steven Newbury
2012-04-15 11:31                                     ` Steven Newbury
2012-04-12 16:29                             ` Steven Newbury
2012-04-11 11:43                       ` Steven Newbury

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=1334122404.28676.2.camel@Nokia-N900 \
    --to=steve@snewbury.org.uk \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --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