From: Larry Johnson <lrj@arlinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Possible bug in PPC4xx dcache() function
Date: Mon, 15 Oct 2007 12:22:56 -0400 [thread overview]
Message-ID: <471393E0.6050606@arlinx.com> (raw)
Greetings!
If I call the dflush() function in cpu/ppc4xx/start.S on a PPC440EPx as
part of initializing SDRAM, I later get the error
The value of DVLIM special register is incorrect: 0x00000000
from spr_post_test(). I can make the spr_post_test() error message go
away by applying the patch
--- a/cpu/ppc4xx/start.S
+++ b/cpu/ppc4xx/start.S
@@ -1711,6 +1711,7 @@ trap_reloc:
rlwinm r8,r9,0,15,13
rlwinm r8,r8,0,17,15
mtmsr r8
+ mfspr r8,dvlim
addi r3,r0,0x0000
mtspr dvlim,r3
mfspr r3,ivpr
@@ -1725,6 +1726,7 @@ trap_reloc:
..ag: dcbf r0,r3
addi r3,r3,-32
bdnz ..ag
+ mtspr dvlim,r8
sync
mtmsr r9
blr
The routine dflush() zeros DVLIM but does not save and restore the
original value. Is this the intended behavior? The patch I tried seems
safe, although I couldn't easily find the gcc function calling
conventions for PowerPC. (Does anyone have a pointer to these?)
-- Best regards, Larry Johnson <lrj@acm.org>
reply other threads:[~2007-10-15 16:22 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=471393E0.6050606@arlinx.com \
--to=lrj@arlinx.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