mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: barebox@lists.infradead.org
Subject: Re: ARM, MMU and IO space mapping
Date: Thu, 24 Nov 2011 21:25:09 +0100	[thread overview]
Message-ID: <4ECEA825.1050005@pengutronix.de> (raw)
In-Reply-To: <87d3chxoxp.fsf@free.fr>


[-- Attachment #1.1: Type: text/plain, Size: 2485 bytes --]

On 11/24/2011 09:09 PM, Robert Jarzmik wrote:
> Sascha Hauer <s.hauer@pengutronix.de> writes:
>> I remember Marc had some trouble with the mmu/cache implementation on
>> PXA. I don't know the details though. Maybe you have to dig through
>> the manuals/kernel code to find out the differences between the normal
>> arm v5 and pxa.
> 
> Ah, I know what happens now, and it's tricky.
> First of all, you're right, there's a flat uncached mapping, I was misled by
> the function name "create_section", without looking closely at it. I thought
> it created the first section, not all the 4096 1MBytes section of a 4GB
> address space.
> It would deserve a "create_sections" name, in plural form.
> 
> Now, for the serial UDC not working, there comes the fun.
> What's happening is that I'm using a default environment, with the init
> script in [1]. This script has an error somewhere.
> In barebox_startup(), we have :
>    if (!stat("/env/bin/init", &s)) {
>       run_command("source /env/bin/init", 0);
> 
> And here is the trickery:
>  - in the NOMMU case, the run_command() returns, and the code continues to the
>    eternal loop of run_shell(), which calls console.getc(), which calls
>    poller(), which call the UDC poll method
>    => the gadget does work
>    => I have a console, hurray !
> 
>  - in the MMU case, the run_command() never returns, and the poller method is
>    never called. I traced that with my leds.
>    => the gadget does *not* work
> 
> So the problem was not the IO mapping, but a difference in run_command() between
> MMU and non-MMU config. Moreover, in non-MMU case, once my console is connected,
> I see a message :
>> running /env/bin/init...
>> syntax error
> I the MMU case, as the gadget doesn't work, I'm blind, so I can't really tell
> what is happening and which is the impact of MMU over run_command()...

As I said in my other mail, we had problems with the MMU turned on.
There is one patch fiddeling with the armv5 vs armv4 cache code, but
this is all very fragile. As Sascha pointed out, someone should have a
look at the kernel and figure out what are the differences between armv5
and an pxa270.

cheers, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-11-24 20:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24 11:24 Robert Jarzmik
2011-11-24 12:04 ` Sascha Hauer
2011-11-24 14:23   ` Marc Kleine-Budde
2011-11-24 20:09   ` Robert Jarzmik
2011-11-24 20:25     ` Marc Kleine-Budde [this message]
2011-11-25  0:01     ` Sascha Hauer
2011-11-27 22:30       ` Robert Jarzmik
2011-11-28  7:43         ` Sascha Hauer
2011-11-28 17:43           ` Robert Jarzmik
2011-11-29  8:15             ` Sascha Hauer
2011-11-30 22:06               ` Robert Jarzmik
2011-12-01 14:26                 ` Sascha Hauer
2011-12-01 14:34                   ` Marc Kleine-Budde
2011-12-11 13:01                   ` Robert Jarzmik

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=4ECEA825.1050005@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /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