Re: ARM, MMU and IO space mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/24/2011 09:09 PM, Robert Jarzmik wrote:
> Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> 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: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux