2005-02-24 20:22:42

by Terence Ripperda

[permalink] [raw]
Subject: 64-bit pci bar on a 32-bit kernel

Hello,

we've gotten a customer report of a problem whereby our framebuffer is
not visible through the kernel. the kernel data structures in struct
pci_dev have bar1 (our framebuffer) set to 0, and the bar does not
appear in /proc/pci.

after a little investigation, it appears that the bios allocated a
64-bit bar in pci config space. our gpu claims 64-bit support in pci
config space and the cpu is an em64t. but the customer is running a
32-bit kernel on the em64t, which is a reasonable thing to do. it
turns out the pci driver does not like 64-bit bars on a 32-bit kernel
and prints out the following messages during boot:

PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=5
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Ignoring BAR0-3 of IDE controller 00:1f.1
PCI: Unable to handle 64-bit address space for
PCI: Unable to handle 64-bit address space for
PCI: Unable to handle 64-bit address for device 03:00.0
PCI: Unable to handle 64-bit address space for

Is this an expected problem? Is there any reason why the 32-bit kernel
couldn't handle 64-bit bars?

here's what pci config space for our gpu looks like:

00: de 10 ce 00 07 01 10 00 a2 00 00 03 10 00 00 00
10: 00 00 00 de 0c 00 00 f8 0f 00 00 00 04 00 00 dd
20: 00 00 00 00 00 00 00 00 00 00 00 00 de 10 43 02
30: 00 00 ee df 60 00 00 00 00 00 00 00 0a 01 00 00

Thanks,
Terence


2005-02-24 21:04:07

by Jeff Garzik

[permalink] [raw]
Subject: Re: 64-bit pci bar on a 32-bit kernel

Terence Ripperda wrote:
> Hello,
>
> we've gotten a customer report of a problem whereby our framebuffer is
> not visible through the kernel. the kernel data structures in struct
> pci_dev have bar1 (our framebuffer) set to 0, and the bar does not
> appear in /proc/pci.
>
> after a little investigation, it appears that the bios allocated a
> 64-bit bar in pci config space. our gpu claims 64-bit support in pci
> config space and the cpu is an em64t. but the customer is running a
> 32-bit kernel on the em64t, which is a reasonable thing to do. it
> turns out the pci driver does not like 64-bit bars on a 32-bit kernel
> and prints out the following messages during boot:
>
> PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=5
> PCI: Using configuration type 1
> PCI: Probing PCI hardware
> PCI: Probing PCI hardware (bus 00)
> PCI: Ignoring BAR0-3 of IDE controller 00:1f.1
> PCI: Unable to handle 64-bit address space for
> PCI: Unable to handle 64-bit address space for
> PCI: Unable to handle 64-bit address for device 03:00.0
> PCI: Unable to handle 64-bit address space for
>
> Is this an expected problem? Is there any reason why the 32-bit kernel
> couldn't handle 64-bit bars?

hmmm, that's a good question.

I wonder if ioremap() even supports 64-bit addresses on 32-bit platforms?

64-bit MMIO is a bit different from 64-bit DMA; though its still only
page tables...

Jeff



2005-02-24 22:34:51

by Brian Gerst

[permalink] [raw]
Subject: Re: 64-bit pci bar on a 32-bit kernel

Terence Ripperda wrote:
> Hello,
>
> we've gotten a customer report of a problem whereby our framebuffer is
> not visible through the kernel. the kernel data structures in struct
> pci_dev have bar1 (our framebuffer) set to 0, and the bar does not
> appear in /proc/pci.
>
> after a little investigation, it appears that the bios allocated a
> 64-bit bar in pci config space. our gpu claims 64-bit support in pci
> config space and the cpu is an em64t. but the customer is running a
> 32-bit kernel on the em64t, which is a reasonable thing to do. it
> turns out the pci driver does not like 64-bit bars on a 32-bit kernel
> and prints out the following messages during boot:
>
> PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=5
> PCI: Using configuration type 1
> PCI: Probing PCI hardware
> PCI: Probing PCI hardware (bus 00)
> PCI: Ignoring BAR0-3 of IDE controller 00:1f.1
> PCI: Unable to handle 64-bit address space for
> PCI: Unable to handle 64-bit address space for
> PCI: Unable to handle 64-bit address for device 03:00.0
> PCI: Unable to handle 64-bit address space for
>
> Is this an expected problem? Is there any reason why the 32-bit kernel
> couldn't handle 64-bit bars?
>
> here's what pci config space for our gpu looks like:
>
> 00: de 10 ce 00 07 01 10 00 a2 00 00 03 10 00 00 00
> 10: 00 00 00 de 0c 00 00 f8 0f 00 00 00 04 00 00 dd
> 20: 00 00 00 00 00 00 00 00 00 00 00 00 de 10 43 02
> 30: 00 00 ee df 60 00 00 00 00 00 00 00 0a 01 00 00
>
> Thanks,
> Terence
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

It looks like support for 64-bit struct resouce is being worked on in
the -mm tree.

--
Brian Gerst