From nobody Fri Apr 26 10:39:59 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 ARC-Seal: i=1; a=rsa-sha256; t=1558628983; cv=none; d=zoho.com; s=zohoarc; b=NOXu8aisiARbwYz8mdBBKEAxD/G07cViLaLq1HO2La5nsgyQUDWQ2elgSZYkLi5HLObqOXPGDO4uwxo6RzQv3MCXKvEzy6h1p/T4EUiDVtEKWC/kth9bZfOg0SiZIy9aCtbGvTaFUirVzha8NHcdPmZ1PWi65QNWir0eeuAFREg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558628983; 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=rgm78FziHQBh1mMo8vrU/qtRbDvyotksKnRyWwjM0ZQ=; b=m+lzdbuQ1S8J3vvvrB6gqw2ev7DVVz1y6OldWzaJgU4HqEyISXx8X38MS5jxmPFDHd8hPm+gO7AV2l4SiKcZ18kPOs8E4ySt6+WN3QsczI6rrfVwuXxQWodaYpy/mlGhTkDIzVDzOTHw7NM1M9NtvVq5ySYEPT5faxRs9JAhikI= 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 Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1558628983468294.90257527407914; Thu, 23 May 2019 09:29:43 -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 8358912E2E72; Thu, 23 May 2019 16:29:38 +0000 (UTC) Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by coreboot.org (Postfix) with ESMTP id 02B6E12E2E6A for ; Thu, 23 May 2019 16:29:25 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id o2so3873186qkb.3 for ; Thu, 23 May 2019 09:29:25 -0700 (PDT) Received: from localhost ([64.9.249.128]) by smtp.gmail.com with ESMTPSA id 29sm15486913qty.87.2019.05.23.09.29.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 May 2019 09:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=koconnor.net; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Ir4lYaVk1IX5LWK+CT1DxSZA2KdM2uRDNqxaKxw8+/s=; b=HTQLbRZ9B0zkVAx0YOj3wFAPnWa6FPWiczfL1U0Nj+Qx3pjy4uSA4KtbOtO2ZGMSfx H4IB+vwxB9HtV3yj0G05d/3PiKoH/N2hwdPzBxtDKsaFxUp33T56xUDYdh2n/VeMxYqW gakVqMu9uPtAFv6dgP9b39Z9kyi4bA/lgcNMA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Ir4lYaVk1IX5LWK+CT1DxSZA2KdM2uRDNqxaKxw8+/s=; b=EYz2ZconEax02ZJBbLUvlrQpTv/cRoQXKIMDyjvdxGZCxOgrT9apBPRWzIEWrpGx8n ysc7Y+1dVj2UEibSwYNYA4chuuuKpyPecxRzUiWUhLzxB5avmzXgoyoHMqbC6tSI0J98 TLsMWV+XbB6jhAXSyyRmGCiNJnzDYmTGv9xd5UZhymbF6Vv4oml6Z0xqHKjZ2xUy5IBx rS3INH9j/G9f0YmgnZKHFXdB3wVPh+bo90ZJTujk0MQ0aZ+d7zuElwXlD1WGAGCoFVuf tQqYBf8SbAie3umDbiSVt9BMW2pM/ilQ99VGoYp7+3UQBqf97UxxiHZldrDjm4xXqT1E doPw== X-Gm-Message-State: APjAAAUSZo41Jm70FphXyuQIGs31SCOSQgBreh+UFxGV8oxanFNKtU2p KFPUVOITSVuqTn4fpFEgxB+9uw== X-Google-Smtp-Source: APXvYqySf/G9eo/OZi7vNQgH4J8oLKoJ6YvF+AeGXowoLFvr52Qq/q0SOT6WZvSU3+0xu5IbPnzNyA== X-Received: by 2002:a05:620a:692:: with SMTP id f18mr39920518qkh.175.1558628964421; Thu, 23 May 2019 09:29:24 -0700 (PDT) Date: Thu, 23 May 2019 12:29:23 -0400 From: Kevin O'Connor To: Sam Eiderman Message-ID: <20190523162923.GA24739@morn.lan> 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> <20190523155415.GA23716@morn.lan> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Message-ID-Hash: VKERD4AJFPTEAX5S7NL6ARM5RRRTV7JD X-Message-ID-Hash: VKERD4AJFPTEAX5S7NL6ARM5RRRTV7JD X-MailFrom: kevin@koconnor.net 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: Gerd Hoffmann , 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) On Thu, May 23, 2019 at 06:58:57PM +0300, Sam Eiderman wrote: > > On 23 May 2019, at 18:54, Kevin O'Connor wrote: > > I understand. If we ensured the smbios date is always in the > > f-segment, would that also solve the problem? (That is, using the > > 'char win_bios_date[] VARFSEG' method discussed previously.) >=20 > That would only be half of the solution, since F-SEG contains the followi= ng dates: ['04/01/2014', '01/01/2011', '06/23/99=E2=80=99] > It means that no matter what is found in "char win_bios_date[] VARFSEG=E2= =80=9D, SystemBiosDate will always be a date of =E2=80=9904/01/2014=E2=80= =99 or later. > To really control the output of SystemBiosDate, all dates in SeaBIOS=E2= =80=99s F-SEG should be the desired SystemBiosDate (or older). Under normal circumstances, the 32bit init code is relocated out of the f-segment. Unfortunately, that doesn't work for anonymous strings. One simple trick, though, is to force these problematic strings into named variables (see patch below). -Kevin diff --git a/src/fw/biostables.c b/src/fw/biostables.c index fe8626e..269b858 100644 --- a/src/fw/biostables.c +++ b/src/fw/biostables.c @@ -401,7 +401,7 @@ smbios_new_type_0(void *start, } =20 #define BIOS_NAME "SeaBIOS" -#define BIOS_DATE "04/01/2014" +static const char BIOS_DATE[] =3D "04/01/2014"; =20 static int smbios_romfile_setup(void) diff --git a/src/fw/smbios.c b/src/fw/smbios.c index 62a563b..8e7ee6a 100644 --- a/src/fw/smbios.c +++ b/src/fw/smbios.c @@ -161,7 +161,7 @@ get_external(int type, char **p, unsigned *nr_structs, } while (0) =20 /* Type 0 -- BIOS Information */ -#define RELEASE_DATE_STR "01/01/2011" +static const char RELEASE_DATE_STR[] =3D "01/01/2011"; static void * smbios_init_type_0(void *start) { _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org