coreboot/src
Ronald G. Minnich 79e36d9060 Improve how our printk calls do_div by using constants.
The do_div code has a nice optimization in it when it is called with
constants. The current highly generalized use of it defeats those
optimizations and causes trouble on ARM, resulting in a complex and
buggy code path.

Since we only need to print in bases 8, 10, and 16, do a minor
restructuring of the code so that we call do_div with constants.
If you need base 2, print in base 16 and do it in your head. :-)

This fixes an ongoing problem with ARM, will not harm X86, and will
help PPC should we ever want to support it again.
Plus, I don't have to ever try to understand the div64 assembly and where
it's going wrong :-)

Change-Id: I6a480011916eb0834e05c5bb10909d83330fe797
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/2235
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2013-01-31 23:18:16 +01:00
..
arch armv7: don't hang on divide by zero 2013-01-30 22:36:25 +01:00
console Improve how our printk calls do_div by using constants. 2013-01-31 23:18:16 +01:00
cpu Exynos5250: Get DDR3 working by changing what is compiled and add a function 2013-01-30 21:39:22 +01:00
device Extend CBFS to support arbitrary ROM source media. 2013-01-30 17:58:32 +01:00
drivers Extend CBFS to support arbitrary ROM source media. 2013-01-30 17:58:32 +01:00
ec Add support for ENE932 EC w/ Compal firmware 2012-12-12 06:02:04 +01:00
include Extend CBFS to support arbitrary ROM source media. 2013-01-30 17:58:32 +01:00
lib Extend CBFS to support arbitrary ROM source media. 2013-01-30 17:58:32 +01:00
mainboard armv7: Add SPI driver for Exynos. 2013-01-30 19:51:23 +01:00
northbridge Extend CBFS to support arbitrary ROM source media. 2013-01-30 17:58:32 +01:00
southbridge Hudson: Legacy free question is hudson only 2013-01-22 08:52:24 +01:00
superio Remove assembly coded log2 function 2012-11-28 07:57:17 +01:00
vendorcode F15tn: Fix all warnings, enable warnings as errors 2013-01-22 12:17:07 +01:00
Kconfig Project PIANO aka tianocoreboot 2013-01-30 17:34:40 +01:00