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>
This commit is contained in:
parent
a90bd527d9
commit
01c3de9bb4
|
@ -169,7 +169,7 @@ static void setup_realmode_idt(void)
|
||||||
#if CONFIG_FRAMEBUFFER_SET_VESA_MODE
|
#if CONFIG_FRAMEBUFFER_SET_VESA_MODE
|
||||||
static u8 vbe_get_mode_info(vbe_mode_info_t * mode_info)
|
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);
|
mode_info->video_mode);
|
||||||
char *buffer = (char *)&__buffer;
|
char *buffer = (char *)&__buffer;
|
||||||
u16 buffer_seg = (((unsigned long)buffer) >> 4) & 0xff00;
|
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)
|
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
|
// request linear framebuffer mode
|
||||||
mode_info->video_mode |= (1 << 14);
|
mode_info->video_mode |= (1 << 14);
|
||||||
// request clearing of framebuffer
|
// request clearing of framebuffer
|
||||||
|
@ -203,7 +203,17 @@ void vbe_set_graphics(void)
|
||||||
vbe_get_mode_info(&mode_info);
|
vbe_get_mode_info(&mode_info);
|
||||||
unsigned char *framebuffer =
|
unsigned char *framebuffer =
|
||||||
(unsigned char *)mode_info.vesa.phys_base_ptr;
|
(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);
|
vbe_set_mode(&mode_info);
|
||||||
#if CONFIG_BOOTSPLASH
|
#if CONFIG_BOOTSPLASH
|
||||||
struct jpeg_decdata *decdata;
|
struct jpeg_decdata *decdata;
|
||||||
|
@ -211,6 +221,7 @@ void vbe_set_graphics(void)
|
||||||
unsigned char *jpeg = cbfs_find_file("bootsplash.jpg",
|
unsigned char *jpeg = cbfs_find_file("bootsplash.jpg",
|
||||||
CBFS_TYPE_BOOTSPLASH);
|
CBFS_TYPE_BOOTSPLASH);
|
||||||
if (!jpeg) {
|
if (!jpeg) {
|
||||||
|
printk(BIOS_DEBUG, "VBE: No bootsplash found.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
Loading…
Reference in New Issue