diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2011-10-12 14:30:59 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2011-10-13 20:00:50 +0200 |
commit | c1efb9038402af268a0a25957ac236d047b21f22 (patch) | |
tree | cf03bd6d38a9731d391e84e92e5ebf44dcff3b2b /src/devices/oprom/yabel | |
parent | 216fa4633a583fcc278186e1f927f32332d1e5c5 (diff) |
refactor vesa mode setting code and bootsplash code
- adds possibility to set a vesa mode without showing a bootsplash
- make bootsplash / mode setting code available in real mode.
Change-Id: I0045c9d75757657f4ce531889593102ea1e39ce5
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/256
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marcj303@gmail.com>
Diffstat (limited to 'src/devices/oprom/yabel')
-rw-r--r-- | src/devices/oprom/yabel/compat/functions.c | 2 | ||||
-rw-r--r-- | src/devices/oprom/yabel/device.c | 2 | ||||
-rw-r--r-- | src/devices/oprom/yabel/vbe.c | 9 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/devices/oprom/yabel/compat/functions.c b/src/devices/oprom/yabel/compat/functions.c index db37fbc6f9..542c81f315 100644 --- a/src/devices/oprom/yabel/compat/functions.c +++ b/src/devices/oprom/yabel/compat/functions.c @@ -38,7 +38,7 @@ void run_bios(struct device * dev, unsigned long addr) biosemu(vmem, VMEM_SIZE, dev, addr); -#if CONFIG_BOOTSPLASH +#if CONFIG_FRAMEBUFFER_SET_VESA_MODE vbe_set_graphics(); #endif } diff --git a/src/devices/oprom/yabel/device.c b/src/devices/oprom/yabel/device.c index 82595945a8..b09f50e4ac 100644 --- a/src/devices/oprom/yabel/device.c +++ b/src/devices/oprom/yabel/device.c @@ -364,6 +364,7 @@ biosemu_dev_check_exprom(unsigned long rom_base_addr) pci_ds.device_id = in16le(&pci_ds.device_id); pci_ds.img_length = in16le(&pci_ds.img_length); pci_ds.pci_ds_length = in16le(&pci_ds.pci_ds_length); +#ifdef DO_THIS_TEST_TWICE if (pci_ds.vendor_id != bios_device.pci_vendor_id) { printf ("Image has invalid Vendor ID: %04x, expected: %04x\n", @@ -376,6 +377,7 @@ biosemu_dev_check_exprom(unsigned long rom_base_addr) pci_ds.device_id, bios_device.pci_device_id); break; } +#endif DEBUG_PRINTF("Image Length: %d\n", pci_ds.img_length * 512); DEBUG_PRINTF("Image Code Type: %d\n", pci_ds.code_type); if (pci_ds.code_type == 0) { diff --git a/src/devices/oprom/yabel/vbe.c b/src/devices/oprom/yabel/vbe.c index 27bf5e62b0..b1d6984d77 100644 --- a/src/devices/oprom/yabel/vbe.c +++ b/src/devices/oprom/yabel/vbe.c @@ -13,7 +13,7 @@ #include <string.h> #include <types.h> -#if CONFIG_BOOTSPLASH +#if CONFIG_FRAMEBUFFER_SET_VESA_MODE #include <boot/coreboot_tables.h> #endif @@ -64,7 +64,7 @@ vbe_prepare(void) return 0; // successfull init } -#if CONFIG_BOOTSPLASH +#if CONFIG_FRAMEBUFFER_SET_VESA_MODE // VBE Function 00h static u8 vbe_info(vbe_info_t * info) @@ -704,10 +704,12 @@ void vbe_set_graphics(void) mode_info.video_mode = (1 << 14) | CONFIG_FRAMEBUFFER_VESA_MODE; vbe_get_mode_info(&mode_info); + vbe_set_mode(&mode_info); + +#if CONFIG_BOOTSPLASH unsigned char *framebuffer = (unsigned char *) le32_to_cpu(mode_info.vesa.phys_base_ptr); DEBUG_PRINTF_VBE("FRAMEBUFFER: 0x%p\n", framebuffer); - vbe_set_mode(&mode_info); struct jpeg_decdata *decdata; decdata = malloc(sizeof(*decdata)); @@ -728,6 +730,7 @@ void vbe_set_graphics(void) DEBUG_PRINTF_VBE("Decompressing boot splash screen...\n"); ret = jpeg_decode(jpeg, framebuffer, 1024, 768, 16, decdata); DEBUG_PRINTF_VBE("returns %x\n", ret); +#endif } void fill_lb_framebuffer(struct lb_framebuffer *framebuffer) |