Bug 2410 - linux-yocto-dev kernel boot issues on qemumips64
Summary: linux-yocto-dev kernel boot issues on qemumips64
Status: RESOLVED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-runtime (show other bugs)
Version: 1.3
Hardware: Other mips
: Medium normal
Target Milestone: 1.4
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-05-03 22:34 UTC by Khem Raj
Modified: 2013-04-05 04:22 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Khem Raj 2012-05-03 22:34:00 UTC
I have been working on adding mips64 support to OE-Core and while I can build userspace and kernel fine, kernel does not boot properly on qemu. There seem to be two issue

1. CFI finds a device and tries to probe it and ends up in some unimplemented
commands for device. Its to be noted that my build box has SSD and the build it completely running in a ramfs so it could be that qemu when booting exposes the underlying SSD to kernel I dont know. It does not happen with qemumips 32bit

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
ide-gd driver 1.18
physmap platform flash device: 00400000 at 1e000000
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf000f0)
physmap-flash.0: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf0)
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf0)
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf0)
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf0)
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf0)
pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf0)
Intel/Sharp Extended Query Table at 0x0031
Intel/Sharp Extended Query Table at 0x0031
Intel/Sharp Extended Query Table at 0x0031
Intel/Sharp Extended Query Table at 0x0031
Intel/Sharp Extended Query Table at 0x0031
Intel/Sharp Extended Query Table at 0x0031



The above messages keep repeating and kernel never boots


Once I disabled MTD_CFI then it moved along and dies with segfault durng perf counters

Reserved instruction in kernel code[#1]:
Cpu 0
$ 0   : 0000000000000000 ffffffff8010aa24 0000000000000000 0000000000000000
$ 4   : 0000000000000017 0000000000000000 ffffffffffffffff ffffffffffffffff
$ 8   : 0000000000000000 9000000010000010 0000000000000000 0000000000000000
$12   : 9800000007c739e8 000000001000001f 000000000000000f 0000000000000007
$16   : 0000000000000000 0000000000000000 0000000000000000 ffffffff8077d850
$20   : ffffffff8077d878 ffffffff80730000 ffffffff80730000 ffffffff80736000
$24   : 0000000000000000 0000000000000000                                  
$28   : 9800000007c70000 9800000007c739e0 9800000007c739e0 ffffffff8010aa24
Hi    : 0000000000000000
Lo    : 0000000000000200
epc   : ffffffff804fa2cc mipsxx_perfcount_handler+0xf4/0x198
    Not tainted
ra    : ffffffff8010aa24 c0_compare_interrupt+0xa4/0xc0
Status: 140024e2    KX SX UX KERNEL EXL 
Cause : 00808028
PrId  : 000182a0 (MIPS 20Kc)
Modules linked in:
Process swapper (pid: 1, threadinfo=9800000007c70000, task=9800000007c68000, tls=0000000000000000)
Stack : 9800000007c739f0 ffffffff8010aa24 0000000000000000 0000000000000017
        9800000007c73a10 ffffffff8019ac60 ffffffff80741f88 0000000000000017
        ffffffff80741f88 ffffffff80736448 0000000000000037 0000000000000003
        ffffffff807f4bd0 ffffffff80730000 ffffffff80730000 ffffffff807f4bd3
        9800000007c73a70 ffffffff8019f098 0000000000000007 0000000000000010
        9800000007c73a90 ffffffff8019a0b0 9800000007c73aa0 ffffffff806083a4
        0000000000000017 0000000000000000 9800000007c73ac0 ffffffff801010bc
        0000000000000000 ffffffff807f4bd3 9800000007c73c10 ffffffff80102120
        0000000000000000 000000001400a4e0 000000001400a4e1 000000001400a4e1
        0000000000000000 0000000000000000 ffffffffffffffff ffffffffffffffff
        ...
Call Trace:
[<ffffffff804fa2cc>] mipsxx_perfcount_handler+0xf4/0x198
[<ffffffff8010aa24>] c0_compare_interrupt+0xa4/0xc0
[<ffffffff8019ac60>] handle_irq_event_percpu+0xa0/0x378
[<ffffffff8019f098>] handle_percpu_irq+0x68/0x98
[<ffffffff8019a0b0>] generic_handle_irq+0x60/0x90
[<ffffffff806083a4>] do_IRQ+0x2c/0x48
[<ffffffff801010bc>] plat_irq_dispatch+0x6c/0x220
[<ffffffff80102120>] ret_from_irq+0x0/0x4
[<ffffffff8012a6a8>] vprintk+0x300/0x580
[<ffffffff805fbce0>] printk+0x48/0x5c
[<ffffffff8079f158>] oprofile_arch_init+0xe8/0x118
[<ffffffff8079efb8>] oprofile_init+0x30/0xb8
[<ffffffff80100530>] do_one_initcall+0x120/0x1a0
[<ffffffff80780c70>] kernel_init+0x184/0x248
[<ffffffff80103ffc>] kernel_thread_helper+0x24/0x30


Code: 04800021  00000000  4003c800 <4004c801> 30630010  1060ffde  00000000  0481ffdc  00000000 
---[ end trace 18370ecb47afc51e ]---
Kernel panic - not syncing: Fatal exception in interrupt


Which I then solved by disabling profiling segment.
Comment 1 Khem Raj 2012-05-03 22:37:21 UTC
my changes to meta data are available here

https://github.com/kraj/linux-yocto-dev meta-mips64
Comment 2 Bruce Ashfield 2012-05-03 22:38:08 UTC
I think I have a fix for this. Will know more next week.
Comment 3 Bruce Ashfield 2012-09-14 14:44:52 UTC
good timing on the tweak to this .. we've got a few cycles and were just
looking at this again.
Comment 4 Bruce Ashfield 2013-04-05 04:22:39 UTC
It's alive!

--------

root@qemumips64:~# uname -a
Linux qemumips64 3.8.0-yocto-standard #4 PREEMPT Fri Apr 5 00:08:47 EDT 2013 mips64 GNU/Linux
root@qemumips64:~# 

--------

I bisected and found the commit that gave us the silent boot death. It's
a mips 32 bit ftrace fix .. that ironically was fixing a 32 bit silent
boot death. For now, I reverted the patch, which exposed a second oprofile
register read that is invalid. I've removed that read as well, and now
I can boot, with the .cfg's unmodified.

I've already pushed the changes to linux-yocto-3.8.

Cheers,