Hi,

I am starting to work on a Xenomai port for MIPS architecture as part
of an internship at Open Wide (France). It is my first real diving
into the kernel sources so I'm far from being an expert. The goal of
this project is to be able to run it on a Broadcom BCM6448 board.

My first objective is to be able to run an Adeos patched kernel. I
have decided to work with QEMU (mips-malta board emulation) instead of
my real target since it provides me an easy way to use GDB and thus to
understand a little bit more what is going on. Furthermore, it
provides an easy way of testing it for other people since it only
requires QEMU and no specific real hardware.

I read as much as documents I can (Life with Adeos, Porting Adeos,
...) and finally started messing with the code. I managed to compile a
MIPS kernel merging common Adeos code from latest x86 patch and
adapting (see below) / commenting out. I guess my kernel is far from
functional. My current issue seems to be related to the timer (see
attached file).

Here is a list of explicit changes I have done so far :

    - include/asm-mips/irqflags.h : added raw_local_*() and local_irq_*().
    - include/asm-mips/irq.h : do_IRQ() calls __ipipe_handle_irq()
instead of generic_handle_irq().
    - arch/mips/kernel/ipipe.c : created __ipipe_do_IRQ() (used with
__ipipe_enable_pipeline()) which calls generic_handle_irq().

Do you think my approach is correct ? Are my few changes relevant ? I
avoided to modify entry.S and genex.S, is this mandatory ?

Any help or thoughts are welcome !


Regards,

-- 
Florent Audebert
(qemu) Linux version 2.6.24.4-g6c207edf-dirty ([EMAIL PROTECTED]) (gcc version 
3.4.5) #110 Mon May 5 14:14:43 CEST 2008

LINUX started...
console [early0] enabled
CPU revision is: 00018000 (MIPS 4Kc)
registering PCI controller with io_map_base unset
Determined physical RAM map:
 memory: 00001000 @ 00000000 (reserved)
 memory: 000ef000 @ 00001000 (ROM data)
 memory: 00525000 @ 000f0000 (reserved)
 memory: 079ea000 @ 00615000 (usable)
Wasting 49824 bytes for tracking 1557 unused pages
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  DMA             0 ->     4096
  Normal       4096 ->    32767
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->    32767
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: root=/dev/hda1 console=ttyS0
Primary instruction cache 2kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 2kB, 2-way, VIPT, no aliases, linesize 16 bytes
Synthesized clear page handler (26 instructions).
Synthesized copy page handler (46 instructions).
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 512 (order: 9, 2048 bytes)
CPU frequency 200.00 MHz
I-pipe 1.9-01: pipeline enabled.
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
CPU 0 Unable to handle kernel paging request at virtual address 00000098, epc 
== 80185bc4, ra == 80185b98
Oops[#1]:
Cpu 0
$ 0   : 00000000 10002400 00000000 805fc250
$ 4   : 805a0000 00000000 00000000 00000000
$ 8   : 00000000 00000000 00000000 016e3b77
$12   : 8046dbe8 00000000 00000000 80470018
$16   : 80600000 00000000 00000000 00000000
$20   : 00000000 00000000 00000000 00000000
$24   : 00000000 00000000                  
$28   : 8059a000 8059bb78 00000000 80185b98
Hi    : 00000000
Lo    : 00000000
epc   : 80185bc4 tick_periodic+0x144/0x170     Not tainted
ra    : 80185b98 tick_periodic+0x118/0x170
Status: 10002402    KERNEL EXL 
Cause : 00808008
BadVA : 00000098
PrId  : 00018000 (MIPS 4Kc)
Modules linked in:
Process swapper (pid: 0, threadinfo=8059a000, task=8059cfc8)
Stack : 00000001 805fd3c0 00000000 805a6d60 00000000 00000000 00000000 01312d00
        00000000 003d0900 00000000 016e3600 00000000 016e3600 80600000 805fd3c0
        80185c0c 805a80c4 00000000 805fd440 00000001 00000000 8014f104 00000001
        00000000 00000000 00000006 00000003 8059cfc8 8059cfc8 801024e8 00000000
        00000000 8059bc90 8019d8c8 00000000 00000000 00000000 8011439c 00000000
        ...
Call Trace:
[<80185bc4>] tick_periodic+0x144/0x170
[<80185c0c>] tick_handle_periodic+0x1c/0x224
[<8011439c>] timer_interrupt+0x2c/0x40
[<801984b0>] handle_IRQ_event+0x4c/0x144
[<8019b2b8>] handle_level_irq+0xcc/0x15c
[<801147a8>] test_do_IRQ+0x68/0x94
[<801a0c30>] __ipipe_sync_stage+0x6fc/0xb48
[<8019d7fc>] __ipipe_unstall_root+0xf0/0x11c
[<8019d8c8>] __ipipe_restore_root+0xa0/0xac
[<801af410>] __free_pages_ok+0x50c/0x518
[<801b2608>] __free_pages+0xb0/0xbc
[<805d6570>] __free_pages_bootmem+0x278/0x288
[<805d5c74>] free_all_bootmem_core+0x238/0x3ec
[<805d5fec>] free_all_bootmem+0x18/0x28
[<805c4650>] mem_init+0x48/0x298
[<805b5ee8>] start_kernel+0x340/0x438
[<8051dc20>] kernel_entry+0x0/0x90


Code: 8f820040  afa20010  8fa20010 <8c420098> 30420018  38420010  2c420001  
0c055f12  00402021 
Kernel panic - not syncing: Fatal exception in interrupt
_______________________________________________
Adeos-main mailing list
[email protected]
https://mail.gna.org/listinfo/adeos-main

Reply via email to