ioremap fails for a device in PCI-E slot on AMCC katmai board

Shubhada Pugaonkar shubhada at chelsio.com
Sat Feb 21 12:35:05 EST 2009


Hi 

 

I am trying to get Chelsio's 10G T3 adapter working on Katmai board. 

When I load the driver (or have it built in to the kernel) I get
following error.

 

-bash-3.2# insmod cxgb3.ko

__ioremap(): phys addr 0x8000000 is RAM lr e2f21030

cxgb3 0000:11:00.0: cannot map device registers

cxgb3: probe of 0000:11:00.0 failed with error -12

 

I also tried another pci-e card just as an experiment and that also
failed

myri10ge: Version 1.4.3-1.378

myri10ge 0000:11:00.0: enabling device (0000 -> 0002)

myri10ge 0000:11:00.0: ioremap failed for 16777216 bytes at 0x0

 

I am using 2.6.28 kernel with katmai config file from kernel.

I have also tried the latest denx kernel which gave same results. 

 

Following are the values when I added some printks.

cxgb3:      mmio_start 0x08000000, mmio_len 4096, dev reg addr
0x00000000

kernel:     __ioremap:high mem, virtual 0xe0000000 physical 0x20000000

 

Looks like the mmio_start value is low hence the call fails. This does
not seem to be a driver issue. 

 

Is there something that I am missing in kernel config? any other hints 

on how to overcome this problem? 

 

Below is the boot log, lspci output, and the snippets of the code where
failure happens. config file is attached.

Please let me know if any other information is required.

 

Thanks

Shubhada

 

****************************************************

cxgb3_main.c:

        mmio_start = pci_resource_start(pdev, 0);

        mmio_len = pci_resource_len(pdev, 0);

        ai = t3_get_adapter_info(ent->driver_data);

 

      .....................

 

        adapter->regs = ioremap_nocache(mmio_start, mmio_len);

        if (!adapter->regs) {

                dev_err(&pdev->dev,

                        "cannot map device registers\n");

                err = -ENOMEM;

      }

****************************************************

arch/powerpc/mm/pgtable_32.c

        /*

         * Don't allow anybody to remap normal RAM that we're using.

         * mem_init() sets high_memory so only do the check after that.

         */

 

        if (mem_init_done && (p < virt_to_phys(high_memory))) {

                printk("__ioremap(): phys addr 0x%llx is RAM lr %p\n",

                       (unsigned long long)p,
__builtin_return_address(0));

                return NULL;

        }

****************************************************

lspci output 

 

0000:11:00.0 Class 0200: Unknown device 1425:0030

        Subsystem: Unknown device 1425:0001

        Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-

        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR-

        Interrupt: pin A routed to IRQ 18

        Region 0: Memory at e08000000 (64-bit, non-prefetchable)
[size=4K]

        Region 2: Memory at e00000000 (64-bit, non-prefetchable)
[size=128M]

        Region 4: Memory at e08001000 (64-bit, non-prefetchable)
[size=4K]

        [virtual] Expansion ROM at e0c000000 [disabled] [size=64K]

        Capabilities: [40] Power Management version 3

                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold-)

                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

        Capabilities: [48] Message Signalled Interrupts: Mask- 64bit+
Queue=0/5 Enable-

                Address: 0000000000000000  Data: 0000

        Capabilities: [58] Express Endpoint IRQ 0

                Device: Supported: MaxPayload 128 bytes, PhantFunc 0,
ExtTag+

                Device: Latency L0s <64ns, L1 <1us

                Device: AtnBtn- AtnInd- PwrInd-

                Device: Errors: Correctable- Non-Fatal- Fatal-
Unsupported-

                Device: RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+

                Device: MaxPayload 128 bytes, MaxReadReq 512 bytes

                Link: Supported Speed 2.5Gb/s, Width x8, ASPM L0s L1,
Port 0

                Link: Latency L0s unlimited, L1 unlimited

                Link: ASPM Disabled RCB 64 bytes CommClk- ExtSynch-

                Link: Speed 2.5Gb/s, Width x8

        Capabilities: [94] Vital Product Data

        Capabilities: [9c] MSI-X: Enable- Mask- TabSize=32

                Vector table: BAR=4 offset=00000000

                PBA: BAR=4 offset=00000800

        Capabilities: [100] Device Serial Number 01-00-00-00-01-00-00-00

        Capabilities: [300] Advanced Error Reporting

 

****************************************************

Following is the log while booting the kernel. 

Using PowerPC 44x Platform machine description

Linux version 2.6.28 (root at california) (gcc version 4.2.2) #22 Fri Feb
20 15:48:41 PST 2009

console [udbg0] enabled

setup_arch: bootmem

arch: exit

Zone PFN ranges:

  DMA      0x00000000 -> 0x00020000

  Normal   0x00020000 -> 0x00020000

  HighMem  0x00020000 -> 0x00020000

Movable zone start PFN for each node

early_node_map[1] active PFN ranges

    0: 0x00000000 -> 0x00020000

Built 1 zonelists in Zone order, mobility grouping on.  Total pages:
130048

Kernel command line: root=/dev/nfs rw
nfsroot=10.192.165.106:/opt/eldk4.1/eldk4.2/ppc_4xx,tcp,v3
ip=10.192.164.166:10.192.165.106:10.192.160.10

UIC0 (32 IRQ sources) at DCR 0xc0

UIC1 (32 IRQ sources) at DCR 0xd0

UIC2 (32 IRQ sources) at DCR 0xe0

UIC3 (32 IRQ sources) at DCR 0xf0

PID hash table entries: 2048 (order: 11, 8192 bytes)

clocksource: timebase mult[500000] shift[22] registered

Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

Memory: 516224k/524288k available (2796k kernel code, 7640k reserved,
128k data, 129k bss, 144k init)

SLUB: Genslabs=10, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

Calibrating delay loop... 1597.44 BogoMIPS (lpj=3194880)

Mount-cache hash table entries: 512

net_namespace: 288 bytes

NET: Registered protocol family 16

             

PCIE0: Checking link...

PCIE0: Device detected, waiting for link...

PCIE0: link is up !

PCI host bridge /plb/pciex at d00000000 (primary) ranges:

 MEM 0x0000000e00000000..0x0000000e7fffffff -> 0x0000000080000000 

  IO 0x0000000f80000000..0x0000000f8000ffff -> 0x0000000000000000

4xx PCI DMA offset set to 0x00000000

PCIE0: successfully set as root-complex

PCIE1: Checking link...

PCIE1: No device detected.

PCI host bridge /plb/pciex at d20000000 (primary) ranges:

 MEM 0x0000000e80000000..0x0000000effffffff -> 0x0000000080000000 

  IO 0x0000000f80010000..0x0000000f8001ffff -> 0x0000000000000000

4xx PCI DMA offset set to 0x00000000

PCIE1: successfully set as root-complex

PCIE2: Checking link...

PCIE2: No device detected.

PCI host bridge /plb/pciex at d40000000 (primary) ranges:

 MEM 0x0000000f00000000..0x0000000f7fffffff -> 0x0000000080000000 

  IO 0x0000000f80020000..0x0000000f8002ffff -> 0x0000000000000000

4xx PCI DMA offset set to 0x00000000

PCIE2: successfully set as root-complex

PCI host bridge /plb/pci at c0ec00000 (primary) ranges:

 MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000 

  IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000

4xx PCI DMA offset set to 0x00000000

PCI: Probing PCI hardware

PCI: Hiding 4xx host bridge resources 0000:10:00.0

pci 0000:11:00.0: PME# supported from D0 D3hot

pci 0000:11:00.0: PME# disabled

PCI: Hiding 4xx host bridge resources 0001:20:00.0

PCI: Hiding 4xx host bridge resources 0002:30:00.0

pci 0000:10:00.0: PCI bridge, secondary bus 0000:11

pci 0000:10:00.0:   IO window: disabled

pci 0000:10:00.0:   MEM window: 0x80000000-0x8bffffff

pci 0000:10:00.0:   PREFETCH window: 0x0000008c000000-0x0000008c0fffff

pci 0001:20:00.0: PCI bridge, secondary bus 0001:21

pci 0001:20:00.0:   IO window: disabled

pci 0001:20:00.0:   MEM window: disabled

pci 0001:20:00.0:   PREFETCH window: disabled

pci 0002:30:00.0: PCI bridge, secondary bus 0002:31

pci 0002:30:00.0:   IO window: disabled

pci 0002:30:00.0:   MEM window: disabled

pci 0002:30:00.0:   PREFETCH window: disabled

bus: 10 index 0 io port: [0xff080000-0xff08ffff]

bus: 10 index 1 mmio: [0xe00000000-0xe7fffffff]

bus: 11 index 0 mmio: [0xff080000-0xff080fff]

bus: 11 index 1 mmio: [0xe00000000-0xe0bffffff]

bus: 11 index 2 mmio: [0xe0c000000-0xe0c0fffff]

bus: 11 index 3 mmio: [0x0-0x0]

bus: 20 index 0 io port: [0xff0a0000-0xff0affff]

bus: 20 index 1 mmio: [0xe80000000-0xeffffffff]

bus: 21 index 0 mmio: [0xff0a0000-0xff0a0fff]

bus: 21 index 1 mmio: [0xe00000000-0xe000fffff]

bus: 21 index 2 mmio: [0xe00000000-0xe000fffff]

bus: 21 index 3 mmio: [0x0-0x0]

bus: 30 index 0 io port: [0xff0c0000-0xff0cffff]

bus: 30 index 1 mmio: [0xf00000000-0xf7fffffff]

bus: 31 index 0 mmio: [0xff0c0000-0xff0c0fff]

bus: 31 index 1 mmio: [0xe80000000-0xe800fffff]

bus: 31 index 2 mmio: [0xe80000000-0xe800fffff]

bus: 31 index 3 mmio: [0x0-0x0]

bus: 00 index 0 io port: [0x00-0xffff]

bus: 00 index 1 mmio: [0xd80000000-0xdffffffff]

NET: Registered protocol family 2

IP route cache hash table entries: 16384 (order: 4, 65536 bytes)

TCP established hash table entries: 65536 (order: 7, 524288 bytes)

TCP bind hash table entries: 65536 (order: 6, 262144 bytes)

TCP: Hash tables configured (established 65536 bind 65536)

TCP reno registered

NET: Registered protocol family 1

msgmni has been set to 1009

alg: No test for stdrng (krng)

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler deadline registered

io scheduler cfq registered

pcieport-driver 0000:10:00.0: found MSI capability

pcieport-driver 0001:20:00.0: found MSI capability

pcieport-driver 0002:30:00.0: found MSI capability

aer: probe of 0000:10:00.0:pcie01 failed with error -38

aer: probe of 0001:20:00.0:pcie01 failed with error -38

aer: probe of 0002:30:00.0:pcie01 failed with error -38

Serial: 8250/16550 driver4 ports, IRQ sharing enabled

serial8250.0: ttyS0 at MMIO 0x4f0000200 (irq = 19) is a 16550A

                                                              console
handover: boot [udbg0] -> real [ttyS0]

serial8250.0: ttyS1 at MMIO 0x4f0000300 (irq = 20) is a 16550A

serial8250.0: ttyS2 at MMIO 0x4f0000600 (irq = 21) is a 16550A

4f0000200.serial: ttyS0 at MMIO 0x4f0000200 (irq = 19) is a 16550A

4f0000300.serial: ttyS1 at MMIO 0x4f0000300 (irq = 20) is a 16550A

4f0000600.serial: ttyS2 at MMIO 0x4f0000600 (irq = 21) is a 16550A

brd: module loaded

Intel(R) PRO/1000 Network Driver - version 7.3.20-k3-NAPI

Copyright (c) 1999-2006 Intel Corporation.

e1000e: Intel(R) PRO/1000 Network Driver - 0.3.3.3-k6

e1000e: Copyright (c) 1999-2008 Intel Corporation.

PPC 4xx OCP EMAC driver, version 3.54

MAL v2 /plb/mcmal, 2 TX channels, 1 RX channels

eth0: EMAC-0 /plb/opb/ethernet at 10000800, MAC 00:01:73:77:56:64

eth0: found Generic MII PHY (0x01)

TCP cubic registered

NET: Registered protocol family 17

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

eth0: link is down

IP-Config: Complete:

     device=eth0, addr=10.192.164.166, mask=255.255.240.0,
gw=10.192.160.1,

     host=ppcb1, domain=, nis-domain=(none),

     bootserver=10.192.165.106, rootserver=10.192.165.106, rootpath=

Looking up port of RPC 100003/3 on 10.192.165.106

eth0: link is up, 100 FDX, pause enabled

Looking up port of RPC 100005/3 on 10.192.165.106

VFS: Mounted root (nfs filesystem).

Freeing unused kernel memory: 144k init

modprobe: FATAL: Could not load /lib/modules/2.6.28/modules.dep: No such
file or directory

 

modprobe: FATAL: Could not load /lib/modules/2.6.28/modules.dep: No such
file or directory

 

INIT: version 2.86 booting

                Welcome to DENX Embedded Linux Environment

                Press 'I' to enter interactive startup.

modprobe: FATAL: Could not load /lib/modules/2.6.28/modules.dep: No such
file or directory

 

modprobe: FATAL: Could not load /lib/modules/2.6.28/modules.dep: No such
file or directory

 

Cannot access the Hardware Clock via any known method.

Use the --debug option to see the details of our search for an access
method.

Setting clock : Thu Jan  1 01:00:06 CET 1970 [  OK  ]

Building the cache [  OK  ]

Setting hostname ppcb1:  [  OK  ]

Mounting local filesystems:  [  OK  ]

Enabling /etc/fstab swaps:  [  OK  ]

INIT: Entering runlevel: 3

Entering non-interactive startup

FATAL: Could not load /lib/modules/2.6.28/modules.dep: No such file or
directory

Bringing up loopback interface:  [  OK  ]

FATAL: Could not load /lib/modules/2.6.28/modules.dep: No such file or
directory

Starting system logger: [  OK  ]

Starting kernel logger: [  OK  ]

Starting rpcbind: [  OK  ]

Mounting NFS filesystems:  [  OK  ]

Mounting other filesystems:  [  OK  ]

Starting xinetd: [  OK  ]

 

DENX ELDK version 4.2 build 2008-04-01

Linux 2.6.28 on a ppc

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090220/5290e1e9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-2.6.28-katmai
Type: application/octet-stream
Size: 22967 bytes
Desc: config-2.6.28-katmai
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090220/5290e1e9/attachment.obj>


More information about the Linuxppc-dev mailing list