coreboot/lib
Carl-Daniel Hailfinger 10ae1a84d0 This patch tries to make printk more readable and reliable.
Base 16 number printing used digits[33] instead of the more readable 'x'
for the "0x" prefix. That means you have to look up an array just to
find out what the code does. Change it.

We already write "<NULL>" if printk gets a NULL pointer as string
argument. Introduce "<near NULL>" for string arguments with addresses
below 0x400. This error happened in the past when dereferencing a struct
member with a string and the struct had the address NULL.

Check if all to-be-printed characters in the string are indeed
printable. The idea is to catch garbage strings from stray pointers and
print "<non-ASCII characters>" instead.
If a string contains characters outside classic ASCII printable stuff,
this will trigger. An example would be characters with diacritic marks
like äöüéăçőč.
Then again, I don't see localized versions of coreboot on the horizon.
Maybe for payloads, but not for coreboot itself.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1158 f3766cd6-281f-0410-b1cd-43a5c92072e9
2009-03-19 12:53:57 +00:00
..
clog2.c log2 is now log2f (floor) and log2c (ceiling) and users MUST pick one or 2008-08-31 20:28:21 +00:00
compute_ip_checksum.c Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
console.c Not a single file is being rebuilt in v3 if build.h changes. That means 2008-11-16 22:59:52 +00:00
delay.c This now compiles and has a simple error on build to stage2. 2008-08-23 16:51:00 +00:00
elfboot.c This patch converts __FUNCTION__ to __func__, since __func__ is standard. 2009-02-12 21:15:34 +00:00
Kconfig Add log levels to the output. In order to use this enable EXPERT and CONSOLE_LOG_LEVEL. 2008-10-13 20:15:56 +00:00
lar.c Fix a bunch of Doxygen warnings in v3 (trivial). 2008-10-23 18:55:01 +00:00
lzma.c Fix a typo in r684 which caused compilation to fail. Trivial. 2008-05-23 19:59:43 +00:00
lzmadecode.c * This patch renames remainders the arch i386 to x86. 2007-01-04 20:12:02 +00:00
lzmadecode.h Use the same naming convention and placement for "include guards" in 2007-05-21 06:48:47 +00:00
Makefile Not a single file is being rebuilt in v3 if build.h changes. That means 2008-11-16 22:59:52 +00:00
mem.c Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
nrv2b.c - fix build of ulzma 2007-07-12 20:03:02 +00:00
ram.c Various cosmetic fixes, added Doxygen comments (trivial). 2008-03-06 18:26:45 +00:00
ramtest.c Be silent in ram_check in non-debug loglevels 2008-11-20 12:20:35 +00:00
stage2.c last kontron commit. 2009-03-11 16:17:37 +00:00
string.c Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
tables.c the multiboot map is generated too early in 2008-10-17 22:49:43 +00:00
uart8250.c Massive file rename and moving orgy: 2007-05-05 21:36:52 +00:00
vsprintf.c Now version 3: LinuxBIOS -> coreboot rename. 2008-01-27 18:54:57 +00:00
vtxprintf.c This patch tries to make printk more readable and reliable. 2009-03-19 12:53:57 +00:00