[U-Boot] [PATCH] DEBUG 8xxx cpu_numcores

Ed Swarthout Ed.Swarthout at freescale.com
Tue Dec 15 08:07:21 CET 2009


The following debug patch shows that gd->cpu is not being relocated to
ddr.  Linux may not be able to boot due to "fdt board" crashing if
flash has been erased or changed.

On mpc8572ds:

=> fdt board
fdt board
cpu_numcores gd=3fe6df68 cpu=effed578 n=2
cpu_numcores gd=3fe6df68 cpu=effed578 n=2
cpu_numcores gd=3fe6df68 cpu=effed578 n=2
cpu_numcores gd=3fe6df68 cpu=effed578 n=2

Signed-off-by: Ed Swarthout <Ed.Swarthout at freescale.com>
---
 cpu/mpc8xxx/cpu.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/cpu/mpc8xxx/cpu.c b/cpu/mpc8xxx/cpu.c
index d191263..268c1b4 100644
--- a/cpu/mpc8xxx/cpu.c
+++ b/cpu/mpc8xxx/cpu.c
@@ -22,7 +22,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  * MA 02111-1307 USA
  */
-
+#define DEBUG
 #include <config.h>
 #include <common.h>
 #include <command.h>
@@ -98,6 +98,8 @@ struct cpu_type *identify_cpu(u32 ver)
 int cpu_numcores() {
 	struct cpu_type *cpu;
 	cpu = gd->cpu;
+	debug("cpu_numcores gd=%x cpu=%x n=%x\n",
+	       (int)gd, (int)cpu, cpu->num_cores);
 	return cpu->num_cores;
 }
 
-- 
1.5.6.5



More information about the U-Boot mailing list