public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Juergen Wischer <unclejay1@gmail.com>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] MMU question - AT91RM9200
Date: Thu, 30 Jun 2005 17:22:00 -0000	[thread overview]
Message-ID: <20050630172149.GF5563@lunn.ch> (raw)
In-Reply-To: <5c83823050630082753f7df5e@mail.gmail.com>

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

      reply	other threads:[~2005-06-30 17:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30 15:28 Juergen Wischer
2005-06-30 17:22 ` Andrew Lunn [this message]

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=20050630172149.GF5563@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=unclejay1@gmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).