Arthur Heymans (arthur@aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16739
-gerrit
commit f5010fa92f701c24dde10b7b27fa424e04b35f1c Author: Arthur Heymans arthur@aheymans.xyz Date: Sun Sep 25 22:36:26 2016 +0200
intel/gma/vbt.c: pad the ID string with spaces.
The VBT id string is 20 characters long. If the string is shorter than 20 it needs spaces at the end.
Head used to be fully set to 0 (including signature). When an IDstring was shorter the remaining part of the header->signature would still be 0. This patch sets the remaining part to spaces just like the vbios does.
Linux (at least 4.1-4.7) does not seem to care a lot about VBT, because previously it was not generated on i945 and the wrong string was used on gm45 and those still worked properly.
Change-Id: Id6439f1d3dbd09319ee99ce9d15dbc3bcead1f53 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- src/drivers/intel/gma/vbt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/drivers/intel/gma/vbt.c b/src/drivers/intel/gma/vbt.c index e768402..9ec09d3 100644 --- a/src/drivers/intel/gma/vbt.c +++ b/src/drivers/intel/gma/vbt.c @@ -34,7 +34,9 @@ static size_t generate_vbt(const struct i915_gpu_controller_info *conf,
memset (head, 0, sizeof (*head));
- memcpy (head->signature, idstr, 20); + memset(head->signature, ' ', sizeof(head->signature)); + memcpy(head->signature, idstr, MIN(strlen(idstr), + sizeof(head->signature))); head->version = 100; head->header_size = sizeof (*head); head->bdb_offset = sizeof (*head);