Am 17.05.19 um 22:57 schrieb Sam Eiderman:
From: Liran Alon liran.alon@oracle.com
This is a workaround for the Windows kernel wrongly extracting SystemBiosVersion.
Windows kernel extracts various BIOS information at boot-time. The method it use to extract SystemBiosVersion is very hueristic. It is done by nt!CmpGetBiosVersion().
nt!CmpGetBiosVersion() works by scanning all BIOS memory from 0xF0000 to 0xFFFFF in search for a string of the form x.y where x & y are digits. When it finds such a string, it goes a bunch of characters backwards until an unknown character is reached, checks whether the string contains any of "v 0", "v 1", "Rev ", etc... if it does - a match was found. It then continues to find the next matches.
In our case, this lead to a debug-print string "Intel IGD BDSM enabled at 0x%08x, size %lldMB, dev 00:02.0" to be treated as BIOS version (Because of "2.0" at the end, and the "v 0" contained in it).
This can be seen by: * Typing "wmic bios get biosversion" in CMD * Reading "HKLM\HARDWARE\DESCRIPTION\System" "SystemBiosVersion"
Therefore, this commit solves the issue by just modifying "00:02.0" to "00:02:00".
For reference implementation of nt!CmpGetBiosVersion(), see ReactOS: https://doxygen.reactos.org/d5/dd2/i386_2cmhardwr_8c.html
Reviewed-by: Konrad Rzeszutek Wilk konrad.wilk@oracle.com Reviewed-by: Arbel Moshe arbel.moshe@oracle.com Signed-off-by: Sam Eiderman shmuel.eiderman@oracle.com Signed-off-by: Liran Alon liran.alon@oracle.com
src/fw/pciinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index c0634bcb..4ab9b724 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -328,7 +328,7 @@ static void intel_igd_setup(struct pci_device *dev, void *arg) pci_config_writel(bdf, 0x5C, cpu_to_le32((u32)addr));
dprintf(1, "Intel IGD BDSM enabled at 0x%08x, size %lldMB, dev "
"00:02.0\n", (u32)addr, bdsm_size >> 20);
}"00:02:00\n", (u32)addr, bdsm_size >> 20); }
This changed notation for a PCI device looks weird, and AFAICS it is also inconsistent with other places printing PCI device locations. Replacing "dev " with "device " would fix the issue as well, but people grepping for "dev " would have a problem.
Regards, Carl-Daniel