日期:2014-05-16  浏览次数:20761 次

uboot加载内核成功,但是运行不起来的问题--
现象:
CPU: MPC885ZPnn at 132.779 MHz [40.0...133.0 MHz]
  8 kB I-Cache 8 kB D-Cache FEC present
DRAM: 64 MB
FLASH: 32 MB
In: serial
Out: serial
Err: serial
Net: FEC ETHERNET
run to main.c : main_loop():284
### main_loop: bootcmd="bootm 0xfc080000 0xfc280000"
Hit any key to stop autoboot: 2  1  0 
run to hush.c : parse_stream_outer():3168
run to cmd_bootm.c : do_bootm():617
run to cmd_bootm.c : bootm_start():203
* kernel: cmdline image address = 0xfc080000
## Booting kernel from Legacy Image at fc080000 ...
  Image Name: Linux-2.6.29
  Image Type: PowerPC Linux Kernel Image (gzip compressed)
  Data Size: 1282669 Bytes = 1.2 MB
  Load Address: 00400000
  Entry Point: 00400460
  Verifying Checksum ... OK
run to cmd_bootm.c : boot_get_kernel():920
  kernel data at 0xfc080040, len = 0x0013926d (1282669)
run to cmd_bootm.c : bootm_start():296
## Loading init Ramdisk from Legacy Image at fc280000 ...
  Image Name: Ram disk 
  Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
  Data Size: 3159720 Bytes = 3 MB
  Load Address: 00000000
  Entry Point: 00000000
  Verifying Checksum ... OK
run to cmd_bootm.c : bootm_load_os():342
##ready to load OS !!
  Uncompressing Kernel Image ... OK
run to cmd_bootm.c : do_bootm():706
run to bootm.c : do_bootm_linux():334
run to bootm.c : boot_body_linux():243
  Loading Ramdisk to 038a9000, end 03bac6a8 ... OK
run to bootm.c : boot_body_linux():259
## Transferring control to Linux (at address 00400460) ...
  Booting using board info...
cmd_start= 7fff00
cmd_end= 7fff03
,initrd_start= 38a9000
,initrd_end= 3bac6a8
kbd= 7ffec0
Machine check in kernel mode.
Caused by (from msr): regs 03bacae8 Unknown values in msr
NIP: 004057EC XER: 80008508 LR: 004057D4 REGS: 03bacae8 TRAP: 0200 DAR: FA200284
MSR: 00001002 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00

GPR00: 004057D4 03BACBD8 03BACF8C FA200000 00000000 FFFFFFFF 00000000 00000000 
GPR08: FA200000 00000000 FA204000 00000000 FA200000 00000000 03FFF000 00000000 
GPR16: 0000001B 00000000 00000000 00000000 00000000 00000000 03FF90F8 00000000 
GPR24: 00400460 007FFF03 007FFF00 007FFEC0 038A9000 00989680 00412B18 03FFC300 
Call backtrace: 
machine check

到此重启。。。。。。。。。。。。。。。。。。。。

搞了好久,郁闷了!!!!!!!!!!

run to main.c : main_loop():284 等 是我加的调试信息。







------解决方案--------------------
用powerpc的难得啊,很郁闷为什么还有那么多公司用很老的mpc8xx

你在main_loop后面加调试信息倒是无妨
应该还是寄存器配置上的细微差别,既然有成功的uboot,那就参照好的uboot修改那个中重要的配置用的.h 文件
------解决方案--------------------
从 Caused by (from msr): regs 03bacae8 Unknown values in msr 来看,
貌似是 03bacae8 这个地址的内容配置错误。 你在uboot 里找找看 。
------解决方案--------------------
"Machine check in kernel mode."
不会是你的内核要检查芯片的ID,而那个寄存器的内容不是内核期待的值