public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] D-Cache support for ARM?
Date: Sun, 16 Aug 2009 20:53:21 +0200	[thread overview]
Message-ID: <4A8855A1.50602@googlemail.com> (raw)

Hi,

does anybody have some D-Cache enable code for ARM he likes to share?

I'm thinking about some generic code which takes MMU configuration 
from board config and sets up a 16k first level page table (1MB only 
pages). With this, D-Cache can be enabled for the specified memory 
regions and is flushed/disabled again before U-Boot exit.

MMU config entries in board config could look like

CONFIG_ARM_MMU_FIRST_LEVEL_ENTRY( \
<physical/virtual base address>, // 1:1 mapping \
<size in MB>, \
<cacheable/noncachable>, \
<bufferable/nonbufferable> )

E.g.

CONFIG_ARM_MMU_FIRST_LEVEL_ENTRY(0x000, 16, NONCACHEABLE, 
NONBUFFERABLE) // 16MB NOR
CONFIG_ARM_MMU_FIRST_LEVEL_ENTRY(0x100, 128,  CACHEABLE, BUFFERABLE) 
// 128 MB RAM
CONFIG_ARM_MMU_FIRST_LEVEL_ENTRY(0xF00, 1, NONCACHEABLE, 
NONBUFFERABLE) // 1MB register window

Having only a 1:1 mapping (physical/virtual) would be sufficient in a 
first step, as we are only interested in D-Cache support here (using 
the same memory map as currently done without MMU).

Opinions?

Best regards

Dirk

                 reply	other threads:[~2009-08-16 18:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4A8855A1.50602@googlemail.com \
    --to=dirk.behme@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /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