diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/bootsplash.c | 16 | ||||
-rw-r--r-- | src/lib/coreboot_table.c | 9 |
2 files changed, 9 insertions, 16 deletions
diff --git a/src/lib/bootsplash.c b/src/lib/bootsplash.c index ee14b9261e..812a3b7ccc 100644 --- a/src/lib/bootsplash.c +++ b/src/lib/bootsplash.c @@ -21,22 +21,6 @@ #include "jpeg.h" -void set_vesa_bootsplash(void) -{ - const vbe_mode_info_t *mode_info = vbe_mode_info(); - if (mode_info != NULL) { - unsigned int x_resolution = le16_to_cpu(mode_info->vesa.x_resolution); - unsigned int y_resolution = le16_to_cpu(mode_info->vesa.y_resolution); - unsigned int fb_resolution = mode_info->vesa.bits_per_pixel; - unsigned char *framebuffer = - (unsigned char *)le32_to_cpu(mode_info->vesa.phys_base_ptr); - - set_bootsplash(framebuffer, x_resolution, y_resolution, fb_resolution); - } else { - printk(BIOS_ERR, "VBE modeinfo invalid\n"); - } -} - void set_bootsplash(unsigned char *framebuffer, unsigned int x_resolution, unsigned int y_resolution, unsigned int fb_resolution) diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index 95c2ae6e24..66afcf353b 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -31,6 +31,7 @@ #include <cbfs.h> #include <cbmem.h> #include <bootmem.h> +#include <bootsplash.h> #include <spi_flash.h> #include <security/vboot/misc.h> #include <security/vboot/vbnv_layout.h> @@ -144,6 +145,14 @@ static void lb_framebuffer(struct lb_header *header) memcpy(framebuffer, &fb, sizeof(*framebuffer)); framebuffer->tag = LB_TAG_FRAMEBUFFER; framebuffer->size = sizeof(*framebuffer); + + if (CONFIG(BOOTSPLASH)) { + uint8_t *fb_ptr = (uint8_t *)(uintptr_t)framebuffer->physical_address; + unsigned int width = framebuffer->x_resolution; + unsigned int height = framebuffer->y_resolution; + unsigned int depth = framebuffer->bits_per_pixel; + set_bootsplash(fb_ptr, width, height, depth); + } } void lb_add_gpios(struct lb_gpios *gpios, const struct lb_gpio *gpio_table, |