[coreboot] New patch to review for coreboot: aadcfdb armv7: don't hang on divide by zero

Ronald G. Minnich (rminnich@gmail.com) gerrit at coreboot.org
Wed Jan 30 22:08:30 CET 2013

Ronald G. Minnich (rminnich at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2233


commit aadcfdb86b0ed1f9201ea7dd6c8ebfc13bc3b722
Author: Ronald G. Minnich <rminnich at gmail.com>
Date:   Wed Jan 30 15:05:19 2013 -0600

    armv7: don't hang on divide by zero
    People make mistakes. Hanging the box is not a good reason to kill the firmware,
    esp. since this is probably happening in a printk.
    The only issue with the recursive call too printk is that we may
    deadlock if we have locked something. But we can at least try.
    Hanging is certainly not what we want ...
    Change-Id: Ib3bc87bc395ae89e115cf6d042f4167856422ca1
    Signed-off-by: Ronald G. Minnich <rminnich at gmail.com>
 src/arch/armv7/lib/div0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/arch/armv7/lib/div0.c b/src/arch/armv7/lib/div0.c
index 632c247..f5084d1 100644
--- a/src/arch/armv7/lib/div0.c
+++ b/src/arch/armv7/lib/div0.c
@@ -24,9 +24,8 @@
 void __div0(void); // called from asm so no need for a prototype in a header
 /* Replacement (=dummy) for GNU/Linux division-by zero handler */
+/* recursion is ok here because we have no formats ... */
 void __div0 (void)
-	extern void hang (void);
-	hang();
+	printk(BIOS_ERR, "DIVIDE BY ZERO! continuing ... \n");

More information about the coreboot mailing list