Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16530
-gerrit
commit 59ed695d6058fac2eb82fe778b04abe1a55283ba
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Wed Sep 7 22:10:57 2016 +0200
i945/gma.c: generate fake VBT
This generates a fake VBT for the Intel i945 graphic device.
i945 supports both the mobile chipset 945gm (calistoga)
and the desktop chipset 945gc (lakeport),
which is why a VBT with a different id string
needs to be created for each target.
The VBT id string is obtained from the vbios blob in the following way:
"strings vbios.bin | grep VBT".
Change-Id: I8245b12b16a4426efbe1f584d4163fc257231a98
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/northbridge/intel/i945/gma.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c
index 17e0d70..0f829f1 100644
--- a/src/northbridge/intel/i945/gma.c
+++ b/src/northbridge/intel/i945/gma.c
@@ -623,6 +623,15 @@ static void gma_func0_init(struct device *dev)
iobase, mmiobase, graphics_base);
if (err == 0)
gfx_set_init_done(1);
+ /* Linux relies on VBT for panel info. */
+ if (CONFIG_NORTHBRIDGE_INTEL_SUBTYPE_I945GM) {
+ generate_fake_intel_oprom(&conf->gfx, dev,
+ "$VBT CALISTOGA");
+ }
+ if (CONFIG_NORTHBRIDGE_INTEL_SUBTYPE_I945GC) {
+ generate_fake_intel_oprom(&conf->gfx, dev,
+ "$VBT LAKEPORT-G");
+ }
#endif
}
Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16739
-gerrit
commit eb6a6d636510bc3f728da738288237d415e3d1d2
Author: Arthur Heymans <arthur(a)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.
Change-Id: Id6439f1d3dbd09319ee99ce9d15dbc3bcead1f53
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/drivers/intel/gma/vbt.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/drivers/intel/gma/vbt.c b/src/drivers/intel/gma/vbt.c
index e768402..e470378 100644
--- a/src/drivers/intel/gma/vbt.c
+++ b/src/drivers/intel/gma/vbt.c
@@ -34,7 +34,11 @@ static size_t generate_vbt(const struct i915_gpu_controller_info *conf,
memset (head, 0, sizeof (*head));
- memcpy (head->signature, idstr, 20);
+ /* make sure the 20 char length signature is filled */
+ /* with spaces if the idstr is shorter than 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);