[coreboot] New patch to review for coreboot: 0478449 Make option rom init more verbose

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Tue Nov 6 23:52:04 CET 2012


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1714

-gerrit

commit 04784498690bf43a6362365f3f173a86f7341f76
Author: Stefan Reinauer <reinauer at chromium.org>
Date:   Wed Aug 29 09:28:52 2012 -0700

    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 at 16
      VBE: framebuffer: d0000000
      VBE: Setting VESA mode 4161
      VGA Option ROM has been loaded
    
    Change-Id: I2be11f095dc62ed3c99e0d4272ad9d6521608a44
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
 src/devices/oprom/x86.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/devices/oprom/x86.c b/src/devices/oprom/x86.c
index 564017d..cc70d74 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;




More information about the coreboot mailing list