From nobody Thu Apr 25 20:27:40 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=1558715818; cv=none; d=zoho.com; s=zohoarc; b=ISxu/BI/3reYTu/apg/T4d8/yOEsHaGygSVl3HXFVtDkAOxurrEc6crH1P2p2mvJNsxA2dh3Yy9RXW55zB+fJ/zvepoDjFrqoWJo6Jzw4U8O0KjMo9joDCT+vRLCGXXvzYCHwNDJuLBCXR3oRKCm/dyqMW60AHQC5XHJUTNgFDg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558715818; 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=zapyuVcF6ZvomvMy1cbQwqAdWOiX5B3YM7e2jl/j2DI=; b=VS/V6QmTsWBzvklPE8LvsaUvDVb2I/jPJDoUFscYn6wH1vjFOWRrUrhgdxzv3sj9ATZLuAOctfG+QjQtmo/zXM3+KeDLvEROuLd9ndPe7QBxR23iy1r8iYPrr/49Z+ymuHW+tjhR9zSLm332p5BVBBsfxCEHTm/2CO7ZxXY6gJo= 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 1558715818725986.3414432677257; Fri, 24 May 2019 09:36:58 -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 D2B3712E2E81; Fri, 24 May 2019 16:36:53 +0000 (UTC) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by coreboot.org (Postfix) with ESMTP id 7BEEF12E2E81 for ; Fri, 24 May 2019 16:36:46 +0000 (UTC) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4OGY8kc106472; Fri, 24 May 2019 16:36:12 GMT Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2smsk5j8y0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 May 2019 16:36:12 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4OGaBZf180595; Fri, 24 May 2019 16:36:11 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 2smsh304jt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 May 2019 16:36:11 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x4OGa92Z008662; Fri, 24 May 2019 16:36:10 GMT Received: from [10.30.3.6] (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 24 May 2019 16:36:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2018-07-02; bh=MsaOgjdR38LJypvUozJgxAMqOeuFh350H5b1VLwKcj0=; b=uYog2KHCLBqscmmgM9CYxBj32wbSd7gUp3O1Or/h38Sl3IomU+lFPuNlRX/HOxLwV8Xl gz3/zXfYOSDxzfZjtZEzoqm3QaFhljDIpiFj1E3Cfd+L0jnun2ilHUjqTkKDVi7yrRBf ZeVpkkLDpoy4qa9kCyZTKrwetmlLUqE4iW4exFuseEHPgW6dvZ9+h/cxjlWKTLoDLivI j4/A625/EcVPY3GipsitWQKfmC7YJj/bSglk3sTEqIQqiJ0DtzHdI9BiXpLR5yDHvflI 6LKN3fYUbQ2h/0KaVR9fURQr6+5OcZMJZWFLFT7iG6bZVcsozCLOAamLH6Ws1KIb+hgv jg== Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) From: Sam Eiderman In-Reply-To: <20190524045259.5dfqeszvuo22i4df@sirius.home.kraxel.org> Date: Fri, 24 May 2019 19:35:56 +0300 Message-Id: <2AE305F1-747F-400D-B836-A1A5D6919249@oracle.com> References: <20190517205726.34703-1-shmuel.eiderman@oracle.com> <20190517205726.34703-4-shmuel.eiderman@oracle.com> <20190520022828.GD3665@morn.lan> <0080D68E-364D-4B30-BCEA-CE84C5E1EA94@oracle.com> <20190522142359.GA10085@morn.lan> <20190523092922.jyrzca27y4mcmps3@sirius.home.kraxel.org> <85B2C88B-6003-4B9A-B34A-92F4DE06AFAD@oracle.com> <20190524045259.5dfqeszvuo22i4df@sirius.home.kraxel.org> To: Gerd Hoffmann , "Kevin O'Connor" X-Mailer: Apple Mail (2.3445.104.8) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9267 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-1905240109 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9267 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-1905240109 Message-ID-Hash: 6KI4VBEO4CH2ZOIOLN5ICIBNP52NS7BU X-Message-ID-Hash: 6KI4VBEO4CH2ZOIOLN5ICIBNP52NS7BU 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: seabios@seabios.org, Arbel Moshe , Konrad Rzeszutek Wilk X-Mailman-Version: 3.2.2 Precedence: list Subject: [SeaBIOS] Re: [PATCH 3/6] bios_date: Change BiosDate to SMBIOS bios date List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org X-Spamd-Bar: / X-ZohoMail-DKIM: fail (Header signature does not verify) Kevin, Notice that your patch changes SystemBiosDate for legacy smbios users from = 04/01/14 to 01/01/11 - I=E2=80=99m okay with this change. Also notice that the RELEASE_DATE_STR[] in smbios.c has to be volatile or e= lse it is optimized, unlike BIOS_DATE[] which is used in a function call and is not optimized. So the patch should be: diff --git a/src/fw/biostables.c b/src/fw/biostables.c index fe8626ef..718926d7 100644 --- a/src/fw/biostables.c +++ b/src/fw/biostables.c @@ -401,7 +401,7 @@ smbios_new_type_0(void *start, } #define BIOS_NAME "SeaBIOS" -#define BIOS_DATE "04/01/2014" +static const char BIOS_DATE[] =3D "04/01/2014"; static int smbios_romfile_setup(void) diff --git a/src/fw/smbios.c b/src/fw/smbios.c index f3b5ad9d..fc4dcfe2 100644 --- a/src/fw/smbios.c +++ b/src/fw/smbios.c @@ -134,7 +141,7 @@ get_external(int type, char **p, unsigned *nr_structs, end +=3D size; \ p->field =3D ++str_index; \ } else { \ - memcpy(end, def, sizeof(def)); \ + memcpy(end, (void*)def, sizeof(def)); \ end +=3D sizeof(def); \ p->field =3D ++str_index; \ } \ @@ -161,7 +168,7 @@ get_external(int type, char **p, unsigned *nr_structs, } while (0) /* Type 0 -- BIOS Information */ -#define RELEASE_DATE_STR "01/01/2011" +const char volatile RELEASE_DATE_STR[] =3D "01/01/2011"; static void * smbios_init_type_0(void *start) { =E2=80=94 Sam > On 24 May 2019, at 7:52, Gerd Hoffmann wrote: >=20 > Hi, >=20 >> * Letting the user choose the date which will appear in the SystemBiosD= ate registry key >> Under QEMU. >=20 > Ah, *this* is why qemu provides a type0 table. > What is the use case for this? The thing is that SystemBiosDate is different than the value in smbios0.dat= e, at least on a legacy bios. >=20 >> Legacy SMBIOS Bios Date is '01/01/2011=E2=80=99 >=20 > Maybe it's time add a config option to compile out support for legacy > acpi / smbios tables. The qemu versions which need that are a few years > old meanwhile =E2=80=A6 I don=E2=80=99t know who uses legacy smbios at the moment except for qemu m= achines < 2.1 but adding a config option is always nice. Actually I think we used legacy smbios in v2v scenarios from VMware/Phoenix= Bios to QEMU/SeaBIOS (with hwversion < 12). >=20 > cheers, > Gerd >=20 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org