diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2012-08-29 09:28:52 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-11-08 19:38:53 +0100 |
commit | 01c3de9bb45e09edfe715ec2934805b5ea2edd2f (patch) | |
tree | 032f58fd7c9e499342609eccbefa7eae81adbde5 | |
parent | a90bd527d9c450974a7c3a45be026331927823cc (diff) |
Make option rom init more verbose
When bringing up VGA by running the option rom it's sometimes
useful to get more information about the mode that gets set,
or the reason why the mode could not be set or a picture could
not be displayed. Also prefix the output from VBE mode setting
with VBE:
Copying VGA ROM Image from fff0fd78 to 0xc0000, 0x10000 bytes
Real mode stub @00000600: 867 bytes
Calling Option ROM...
int15_handler: INT15 function 5fac!
... Option ROM returned.
VBE: Getting information about VESA mode 4161
VBE: resolution: 1280x1024@16
VBE: framebuffer: d0000000
VBE: Setting VESA mode 4161
VGA Option ROM has been loaded
Change-Id: I2be11f095dc62ed3c99e0d4272ad9d6521608a44
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/1714
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r-- | src/devices/oprom/x86.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/devices/oprom/x86.c b/src/devices/oprom/x86.c index 564017d4e4..cc70d74cf5 100644 --- a/src/devices/oprom/x86.c +++ b/src/devices/oprom/x86.c @@ -169,7 +169,7 @@ static void setup_realmode_idt(void) #if CONFIG_FRAMEBUFFER_SET_VESA_MODE static u8 vbe_get_mode_info(vbe_mode_info_t * mode_info) { - printk(BIOS_DEBUG, "Getting information about VESA mode %04x\n", + printk(BIOS_DEBUG, "VBE: Getting information about VESA mode %04x\n", mode_info->video_mode); char *buffer = (char *)&__buffer; u16 buffer_seg = (((unsigned long)buffer) >> 4) & 0xff00; @@ -182,7 +182,7 @@ static u8 vbe_get_mode_info(vbe_mode_info_t * mode_info) static u8 vbe_set_mode(vbe_mode_info_t * mode_info) { - printk(BIOS_DEBUG, "Setting VESA mode %04x\n", mode_info->video_mode); + printk(BIOS_DEBUG, "VBE: Setting VESA mode %04x\n", mode_info->video_mode); // request linear framebuffer mode mode_info->video_mode |= (1 << 14); // request clearing of framebuffer @@ -203,7 +203,17 @@ void vbe_set_graphics(void) vbe_get_mode_info(&mode_info); unsigned char *framebuffer = (unsigned char *)mode_info.vesa.phys_base_ptr; - printk(BIOS_DEBUG, "framebuffer: %p\n", framebuffer); + printk(BIOS_DEBUG, "VBE: resolution: %dx%d@%d\n", + le16_to_cpu(mode_info.vesa.x_resolution), + le16_to_cpu(mode_info.vesa.y_resolution), + mode_info.vesa.bits_per_pixel); + printk(BIOS_DEBUG, "VBE: framebuffer: %p\n", framebuffer); + if (!framebuffer) { + printk(BIOS_DEBUG, "VBE: Mode does not support linear " + "framebuffer\n"); + return; + } + vbe_set_mode(&mode_info); #if CONFIG_BOOTSPLASH struct jpeg_decdata *decdata; @@ -211,6 +221,7 @@ void vbe_set_graphics(void) unsigned char *jpeg = cbfs_find_file("bootsplash.jpg", CBFS_TYPE_BOOTSPLASH); if (!jpeg) { + printk(BIOS_DEBUG, "VBE: No bootsplash found.\n"); return; } int ret = 0; |