* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 8:36 marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge Dieter Kiermaier
@ 2009-10-29 8:35 ` Simon Kagstrom
2009-10-29 8:50 ` Dieter Kiermaier
2009-10-29 8:52 ` Daniel Mack
1 sibling, 1 reply; 15+ messages in thread
From: Simon Kagstrom @ 2009-10-29 8:35 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 29 Oct 2009 10:36:40 +0200
Dieter Kiermaier <dk-arm-linux@gmx.de> wrote:
> Uncompressing Linux............................................................................................................................................................ done.
>
> The PCIe->PCI bridge is a Marvell 88SB2211 evaluation board and I expect it works well - at least it does in all other environments I've tested so far.
> Please can someone help me to track this down?
> Some tips how to debug such a problem using openocd are very welcome, too!
> I'm completely lost in space :(
Try attaching gdb to it, i.e.,
arm-unknown-linux-gnu-gdb vmlinux
and then connecting to openocd's GDB remote with
target remote localhost:3333
After that you can backtrace and examine stuff as you normally do with
GDB. Remeber to start with nohlt when you use GDB, but I guess you're
already doing that.
// Simon
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
@ 2009-10-29 8:36 Dieter Kiermaier
2009-10-29 8:35 ` Simon Kagstrom
2009-10-29 8:52 ` Daniel Mack
0 siblings, 2 replies; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-29 8:36 UTC (permalink / raw)
To: linux-arm-kernel
Hi all,
I've got a strange problem with latest git kernel. If I connect a PCIe->PCI bridge (without any connected PCI device!)
to my openrd-base board the kernel freezes during bootup if PCI is enabled:
Filename 'uImage_openrd'.
Load address: 0x800000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
############
done
Bytes transferred = 2390120 (247868 hex)
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-2.6.32-rc5-00081-g964fe08-
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2390056 Bytes = 2.3 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux............................................................................................................................................................ done.
The PCIe->PCI bridge is a Marvell 88SB2211 evaluation board and I expect it works well - at least it does in all other environments I've tested so far.
If I insert eg a PCIe Network card everything works fine.
With former marvell 2.6.22 stock kernel / u-boot kernel boots up and I can access PCI card connected after my bridge.
Please can someone help me to track this down?
Some tips how to debug such a problem using openocd are very welcome, too!
I'm completely lost in space :(
Many thanks,
Dieter
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 8:35 ` Simon Kagstrom
@ 2009-10-29 8:50 ` Dieter Kiermaier
0 siblings, 0 replies; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-29 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Am Donnerstag 29 Oktober 2009 09:35:10 schrieb Simon Kagstrom:
Hi Simon,
> On Thu, 29 Oct 2009 10:36:40 +0200
> Dieter Kiermaier <dk-arm-linux@gmx.de> wrote:
>
> > Uncompressing Linux............................................................................................................................................................ done.
> >
> > The PCIe->PCI bridge is a Marvell 88SB2211 evaluation board and I expect it works well - at least it does in all other environments I've tested so far.
>
> > Please can someone help me to track this down?
> > Some tips how to debug such a problem using openocd are very welcome, too!
> > I'm completely lost in space :(
>
> Try attaching gdb to it, i.e.,
>
> arm-unknown-linux-gnu-gdb vmlinux
>
> and then connecting to openocd's GDB remote with
>
> target remote localhost:3333
>
> After that you can backtrace and examine stuff as you normally do with
> GDB. Remeber to start with nohlt when you use GDB, but I guess you're
> already doing that.
Yes I do.
Ok, sometimes things are more easy than one could think off :)
I've done what you told me:
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
warning: shared library handler failed to enable breakpoint
__delay () at arch/arm/lib/delay.S:44
44 subs r0, r0, #1
Current language: auto; currently asm
(gdb) bt
#0 __delay () at arch/arm/lib/delay.S:44
#1 0xc003b1f4 in panic (fmt=0xdf834000 "\002") at kernel/panic.c:138
#2 0xc003e0fc in do_exit (code=-545054720) at kernel/exit.c:902
#3 0xc002a054 in die (str=0xc042fb58 "", regs=0xdf835e10, err=40)
at arch/arm/kernel/traps.c:274
#4 0xc002a11c in arm_notify_die (str=0xc040dc94 "Attempted to kill init!",
regs=0xdf835bbc, info=0xdf835d78, err=3221397788, trap=0)
at arch/arm/kernel/traps.c:286
#5 0xc002634c in do_DataAbort (addr=4276361468, fsr=40, regs=0xdf835e10)
at arch/arm/mm/fault.c:524
#6 0xc037440c in __dabt_svc ()
Backtrace stopped: frame did not save the PC
(gdb)
Could someone see the cause of my freeze?
Dieter
>
> // Simon
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 8:36 marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge Dieter Kiermaier
2009-10-29 8:35 ` Simon Kagstrom
@ 2009-10-29 8:52 ` Daniel Mack
2009-10-29 8:59 ` Simon Kagstrom
2009-10-29 9:14 ` Dieter Kiermaier
1 sibling, 2 replies; 15+ messages in thread
From: Daniel Mack @ 2009-10-29 8:52 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Oct 29, 2009 at 10:36:40AM +0200, Dieter Kiermaier wrote:
> ## Booting kernel from Legacy Image at 00800000 ...
> Image Name: Linux-2.6.32-rc5-00081-g964fe08-
> Image Type: ARM Linux Kernel Image (uncompressed)
> Data Size: 2390056 Bytes = 2.3 MB
> Load Address: 00008000
> Entry Point: 00008000
> Verifying Checksum ... OK
> Loading Kernel Image ... OK
> OK
>
> Starting kernel ...
>
> Uncompressing Linux............................................................................................................................................................ done.
The problem most probably is that your kernel dies before the console is
enabled, and hence you're not pointed to the actual problem.
Try the patch below - printk() messages are not buffered but sent out
directly to the lowlevel UART functions with this hack. CONFIG_DEBUG_LL
must be enabled for this.
Daniel
diff --git a/kernel/printk.c b/kernel/printk.c
index b4d97b5..7919751 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -686,6 +686,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
printed_len += vscnprintf(printk_buf + printed_len,
sizeof(printk_buf) - printed_len, fmt, args);
+{ extern void printascii(const char *); printascii(printk_buf); }
p = printk_buf;
^ permalink raw reply related [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 8:52 ` Daniel Mack
@ 2009-10-29 8:59 ` Simon Kagstrom
2009-10-29 9:14 ` Dieter Kiermaier
1 sibling, 0 replies; 15+ messages in thread
From: Simon Kagstrom @ 2009-10-29 8:59 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 29 Oct 2009 09:52:36 +0100
Daniel Mack <daniel@caiaq.de> wrote:
> On Thu, Oct 29, 2009 at 10:36:40AM +0200, Dieter Kiermaier wrote:
> > ## Booting kernel from Legacy Image at 00800000 ...
> > Image Name: Linux-2.6.32-rc5-00081-g964fe08-
> > Image Type: ARM Linux Kernel Image (uncompressed)
> > Data Size: 2390056 Bytes = 2.3 MB
> > Load Address: 00008000
> > Entry Point: 00008000
> > Verifying Checksum ... OK
> > Loading Kernel Image ... OK
> > OK
> >
> > Starting kernel ...
> >
> > Uncompressing Linux............................................................................................................................................................ done.
>
> The problem most probably is that your kernel dies before the console is
> enabled, and hence you're not pointed to the actual problem.
And another thing: you can printout the buffer from U-boot by looking
at __log_buf, i.e.,
[simkag at marrow kernel]$ nm vmlinux| grep __log_buf
c03bde48 b __log_buf
Just subtract 0xc0000000 from the address to get the physical address.
So from U-boot:
OpenRD>> md 0x3bde48
003bde48: 5b3e353c 20202020 30302e30 30303030 <5>[ 0.000000
003bde58: 694c205d 2078756e 73726576 206e6f69 ] Linux version
003bde68: 2e362e32 342e3133 69732820 67616b6d 2.6.31.4 (simkag
003bde78: 72616d40 29776f72 63672820 65762063 @marrow) (gcc ve
003bde88: 6f697372 2e34206e 20342e33 43434728 rsion 4.3.4 (GCC
[...]
// Simon
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 8:52 ` Daniel Mack
2009-10-29 8:59 ` Simon Kagstrom
@ 2009-10-29 9:14 ` Dieter Kiermaier
2009-10-29 9:36 ` Dieter Kiermaier
1 sibling, 1 reply; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-29 9:14 UTC (permalink / raw)
To: linux-arm-kernel
Am Donnerstag 29 Oktober 2009 09:52:36 schrieb Daniel Mack:
Hi Daniel,
> On Thu, Oct 29, 2009 at 10:36:40AM +0200, Dieter Kiermaier wrote:
> > ## Booting kernel from Legacy Image at 00800000 ...
> > Image Name: Linux-2.6.32-rc5-00081-g964fe08-
> > Image Type: ARM Linux Kernel Image (uncompressed)
> > Data Size: 2390056 Bytes = 2.3 MB
> > Load Address: 00008000
> > Entry Point: 00008000
> > Verifying Checksum ... OK
> > Loading Kernel Image ... OK
> > OK
> >
> > Starting kernel ...
> >
> > Uncompressing Linux............................................................................................................................................................ done.
>
> The problem most probably is that your kernel dies before the console is
> enabled, and hence you're not pointed to the actual problem.
>
> Try the patch below - printk() messages are not buffered but sent out
> directly to the lowlevel UART functions with this hack. CONFIG_DEBUG_LL
> must be enabled for this.
I think your patch leads us to the root but I fear I don't know about PCI / Kernel programming to fix it :(
Here is my start log:
Hopefully someone can see what is going wrong?
Starting kernel ...
Uncompressing Linux............................................................................................................................................................ done.
<5>Linux version 2.6.32-rc5-00081-g964fe08-dirty (dieter at dk1-linux) (gcc version 4.2.0 20070413 (prerelease)) #7 PREEMPT Thu Oct 29 10:05:02 CET 2009
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell OpenRD Base Board
Memory policy: ECC disabled, Data cache writeback
<7>On node 0 totalpages: 131072
<7>free_area_init_node: node 0, pgdat c04c5dec, node_mem_map c058d000
<7> Normal zone: 1024 pages used for memmap
<7> Normal zone: 0 pages reserved
<7> Normal zone: 130048 pages, LIFO batch:31
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
<5>Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x400000 at 0x100000(uImage),0x1fb00000 at 0x500000(rootfs) rw root=/dev/nfs rw nfsroot=192.168.2.251:/home/dieter/ArtistaNt
<6>PID hash table entries: 2048 (order: 1, 8192 bytes)
<6>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
<6>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>Memory: 256MB 256MB = 512MB total
<5>Memory: 513920KB available (4420K code, 961K data, 120K init, 0K highmem)
<6>SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
<6>Hierarchical RCU implementation.
<6>NR_IRQS:114
Console: colour dummy device 80x30
<6>Calibrating delay loop... <c>1199.30 BogoMIPS (lpj=5996544)
Mount-cache hash table entries: 512
<6>CPU: Testing write buffer coherency: ok
<6>NET: Registered protocol family 16
<6>Kirkwood: MV88F6281-A0, TCLK=200000000.
<6>Feroceon L2: Cache support initialised.
<7>initial MPP regs: 01111111 11113311 33331111 33103333 42222033 22244444 00000022
<7> final MPP regs: 01111111 11113311 33331111 33003333 42222033 22244444 00000022
<7>PCI: Scanning bus 0000:00
<7>pci 0000:00:00.0: found [11ab:6281] class 000580 header type 00
<7>pci 0000:00:00.0: reg 10 64bit mmio pref: [0xd0000000-0xd00fffff]
<7>pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff]
<7>pci 0000:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
<7>pci 0000:00:00.0: calling rc_pci_fixup+0x0/0x40
<7>pci 0000:00:00.0: calling quirk_resource_alignment+0x0/0x19c
<7>pci 0000:00:00.0: supports D1 D2
<7>pci 0000:00:01.0: found [11ab:2211] class 000604 header type 01
<7>pci 0000:00:01.0: calling pci_fixup_ide_bases+0x0/0x44
<7>pci 0000:00:01.0: calling rc_pci_fixup+0x0/0x40
<7>pci 0000:00:01.0: calling quirk_resource_alignment+0x0/0x19c
<7>pci 0000:00:01.0: supports D1 D2
<6>pci 0000:00:01.0: PME# supported from D0 D1 D2 D3hot D3cold
<6>pci 0000:00:01.0: PME# disabled
<7>PCI: Fixups for bus 0000:00
<6>PCI: bus0: Fast back to back transfers disabled
<7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 0
<7>pci 0000:00:01.0: bus configuration invalid, reconfiguring
<7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 1
<7>PCI: Scanning bus 0000:01
<1>Unhandled fault: external abort on non-linefetch (0x028) at 0xfee418fc
<0>Internal error: : 28 [#1] PREEMPT
<0>last sysfs file:
<d>Modules linked in:
CPU: 0 Not tainted (2.6.32-rc5-00081-g964fe08-dirty #7)
PC is at orion_pcie_rd_conf+0x48/0x98
LR is at 0x0
pc : [<c002fc10>] lr : [<00000000>] psr: 20000093
sp : df835e58 ip : 00000004 fp : 00000000
r10: df835e94 r9 : 00000000 r8 : 00000000
r7 : 00000000 r6 : 00000004 r5 : df81b800 r4 : 00000000
r3 : 000018fc r2 : 00000000 r1 : 80010000 r0 : fee40000
Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 00004000 DAC: 00000017
<0>Process swapper (pid: 1, stack limit = 0xdf834270)
<0>Stack: (0xdf835e58 to 0xdf836000)
<0>5e40: 20000093 c002f944
<0>5e60: 00000004 df835e94 0000000f 60000013 df81b800 df835eb4 df81b800 00000000
<0>5e80: 00000000 c01c1e90 df835e94 00000000 00000000 00000000 df835eb4 00000000
<0>5ea0: df81b800 c036c7e0 c049f634 df81b800 00000000 00000001 df81b800 00000008
<0>5ec0: 00000000 df81b800 df81b600 00000000 00000000 c01c3d74 60000013 df81b800
<0>5ee0: 00000008 00000001 00000001 c036ded8 df830800 df81b800 00000000 00000001
<0>5f00: df81b600 c036dd48 00000001 00000000 c040abbc c040abbc 00ff0100 00219f00
<0>5f20: 00000000 df81b600 df830800 00000000 00000001 df81b614 00000000 c04c9f00
<0>5f40: 00000000 c036df48 df81b600 00000001 c0022198 df834000 00000040 c036dfa8
<0>5f60: df807b00 c000c638 df807b00 c000a3ac c0009a4c c01f0e94 df8007c0 c00205e0
<0>5f80: c00209bc 00000000 00000000 00000000 00000000 c04c9f00 c000cbfc c000cc1c
<0>5fa0: c001a7c8 c00263b8 df835fb6 c006f770 df809ae0 00000001 00000033 00000000
<0>5fc0: 00000000 c00205e0 c00209bc 00000000 00000000 00000000 00000000 00000000
<0>5fe0: 00000000 c000888c 00000000 00000000 00000000 c00273dc ffff0000 ffff0000
[<c002fc10>] (orion_pcie_rd_conf+0x48/0x98) from [<c002f944>] (pcie_rd_conf+0x7c/0xb8)
[<c002f944>] (pcie_rd_conf+0x7c/0xb8) from [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98)
[<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98) from [<c036c7e0>] (pci_scan_single_device+0x3c/0x150)
[<c036c7e0>] (pci_scan_single_device+0x3c/0x150) from [<c01c3d74>] (pci_scan_slot+0x14/0x7c)
[<c01c3d74>] (pci_scan_slot+0x14/0x7c) from [<c036ded8>] (pci_scan_child_bus+0x30/0xec)
[<c036ded8>] (pci_scan_child_bus+0x30/0xec) from [<c036dd48>] (pci_scan_bridge+0x1a8/0x308)
[<c036dd48>] (pci_scan_bridge+0x1a8/0x308) from [<c036df48>] (pci_scan_child_bus+0xa0/0xec)
[<c036df48>] (pci_scan_child_bus+0xa0/0xec) from [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20)
[<c036dfa8>] (pci_scan_bus_parented+0x14/0x20) from [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48)
[<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48) from [<c000a3ac>] (pci_common_init+0x120/0x20c)
[<c000a3ac>] (pci_common_init+0x120/0x20c) from [<c000cc1c>] (openrd_base_pci_init+0x20/0x34)
[<c000cc1c>] (openrd_base_pci_init+0x20/0x34) from [<c00263b8>] (do_one_initcall+0x58/0x1a4)
[<c00263b8>] (do_one_initcall+0x58/0x1a4) from [<c000888c>] (kernel_init+0x90/0x104)
[<c000888c>] (kernel_init+0x90/0x104) from [<c00273dc>] (kernel_thread_exit+0x0/0x8)
<0>Code: e59f3054 e7801003 e2833004 e59dc008 (e7902003)
<4>---[ end trace 1b75b31a2719ed1c ]---
<6>note: swapper[1] exited with preempt_count 3
<0>Kernel panic - not syncing: Attempted to kill init!
[<c002b96c>] (unwind_backtrace+0x0/0xd8) from [<c003b140>] (panic+0x58/0x12c)
[<c003b140>] (panic+0x58/0x12c) from [<c003e104>] (do_exit+0x64/0x6d0)
[<c003e104>] (do_exit+0x64/0x6d0) from [<c002a054>] (die+0x174/0x198)
[<c002a054>] (die+0x174/0x198) from [<c002a11c>] (dump_stack+0x0/0xc)
>
> Daniel
>
>
> diff --git a/kernel/printk.c b/kernel/printk.c
> index b4d97b5..7919751 100644
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -686,6 +686,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
> printed_len += vscnprintf(printk_buf + printed_len,
> sizeof(printk_buf) - printed_len, fmt, args);
>
> +{ extern void printascii(const char *); printascii(printk_buf); }
>
> p = printk_buf;
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 9:14 ` Dieter Kiermaier
@ 2009-10-29 9:36 ` Dieter Kiermaier
2009-10-29 10:33 ` Ronen Shitrit
0 siblings, 1 reply; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-29 9:36 UTC (permalink / raw)
To: linux-arm-kernel
Maybe helpful additional information:
It makes no difference if I connect a PCI device behind my bridge or not.
The trace is exactly the same.
Dieter
> Am Donnerstag 29 Oktober 2009 09:52:36 schrieb Daniel Mack:
> Hi Daniel,
>
>
> > On Thu, Oct 29, 2009 at 10:36:40AM +0200, Dieter Kiermaier wrote:
> > > ## Booting kernel from Legacy Image at 00800000 ...
> > > Image Name: Linux-2.6.32-rc5-00081-g964fe08-
> > > Image Type: ARM Linux Kernel Image (uncompressed)
> > > Data Size: 2390056 Bytes = 2.3 MB
> > > Load Address: 00008000
> > > Entry Point: 00008000
> > > Verifying Checksum ... OK
> > > Loading Kernel Image ... OK
> > > OK
> > >
> > > Starting kernel ...
> > >
> > > Uncompressing Linux............................................................................................................................................................ done.
> >
> > The problem most probably is that your kernel dies before the console is
> > enabled, and hence you're not pointed to the actual problem.
> >
> > Try the patch below - printk() messages are not buffered but sent out
> > directly to the lowlevel UART functions with this hack. CONFIG_DEBUG_LL
> > must be enabled for this.
>
> I think your patch leads us to the root but I fear I don't know about PCI / Kernel programming to fix it :(
> Here is my start log:
>
> Hopefully someone can see what is going wrong?
>
> Starting kernel ...
>
> Uncompressing Linux............................................................................................................................................................ done.
> <5>Linux version 2.6.32-rc5-00081-g964fe08-dirty (dieter at dk1-linux) (gcc version 4.2.0 20070413 (prerelease)) #7 PREEMPT Thu Oct 29 10:05:02 CET 2009
> CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
> CPU: VIVT data cache, VIVT instruction cache
> Machine: Marvell OpenRD Base Board
> Memory policy: ECC disabled, Data cache writeback
> <7>On node 0 totalpages: 131072
> <7>free_area_init_node: node 0, pgdat c04c5dec, node_mem_map c058d000
> <7> Normal zone: 1024 pages used for memmap
> <7> Normal zone: 0 pages reserved
> <7> Normal zone: 130048 pages, LIFO batch:31
> Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
> <5>Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x400000 at 0x100000(uImage),0x1fb00000 at 0x500000(rootfs) rw root=/dev/nfs rw nfsroot=192.168.2.251:/home/dieter/ArtistaNt
> <6>PID hash table entries: 2048 (order: 1, 8192 bytes)
> <6>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
> <6>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
> <6>Memory: 256MB 256MB = 512MB total
> <5>Memory: 513920KB available (4420K code, 961K data, 120K init, 0K highmem)
> <6>SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> <6>Hierarchical RCU implementation.
> <6>NR_IRQS:114
> Console: colour dummy device 80x30
> <6>Calibrating delay loop... <c>1199.30 BogoMIPS (lpj=5996544)
> Mount-cache hash table entries: 512
> <6>CPU: Testing write buffer coherency: ok
> <6>NET: Registered protocol family 16
> <6>Kirkwood: MV88F6281-A0, TCLK=200000000.
> <6>Feroceon L2: Cache support initialised.
> <7>initial MPP regs: 01111111 11113311 33331111 33103333 42222033 22244444 00000022
> <7> final MPP regs: 01111111 11113311 33331111 33003333 42222033 22244444 00000022
> <7>PCI: Scanning bus 0000:00
> <7>pci 0000:00:00.0: found [11ab:6281] class 000580 header type 00
> <7>pci 0000:00:00.0: reg 10 64bit mmio pref: [0xd0000000-0xd00fffff]
> <7>pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff]
> <7>pci 0000:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
> <7>pci 0000:00:00.0: calling rc_pci_fixup+0x0/0x40
> <7>pci 0000:00:00.0: calling quirk_resource_alignment+0x0/0x19c
> <7>pci 0000:00:00.0: supports D1 D2
> <7>pci 0000:00:01.0: found [11ab:2211] class 000604 header type 01
> <7>pci 0000:00:01.0: calling pci_fixup_ide_bases+0x0/0x44
> <7>pci 0000:00:01.0: calling rc_pci_fixup+0x0/0x40
> <7>pci 0000:00:01.0: calling quirk_resource_alignment+0x0/0x19c
> <7>pci 0000:00:01.0: supports D1 D2
> <6>pci 0000:00:01.0: PME# supported from D0 D1 D2 D3hot D3cold
> <6>pci 0000:00:01.0: PME# disabled
> <7>PCI: Fixups for bus 0000:00
> <6>PCI: bus0: Fast back to back transfers disabled
> <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 0
> <7>pci 0000:00:01.0: bus configuration invalid, reconfiguring
> <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 1
> <7>PCI: Scanning bus 0000:01
> <1>Unhandled fault: external abort on non-linefetch (0x028) at 0xfee418fc
> <0>Internal error: : 28 [#1] PREEMPT
> <0>last sysfs file:
> <d>Modules linked in:
> CPU: 0 Not tainted (2.6.32-rc5-00081-g964fe08-dirty #7)
> PC is at orion_pcie_rd_conf+0x48/0x98
> LR is at 0x0
> pc : [<c002fc10>] lr : [<00000000>] psr: 20000093
> sp : df835e58 ip : 00000004 fp : 00000000
> r10: df835e94 r9 : 00000000 r8 : 00000000
> r7 : 00000000 r6 : 00000004 r5 : df81b800 r4 : 00000000
> r3 : 000018fc r2 : 00000000 r1 : 80010000 r0 : fee40000
> Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
> Control: 0005317f Table: 00004000 DAC: 00000017
> <0>Process swapper (pid: 1, stack limit = 0xdf834270)
> <0>Stack: (0xdf835e58 to 0xdf836000)
> <0>5e40: 20000093 c002f944
> <0>5e60: 00000004 df835e94 0000000f 60000013 df81b800 df835eb4 df81b800 00000000
> <0>5e80: 00000000 c01c1e90 df835e94 00000000 00000000 00000000 df835eb4 00000000
> <0>5ea0: df81b800 c036c7e0 c049f634 df81b800 00000000 00000001 df81b800 00000008
> <0>5ec0: 00000000 df81b800 df81b600 00000000 00000000 c01c3d74 60000013 df81b800
> <0>5ee0: 00000008 00000001 00000001 c036ded8 df830800 df81b800 00000000 00000001
> <0>5f00: df81b600 c036dd48 00000001 00000000 c040abbc c040abbc 00ff0100 00219f00
> <0>5f20: 00000000 df81b600 df830800 00000000 00000001 df81b614 00000000 c04c9f00
> <0>5f40: 00000000 c036df48 df81b600 00000001 c0022198 df834000 00000040 c036dfa8
> <0>5f60: df807b00 c000c638 df807b00 c000a3ac c0009a4c c01f0e94 df8007c0 c00205e0
> <0>5f80: c00209bc 00000000 00000000 00000000 00000000 c04c9f00 c000cbfc c000cc1c
> <0>5fa0: c001a7c8 c00263b8 df835fb6 c006f770 df809ae0 00000001 00000033 00000000
> <0>5fc0: 00000000 c00205e0 c00209bc 00000000 00000000 00000000 00000000 00000000
> <0>5fe0: 00000000 c000888c 00000000 00000000 00000000 c00273dc ffff0000 ffff0000
> [<c002fc10>] (orion_pcie_rd_conf+0x48/0x98) from [<c002f944>] (pcie_rd_conf+0x7c/0xb8)
> [<c002f944>] (pcie_rd_conf+0x7c/0xb8) from [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98)
> [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98) from [<c036c7e0>] (pci_scan_single_device+0x3c/0x150)
> [<c036c7e0>] (pci_scan_single_device+0x3c/0x150) from [<c01c3d74>] (pci_scan_slot+0x14/0x7c)
> [<c01c3d74>] (pci_scan_slot+0x14/0x7c) from [<c036ded8>] (pci_scan_child_bus+0x30/0xec)
> [<c036ded8>] (pci_scan_child_bus+0x30/0xec) from [<c036dd48>] (pci_scan_bridge+0x1a8/0x308)
> [<c036dd48>] (pci_scan_bridge+0x1a8/0x308) from [<c036df48>] (pci_scan_child_bus+0xa0/0xec)
> [<c036df48>] (pci_scan_child_bus+0xa0/0xec) from [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20)
> [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20) from [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48)
> [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48) from [<c000a3ac>] (pci_common_init+0x120/0x20c)
> [<c000a3ac>] (pci_common_init+0x120/0x20c) from [<c000cc1c>] (openrd_base_pci_init+0x20/0x34)
> [<c000cc1c>] (openrd_base_pci_init+0x20/0x34) from [<c00263b8>] (do_one_initcall+0x58/0x1a4)
> [<c00263b8>] (do_one_initcall+0x58/0x1a4) from [<c000888c>] (kernel_init+0x90/0x104)
> [<c000888c>] (kernel_init+0x90/0x104) from [<c00273dc>] (kernel_thread_exit+0x0/0x8)
> <0>Code: e59f3054 e7801003 e2833004 e59dc008 (e7902003)
> <4>---[ end trace 1b75b31a2719ed1c ]---
> <6>note: swapper[1] exited with preempt_count 3
> <0>Kernel panic - not syncing: Attempted to kill init!
> [<c002b96c>] (unwind_backtrace+0x0/0xd8) from [<c003b140>] (panic+0x58/0x12c)
> [<c003b140>] (panic+0x58/0x12c) from [<c003e104>] (do_exit+0x64/0x6d0)
> [<c003e104>] (do_exit+0x64/0x6d0) from [<c002a054>] (die+0x174/0x198)
> [<c002a054>] (die+0x174/0x198) from [<c002a11c>] (dump_stack+0x0/0xc)
>
>
>
> >
> > Daniel
> >
> >
> > diff --git a/kernel/printk.c b/kernel/printk.c
> > index b4d97b5..7919751 100644
> > --- a/kernel/printk.c
> > +++ b/kernel/printk.c
> > @@ -686,6 +686,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
> > printed_len += vscnprintf(printk_buf + printed_len,
> > sizeof(printk_buf) - printed_len, fmt, args);
> >
> > +{ extern void printascii(const char *); printascii(printk_buf); }
> >
> > p = printk_buf;
> >
> >
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 9:36 ` Dieter Kiermaier
@ 2009-10-29 10:33 ` Ronen Shitrit
2009-10-29 10:57 ` Dieter Kiermaier
0 siblings, 1 reply; 15+ messages in thread
From: Ronen Shitrit @ 2009-10-29 10:33 UTC (permalink / raw)
To: linux-arm-kernel
Can u pls place a breakpoint before scanning the pcie and read register 0x20100.
If bit 2 is set, try to unset it and continue.
When u scan the PCI u probably get master abort error on a device which isnt found, according to bit 2 above this "Error indications" is propagated to the Mbus-L and will cause external abort.
Regards
-----Original Message-----
From: linux-arm-kernel-bounces@lists.infradead.org [mailto:linux-arm-kernel-bounces at lists.infradead.org] On Behalf Of Dieter Kiermaier
Sent: Thursday, October 29, 2009 11:37 AM
To: linux-arm-kernel at lists.infradead.org
Cc: Nicolas Pitre; openrd at googlegroups.com; Daniel Mack; Nicolas Pitre
Subject: Re: marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
Maybe helpful additional information:
It makes no difference if I connect a PCI device behind my bridge or not.
The trace is exactly the same.
Dieter
> Am Donnerstag 29 Oktober 2009 09:52:36 schrieb Daniel Mack:
> Hi Daniel,
>
>
> > On Thu, Oct 29, 2009 at 10:36:40AM +0200, Dieter Kiermaier wrote:
> > > ## Booting kernel from Legacy Image at 00800000 ...
> > > Image Name: Linux-2.6.32-rc5-00081-g964fe08-
> > > Image Type: ARM Linux Kernel Image (uncompressed)
> > > Data Size: 2390056 Bytes = 2.3 MB
> > > Load Address: 00008000
> > > Entry Point: 00008000
> > > Verifying Checksum ... OK
> > > Loading Kernel Image ... OK
> > > OK
> > >
> > > Starting kernel ...
> > >
> > > Uncompressing Linux............................................................................................................................................................ done.
> >
> > The problem most probably is that your kernel dies before the console is
> > enabled, and hence you're not pointed to the actual problem.
> >
> > Try the patch below - printk() messages are not buffered but sent out
> > directly to the lowlevel UART functions with this hack. CONFIG_DEBUG_LL
> > must be enabled for this.
>
> I think your patch leads us to the root but I fear I don't know about PCI / Kernel programming to fix it :(
> Here is my start log:
>
> Hopefully someone can see what is going wrong?
>
> Starting kernel ...
>
> Uncompressing Linux............................................................................................................................................................ done.
> <5>Linux version 2.6.32-rc5-00081-g964fe08-dirty (dieter at dk1-linux) (gcc version 4.2.0 20070413 (prerelease)) #7 PREEMPT Thu Oct 29 10:05:02 CET 2009
> CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
> CPU: VIVT data cache, VIVT instruction cache
> Machine: Marvell OpenRD Base Board
> Memory policy: ECC disabled, Data cache writeback
> <7>On node 0 totalpages: 131072
> <7>free_area_init_node: node 0, pgdat c04c5dec, node_mem_map c058d000
> <7> Normal zone: 1024 pages used for memmap
> <7> Normal zone: 0 pages reserved
> <7> Normal zone: 130048 pages, LIFO batch:31
> Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
> <5>Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x400000 at 0x100000(uImage),0x1fb00000 at 0x500000(rootfs) rw root=/dev/nfs rw nfsroot=192.168.2.251:/home/dieter/ArtistaNt
> <6>PID hash table entries: 2048 (order: 1, 8192 bytes)
> <6>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
> <6>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
> <6>Memory: 256MB 256MB = 512MB total
> <5>Memory: 513920KB available (4420K code, 961K data, 120K init, 0K highmem)
> <6>SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> <6>Hierarchical RCU implementation.
> <6>NR_IRQS:114
> Console: colour dummy device 80x30
> <6>Calibrating delay loop... <c>1199.30 BogoMIPS (lpj=5996544)
> Mount-cache hash table entries: 512
> <6>CPU: Testing write buffer coherency: ok
> <6>NET: Registered protocol family 16
> <6>Kirkwood: MV88F6281-A0, TCLK=200000000.
> <6>Feroceon L2: Cache support initialised.
> <7>initial MPP regs: 01111111 11113311 33331111 33103333 42222033 22244444 00000022
> <7> final MPP regs: 01111111 11113311 33331111 33003333 42222033 22244444 00000022
> <7>PCI: Scanning bus 0000:00
> <7>pci 0000:00:00.0: found [11ab:6281] class 000580 header type 00
> <7>pci 0000:00:00.0: reg 10 64bit mmio pref: [0xd0000000-0xd00fffff]
> <7>pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff]
> <7>pci 0000:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
> <7>pci 0000:00:00.0: calling rc_pci_fixup+0x0/0x40
> <7>pci 0000:00:00.0: calling quirk_resource_alignment+0x0/0x19c
> <7>pci 0000:00:00.0: supports D1 D2
> <7>pci 0000:00:01.0: found [11ab:2211] class 000604 header type 01
> <7>pci 0000:00:01.0: calling pci_fixup_ide_bases+0x0/0x44
> <7>pci 0000:00:01.0: calling rc_pci_fixup+0x0/0x40
> <7>pci 0000:00:01.0: calling quirk_resource_alignment+0x0/0x19c
> <7>pci 0000:00:01.0: supports D1 D2
> <6>pci 0000:00:01.0: PME# supported from D0 D1 D2 D3hot D3cold
> <6>pci 0000:00:01.0: PME# disabled
> <7>PCI: Fixups for bus 0000:00
> <6>PCI: bus0: Fast back to back transfers disabled
> <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 0
> <7>pci 0000:00:01.0: bus configuration invalid, reconfiguring
> <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 1
> <7>PCI: Scanning bus 0000:01
> <1>Unhandled fault: external abort on non-linefetch (0x028) at 0xfee418fc
> <0>Internal error: : 28 [#1] PREEMPT
> <0>last sysfs file:
> <d>Modules linked in:
> CPU: 0 Not tainted (2.6.32-rc5-00081-g964fe08-dirty #7)
> PC is at orion_pcie_rd_conf+0x48/0x98
> LR is at 0x0
> pc : [<c002fc10>] lr : [<00000000>] psr: 20000093
> sp : df835e58 ip : 00000004 fp : 00000000
> r10: df835e94 r9 : 00000000 r8 : 00000000
> r7 : 00000000 r6 : 00000004 r5 : df81b800 r4 : 00000000
> r3 : 000018fc r2 : 00000000 r1 : 80010000 r0 : fee40000
> Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
> Control: 0005317f Table: 00004000 DAC: 00000017
> <0>Process swapper (pid: 1, stack limit = 0xdf834270)
> <0>Stack: (0xdf835e58 to 0xdf836000)
> <0>5e40: 20000093 c002f944
> <0>5e60: 00000004 df835e94 0000000f 60000013 df81b800 df835eb4 df81b800 00000000
> <0>5e80: 00000000 c01c1e90 df835e94 00000000 00000000 00000000 df835eb4 00000000
> <0>5ea0: df81b800 c036c7e0 c049f634 df81b800 00000000 00000001 df81b800 00000008
> <0>5ec0: 00000000 df81b800 df81b600 00000000 00000000 c01c3d74 60000013 df81b800
> <0>5ee0: 00000008 00000001 00000001 c036ded8 df830800 df81b800 00000000 00000001
> <0>5f00: df81b600 c036dd48 00000001 00000000 c040abbc c040abbc 00ff0100 00219f00
> <0>5f20: 00000000 df81b600 df830800 00000000 00000001 df81b614 00000000 c04c9f00
> <0>5f40: 00000000 c036df48 df81b600 00000001 c0022198 df834000 00000040 c036dfa8
> <0>5f60: df807b00 c000c638 df807b00 c000a3ac c0009a4c c01f0e94 df8007c0 c00205e0
> <0>5f80: c00209bc 00000000 00000000 00000000 00000000 c04c9f00 c000cbfc c000cc1c
> <0>5fa0: c001a7c8 c00263b8 df835fb6 c006f770 df809ae0 00000001 00000033 00000000
> <0>5fc0: 00000000 c00205e0 c00209bc 00000000 00000000 00000000 00000000 00000000
> <0>5fe0: 00000000 c000888c 00000000 00000000 00000000 c00273dc ffff0000 ffff0000
> [<c002fc10>] (orion_pcie_rd_conf+0x48/0x98) from [<c002f944>] (pcie_rd_conf+0x7c/0xb8)
> [<c002f944>] (pcie_rd_conf+0x7c/0xb8) from [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98)
> [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98) from [<c036c7e0>] (pci_scan_single_device+0x3c/0x150)
> [<c036c7e0>] (pci_scan_single_device+0x3c/0x150) from [<c01c3d74>] (pci_scan_slot+0x14/0x7c)
> [<c01c3d74>] (pci_scan_slot+0x14/0x7c) from [<c036ded8>] (pci_scan_child_bus+0x30/0xec)
> [<c036ded8>] (pci_scan_child_bus+0x30/0xec) from [<c036dd48>] (pci_scan_bridge+0x1a8/0x308)
> [<c036dd48>] (pci_scan_bridge+0x1a8/0x308) from [<c036df48>] (pci_scan_child_bus+0xa0/0xec)
> [<c036df48>] (pci_scan_child_bus+0xa0/0xec) from [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20)
> [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20) from [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48)
> [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48) from [<c000a3ac>] (pci_common_init+0x120/0x20c)
> [<c000a3ac>] (pci_common_init+0x120/0x20c) from [<c000cc1c>] (openrd_base_pci_init+0x20/0x34)
> [<c000cc1c>] (openrd_base_pci_init+0x20/0x34) from [<c00263b8>] (do_one_initcall+0x58/0x1a4)
> [<c00263b8>] (do_one_initcall+0x58/0x1a4) from [<c000888c>] (kernel_init+0x90/0x104)
> [<c000888c>] (kernel_init+0x90/0x104) from [<c00273dc>] (kernel_thread_exit+0x0/0x8)
> <0>Code: e59f3054 e7801003 e2833004 e59dc008 (e7902003)
> <4>---[ end trace 1b75b31a2719ed1c ]---
> <6>note: swapper[1] exited with preempt_count 3
> <0>Kernel panic - not syncing: Attempted to kill init!
> [<c002b96c>] (unwind_backtrace+0x0/0xd8) from [<c003b140>] (panic+0x58/0x12c)
> [<c003b140>] (panic+0x58/0x12c) from [<c003e104>] (do_exit+0x64/0x6d0)
> [<c003e104>] (do_exit+0x64/0x6d0) from [<c002a054>] (die+0x174/0x198)
> [<c002a054>] (die+0x174/0x198) from [<c002a11c>] (dump_stack+0x0/0xc)
>
>
>
> >
> > Daniel
> >
> >
> > diff --git a/kernel/printk.c b/kernel/printk.c
> > index b4d97b5..7919751 100644
> > --- a/kernel/printk.c
> > +++ b/kernel/printk.c
> > @@ -686,6 +686,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
> > printed_len += vscnprintf(printk_buf + printed_len,
> > sizeof(printk_buf) - printed_len, fmt, args);
> >
> > +{ extern void printascii(const char *); printascii(printk_buf); }
> >
> > p = printk_buf;
> >
> >
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 10:33 ` Ronen Shitrit
@ 2009-10-29 10:57 ` Dieter Kiermaier
2009-10-29 11:33 ` Ronen Shitrit
0 siblings, 1 reply; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-29 10:57 UTC (permalink / raw)
To: linux-arm-kernel
Am Donnerstag 29 Oktober 2009 11:33:41 schrieb Ronen Shitrit:
> Can u pls place a breakpoint before scanning the pcie and read register 0x20100.
> If bit 2 is set, try to unset it and continue.
>
> When u scan the PCI u probably get master abort error on a device which isnt found, according to bit 2 above this "Error indications" is propagated to the Mbus-L and will cause external abort.
>
Hi Ronen,
sorry for the stupid question but it's the first time i debug the kernel ;)
How do I place a breakpoint?
Can I run the kernel directly from the openocd debugger, without running it from u-boot?
> Regards
>
> -----Original Message-----
> From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-kernel-bounces at lists.infradead.org] On Behalf Of Dieter Kiermaier
> Sent: Thursday, October 29, 2009 11:37 AM
> To: linux-arm-kernel at lists.infradead.org
> Cc: Nicolas Pitre; openrd at googlegroups.com; Daniel Mack; Nicolas Pitre
> Subject: Re: marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
>
>
> Maybe helpful additional information:
> It makes no difference if I connect a PCI device behind my bridge or not.
> The trace is exactly the same.
>
> Dieter
>
> > Am Donnerstag 29 Oktober 2009 09:52:36 schrieb Daniel Mack:
> > Hi Daniel,
> >
> >
> > > On Thu, Oct 29, 2009 at 10:36:40AM +0200, Dieter Kiermaier wrote:
> > > > ## Booting kernel from Legacy Image at 00800000 ...
> > > > Image Name: Linux-2.6.32-rc5-00081-g964fe08-
> > > > Image Type: ARM Linux Kernel Image (uncompressed)
> > > > Data Size: 2390056 Bytes = 2.3 MB
> > > > Load Address: 00008000
> > > > Entry Point: 00008000
> > > > Verifying Checksum ... OK
> > > > Loading Kernel Image ... OK
> > > > OK
> > > >
> > > > Starting kernel ...
> > > >
> > > > Uncompressing Linux............................................................................................................................................................ done.
> > >
> > > The problem most probably is that your kernel dies before the console is
> > > enabled, and hence you're not pointed to the actual problem.
> > >
> > > Try the patch below - printk() messages are not buffered but sent out
> > > directly to the lowlevel UART functions with this hack. CONFIG_DEBUG_LL
> > > must be enabled for this.
> >
> > I think your patch leads us to the root but I fear I don't know about PCI / Kernel programming to fix it :(
> > Here is my start log:
> >
> > Hopefully someone can see what is going wrong?
> >
> > Starting kernel ...
> >
> > Uncompressing Linux............................................................................................................................................................ done.
> > <5>Linux version 2.6.32-rc5-00081-g964fe08-dirty (dieter at dk1-linux) (gcc version 4.2.0 20070413 (prerelease)) #7 PREEMPT Thu Oct 29 10:05:02 CET 2009
> > CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
> > CPU: VIVT data cache, VIVT instruction cache
> > Machine: Marvell OpenRD Base Board
> > Memory policy: ECC disabled, Data cache writeback
> > <7>On node 0 totalpages: 131072
> > <7>free_area_init_node: node 0, pgdat c04c5dec, node_mem_map c058d000
> > <7> Normal zone: 1024 pages used for memmap
> > <7> Normal zone: 0 pages reserved
> > <7> Normal zone: 130048 pages, LIFO batch:31
> > Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
> > <5>Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x400000 at 0x100000(uImage),0x1fb00000 at 0x500000(rootfs) rw root=/dev/nfs rw nfsroot=192.168.2.251:/home/dieter/ArtistaNt
> > <6>PID hash table entries: 2048 (order: 1, 8192 bytes)
> > <6>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
> > <6>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
> > <6>Memory: 256MB 256MB = 512MB total
> > <5>Memory: 513920KB available (4420K code, 961K data, 120K init, 0K highmem)
> > <6>SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> > <6>Hierarchical RCU implementation.
> > <6>NR_IRQS:114
> > Console: colour dummy device 80x30
> > <6>Calibrating delay loop... <c>1199.30 BogoMIPS (lpj=5996544)
> > Mount-cache hash table entries: 512
> > <6>CPU: Testing write buffer coherency: ok
> > <6>NET: Registered protocol family 16
> > <6>Kirkwood: MV88F6281-A0, TCLK=200000000.
> > <6>Feroceon L2: Cache support initialised.
> > <7>initial MPP regs: 01111111 11113311 33331111 33103333 42222033 22244444 00000022
> > <7> final MPP regs: 01111111 11113311 33331111 33003333 42222033 22244444 00000022
> > <7>PCI: Scanning bus 0000:00
> > <7>pci 0000:00:00.0: found [11ab:6281] class 000580 header type 00
> > <7>pci 0000:00:00.0: reg 10 64bit mmio pref: [0xd0000000-0xd00fffff]
> > <7>pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff]
> > <7>pci 0000:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
> > <7>pci 0000:00:00.0: calling rc_pci_fixup+0x0/0x40
> > <7>pci 0000:00:00.0: calling quirk_resource_alignment+0x0/0x19c
> > <7>pci 0000:00:00.0: supports D1 D2
> > <7>pci 0000:00:01.0: found [11ab:2211] class 000604 header type 01
> > <7>pci 0000:00:01.0: calling pci_fixup_ide_bases+0x0/0x44
> > <7>pci 0000:00:01.0: calling rc_pci_fixup+0x0/0x40
> > <7>pci 0000:00:01.0: calling quirk_resource_alignment+0x0/0x19c
> > <7>pci 0000:00:01.0: supports D1 D2
> > <6>pci 0000:00:01.0: PME# supported from D0 D1 D2 D3hot D3cold
> > <6>pci 0000:00:01.0: PME# disabled
> > <7>PCI: Fixups for bus 0000:00
> > <6>PCI: bus0: Fast back to back transfers disabled
> > <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 0
> > <7>pci 0000:00:01.0: bus configuration invalid, reconfiguring
> > <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 1
> > <7>PCI: Scanning bus 0000:01
> > <1>Unhandled fault: external abort on non-linefetch (0x028) at 0xfee418fc
> > <0>Internal error: : 28 [#1] PREEMPT
> > <0>last sysfs file:
> > <d>Modules linked in:
> > CPU: 0 Not tainted (2.6.32-rc5-00081-g964fe08-dirty #7)
> > PC is at orion_pcie_rd_conf+0x48/0x98
> > LR is at 0x0
> > pc : [<c002fc10>] lr : [<00000000>] psr: 20000093
> > sp : df835e58 ip : 00000004 fp : 00000000
> > r10: df835e94 r9 : 00000000 r8 : 00000000
> > r7 : 00000000 r6 : 00000004 r5 : df81b800 r4 : 00000000
> > r3 : 000018fc r2 : 00000000 r1 : 80010000 r0 : fee40000
> > Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
> > Control: 0005317f Table: 00004000 DAC: 00000017
> > <0>Process swapper (pid: 1, stack limit = 0xdf834270)
> > <0>Stack: (0xdf835e58 to 0xdf836000)
> > <0>5e40: 20000093 c002f944
> > <0>5e60: 00000004 df835e94 0000000f 60000013 df81b800 df835eb4 df81b800 00000000
> > <0>5e80: 00000000 c01c1e90 df835e94 00000000 00000000 00000000 df835eb4 00000000
> > <0>5ea0: df81b800 c036c7e0 c049f634 df81b800 00000000 00000001 df81b800 00000008
> > <0>5ec0: 00000000 df81b800 df81b600 00000000 00000000 c01c3d74 60000013 df81b800
> > <0>5ee0: 00000008 00000001 00000001 c036ded8 df830800 df81b800 00000000 00000001
> > <0>5f00: df81b600 c036dd48 00000001 00000000 c040abbc c040abbc 00ff0100 00219f00
> > <0>5f20: 00000000 df81b600 df830800 00000000 00000001 df81b614 00000000 c04c9f00
> > <0>5f40: 00000000 c036df48 df81b600 00000001 c0022198 df834000 00000040 c036dfa8
> > <0>5f60: df807b00 c000c638 df807b00 c000a3ac c0009a4c c01f0e94 df8007c0 c00205e0
> > <0>5f80: c00209bc 00000000 00000000 00000000 00000000 c04c9f00 c000cbfc c000cc1c
> > <0>5fa0: c001a7c8 c00263b8 df835fb6 c006f770 df809ae0 00000001 00000033 00000000
> > <0>5fc0: 00000000 c00205e0 c00209bc 00000000 00000000 00000000 00000000 00000000
> > <0>5fe0: 00000000 c000888c 00000000 00000000 00000000 c00273dc ffff0000 ffff0000
> > [<c002fc10>] (orion_pcie_rd_conf+0x48/0x98) from [<c002f944>] (pcie_rd_conf+0x7c/0xb8)
> > [<c002f944>] (pcie_rd_conf+0x7c/0xb8) from [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98)
> > [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98) from [<c036c7e0>] (pci_scan_single_device+0x3c/0x150)
> > [<c036c7e0>] (pci_scan_single_device+0x3c/0x150) from [<c01c3d74>] (pci_scan_slot+0x14/0x7c)
> > [<c01c3d74>] (pci_scan_slot+0x14/0x7c) from [<c036ded8>] (pci_scan_child_bus+0x30/0xec)
> > [<c036ded8>] (pci_scan_child_bus+0x30/0xec) from [<c036dd48>] (pci_scan_bridge+0x1a8/0x308)
> > [<c036dd48>] (pci_scan_bridge+0x1a8/0x308) from [<c036df48>] (pci_scan_child_bus+0xa0/0xec)
> > [<c036df48>] (pci_scan_child_bus+0xa0/0xec) from [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20)
> > [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20) from [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48)
> > [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48) from [<c000a3ac>] (pci_common_init+0x120/0x20c)
> > [<c000a3ac>] (pci_common_init+0x120/0x20c) from [<c000cc1c>] (openrd_base_pci_init+0x20/0x34)
> > [<c000cc1c>] (openrd_base_pci_init+0x20/0x34) from [<c00263b8>] (do_one_initcall+0x58/0x1a4)
> > [<c00263b8>] (do_one_initcall+0x58/0x1a4) from [<c000888c>] (kernel_init+0x90/0x104)
> > [<c000888c>] (kernel_init+0x90/0x104) from [<c00273dc>] (kernel_thread_exit+0x0/0x8)
> > <0>Code: e59f3054 e7801003 e2833004 e59dc008 (e7902003)
> > <4>---[ end trace 1b75b31a2719ed1c ]---
> > <6>note: swapper[1] exited with preempt_count 3
> > <0>Kernel panic - not syncing: Attempted to kill init!
> > [<c002b96c>] (unwind_backtrace+0x0/0xd8) from [<c003b140>] (panic+0x58/0x12c)
> > [<c003b140>] (panic+0x58/0x12c) from [<c003e104>] (do_exit+0x64/0x6d0)
> > [<c003e104>] (do_exit+0x64/0x6d0) from [<c002a054>] (die+0x174/0x198)
> > [<c002a054>] (die+0x174/0x198) from [<c002a11c>] (dump_stack+0x0/0xc)
> >
> >
> >
> > >
> > > Daniel
> > >
> > >
> > > diff --git a/kernel/printk.c b/kernel/printk.c
> > > index b4d97b5..7919751 100644
> > > --- a/kernel/printk.c
> > > +++ b/kernel/printk.c
> > > @@ -686,6 +686,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
> > > printed_len += vscnprintf(printk_buf + printed_len,
> > > sizeof(printk_buf) - printed_len, fmt, args);
> > >
> > > +{ extern void printascii(const char *); printascii(printk_buf); }
> > >
> > > p = printk_buf;
> > >
> > >
> >
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 10:57 ` Dieter Kiermaier
@ 2009-10-29 11:33 ` Ronen Shitrit
2009-10-29 15:11 ` Dieter Kiermaier
0 siblings, 1 reply; 15+ messages in thread
From: Ronen Shitrit @ 2009-10-29 11:33 UTC (permalink / raw)
To: linux-arm-kernel
Sorry I don't have experience with the OpenOCD.
Any way by using the printk hack, u can simply read the register and print it...
Regards
-----Original Message-----
From: linux-arm-kernel-bounces@lists.infradead.org [mailto:linux-arm-kernel-bounces at lists.infradead.org] On Behalf Of Dieter Kiermaier
Sent: Thursday, October 29, 2009 12:58 PM
To: linux-arm-kernel at lists.infradead.org
Cc: Nicolas Pitre; openrd at googlegroups.com; Daniel Mack; Nicolas Pitre
Subject: Re: marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
Am Donnerstag 29 Oktober 2009 11:33:41 schrieb Ronen Shitrit:
> Can u pls place a breakpoint before scanning the pcie and read register 0x20100.
> If bit 2 is set, try to unset it and continue.
>
> When u scan the PCI u probably get master abort error on a device which isnt found, according to bit 2 above this "Error indications" is propagated to the Mbus-L and will cause external abort.
>
Hi Ronen,
sorry for the stupid question but it's the first time i debug the kernel ;)
How do I place a breakpoint?
Can I run the kernel directly from the openocd debugger, without running it from u-boot?
> Regards
>
> -----Original Message-----
> From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-kernel-bounces at lists.infradead.org] On Behalf Of Dieter Kiermaier
> Sent: Thursday, October 29, 2009 11:37 AM
> To: linux-arm-kernel at lists.infradead.org
> Cc: Nicolas Pitre; openrd at googlegroups.com; Daniel Mack; Nicolas Pitre
> Subject: Re: marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
>
>
> Maybe helpful additional information:
> It makes no difference if I connect a PCI device behind my bridge or not.
> The trace is exactly the same.
>
> Dieter
>
> > Am Donnerstag 29 Oktober 2009 09:52:36 schrieb Daniel Mack:
> > Hi Daniel,
> >
> >
> > > On Thu, Oct 29, 2009 at 10:36:40AM +0200, Dieter Kiermaier wrote:
> > > > ## Booting kernel from Legacy Image at 00800000 ...
> > > > Image Name: Linux-2.6.32-rc5-00081-g964fe08-
> > > > Image Type: ARM Linux Kernel Image (uncompressed)
> > > > Data Size: 2390056 Bytes = 2.3 MB
> > > > Load Address: 00008000
> > > > Entry Point: 00008000
> > > > Verifying Checksum ... OK
> > > > Loading Kernel Image ... OK
> > > > OK
> > > >
> > > > Starting kernel ...
> > > >
> > > > Uncompressing Linux............................................................................................................................................................ done.
> > >
> > > The problem most probably is that your kernel dies before the console is
> > > enabled, and hence you're not pointed to the actual problem.
> > >
> > > Try the patch below - printk() messages are not buffered but sent out
> > > directly to the lowlevel UART functions with this hack. CONFIG_DEBUG_LL
> > > must be enabled for this.
> >
> > I think your patch leads us to the root but I fear I don't know about PCI / Kernel programming to fix it :(
> > Here is my start log:
> >
> > Hopefully someone can see what is going wrong?
> >
> > Starting kernel ...
> >
> > Uncompressing Linux............................................................................................................................................................ done.
> > <5>Linux version 2.6.32-rc5-00081-g964fe08-dirty (dieter at dk1-linux) (gcc version 4.2.0 20070413 (prerelease)) #7 PREEMPT Thu Oct 29 10:05:02 CET 2009
> > CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
> > CPU: VIVT data cache, VIVT instruction cache
> > Machine: Marvell OpenRD Base Board
> > Memory policy: ECC disabled, Data cache writeback
> > <7>On node 0 totalpages: 131072
> > <7>free_area_init_node: node 0, pgdat c04c5dec, node_mem_map c058d000
> > <7> Normal zone: 1024 pages used for memmap
> > <7> Normal zone: 0 pages reserved
> > <7> Normal zone: 130048 pages, LIFO batch:31
> > Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
> > <5>Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x400000 at 0x100000(uImage),0x1fb00000 at 0x500000(rootfs) rw root=/dev/nfs rw nfsroot=192.168.2.251:/home/dieter/ArtistaNt
> > <6>PID hash table entries: 2048 (order: 1, 8192 bytes)
> > <6>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
> > <6>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
> > <6>Memory: 256MB 256MB = 512MB total
> > <5>Memory: 513920KB available (4420K code, 961K data, 120K init, 0K highmem)
> > <6>SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> > <6>Hierarchical RCU implementation.
> > <6>NR_IRQS:114
> > Console: colour dummy device 80x30
> > <6>Calibrating delay loop... <c>1199.30 BogoMIPS (lpj=5996544)
> > Mount-cache hash table entries: 512
> > <6>CPU: Testing write buffer coherency: ok
> > <6>NET: Registered protocol family 16
> > <6>Kirkwood: MV88F6281-A0, TCLK=200000000.
> > <6>Feroceon L2: Cache support initialised.
> > <7>initial MPP regs: 01111111 11113311 33331111 33103333 42222033 22244444 00000022
> > <7> final MPP regs: 01111111 11113311 33331111 33003333 42222033 22244444 00000022
> > <7>PCI: Scanning bus 0000:00
> > <7>pci 0000:00:00.0: found [11ab:6281] class 000580 header type 00
> > <7>pci 0000:00:00.0: reg 10 64bit mmio pref: [0xd0000000-0xd00fffff]
> > <7>pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff]
> > <7>pci 0000:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
> > <7>pci 0000:00:00.0: calling rc_pci_fixup+0x0/0x40
> > <7>pci 0000:00:00.0: calling quirk_resource_alignment+0x0/0x19c
> > <7>pci 0000:00:00.0: supports D1 D2
> > <7>pci 0000:00:01.0: found [11ab:2211] class 000604 header type 01
> > <7>pci 0000:00:01.0: calling pci_fixup_ide_bases+0x0/0x44
> > <7>pci 0000:00:01.0: calling rc_pci_fixup+0x0/0x40
> > <7>pci 0000:00:01.0: calling quirk_resource_alignment+0x0/0x19c
> > <7>pci 0000:00:01.0: supports D1 D2
> > <6>pci 0000:00:01.0: PME# supported from D0 D1 D2 D3hot D3cold
> > <6>pci 0000:00:01.0: PME# disabled
> > <7>PCI: Fixups for bus 0000:00
> > <6>PCI: bus0: Fast back to back transfers disabled
> > <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 0
> > <7>pci 0000:00:01.0: bus configuration invalid, reconfiguring
> > <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 1
> > <7>PCI: Scanning bus 0000:01
> > <1>Unhandled fault: external abort on non-linefetch (0x028) at 0xfee418fc
> > <0>Internal error: : 28 [#1] PREEMPT
> > <0>last sysfs file:
> > <d>Modules linked in:
> > CPU: 0 Not tainted (2.6.32-rc5-00081-g964fe08-dirty #7)
> > PC is at orion_pcie_rd_conf+0x48/0x98
> > LR is at 0x0
> > pc : [<c002fc10>] lr : [<00000000>] psr: 20000093
> > sp : df835e58 ip : 00000004 fp : 00000000
> > r10: df835e94 r9 : 00000000 r8 : 00000000
> > r7 : 00000000 r6 : 00000004 r5 : df81b800 r4 : 00000000
> > r3 : 000018fc r2 : 00000000 r1 : 80010000 r0 : fee40000
> > Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
> > Control: 0005317f Table: 00004000 DAC: 00000017
> > <0>Process swapper (pid: 1, stack limit = 0xdf834270)
> > <0>Stack: (0xdf835e58 to 0xdf836000)
> > <0>5e40: 20000093 c002f944
> > <0>5e60: 00000004 df835e94 0000000f 60000013 df81b800 df835eb4 df81b800 00000000
> > <0>5e80: 00000000 c01c1e90 df835e94 00000000 00000000 00000000 df835eb4 00000000
> > <0>5ea0: df81b800 c036c7e0 c049f634 df81b800 00000000 00000001 df81b800 00000008
> > <0>5ec0: 00000000 df81b800 df81b600 00000000 00000000 c01c3d74 60000013 df81b800
> > <0>5ee0: 00000008 00000001 00000001 c036ded8 df830800 df81b800 00000000 00000001
> > <0>5f00: df81b600 c036dd48 00000001 00000000 c040abbc c040abbc 00ff0100 00219f00
> > <0>5f20: 00000000 df81b600 df830800 00000000 00000001 df81b614 00000000 c04c9f00
> > <0>5f40: 00000000 c036df48 df81b600 00000001 c0022198 df834000 00000040 c036dfa8
> > <0>5f60: df807b00 c000c638 df807b00 c000a3ac c0009a4c c01f0e94 df8007c0 c00205e0
> > <0>5f80: c00209bc 00000000 00000000 00000000 00000000 c04c9f00 c000cbfc c000cc1c
> > <0>5fa0: c001a7c8 c00263b8 df835fb6 c006f770 df809ae0 00000001 00000033 00000000
> > <0>5fc0: 00000000 c00205e0 c00209bc 00000000 00000000 00000000 00000000 00000000
> > <0>5fe0: 00000000 c000888c 00000000 00000000 00000000 c00273dc ffff0000 ffff0000
> > [<c002fc10>] (orion_pcie_rd_conf+0x48/0x98) from [<c002f944>] (pcie_rd_conf+0x7c/0xb8)
> > [<c002f944>] (pcie_rd_conf+0x7c/0xb8) from [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98)
> > [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98) from [<c036c7e0>] (pci_scan_single_device+0x3c/0x150)
> > [<c036c7e0>] (pci_scan_single_device+0x3c/0x150) from [<c01c3d74>] (pci_scan_slot+0x14/0x7c)
> > [<c01c3d74>] (pci_scan_slot+0x14/0x7c) from [<c036ded8>] (pci_scan_child_bus+0x30/0xec)
> > [<c036ded8>] (pci_scan_child_bus+0x30/0xec) from [<c036dd48>] (pci_scan_bridge+0x1a8/0x308)
> > [<c036dd48>] (pci_scan_bridge+0x1a8/0x308) from [<c036df48>] (pci_scan_child_bus+0xa0/0xec)
> > [<c036df48>] (pci_scan_child_bus+0xa0/0xec) from [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20)
> > [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20) from [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48)
> > [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48) from [<c000a3ac>] (pci_common_init+0x120/0x20c)
> > [<c000a3ac>] (pci_common_init+0x120/0x20c) from [<c000cc1c>] (openrd_base_pci_init+0x20/0x34)
> > [<c000cc1c>] (openrd_base_pci_init+0x20/0x34) from [<c00263b8>] (do_one_initcall+0x58/0x1a4)
> > [<c00263b8>] (do_one_initcall+0x58/0x1a4) from [<c000888c>] (kernel_init+0x90/0x104)
> > [<c000888c>] (kernel_init+0x90/0x104) from [<c00273dc>] (kernel_thread_exit+0x0/0x8)
> > <0>Code: e59f3054 e7801003 e2833004 e59dc008 (e7902003)
> > <4>---[ end trace 1b75b31a2719ed1c ]---
> > <6>note: swapper[1] exited with preempt_count 3
> > <0>Kernel panic - not syncing: Attempted to kill init!
> > [<c002b96c>] (unwind_backtrace+0x0/0xd8) from [<c003b140>] (panic+0x58/0x12c)
> > [<c003b140>] (panic+0x58/0x12c) from [<c003e104>] (do_exit+0x64/0x6d0)
> > [<c003e104>] (do_exit+0x64/0x6d0) from [<c002a054>] (die+0x174/0x198)
> > [<c002a054>] (die+0x174/0x198) from [<c002a11c>] (dump_stack+0x0/0xc)
> >
> >
> >
> > >
> > > Daniel
> > >
> > >
> > > diff --git a/kernel/printk.c b/kernel/printk.c
> > > index b4d97b5..7919751 100644
> > > --- a/kernel/printk.c
> > > +++ b/kernel/printk.c
> > > @@ -686,6 +686,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
> > > printed_len += vscnprintf(printk_buf + printed_len,
> > > sizeof(printk_buf) - printed_len, fmt, args);
> > >
> > > +{ extern void printascii(const char *); printascii(printk_buf); }
> > >
> > > p = printk_buf;
> > >
> > >
> >
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 11:33 ` Ronen Shitrit
@ 2009-10-29 15:11 ` Dieter Kiermaier
2009-10-29 15:16 ` Russell King - ARM Linux
0 siblings, 1 reply; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-29 15:11 UTC (permalink / raw)
To: linux-arm-kernel
Am Donnerstag 29 Oktober 2009 12:33:03 schrieb Ronen Shitrit:
> Sorry I don't have experience with the OpenOCD.
> Any way by using the printk hack, u can simply read the register and print it...
I fear I need any further help:
I've tried to read the register you told me but now I get an oops:
<1>Unable to handle kernel paging request at virtual address 40020100
<1>pgd = c0004000
<1>[40020100] *pgd=00000000
<0>Internal error: Oops: 5 [#1] PREEMP
My code to read the register is:
#include <asm/io.h>
printk("register 0x20100: %x\n", readl(virt_to_phys(0x20100)))
also a
printk("register 0x20100: %x\n", readl(0x20100));
fail with an Ooops :(
What am I doing wrong here?
Many thanks for helping such a newbie ;)
Dieter
>
> Regards
>
> -----Original Message-----
> From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-kernel-bounces at lists.infradead.org] On Behalf Of Dieter Kiermaier
> Sent: Thursday, October 29, 2009 12:58 PM
> To: linux-arm-kernel at lists.infradead.org
> Cc: Nicolas Pitre; openrd at googlegroups.com; Daniel Mack; Nicolas Pitre
> Subject: Re: marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
>
> Am Donnerstag 29 Oktober 2009 11:33:41 schrieb Ronen Shitrit:
> > Can u pls place a breakpoint before scanning the pcie and read register 0x20100.
> > If bit 2 is set, try to unset it and continue.
> >
> > When u scan the PCI u probably get master abort error on a device which isnt found, according to bit 2 above this "Error indications" is propagated to the Mbus-L and will cause external abort.
> >
>
> Hi Ronen,
>
> sorry for the stupid question but it's the first time i debug the kernel ;)
>
> How do I place a breakpoint?
>
> Can I run the kernel directly from the openocd debugger, without running it from u-boot?
>
> > Regards
> >
> > -----Original Message-----
> > From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-kernel-bounces at lists.infradead.org] On Behalf Of Dieter Kiermaier
> > Sent: Thursday, October 29, 2009 11:37 AM
> > To: linux-arm-kernel at lists.infradead.org
> > Cc: Nicolas Pitre; openrd at googlegroups.com; Daniel Mack; Nicolas Pitre
> > Subject: Re: marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
> >
> >
> > Maybe helpful additional information:
> > It makes no difference if I connect a PCI device behind my bridge or not.
> > The trace is exactly the same.
> >
> > Dieter
> >
> > > Am Donnerstag 29 Oktober 2009 09:52:36 schrieb Daniel Mack:
> > > Hi Daniel,
> > >
> > >
> > > > On Thu, Oct 29, 2009 at 10:36:40AM +0200, Dieter Kiermaier wrote:
> > > > > ## Booting kernel from Legacy Image at 00800000 ...
> > > > > Image Name: Linux-2.6.32-rc5-00081-g964fe08-
> > > > > Image Type: ARM Linux Kernel Image (uncompressed)
> > > > > Data Size: 2390056 Bytes = 2.3 MB
> > > > > Load Address: 00008000
> > > > > Entry Point: 00008000
> > > > > Verifying Checksum ... OK
> > > > > Loading Kernel Image ... OK
> > > > > OK
> > > > >
> > > > > Starting kernel ...
> > > > >
> > > > > Uncompressing Linux............................................................................................................................................................ done.
> > > >
> > > > The problem most probably is that your kernel dies before the console is
> > > > enabled, and hence you're not pointed to the actual problem.
> > > >
> > > > Try the patch below - printk() messages are not buffered but sent out
> > > > directly to the lowlevel UART functions with this hack. CONFIG_DEBUG_LL
> > > > must be enabled for this.
> > >
> > > I think your patch leads us to the root but I fear I don't know about PCI / Kernel programming to fix it :(
> > > Here is my start log:
> > >
> > > Hopefully someone can see what is going wrong?
> > >
> > > Starting kernel ...
> > >
> > > Uncompressing Linux............................................................................................................................................................ done.
> > > <5>Linux version 2.6.32-rc5-00081-g964fe08-dirty (dieter at dk1-linux) (gcc version 4.2.0 20070413 (prerelease)) #7 PREEMPT Thu Oct 29 10:05:02 CET 2009
> > > CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
> > > CPU: VIVT data cache, VIVT instruction cache
> > > Machine: Marvell OpenRD Base Board
> > > Memory policy: ECC disabled, Data cache writeback
> > > <7>On node 0 totalpages: 131072
> > > <7>free_area_init_node: node 0, pgdat c04c5dec, node_mem_map c058d000
> > > <7> Normal zone: 1024 pages used for memmap
> > > <7> Normal zone: 0 pages reserved
> > > <7> Normal zone: 130048 pages, LIFO batch:31
> > > Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
> > > <5>Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x400000 at 0x100000(uImage),0x1fb00000 at 0x500000(rootfs) rw root=/dev/nfs rw nfsroot=192.168.2.251:/home/dieter/ArtistaNt
> > > <6>PID hash table entries: 2048 (order: 1, 8192 bytes)
> > > <6>Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
> > > <6>Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
> > > <6>Memory: 256MB 256MB = 512MB total
> > > <5>Memory: 513920KB available (4420K code, 961K data, 120K init, 0K highmem)
> > > <6>SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> > > <6>Hierarchical RCU implementation.
> > > <6>NR_IRQS:114
> > > Console: colour dummy device 80x30
> > > <6>Calibrating delay loop... <c>1199.30 BogoMIPS (lpj=5996544)
> > > Mount-cache hash table entries: 512
> > > <6>CPU: Testing write buffer coherency: ok
> > > <6>NET: Registered protocol family 16
> > > <6>Kirkwood: MV88F6281-A0, TCLK=200000000.
> > > <6>Feroceon L2: Cache support initialised.
> > > <7>initial MPP regs: 01111111 11113311 33331111 33103333 42222033 22244444 00000022
> > > <7> final MPP regs: 01111111 11113311 33331111 33003333 42222033 22244444 00000022
> > > <7>PCI: Scanning bus 0000:00
> > > <7>pci 0000:00:00.0: found [11ab:6281] class 000580 header type 00
> > > <7>pci 0000:00:00.0: reg 10 64bit mmio pref: [0xd0000000-0xd00fffff]
> > > <7>pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff]
> > > <7>pci 0000:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
> > > <7>pci 0000:00:00.0: calling rc_pci_fixup+0x0/0x40
> > > <7>pci 0000:00:00.0: calling quirk_resource_alignment+0x0/0x19c
> > > <7>pci 0000:00:00.0: supports D1 D2
> > > <7>pci 0000:00:01.0: found [11ab:2211] class 000604 header type 01
> > > <7>pci 0000:00:01.0: calling pci_fixup_ide_bases+0x0/0x44
> > > <7>pci 0000:00:01.0: calling rc_pci_fixup+0x0/0x40
> > > <7>pci 0000:00:01.0: calling quirk_resource_alignment+0x0/0x19c
> > > <7>pci 0000:00:01.0: supports D1 D2
> > > <6>pci 0000:00:01.0: PME# supported from D0 D1 D2 D3hot D3cold
> > > <6>pci 0000:00:01.0: PME# disabled
> > > <7>PCI: Fixups for bus 0000:00
> > > <6>PCI: bus0: Fast back to back transfers disabled
> > > <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 0
> > > <7>pci 0000:00:01.0: bus configuration invalid, reconfiguring
> > > <7>pci 0000:00:01.0: scanning behind bridge, config 000000, pass 1
> > > <7>PCI: Scanning bus 0000:01
> > > <1>Unhandled fault: external abort on non-linefetch (0x028) at 0xfee418fc
> > > <0>Internal error: : 28 [#1] PREEMPT
> > > <0>last sysfs file:
> > > <d>Modules linked in:
> > > CPU: 0 Not tainted (2.6.32-rc5-00081-g964fe08-dirty #7)
> > > PC is at orion_pcie_rd_conf+0x48/0x98
> > > LR is at 0x0
> > > pc : [<c002fc10>] lr : [<00000000>] psr: 20000093
> > > sp : df835e58 ip : 00000004 fp : 00000000
> > > r10: df835e94 r9 : 00000000 r8 : 00000000
> > > r7 : 00000000 r6 : 00000004 r5 : df81b800 r4 : 00000000
> > > r3 : 000018fc r2 : 00000000 r1 : 80010000 r0 : fee40000
> > > Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
> > > Control: 0005317f Table: 00004000 DAC: 00000017
> > > <0>Process swapper (pid: 1, stack limit = 0xdf834270)
> > > <0>Stack: (0xdf835e58 to 0xdf836000)
> > > <0>5e40: 20000093 c002f944
> > > <0>5e60: 00000004 df835e94 0000000f 60000013 df81b800 df835eb4 df81b800 00000000
> > > <0>5e80: 00000000 c01c1e90 df835e94 00000000 00000000 00000000 df835eb4 00000000
> > > <0>5ea0: df81b800 c036c7e0 c049f634 df81b800 00000000 00000001 df81b800 00000008
> > > <0>5ec0: 00000000 df81b800 df81b600 00000000 00000000 c01c3d74 60000013 df81b800
> > > <0>5ee0: 00000008 00000001 00000001 c036ded8 df830800 df81b800 00000000 00000001
> > > <0>5f00: df81b600 c036dd48 00000001 00000000 c040abbc c040abbc 00ff0100 00219f00
> > > <0>5f20: 00000000 df81b600 df830800 00000000 00000001 df81b614 00000000 c04c9f00
> > > <0>5f40: 00000000 c036df48 df81b600 00000001 c0022198 df834000 00000040 c036dfa8
> > > <0>5f60: df807b00 c000c638 df807b00 c000a3ac c0009a4c c01f0e94 df8007c0 c00205e0
> > > <0>5f80: c00209bc 00000000 00000000 00000000 00000000 c04c9f00 c000cbfc c000cc1c
> > > <0>5fa0: c001a7c8 c00263b8 df835fb6 c006f770 df809ae0 00000001 00000033 00000000
> > > <0>5fc0: 00000000 c00205e0 c00209bc 00000000 00000000 00000000 00000000 00000000
> > > <0>5fe0: 00000000 c000888c 00000000 00000000 00000000 c00273dc ffff0000 ffff0000
> > > [<c002fc10>] (orion_pcie_rd_conf+0x48/0x98) from [<c002f944>] (pcie_rd_conf+0x7c/0xb8)
> > > [<c002f944>] (pcie_rd_conf+0x7c/0xb8) from [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98)
> > > [<c01c1e90>] (pci_bus_read_config_dword+0x58/0x98) from [<c036c7e0>] (pci_scan_single_device+0x3c/0x150)
> > > [<c036c7e0>] (pci_scan_single_device+0x3c/0x150) from [<c01c3d74>] (pci_scan_slot+0x14/0x7c)
> > > [<c01c3d74>] (pci_scan_slot+0x14/0x7c) from [<c036ded8>] (pci_scan_child_bus+0x30/0xec)
> > > [<c036ded8>] (pci_scan_child_bus+0x30/0xec) from [<c036dd48>] (pci_scan_bridge+0x1a8/0x308)
> > > [<c036dd48>] (pci_scan_bridge+0x1a8/0x308) from [<c036df48>] (pci_scan_child_bus+0xa0/0xec)
> > > [<c036df48>] (pci_scan_child_bus+0xa0/0xec) from [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20)
> > > [<c036dfa8>] (pci_scan_bus_parented+0x14/0x20) from [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48)
> > > [<c000c638>] (kirkwood_pcie_scan_bus+0x1c/0x48) from [<c000a3ac>] (pci_common_init+0x120/0x20c)
> > > [<c000a3ac>] (pci_common_init+0x120/0x20c) from [<c000cc1c>] (openrd_base_pci_init+0x20/0x34)
> > > [<c000cc1c>] (openrd_base_pci_init+0x20/0x34) from [<c00263b8>] (do_one_initcall+0x58/0x1a4)
> > > [<c00263b8>] (do_one_initcall+0x58/0x1a4) from [<c000888c>] (kernel_init+0x90/0x104)
> > > [<c000888c>] (kernel_init+0x90/0x104) from [<c00273dc>] (kernel_thread_exit+0x0/0x8)
> > > <0>Code: e59f3054 e7801003 e2833004 e59dc008 (e7902003)
> > > <4>---[ end trace 1b75b31a2719ed1c ]---
> > > <6>note: swapper[1] exited with preempt_count 3
> > > <0>Kernel panic - not syncing: Attempted to kill init!
> > > [<c002b96c>] (unwind_backtrace+0x0/0xd8) from [<c003b140>] (panic+0x58/0x12c)
> > > [<c003b140>] (panic+0x58/0x12c) from [<c003e104>] (do_exit+0x64/0x6d0)
> > > [<c003e104>] (do_exit+0x64/0x6d0) from [<c002a054>] (die+0x174/0x198)
> > > [<c002a054>] (die+0x174/0x198) from [<c002a11c>] (dump_stack+0x0/0xc)
> > >
> > >
> > >
> > > >
> > > > Daniel
> > > >
> > > >
> > > > diff --git a/kernel/printk.c b/kernel/printk.c
> > > > index b4d97b5..7919751 100644
> > > > --- a/kernel/printk.c
> > > > +++ b/kernel/printk.c
> > > > @@ -686,6 +686,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
> > > > printed_len += vscnprintf(printk_buf + printed_len,
> > > > sizeof(printk_buf) - printed_len, fmt, args);
> > > >
> > > > +{ extern void printascii(const char *); printascii(printk_buf); }
> > > >
> > > > p = printk_buf;
> > > >
> > > >
> > >
> > >
> > >
> > > _______________________________________________
> > > linux-arm-kernel mailing list
> > > linux-arm-kernel at lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> > >
> >
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 15:11 ` Dieter Kiermaier
@ 2009-10-29 15:16 ` Russell King - ARM Linux
2009-10-29 22:47 ` saeed bishara
0 siblings, 1 reply; 15+ messages in thread
From: Russell King - ARM Linux @ 2009-10-29 15:16 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Oct 29, 2009 at 05:11:02PM +0200, Dieter Kiermaier wrote:
> Am Donnerstag 29 Oktober 2009 12:33:03 schrieb Ronen Shitrit:
> > Sorry I don't have experience with the OpenOCD.
> > Any way by using the printk hack, u can simply read the register and print it...
>
> I fear I need any further help:
>
> I've tried to read the register you told me but now I get an oops:
> <1>Unable to handle kernel paging request at virtual address 40020100
> <1>pgd = c0004000
> <1>[40020100] *pgd=00000000
> <0>Internal error: Oops: 5 [#1] PREEMP
>
> My code to read the register is:
> #include <asm/io.h>
> printk("register 0x20100: %x\n", readl(virt_to_phys(0x20100)))
>
> also a
> printk("register 0x20100: %x\n", readl(0x20100));
> fail with an Ooops :(
>
> What am I doing wrong here?
1. virt_to_phys() is only valid for the kernel memory region in the
virtual address space. 0x20100 is not within such a region.
2. readl() takes an offsettable cookie representing the location you
want to access. (you get this cookie via ioremap of a bus address
or via a platform defined constant.) Practially (for most existing
implementations but not all) it is a virtual address.
Assuming 0x20100 is the physical address of the register, you should be
able to read it like this:
void __iomem *base = ioremap(0x20100, 4);
if (base)
printk("register 0x20100: %x\n", readl(base));
iounmap(base);
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 15:16 ` Russell King - ARM Linux
@ 2009-10-29 22:47 ` saeed bishara
2009-10-30 8:55 ` Dieter Kiermaier
0 siblings, 1 reply; 15+ messages in thread
From: saeed bishara @ 2009-10-29 22:47 UTC (permalink / raw)
To: linux-arm-kernel
For Kirkwood, the registers physical addresses start at 0xF1000000
(KIRKWOOD_REGS_PHYS_BASE ). so the physical address that you need to
pass to ioremap is 0xf1020100. alternatley, you can use the existing
virtual mapping of the register that defined by
KIRKWOOD_REGS_VIRT_BASE, so just use: readl(KIRKWOOD_REGS_VIRT_BASE |
0x20100)
saeed
On Thu, Oct 29, 2009 at 5:16 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Thu, Oct 29, 2009 at 05:11:02PM +0200, Dieter Kiermaier wrote:
>> Am Donnerstag 29 Oktober 2009 12:33:03 schrieb Ronen Shitrit:
>> > Sorry I don't have experience with the OpenOCD.
>> > Any way by using the printk hack, u can simply read the register and print it...
>>
>> I fear I need any further help:
>>
>> I've tried to read the register you told me but now I get an oops:
>> <1>Unable to handle kernel paging request at virtual address 40020100
>> <1>pgd = c0004000
>> <1>[40020100] *pgd=00000000
>> <0>Internal error: Oops: 5 [#1] PREEMP
>>
>> My code to read the register is:
>> #include <asm/io.h>
>> printk("register 0x20100: %x\n", readl(virt_to_phys(0x20100)))
>>
>> also a
>> printk("register 0x20100: %x\n", readl(0x20100));
>> fail with an Ooops :(
>>
>> What am I doing wrong here?
>
> 1. virt_to_phys() is only valid for the kernel memory region in the
> ? virtual address space. ?0x20100 is not within such a region.
>
> 2. readl() takes an offsettable cookie representing the location you
> ? want to access. ?(you get this cookie via ioremap of a bus address
> ? or via a platform defined constant.) ?Practially (for most existing
> ? implementations but not all) it is a virtual address.
>
> Assuming 0x20100 is the physical address of the register, you should be
> able to read it like this:
>
> ? ? ? ?void __iomem *base = ioremap(0x20100, 4);
> ? ? ? ?if (base)
> ? ? ? ? ? ? ? ?printk("register 0x20100: %x\n", readl(base));
> ? ? ? ?iounmap(base);
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-29 22:47 ` saeed bishara
@ 2009-10-30 8:55 ` Dieter Kiermaier
2009-11-03 14:36 ` Dieter Kiermaier
0 siblings, 1 reply; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-30 8:55 UTC (permalink / raw)
To: linux-arm-kernel
> For Kirkwood, the registers physical addresses start at 0xF1000000
> (KIRKWOOD_REGS_PHYS_BASE ). so the physical address that you need to
> pass to ioremap is 0xf1020100. alternatley, you can use the existing
> virtual mapping of the register that defined by
> KIRKWOOD_REGS_VIRT_BASE, so just use: readl(KIRKWOOD_REGS_VIRT_BASE |
> 0x20100)
>
> saeed
thanks for the help.
ok - now I'm able to read the register:
register 0x20100: 3fb8
So it looks like bit 2 isn't set. That's what Ronen wanted me to have a look for.
Hopefully someone has any further suggestions?
Dieter
>
>
> On Thu, Oct 29, 2009 at 5:16 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Thu, Oct 29, 2009 at 05:11:02PM +0200, Dieter Kiermaier wrote:
> >> Am Donnerstag 29 Oktober 2009 12:33:03 schrieb Ronen Shitrit:
> >> > Sorry I don't have experience with the OpenOCD.
> >> > Any way by using the printk hack, u can simply read the register and print it...
> >>
> >> I fear I need any further help:
> >>
> >> I've tried to read the register you told me but now I get an oops:
> >> <1>Unable to handle kernel paging request at virtual address 40020100
> >> <1>pgd = c0004000
> >> <1>[40020100] *pgd=00000000
> >> <0>Internal error: Oops: 5 [#1] PREEMP
> >>
> >> My code to read the register is:
> >> #include <asm/io.h>
> >> printk("register 0x20100: %x\n", readl(virt_to_phys(0x20100)))
> >>
> >> also a
> >> printk("register 0x20100: %x\n", readl(0x20100));
> >> fail with an Ooops :(
> >>
> >> What am I doing wrong here?
> >
> > 1. virt_to_phys() is only valid for the kernel memory region in the
> > ? virtual address space. ?0x20100 is not within such a region.
> >
> > 2. readl() takes an offsettable cookie representing the location you
> > ? want to access. ?(you get this cookie via ioremap of a bus address
> > ? or via a platform defined constant.) ?Practially (for most existing
> > ? implementations but not all) it is a virtual address.
> >
> > Assuming 0x20100 is the physical address of the register, you should be
> > able to read it like this:
> >
> > ? ? ? ?void __iomem *base = ioremap(0x20100, 4);
> > ? ? ? ?if (base)
> > ? ? ? ? ? ? ? ?printk("register 0x20100: %x\n", readl(base));
> > ? ? ? ?iounmap(base);
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge
2009-10-30 8:55 ` Dieter Kiermaier
@ 2009-11-03 14:36 ` Dieter Kiermaier
0 siblings, 0 replies; 15+ messages in thread
From: Dieter Kiermaier @ 2009-11-03 14:36 UTC (permalink / raw)
To: linux-arm-kernel
Some news, but allready no solution...
>
> > For Kirkwood, the registers physical addresses start at 0xF1000000
> > (KIRKWOOD_REGS_PHYS_BASE ). so the physical address that you need to
> > pass to ioremap is 0xf1020100. alternatley, you can use the existing
> > virtual mapping of the register that defined by
> > KIRKWOOD_REGS_VIRT_BASE, so just use: readl(KIRKWOOD_REGS_VIRT_BASE |
> > 0x20100)
> >
> > saeed
>
> thanks for the help.
>
> ok - now I'm able to read the register:
> register 0x20100: 3fb8
>
> So it looks like bit 2 isn't set. That's what Ronen wanted me to have a look for.
>
> Hopefully someone has any further suggestions?
>
> Dieter
I've tracked down the now until pci_setup_device() in drivers/pci/probe.c
if I do something like:
#if 0
case PCI_HEADER_TYPE_BRIDGE: /* bridge header */
if (class != PCI_CLASS_BRIDGE_PCI)
goto bad;
/* The PCI-to-PCI bridge spec requires that subtractive
decoding (i.e. transparent) bridge must have programming
interface code of 0x01. */
pci_read_irq(dev);
dev->transparent = ((dev->class & 0xff) == 1);
pci_read_bases(dev, 2, PCI_ROM_ADDRESS1);
set_pcie_hotplug_bridge(dev);
break;
#endif
everything except my pcie->pci bridge seems to work fine.
So I looks like that's a problem with only pcie->pci bridges (or pci bridges more general)?
Is this possible or do I complete understand something wrong?
Could someone please try to reproduce this on a marvell or at least an arm platform?
Many, many thanks,
Dieter
>
> >
> >
> > On Thu, Oct 29, 2009 at 5:16 PM, Russell King - ARM Linux
> > <linux@arm.linux.org.uk> wrote:
> > > On Thu, Oct 29, 2009 at 05:11:02PM +0200, Dieter Kiermaier wrote:
> > >> Am Donnerstag 29 Oktober 2009 12:33:03 schrieb Ronen Shitrit:
> > >> > Sorry I don't have experience with the OpenOCD.
> > >> > Any way by using the printk hack, u can simply read the register and print it...
> > >>
> > >> I fear I need any further help:
> > >>
> > >> I've tried to read the register you told me but now I get an oops:
> > >> <1>Unable to handle kernel paging request at virtual address 40020100
> > >> <1>pgd = c0004000
> > >> <1>[40020100] *pgd=00000000
> > >> <0>Internal error: Oops: 5 [#1] PREEMP
> > >>
> > >> My code to read the register is:
> > >> #include <asm/io.h>
> > >> printk("register 0x20100: %x\n", readl(virt_to_phys(0x20100)))
> > >>
> > >> also a
> > >> printk("register 0x20100: %x\n", readl(0x20100));
> > >> fail with an Ooops :(
> > >>
> > >> What am I doing wrong here?
> > >
> > > 1. virt_to_phys() is only valid for the kernel memory region in the
> > > ? virtual address space. ?0x20100 is not within such a region.
> > >
> > > 2. readl() takes an offsettable cookie representing the location you
> > > ? want to access. ?(you get this cookie via ioremap of a bus address
> > > ? or via a platform defined constant.) ?Practially (for most existing
> > > ? implementations but not all) it is a virtual address.
> > >
> > > Assuming 0x20100 is the physical address of the register, you should be
> > > able to read it like this:
> > >
> > > ? ? ? ?void __iomem *base = ioremap(0x20100, 4);
> > > ? ? ? ?if (base)
> > > ? ? ? ? ? ? ? ?printk("register 0x20100: %x\n", readl(base));
> > > ? ? ? ?iounmap(base);
> > >
> > > _______________________________________________
> > > linux-arm-kernel mailing list
> > > linux-arm-kernel at lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> > >
> >
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-11-03 14:36 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-29 8:36 marvell kirkwood / openrd-base kernel freeze on bootup with PICe->PCI bridge Dieter Kiermaier
2009-10-29 8:35 ` Simon Kagstrom
2009-10-29 8:50 ` Dieter Kiermaier
2009-10-29 8:52 ` Daniel Mack
2009-10-29 8:59 ` Simon Kagstrom
2009-10-29 9:14 ` Dieter Kiermaier
2009-10-29 9:36 ` Dieter Kiermaier
2009-10-29 10:33 ` Ronen Shitrit
2009-10-29 10:57 ` Dieter Kiermaier
2009-10-29 11:33 ` Ronen Shitrit
2009-10-29 15:11 ` Dieter Kiermaier
2009-10-29 15:16 ` Russell King - ARM Linux
2009-10-29 22:47 ` saeed bishara
2009-10-30 8:55 ` Dieter Kiermaier
2009-11-03 14:36 ` Dieter Kiermaier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).