coreboot-kgpe-d16/src/arch/x86
Gabe Black fb8632ab58 oprom: Ensure that mode information is valid before putting it in the tables.
At least when CONFIG_CHROMEOS is turned on, it's possible for
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE to be set but for there not to be any valid
information to put into the framebuffer coreboot table. That means that what's
put in there is junk, probably all zeroes from the uninitialized global
variable the mode information is stored in (mode_info).

When a payload uses libpayload and turns on the coreboot framebuffer console,
that console will attempt to scroll at some point and decrease the cursor's y
coordinate until it is less than the number of rows claimed by the console.
The number of rows is computed by taking the vertical resolution of the
framebuffer and dividing it by the height of the font. Because the mode
information was all zeroes, the coreboot table info is all zeroes, and that
means that the number of rows the console claims is zero. You can't get the
unsigned y coordinate of the cursor to be less than zero, so libpayload gets
stuck in an infinite loop.

The solution this change implements is to add a new function,
vbe_mode_info_valid, which simply returns whether or not mode_info has anything
in it. If not, the framebuffer coreboot table is not created, and libpayload
doesn't get stuck.

Change-Id: I08f3ec628e4453f0cfe9e15c4d8dfd40327f91c9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-11-12 04:22:34 +01:00
..
acpi After this has been brought up many times before, rename src/arch/i386 to 2010-12-11 20:33:41 +00:00
boot oprom: Ensure that mode information is valid before putting it in the tables. 2012-11-12 04:22:34 +01:00
include Add support for storing POST codes in CMOS 2012-11-08 19:40:40 +01:00
init Add support for storing POST codes in CMOS 2012-11-08 19:40:40 +01:00
lib x86 memcpy: Copy 4 bytes at once 2012-11-08 19:40:26 +01:00
llshell llshell: fix build without romcc 2012-06-14 21:21:06 +02:00
coreboot_ram.ld After this has been brought up many times before, rename src/arch/i386 to 2010-12-11 20:33:41 +00:00
Kconfig hpet: common ACPI generation 2012-10-08 21:23:08 +02:00
Makefile.inc Make coreboot use the offset parameter in cbfstool create 2012-11-09 19:07:34 +01:00