No subject


Tue Jul 29 02:03:00 CEST 2008


=A0
=A0
=3D>diag run cpu =A0
=A0
By log I verfied that this TRAP is generated from the post/cpu.c because of=
 printf
=A0
NIP: 00000000 XER: 00000000 LR: FFF25C40 REGS: 3feed878 TRAP: 0700 DAR: 000=
00004
MSR: 00029200 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 00
=A0
GPR00: 00000004 3FEED968 00000200 3FEEDA18 3FEEDA18 3FEEDA08 FFFFFFF4 00000=
007
GPR08: 00000000 00000000 FFFFFFFF 3FEED918 44028042 00000000 3FFBBC00 00000=
000
GPR16: 00000000 00000000 00000000 00000000 00000000 3FEF0378 00000003 00000=
00C
GPR24: 3FEF0350 00000600 00000002 00000600 3FEEDA18 3FEEDF90 FFF4D3BC 00000=
000
** Illegal Instruction **
Call backtrace:
3FF73310 FFF25DB8 FFF25E38 FFF338A0 3FFA2FAC 3FFA3564 3FF8D620
3FF98820 3FF98E98 3FF99000 3FF8AE44 3FF81DA8 3FF72628
Program Check Exception
NIP=DE
=A0
=A0
=A0
CASE 2 Experiment:
=A0
Post/cpu.c=20
=A0
int cpu_post_test (int flags)
{
=A0=A0=A0=A0=A0=A0=A0 int ic =3D icache_status ();
=A0=A0=A0=A0=A0=A0=A0 int=A0 ret =3D 0;
=A0=A0=A0=A0=A0=A0=A0 int c;
=A0=A0=A0=A0=A0=A0=A0 post_result_cpu =3D 0;
=A0=A0=A0=A0=A0=A0=A0 cpu_dbg =3D 0;
=A0=A0=A0=A0=A0=A0=A0 boot_flag_post =3D 0;
=A0
=A0=A0=A0=A0 < Removed or commented =A0the printf statement =A0>
=A0=A0=A0=A0=A0=A0=A0=A0 return 0;=A0=A0=A0 NO TRAP=A0 is Generated.
=A0
=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0.
}
=A0
=A0
Another approach to validate the post/cpu.c fuction. Is working correctly o=
r not.
=A0
=A0
In file post.c=20
=A0
Declared this API and directly called cpu_post_test(flags) before the funct=
ion pointers. This API executed correctly with out a TRAP and results were =
displayed correctly.=20
extern int cpu_post_test (int flags);
=A0
static int post_run_single (struct post_test *test,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 int test_flags, int flags, unsigned int i) {
=A0
ret =3D=A0 cpu_post_test(flags);
=A0
#if 0
if ((*test->test) (flags) !=3D 0) {=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
=A0 post_log ("FAILED\n")
} else {
post_log ("PASSED\n")
}
#iendif=20
=A0
=A0
Could u please let me know how do I avoid this TRAP when I am using the fun=
ction pointers.. CASE 1 Experiment:
=A0
=A0
=A0
=A0
Regards,
Rajshekar
=A0
=A0
=A0
=A0
=A0=0A=0A=0A      
--0-1028163133-1227441595=:38644--


More information about the U-Boot mailing list