All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregor Waltz <gregor.waltz@raritan.com>
To: linux-mips@linux-mips.org
Subject: Re: Toshiba JMR 3927 working setup?
Date: Tue, 15 Jan 2008 15:05:48 -0500	[thread overview]
Message-ID: <478D121C.4020701@raritan.com> (raw)
In-Reply-To: <20080115161457.GB31107@networkno.de>

Thiemo Seufer wrote:
> Gregor Waltz wrote:
>   
>> Atsushi Nemoto wrote:
>>     
>>> On Fri, 11 Jan 2008 12:49:49 -0500, Gregor Waltz <gregor.waltz@raritan.com> wrote:
>>>   
>>>       
>>>> I built linux-2.6.23.9 with the above, but the results are still the  
>>>> same and the EPC is not in System.map.
>>>>     
>>>>         
>>> Are you searching the exact EPC value in System.map?
>>> Usually you should find a function symbol which contains the EPC value in it.
>>>
>>> Or you can do "mipsel-linux-objdump -d vmlinux" and search the EPC value.
>>>   
>>>       
>> The current error is:
>> Exception! EPC=80026290 CAUSE=00000020(Sys)
>> 80026290 0000000c syscall
>>
>> 80026290 is not in System.map, however, the objdump is much more  
>> informative and does contain that value. That particular syscall is in:
>>
>> 8002628c <kernel_execve>:
>> 8002628c:       24020fab        li      v0,4011
>> 80026290:       0000000c        syscall
>> 80026294:       00401821        move    v1,v0
>> 80026298:       14e00003        bnez    a3,800262a8 <kernel_execve+0x1c>
>> 8002629c:       00000000        nop
>> 800262a0:       03e00008        jr      ra
>> 800262a4:       00601021        move    v0,v1
>> 800262a8:       03e00008        jr      ra
>> 800262ac:       00031023        negu    v0,v1
>>
>> Does that provide any clues?
>>     
>
> The kernel failed to set up the general exception handler correctly.
> It should have done that before attempting to start the first kernel
> thread.
>
>
> Thiemo
>   

 From where in the kernel image should execution begin?

Presuming that the output of "objdump -d" reflects the disassembled 
binary from the beginning in order, it looks like my 2.6 kernel is 
running straight into run_init_process as the first real code executed. 
 From what I have seen in the kernel code, run_init_process should be 
jumped to far later in the boot process. If what I am thinking is 
correct, then it also explains why the failure happens in kernel_execve.

I have also included the start of my working kernel, which has _ftext 
with non-zero data as its first entry. Is the _ftext the ELF header or 
some other info for the boot loader?

Thanks


linux-2.6.23.9/vmlinux:     file format elf32-tradlittlemips

Disassembly of section .text:

80020000 <run_init_process-0x400>:
        ...

80020400 <run_init_process>:
80020400:       3c028033        lui     v0,0x8033
80020404:       3c068033        lui     a2,0x8033
80020408:       244594dc        addiu   a1,v0,-27428
8002040c:       24c69450        addiu   a2,a2,-27568
80020410:       080098a3        j       8002628c <kernel_execve> // 
Should this be happening already?
80020414:       ac4494dc        sw      a0,-27428(v0)

80020418 <init_post>:

run_init_process is from linux-2.6.23.9/init/main.c



Our working kernel starts differently:

linux-2.4.12/vmlinux:     file format elf32-tradlittlemips

Disassembly of section .text:

80020000 <_ftext>:
80020000:       26 80 01 3c 14 42 3d ac 02 80 08 3c 80 04 08 25     
&..<.B=....<...%
80020010:       08 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00     
................
        ...

80020298 <except_vec2_generic>:
80020298:       401a8000        mfc0    k0,$16
8002029c:       241bfff8        li      k1,-8
800202a0:       035bd024        and     k0,k0,k1
800202a4:       375a0002        ori     k0,k0,0x2
800202a8:       409a8000        mtc0    k0,$16
        ...
800202b8:       0800b248        j       8002c920 <cache_parity_error>
800202bc:       00000000        nop

800202c0 <except_vec4>:

  reply	other threads:[~2008-01-15 20:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-04 16:45 Toshiba JMR 3927 working setup? Gregor Waltz
2008-01-04 17:21 ` Thiemo Seufer
2008-01-04 18:40   ` Gregor Waltz
2008-01-04 18:51     ` Florian Lohoff
2008-01-04 19:23       ` Gregor Waltz
2008-01-04 19:23     ` Thiemo Seufer
2008-01-04 22:27       ` Gregor Waltz
2008-01-05 14:42         ` Atsushi Nemoto
2008-01-07 12:21           ` Ralf Baechle
2008-01-07 15:34             ` Atsushi Nemoto
2008-01-05 15:07     ` Atsushi Nemoto
2008-01-11 17:49       ` Gregor Waltz
2008-01-12 12:17         ` Atsushi Nemoto
2008-01-15 15:50           ` Gregor Waltz
2008-01-15 15:50             ` Gregor Waltz
2008-01-15 16:14             ` Thiemo Seufer
2008-01-15 20:05               ` Gregor Waltz [this message]
2008-01-15 23:14                 ` Thiemo Seufer
2008-01-16 15:28                   ` Gregor Waltz
2008-01-16 16:04                     ` Atsushi Nemoto
2008-01-17 16:50                       ` Gregor Waltz
2008-01-18  1:05                         ` Atsushi Nemoto
2008-01-05 14:45 ` Ralf Baechle
2008-01-08 23:54   ` Gregor Waltz
2008-01-09  0:17     ` Thiemo Seufer
2008-02-04  1:14     ` M. Warner Losh
  -- strict thread matches above, loose matches on Subject: below --
2008-01-25 16:50 Max Okumoto
2008-01-26  5:08 ` Atsushi Nemoto
2008-01-28 16:36   ` Gregor Waltz
2008-01-29 13:50     ` Atsushi Nemoto
2008-03-06 15:49   ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=478D121C.4020701@raritan.com \
    --to=gregor.waltz@raritan.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.