Skip to contentSkip to conversation

program exception trap 700

U-Boot raj shekar 1 participant 1 message Nov 24, 2008

lore
Share & tools
lore

raj shekar

author
#0 lore raw

?
I ?am working on ?mpc8548cds board ?
?
Feature : POST DIAGNOSTICS;
?
In ?u-boot :? post/memory.c,cpu.c..etc..
?
Need your suggestion?
?
There is function pointers in post.c which calls the respective function to perform diag test ( example ram , cpu, ether ..etc ) which will be picked from tests.c ( This is the structure which defines all the fileds of the tests) ?
Function pointer defined in post.c
?
static int post_run_single (struct post_test *test,
??????????????????????????????????????????????????????? int test_flags, int flags, unsigned int i) {
?
..
if ((*test->test) (flags) != 0) {???????????? ( This function pointers will call cpu tests from post/cpu.c defined below based tested entered from u-boot promt ?)
? post_log ("FAILED\n")
} else {
post_log ("PASSED\n")
}
?
------------------------------------------------------------------------------------------------------------
CASE 1 Experiment :
Post/cpu.c
?
int cpu_post_test (int flags)
{
??????? int ic = icache_status ();
??????? int? ret = 0;
??????? int c;
??????? post_result_cpu = 0;
??????? cpu_dbg = 0;
??????? boot_flag_post = 0;
?
?????? printf( ? Testing cpu diag \n?);?? ? TRAP IS Generated and box got rebooted.
?
?????? Other part of code exits..
}
?
?