From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Zhou Rui <vancasperz@yahoo.com.cn>
Cc: Linuxppc-dev <Linuxppc-dev@ozlabs.org>
Subject: Re: [Evolves!] Why does one "stw" fail with address translation disabled in PPC405EP?
Date: Mon, 01 Sep 2008 17:17:43 +1000 [thread overview]
Message-ID: <1220253463.13010.40.camel@pasglop> (raw)
In-Reply-To: <1220253721.6764.9.camel@zr.gii.upv.es>
On Mon, 2008-09-01 at 09:22 +0200, Zhou Rui wrote:
> 在 2008-09-01一的 15:42 +1000,Benjamin Herrenschmidt写道:
> > On Sun, 2008-08-31 at 13:50 +0200, Zhou Rui wrote:
> > > Hi, all:
> > > My problem seems basically solved.
> > > We we used to call vmalloc() in the memory management part of our
> > > source, but it seems to be the key unreliable point resulting in the
> > > problem. vmalloc() always assigns some virtual addresses whose
> > > corresponding physical addresses are out of memory size (there is only
> > > 32MB DRAM in our 405 board). Once instructions try to access these
> > > illegal physical address, machine check happens
> >
> > That should -never- happen.
> >
> > Have you verified, as I asked you a while ago, that you are actually
> > passing the right amount of memory to your kernel from the device-tree
> > or the bootloader ?
> >
> > Ben.
>
> I added "mem=32M" to linux command line of the bootloader, and got the
> same machine check.
Paul spotted today that you are actually trying to use __pa() on
addresses returned from vmalloc, that will not work. Those are virtual
addresses in a non-linear mapping, _pa() only works on the linear
mapping.
Ben.
next prev parent reply other threads:[~2008-09-01 7:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-22 18:27 Why does one "stw" fail with address translation disabled in PPC405EP? Zhou Rui
2008-08-22 18:42 ` Josh Boyer
2008-08-23 8:26 ` Zhou Rui
2008-08-23 22:49 ` Benjamin Herrenschmidt
2008-08-24 18:55 ` Wolfgang Denk
2008-08-25 19:16 ` Zhou Rui
2008-08-28 15:53 ` Zhou Rui
2008-08-31 11:50 ` [Evolves!] " Zhou Rui
2008-09-01 5:42 ` Benjamin Herrenschmidt
2008-09-01 7:22 ` Zhou Rui
2008-09-01 7:17 ` Benjamin Herrenschmidt [this message]
2008-09-01 8:19 ` Zhou Rui
2008-08-23 21:18 ` Zhou Rui
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=1220253463.13010.40.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=Linuxppc-dev@ozlabs.org \
--cc=vancasperz@yahoo.com.cn \
/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).