[coreboot-gerrit] Change in coreboot[master]: lib/coreboot_tables: Zero framebuffer structure

Duncan Laurie (Code Review) gerrit at coreboot.org
Mon Jun 26 11:00:28 CEST 2017


Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/20367


Change subject: lib/coreboot_tables: Zero framebuffer structure
......................................................................

lib/coreboot_tables: Zero framebuffer structure

Zero the framebuffer structure so if it is not filled in (either if
it is not present or if there is an error) then it does not present
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 at chromium.org>
---
M src/lib/coreboot_table.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/20367/1

diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index aa6c7a5..52c18d0 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -138,7 +138,7 @@
 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;

-- 
To view, visit https://review.coreboot.org/20367
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8114d88496cd2a4f2e7f07f377fe76f3180a7f40
Gerrit-Change-Number: 20367
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170626/9c6ca3e1/attachment.html>


More information about the coreboot-gerrit mailing list