public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] PPC 440GX ECC SDRAM configuration from U-Boot
Date: Fri, 27 May 2005 08:17:28 -0400	[thread overview]
Message-ID: <42970FD8.1040806@smiths-aerospace.com> (raw)
In-Reply-To: <C499405203244F4F8ECC637C6A8F498B013B53F1@sd-exchange>

Chris Love wrote:
> We have U-Boot (& Linux) running on a custom board featuring a PPC
> 440GX.  For now we've been happy enough to get SDRAM configured and
> working (no SPD eeproms), but eventually have to tackle the issue of
> enabling ECC.
> 
> Per the application note from AMCC this will involve writing the entire
> memory array with valid or dummy data (with ECC enabled but not
> checking).  With code executing from flash, the time to iterate through
> all of memory and zero it out is pretty substantial.  The complete setup
> process involves changing other SDRAM configuration registers at various
> steps, implying that SDRAM is getting enabled and disabled (precluding
> doing this on the fly after U-Boot has relocated).
> 
> One thought here is to copy a SDRAM zeroing routine into internal SRAM
> (above the initial stack and global data) and execute from there.
> 
> Has anyone else tried to tackle ECC for the 440GX, and is this a
> reasonable approach to try?  Any other suggestions for someone
> relatively new to the land of PPC assembly code?
> 
> Thanks in advance,
> 
> 	Chris
> --
> Chris Love           // Continuous Computing
> chris.love at ccpu.com // http://www.ccpu.com

I have not used the 440gx, but I presume it implements the dcbz 
instruciton "Data Cache Block Set to Zero".  Loop through the cache 
blocks with this instruction... it has many benefits over a "normal" 
zeroing loop...
* Smaller loop count since you only need one instruction per cache line
     (32(?) bytes) rather than per 4-byte word.
* No memory read operation from SDRAM (a Good Thing when you are
     initializing EDC ;-).
* Burst writes when the cache line is flushed out to SDRAM... another
     major win.

You will be amazed at the speed difference.  You should be able to run 
with instruction caches enabled too, which should help substantially, 
perhaps amazingly.

gvb

  reply	other threads:[~2005-05-27 12:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-27  0:33 [U-Boot-Users] PPC 440GX ECC SDRAM configuration from U-Boot Chris Love
2005-05-27 12:17 ` Jerry Van Baren [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-05-27  9:20 Barbier, Renaud

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=42970FD8.1040806@smiths-aerospace.com \
    --to=gerald.vanbaren@smiths-aerospace.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