linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Nai-Hsien" <dennis@loop.com.tw>
To: "Andrew Williams" <awilliam@nortel.com>, <linuxppc-embedded@ozlabs.org>
Subject: Re: MPC8272 runs application with segmentation fault
Date: Wed, 8 Jun 2005 21:39:24 +0800	[thread overview]
Message-ID: <010301c56c2f$7fbb4810$0102000a@loop.com.tw> (raw)
In-Reply-To: 713043CE8B8E1348AF3C546DBE02C1B403AC5D5C@zcarhxm2.corp.nortel.com

[-- Attachment #1: Type: text/plain, Size: 6360 bytes --]

MessageAndrew,
I believe I already modify my u-boot to detect the processor.

If I statically link my program, I find that the program can run
on my MPC8272 platform properly, so I think maybe the problem
is caused by shared library. However, the same file system (of course,
same shared library) can run on my MPC8245 platform.

With the observation, I think my kernel is not handling shared library
properly. Is there any part of the kernel I should check?

I added some code in do_page_fault() to dump some information, shown
as below, when my program get problem.

PID=34(console): Trap=300, NIP=0x0ffc6d90, LR=0x0ffc6d20, VM: (start=0x30000000,
end=0x30017000, flags=0x00000875), addr=0x2e313056
Segmentation fault

Thank you
Dennis

  ----- Original Message ----- 
  From: Andrew Williams 
  To: Nai-Hsien ; linuxppc-embedded@ozlabs.org 
  Sent: Tuesday, June 07, 2005 10:17 PM
  Subject: RE: MPC8272 runs application with segmentation fault


  Take a alook at the checkcpu() routine in /cpu/mpc8260/cpu.c .
  Validate that your CPU is correctly being identified, and thus initialized. 
  We had identical symptoms with the 8270. 

  We added the following after the case for the PVR_8260_HIP7:
     
          case PVR_8280a_HIP7:
          case PVR_8280_HIP7:
                  k = 7;
                  printf (CPU_ID_STR " (HiP%d Rev %02x, Mask ", k, rev);
                  break;

  include/asm-ppc/processor.h

      #define PVR_8280_HIP7   0x80822013 
      #define PVR_8280a_HIP7   0x80822014 

  A.
    -----Original Message-----
    From: linuxppc-embedded-bounces@ozlabs.org [mailto:linuxppc-embedded-bounces@ozlabs.org] On Behalf Of Nai-Hsien
    Sent: June 7, 2005 9:11 AM
    To: linuxppc-embedded@ozlabs.org
    Subject: MPC8272 runs application with segmentation fault


    Dear experts,

    I have two hardware boards, one uses MPC8245 and the other one uses MPC8272.
    Initially, I use the MPC8245 board to port Linux 2.4.20 and write some applications.
    I already do a lot of test on the MPC8245 board and all my application programs work
    fine.

    After this, I use the same kernel configuration and same file system that are being used
    by the MPC8245 board to port the whole system to my MPC8272.
    Now, I can boot the kernel and run busybox well. However, when
    I run my application programs, I always get segmentation fault. Following is a strace
    dump. Could anybody give me some idea?

    Thank you
    Dennis

    ====================================================
    execve("sbin/console", ["sbin/console"], [/* 6 vars */]) = 0
    uname({sys="Linux", node="6200_linux", ...}) = 0
    brk(0)                                  = 0x10059134
    open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or directory)
    open("/lib/libncurses.so.5", O_RDONLY)  = 3
    read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\001"..., 1024) = 1024
    fstat64(0x3, 0x7ffff098)                = 0
    mmap(0xff97000, 362628, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xff97000
    mprotect(0xffd4000, 112772, PROT_NONE)  = 0
    mmap(0xffd7000, 86016, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x30000) = 0xffd7000
    mmap(0xffec000, 14468, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffec000
    close(3)                                = 0
    open("/lib/libdl.so.2", O_RDONLY)       = 3
    read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\34"..., 1024) = 1024
    fstat64(0x3, 0x7ffff078)                = 0
    mmap(0xff74000, 74812, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xff74000
    mprotect(0xff77000, 62524, PROT_NONE)   = 0
    mmap(0xff84000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xff84000
    close(3)                                = 0
    open("/lib/libnsl.so.1", O_RDONLY)      = 3
    read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0A\274"..., 1024) = 1024
    fstat64(0x3, 0x7ffff058)                = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30017000
    mmap(0xff3e000, 152068, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xff3e000
    mprotect(0xff51000, 74244, PROT_NONE)   = 0
    mmap(0xff5e000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0xff5e000
    mmap(0xff61000, 8708, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xff61000
    close(3)                                = 0
    open("/lib/libc.so.6", O_RDONLY)        = 3
    read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\322"..., 1024) = 1024
    fstat64(0x3, 0x7ffff038)                = 0
    mmap(0xfddd000, 1379388, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfddd000
    mprotect(0xff16000, 97340, PROT_NONE)   = 0
    mmap(0xff1d000, 61440, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x130000) = 0xff1d000
    mmap(0xff2c000, 7228, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xff2c000
    close(3)                                = 0
    brk(0)                                  = 0x10059134
    brk(0x1005a134)                         = 0x1005a134
    brk(0x1005b000)                         = 0x1005b000
    write(2, "before init_ncurses()\n", 22) = 22
    write(2, "before initscr()\n", 17)      = 17
    access("/usr/share/terminfo/v/vt100", R_OK) = 0
    open("/usr/share/terminfo/v/vt100", O_RDONLY) = 3
    read(3, "\32\1,\0\25\0\7\0\16\1\3\2", 12) = 12
    read(3, "vt100|vt100-am|dec vt100 (w/adva"..., 44) = 44
    read(3, "\0\1\0\0\1\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\1", 21) = 21
    read(3, "\0", 1)                        = 1
    read(3, "P\0\10\0\30\0\377\377\377\377\377\377\3\0", 14) = 14
    read(3, "\377\377\0\0\2\0\4\0\25\0\32\0&\0.\0\377\377\377\3777\0"..., 540) = 540
    read(3, "\7\0\r\0\33[%i%p1%d;%p2%dr\0\33[3g\0\33[H\33[J"..., 515) = 515
    read(3, "", 1)                          = 0
    read(3, "", 10)                         = 0
    close(3)                                = 0
    -- SIGSEGV (Segmentation fault) @ 0 (0) ---
    +++ killed by SIGSEGV +++
    Segmentation fault


[-- Attachment #2: Type: text/html, Size: 14274 bytes --]

  reply	other threads:[~2005-06-08 13:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-07 14:17 MPC8272 runs application with segmentation fault Andrew Williams
2005-06-08 13:39 ` Nai-Hsien [this message]
2005-06-08 13:52   ` Kumar Gala
2005-06-08 14:51     ` Nai-Hsien
2005-06-08 14:59       ` Kumar Gala
  -- strict thread matches above, loose matches on Subject: below --
2005-06-08 15:02 Nai-Hsien
2005-06-07 21:54 Andrew Williams
2005-06-07 13:11 Nai-Hsien

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='010301c56c2f$7fbb4810$0102000a@loop.com.tw' \
    --to=dennis@loop.com.tw \
    --cc=awilliam@nortel.com \
    --cc=linuxppc-embedded@ozlabs.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 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).