From: Martin Hicks <mort@bork.org>
To: linuxppc-embedded@ozlabs.org
Subject: U-boot CPU post failure on 405gp
Date: Thu, 30 Mar 2006 16:11:43 -0500 [thread overview]
Message-ID: <20060330211143.GK27792@bork.org> (raw)
I'm using a PPC405gp based board, and using u-boot to boot Linux. I
recently upgraded toolchains from gcc-3.2 (some timesys build) to a
gcc-3.4.5/glibc-2.3.6 toolchain built with crosstools-0.42
Reading specs from /home/mort/src/targa/powerpc-linux/gcc-3.4.5-glibc-2.3.6/powerpc-405-linux-gnu/bin/../lib/gcc/powerpc-405-linux-gnu/3.4.5/specs
Configured with: /home/mort/src/crosstool-0.42/build/powerpc-405-linux-gnu/gcc-3.4.5-glibc-2.3.6/gcc-3.4.5/configure --target=powerpc-405-linux-gnu --host=i686-host_pc-linux-gnu --prefix=/opt/targa/local/powerpc-linux/gcc-3.4.5-glibc-2.3.6/powerpc-405-linux-gnu --with-cpu=405 --enable-cxx-flags=-mcpu=405 --with-headers=/opt/targa/local/powerpc-linux/gcc-3.4.5-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/include --with-local-prefix=/opt/targa/local/powerpc-linux/gcc-3.4.5-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.5
The problem I'm having is when running the CPU post test on u-boot
1.1.4. Specifically, in the branch tests. While doing the first branch
conditional test the computer incorrectly takes the "if (link)" branch
in u-boot/post/cpu/b.c::cpu_post_test_bc()
--- a/post/cpu/b.c
+++ b/post/cpu/b.c
@@ -84,10 +84,14 @@ static int cpu_post_test_bc (ulong cmd,
}
if (ret == 0)
{
- if (link)
+ printf("link = %d\n", link);
+ if (link)
ret = lr == (ulong) code + 24 ? 0 : -1;
else
ret = lr == 0 ? 0 : -1;
+ if (ret)
+ printf("ret = %d, link = %lx, code = %p, lr = %lx\n",
+ ret, link, code, lr);
}
return ret;
---
Running with this small change, I get:
POST cpu link = 0
ret = -1, link = 0, code = 03fa5ab8, lr = 0
It looks clear to me that link == 0, so the test worked fine.
However, if I take away the "static" from the cpu_post_test_bc()
declaration then everything works fine.
I've posted "objdump -dS" output for post/cpu/b.o with and without
cpu_post_test_bc() declared as static at:
http://www.bork.org/~mort/ppcstatic/
Any hints appreciated. Let me know if any other info is required.
mh
--
Martin Hicks || mort@bork.org || PGP/GnuPG: 0x4C7F2BEE
next reply other threads:[~2006-03-30 21:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-30 21:11 Martin Hicks [this message]
2006-03-31 0:51 ` U-boot CPU post failure on 405gp Martin Hicks
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=20060330211143.GK27792@bork.org \
--to=mort@bork.org \
--cc=linuxppc-embedded@ozlabs.org \
/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 NNTP newsgroup(s).