switch-coreboot/src/console
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
..
cbmem_console.c CBMEM CONSOLE: Add CBMEM console driver implementation. 2012-03-29 20:14:25 +02:00
console.c Fix console.c with serial support disabled 2013-01-11 20:03:30 +01:00
die.c remove trailing whitespace 2011-11-01 19:07:45 +01:00
Kconfig make early serial console support more generic 2013-01-04 01:36:27 +01:00
logbuf_console.c Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
Makefile.inc make early serial console support more generic 2013-01-04 01:36:27 +01:00
ne2k_console.c Add support for the console over Ethernet (through PCI NE2000). 2010-07-16 20:02:09 +00:00
post.c Conditionally #include mc1468181rtc if CMOS_POST is enabled 2012-11-27 02:03:27 +01:00
printk.c Add support for the tracing infastructure in coreboot. 2011-09-07 01:26:47 +02:00
uart8250_console.c Do full flush on uart8250 only at end of printk. 2011-07-12 11:36:20 +02:00
uart8250mem_console.c Add uartmem_init prototype. 2012-07-24 12:17:21 +02:00
usbdebug_console.c USBDEBUG: buffer up to 8 bytes 2012-07-26 15:52:00 +02:00
vsprintf.c Add support for the tracing infastructure in coreboot. 2011-09-07 01:26:47 +02:00
vtxprintf.c Improve how our printk calls do_div by using constants. 2013-01-31 23:18:16 +01:00