diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2017-06-26 01:50:14 -0700 |
---|---|---|
committer | Duncan Laurie <dlaurie@chromium.org> | 2017-06-27 02:16:03 +0000 |
commit | 13bc5e5c801668001044674e8efee93271863a2e (patch) | |
tree | cfdaec9c4241f29136b4d21bd51853e165662eb9 /src/lib | |
parent | 8bd88341e8c07df7b5640e15fa69acc115436d36 (diff) |
lib/coreboot_tables: Zero framebuffer structure
Zero the framebuffer structure so if it is not filled in (either if
no display is present or if there is an error) then it does not
provide garbage data to the payload.
This was noticed when booting a board without a display attached as
the payload wrote to the framebuffer at a random address.
With this change the payload can properly handle the case where a
display is not attached and not corrupt memory.
Change-Id: I8114d88496cd2a4f2e7f07f377fe76f3180a7f40
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/20367
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/coreboot_table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index aa6c7a51d6..52c18d051e 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -138,7 +138,7 @@ void lb_add_console(uint16_t consoletype, void *data) static void lb_framebuffer(struct lb_header *header) { struct lb_framebuffer *framebuffer; - struct lb_framebuffer fb; + struct lb_framebuffer fb = {0}; if (!IS_ENABLED(CONFIG_LINEAR_FRAMEBUFFER) || fill_lb_framebuffer(&fb)) return; |