From nobody Mon Sep 16 19:33:33 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1558220906; cv=none; d=zoho.com; s=zohoarc; b=EcInh7+c7IdIjgkGrwrniy0efIyJJycsSYGkLmUa1/Vkdn945cOXFnPrUgC/84TY7BnSEMoD9XVfzlJwKz1eg7gmOc5QxnLUG4yswqqJqhuWFhGm8TVV0t4eTueLiR8yuYpFWrErgfMOzd/xsAfhi6Vm2z4ulwUG7J+qnYAvZg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558220906; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=PcIp9j5YzsqsN9/cjOaedKghhW2oNLs3yef7+FvB9Cc=; b=DF1JgmxJdYq4cagHTNgMDCcUtB85Qx5x8RO4Bdqfsv1+vt8SASuSb/gu6xZ/ctApA/5wwbnrcw6dWO96kssajo5zgdFYRZ/LQN8ldPoOzmQ65X3uWKa5Q6YX/gIDASQTU8tt5y29qbFqwC/5RrKBIaWh0fTjvlcnHxcUaP+dEhQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1558220906638601.5200534556866; Sat, 18 May 2019 16:08:26 -0700 (PDT) Received: from [192.168.203.99] (mailu_mailman-core_1.mailu_default [192.168.203.99]) by coreboot.org (Postfix) with ESMTP id B322612E2E6D; Sat, 18 May 2019 23:08:21 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) by coreboot.org (Postfix) with ESMTP id 0C23212E2E6A for ; Sat, 18 May 2019 23:08:10 +0000 (UTC) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4IG8ffB115765; Sat, 18 May 2019 16:17:03 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 2sj7jd9h6k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 18 May 2019 16:17:02 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4IGFR9k072911; Sat, 18 May 2019 16:17:02 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 2sj839wsta-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 18 May 2019 16:17:02 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x4IGH1wc025617; Sat, 18 May 2019 16:17:01 GMT Received: from nexus.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 18 May 2019 09:17:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=C5eU1fq1MBOEbI8rymkGp5hJZchF5GvHLplUHGwBHiQ=; b=5qLfGTYWC4re3ec6mCfrJQmWSuQGwsou4CBiF/BKs/89Eg5+2yOlajOKbtJBttUg+vy0 Qyy2zonrDVQ3xq7yqQsIDEnX8FVzqcJq2rk+2JLhyPVQfORgtlSHZrCXWUsqmgru1JpI 6spQhZpHkG5i09xGq33qCM7ghoPGaMrkLBy+Ni93huW0w1oB9kBuDEvZw7Nt5N051z0a Qd0wGbHj4UdEaOh/laVQ61ghxPkO0y9eIFaxPKw4+etHYoWcmIGYiUiSjZHlmCRDqQAf 2hFkoXuLun7qlwzhq5pjKo/uAInJ38Kx2kZ51iHhGl6VFNxJ92tD5GAXHf8eW5KZFosC sA== From: Sam Eiderman To: seabios@seabios.org, kraxel@redhat.com, kevin@koconnor.net Date: Sat, 18 May 2019 19:15:41 +0300 Message-Id: <20190518161542.12662-6-shmuel.eiderman@oracle.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20190518161542.12662-1-shmuel.eiderman@oracle.com> References: <20190518161542.12662-1-shmuel.eiderman@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9261 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905180117 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9261 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905180117 Message-ID-Hash: JUCOQNXZ325SGGBNN52GWSB5AAPU5YPD X-Message-ID-Hash: JUCOQNXZ325SGGBNN52GWSB5AAPU5YPD X-MailFrom: shmuel.eiderman@oracle.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: arbel.moshe@oracle.com, konrad.wilk@oracle.com X-Mailman-Version: 3.2.2 Precedence: list Subject: [SeaBIOS] [PATCH v2 5/6] bios_version: Remove misinterpreted version string List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org X-Spamd-Bar: / X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Liran Alon 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 creating the "00:02.0" string dynamically, like in the rest of the file. For reference implementation of nt!CmpGetBiosVersion(), see ReactOS: https://doxygen.reactos.org/d5/dd2/i386_2cmhardwr_8c.html Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman Signed-off-by: Liran Alon --- src/fw/pciinit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index c0634bcb..5b934d10 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -328,7 +328,8 @@ static void intel_igd_setup(struct pci_device *dev, voi= d *arg) pci_config_writel(bdf, 0x5C, cpu_to_le32((u32)addr)); =20 dprintf(1, "Intel IGD BDSM enabled at 0x%08x, size %lldMB, dev " - "00:02.0\n", (u32)addr, bdsm_size >> 20); + "%02x:%02x.%x\n", (u32)addr, bdsm_size >> 20, + 0, 2, 0); } } =20 --=20 2.13.3 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org