linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Anton Wöllert" <a.woellert@gmail.com>
To: Theo Gjaltema <gjalt007@chello.nl>,  linuxppc-embedded@ozlabs.org
Subject: Re: mpc8xx and ld.so problem
Date: Thu, 14 Jul 2005 07:44:31 +0200	[thread overview]
Message-ID: <42D5FBBF.8030302@gmail.com> (raw)
In-Reply-To: <42D5361B.2070402@chello.nl>

Theo Gjaltema wrote:

 > Has anyone an idea why only this large application failed? busybox_1.0
 > and more applications work fine.
 > system is a: mcp862/32Mb SDRAM started from u-boot 0.4.1,
 > kernel enhanced with atm/utopia driver.
 >
 > This driver causes the CPM sometimes to hang when performing a memset,
 > can this be caused by the same problem?
 > (CPM stops responding, console buffers are not flused anymore and
 > kernel stops waiting for buffers)
 >
 > Greetings,
 >   Theo Gjaltema
 >

the problem ( so i think ) is, that larger applications will need more 
space, which in turn is satisfied by malloc (or mmap with fd = -1). 
these allocated pages are not real initialized after malloc ( they will 
be initialized completely, if a write on it is done, which will cause 
the page fault handler, that does the hardware mmu-stuff, so that a 
write can be done). so they will cause a page fault on a first access. 
no problem so long, but when the memset.S routine in libc tries to set 
all to zero, it uses the dcbz instructions. this instruction then causes 
a page fault or better a TLB miss (if i'm right). after the exception is 
raised, the address where the write to was done is looked up in the DAR 
(data address register), which could be bogus on the dcb* instruction 
(on 8xx, where is the errata for that?).
to sum up, the chance, that a memset( .., '\0', ..) with dcbz is done on 
a page (that has just registered structures in the kernel, and not 
cached in the tlb or even marked as writeable) is bigger :)

that's my opinion. if someone has more knowledge about that, or if i'm 
wrong - please! correct me.

anton

  parent reply	other threads:[~2005-07-14  5:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <42C1AAC1.4060702@gmail.com>
     [not found] ` <20050629085913.GA2153@logos.cnet>
     [not found]   ` <faba7798050630071347d4ad63@mail.gmail.com>
2005-07-01  9:44     ` mpc8xx and ld.so problem Marcelo Tosatti
2005-07-01 14:55       ` Jason McMullan
2005-07-01 10:17         ` Marcelo Tosatti
2005-07-01 18:56           ` Jason McMullan
2005-07-01 14:42             ` Marcelo Tosatti
2005-07-04  8:22             ` Yuli Barcohen
2005-07-05 19:53               ` Tom Rini
2005-07-06  8:58                 ` Yuli Barcohen
2005-07-08  0:36               ` Marcelo Tosatti
2005-07-10  7:31                 ` Yuli Barcohen
2005-07-13 15:41                   ` Theo Gjaltema
2005-07-13 20:32                     ` Wolfgang Denk
2005-07-13 21:32                       ` Theo Gjaltema
2005-07-13 23:11                         ` Wolfgang Denk
2005-07-14  5:44                     ` Anton Wöllert [this message]
2005-07-14  8:23           ` ptrace on linux 2.6.12 causes oops Anton Wöllert
2005-07-14 13:31             ` Kumar Gala
2005-07-14 11:20               ` Marcelo Tosatti
     [not found]               ` <faba77980507140809ad923db@mail.gmail.com>
2005-07-14 15:11                 ` Anton Wöllert
2005-07-14 20:27             ` aris
2005-07-14 11:19               ` Marcelo Tosatti
2005-07-15  9:42                 ` Anton Wöllert
2005-07-15  5:03                   ` Marcelo Tosatti
2005-07-03 16:01       ` mpc8xx and ld.so problem Anton Wöllert
2005-07-01 18:40 Tjernlund
  -- strict thread matches above, loose matches on Subject: below --
2005-07-14 13:32 Joakim Tjernlund

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=42D5FBBF.8030302@gmail.com \
    --to=a.woellert@gmail.com \
    --cc=gjalt007@chello.nl \
    --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).