[U-Boot-Users] Calling show_boot_progress() whenever POST "FAILED" is printed.

Jon Diekema diekema at cideas.com
Sat Feb 14 04:56:24 CET 2004


Product:

- u-boot

Version:

- 1.0.2

CHANGELOG:

- Calling show_boot_progress() whenever POST "FAILED" is printed.

Background:

- We ran into a board that is having memory failure.  On bootup
  it reports:

  ...
  DRAM:  128MB
  Memory error at 0700053c, wrote ffffffff, read ffffffdd !
  POST memory FAILED
  FLASH:  2MB
  Net:   FCC2 ETHERNET
  POST cpu PASSED
  Autobooting...

  Then it attempts to boot, gets a kernel panic, and resets after 180
  seconds.  The problem is the POST memory failure never gets flagged
  anywhere other than the serial output, so unless you watch the
  serial output for it, the only indication is a crash and reset.

CVS Comments:

- Calling show_boot_progress() whenever POST "FAILED" is printed.
-------------- next part --------------
To: wd at denx.de
Cc: u-boot-users at lists.sourceforge.net

Product:

- u-boot

Version:

- 1.0.2

CHANGELOG:

- Calling show_boot_progress() whenever POST "FAILED" is printed.

Background:

- We ran into a board today that is having memory failure.  On bootup
  it reports:

  ...
  DRAM:  128MB
  Memory error at 0700053c, wrote ffffffff, read ffffffdd !
  POST memory FAILED
  FLASH:  2MB
  Net:   FCC2 ETHERNET
  POST cpu PASSED
  Autobooting...

  Then it attempts to boot, gets a kernel panic, and resets after 180
  seconds.  The problem is the POST memory failure never gets flagged
  anywhere other than the serial output, so unless you watch the
  serial output for it, the only indication is a crash and reset.

CVS Comments:

- Calling show_boot_progress() whenever POST "FAILED" is printed.

Patched files:

--- README	8 Feb 2004 22:55:39 -0000	1.72
+++ README	13 Feb 2004 23:08:31 -0000
@@ -1450,6 +1450,10 @@ The following options need to be configu
    14	common/cmd_bootm.c	No initial ramdisk, no multifile, continue.
    15	common/cmd_bootm.c	All preparation done, transferring control to OS
 
+  -30   lib_ppc/board.c	        Fatal error, hang the system
+  -31   post/post.c	        POST test failed, detected by post_output_backlog()
+  -32   post/post.c	        POST test failed, detected by post_run_single()
+
    -1	common/cmd_doc.c	Bad usage of "doc" command
    -1	common/cmd_doc.c	No boot device
    -1	common/cmd_doc.c	Unknown Chip ID on boot device

--- lib_ppc/board.c	6 Feb 2004 23:19:53 -0000	1.31
+++ lib_ppc/board.c	13 Feb 2004 23:08:37 -0000
@@ -1011,6 +1011,9 @@ void board_init_r (gd_t *id, ulong dest_
 void hang (void)
 {
 	puts ("### ERROR ### Please RESET the board ###\n");
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+	show_boot_progress(-30);
+#endif
 	for (;;);
 }
 
--- post/post.c	15 Oct 2003 23:54:00 -0000	1.10
+++ post/post.c	13 Feb 2004 23:08:37 -0000
@@ -131,8 +131,12 @@ void post_output_backlog ( void )
 			post_log ("POST %s ", post_list[j].cmd);
 			if (gd->post_log_word & post_list[j].testid)
 				post_log ("PASSED\n");
-			else
+			else {
 				post_log ("FAILED\n");
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+				show_boot_progress(-31);
+#endif
+			}
 		}
 	}
 }
@@ -239,8 +243,12 @@ static int post_run_single (struct post_
 			if ((*test->test) (flags) == 0)
 				post_log_mark_succ ( test->testid );
 		} else {
-		if ((*test->test) (flags) != 0)
+		if ((*test->test) (flags) != 0) {
 			post_log ("FAILED\n");
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+			show_boot_progress(-32);
+#endif
+		}
 		else
 			post_log ("PASSED\n");
 		}


More information about the U-Boot mailing list