public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] MMU question - AT91RM9200
@ 2005-06-30 15:28 Juergen Wischer
  2005-06-30 17:22 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Wischer @ 2005-06-30 15:28 UTC (permalink / raw)
  To: ecos-discuss

Hello,

I have a problem with the right setup of my mmu table.

For testing I load the Redboot ROMRAM image at 0x20300000, where it is
relocated to 0x20000000. Without mmu everything works fine.

When I enable the mmu after following initialization:
ttb_base = 0x20400000
X_ARM_MMU_SECTION(0x200,  0x200,   4,  ARM_UNCACHEABLE,  
ARM_UNBUFFERABLE,   ARM_ACCESS_PERM_RW_RW);

(macro from the AAED2000 board)

I get the problem that my code hangs at the end of the PLATFORM_SETUP1
macro. So there must be a mistake in the mmu init....

hardware:
AT91RM9200 - ARM920T core
0x20000000 - 0x21FFFFFF (RAM)

I hope there somebody out here who can help me with this problem.

Thanks,
Jürgen

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] MMU question - AT91RM9200
  2005-06-30 15:28 [ECOS] MMU question - AT91RM9200 Juergen Wischer
@ 2005-06-30 17:22 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2005-06-30 17:22 UTC (permalink / raw)
  To: Juergen Wischer; +Cc: ecos-discuss

On Thu, Jun 30, 2005 at 05:27:58PM +0200, Juergen Wischer wrote:
> Hello,
> 
> I have a problem with the right setup of my mmu table.
> 
> For testing I load the Redboot ROMRAM image at 0x20300000, where it is
> relocated to 0x20000000. Without mmu everything works fine.
> 
> When I enable the mmu after following initialization:
> ttb_base = 0x20400000
> X_ARM_MMU_SECTION(0x200,  0x200,   4,  ARM_UNCACHEABLE,  
> ARM_UNBUFFERABLE,   ARM_ACCESS_PERM_RW_RW);
> 
> (macro from the AAED2000 board)
> 
> I get the problem that my code hangs at the end of the PLATFORM_SETUP1
> macro. So there must be a mistake in the mmu init....
> 
> hardware:
> AT91RM9200 - ARM920T core
> 0x20000000 - 0x21FFFFFF (RAM)

What you want is the MMU to map the physical RAM to virtual address
0x0. You need this so that the interrupt vectors, which are at 0x0,
are in RAM not ROM so you can change them.

This also means your RedBoot must be linked so that it runs at address
0x0, not 0x20000000.

Also, the ttb_base looks wrong. It seems to be too high up in
memory. I would expect it to be low down. I know the EBSA285 setup,
which is a StrongARM. That has the reset vectors at 0x0. It then puts
the ttb in the next "page", and then Redboot's code section comes
next. I say "page" but its not strictly a page. The ttb has to start
on some specified boundary, 16Kb or something, which i cannot remember
fstright of the top of my head.

You seem to have the ttb in the middle of memory where it might get
over written by the application.

Also the ARM_UNCACHEABLE ARM_UNBUFFERABLE does not look right. You
want your RAM cachabe and bufferable for performance. I would expect
your FLASH to be UNCACHABLE and UNBUFFERABLE. Maybe you have these
mixed up?

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-30 17:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-30 15:28 [ECOS] MMU question - AT91RM9200 Juergen Wischer
2005-06-30 17:22 ` Andrew Lunn

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 read-only IMAP folder(s) and NNTP newsgroup(s).