lib/coreboot_table: Show splashscreen in lb_table_init
Every vga init implementation needs to cache the framebuffer state to be able to fill the lb_framebuffer struct later on in the fill_lb_framebuffer call. Showing the bootsplash afterwards guarantees to have the same interface into all the vga drivers. This is by far from ideal, as it only allows for a single driver at compile-time and should be adapted in the future. It was tested on the wip razer blade stealth using vgabios @ 1280x1024 and also in Qemu @ 1280x1024. By default the qemu framebuffer will be initialized in 800x600@32. This can be overwriten by configuration by setting CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_{X,Y}RES . Change-Id: I4bec06d22423627e8f429c4b47e0dc9920f1464e Signed-off-by: Johanna Schander <coreboot@mimoja.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34599 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
committed by
Nico Huber
parent
bfb0c2d543
commit
c544a85d2a
@ -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,
|
||||
|
Reference in New Issue
Block a user