[coreboot-gerrit] Change in coreboot[master]: drv/intel/gma/opregion: fix opregion version

Matt DeVillier (Code Review) gerrit at coreboot.org
Fri Oct 20 06:03:40 CEST 2017


Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/22118


Change subject: drv/intel/gma/opregion: fix opregion version
......................................................................

drv/intel/gma/opregion: fix opregion version

Per Intel spec, the OpRegion struture version field is 32 bits,
broken down into two 16-bit components: version and revision.
The version component occupies the upper half of the field,
so left-shift the value appropriately; the revision value is
zero and so does not need to be set.

Although the Linux i915 driver doesn't care if the version is
shifted correctly or not, under Windows the Intel drivers won't
load unless both the offset and value are correct (at least
when booted in UEFI mode without the use of a VBIOS).

Additionaly, correct the raw / unshifted version value to match
Intel's Tianocore reference code.

TEST: Boot Windows [8.1,10] in UEFI mode w/GOP graphics init,
observe Intel GPU drivers load correctly / have full capability.

Change-Id: Ic2903ee4829689ec4117aec93dce0b87cec6f313
Signed-off-by: Matt DeVillier <matt.devillier at gmail.com>
---
M src/drivers/intel/gma/opregion.c
M src/drivers/intel/gma/opregion.h
2 files changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/22118/1

diff --git a/src/drivers/intel/gma/opregion.c b/src/drivers/intel/gma/opregion.c
index 84bca9b..46031e3 100644
--- a/src/drivers/intel/gma/opregion.c
+++ b/src/drivers/intel/gma/opregion.c
@@ -260,7 +260,7 @@
 
 	/* 8kb */
 	opregion->header.size = sizeof(igd_opregion_t) / 1024;
-	opregion->header.version = IGD_OPREGION_VERSION;
+	opregion->header.version = (IGD_OPREGION_VERSION << 16);
 
 	// FIXME We just assume we're mobile for now
 	opregion->header.mailboxes = MAILBOXES_MOBILE;
diff --git a/src/drivers/intel/gma/opregion.h b/src/drivers/intel/gma/opregion.h
index 3ae68e5..5d299ef 100644
--- a/src/drivers/intel/gma/opregion.h
+++ b/src/drivers/intel/gma/opregion.h
@@ -44,7 +44,7 @@
 } __packed opregion_header_t;
 
 #define IGD_OPREGION_SIGNATURE "IntelGraphicsMem"
-#define IGD_OPREGION_VERSION  2
+#define IGD_OPREGION_VERSION  0x0200
 
 #define IGD_MBOX1	(1 << 0)
 #define IGD_MBOX2	(1 << 1)

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2903ee4829689ec4117aec93dce0b87cec6f313
Gerrit-Change-Number: 22118
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171020/9a681aab/attachment.html>


More information about the coreboot-gerrit mailing list