[U-Boot] program exception trap 700

raj shekar rajshekar_py at yahoo.com
Mon Nov 24 04:55:58 CET 2008








  
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.. 
} 
  
  


More information about the U-Boot mailing list