From mboxrd@z Thu Jan 1 00:00:00 1970 From: raj shekar Date: Sun, 23 Nov 2008 19:55:58 -0800 (PST) Subject: [U-Boot] program exception trap 700 Message-ID: <831719.70215.qm@web52812.mail.re2.yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de ? 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.. } ? ?