From MAILER-DAEMON Tue Sep 05 17:41:55 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dpLbX-0005eC-Rd for mharc-dmidecode-devel@gnu.org; Tue, 05 Sep 2017 17:41:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpLbS-0005dt-8F for dmidecode-devel@nongnu.org; Tue, 05 Sep 2017 17:41:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpLbK-0005rR-6R for dmidecode-devel@nongnu.org; Tue, 05 Sep 2017 17:41:46 -0400 Received: from mail-yw0-x230.google.com ([2607:f8b0:4002:c05::230]:33366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpLbK-0005qJ-1N for dmidecode-devel@nongnu.org; Tue, 05 Sep 2017 17:41:42 -0400 Received: by mail-yw0-x230.google.com with SMTP id s62so1472422ywg.0 for ; Tue, 05 Sep 2017 14:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=DzAg1tzjDWw/wUZK2xvvnV8NPoWYDG+yl4h4IaKXb20=; b=Oje9DTEJVxXHDM5aP7vWFk0sJiXoIFeXKvVXRmugOKUjXegdiiWohFxqUy4NQs30KW 726WlTB3+72f3YxLHEIC6O74QbWFkIuZwI9FR+AQaPqbGQ3zjV810PkkHjvfP7hUXqoj ZPI+7ColsyqZzhQHsv136eusPB3PU516WlwtnLCk/g9ktB04OINWFcSighO/7NZnxRC+ cP82q98izTBfZEKSoUMFB7GTXyREcqW1LuQb+BHAa4kpiQQeEifbhwcq4mF7ZSDL3c6Z EaM93DCAfRiMOft/giuKFjwKBe5JWcsBUY8byDLDOvC1uwnx6/PE/CAKUJRQaVixvWLD SmJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DzAg1tzjDWw/wUZK2xvvnV8NPoWYDG+yl4h4IaKXb20=; b=o3s05yqSLDuJzGxNVBgCdL6qqihsEMdY5cEuJpK6NfVSEJyGo58Zb3j7Nd0IaK2F1I C7vFshP3Gp1XZp8QN+XU+bXwWG6Z7xBXBHxroZfsTawBbjG+eXo1UTTAvsc6GLSrNczA wPBe5/QALbO9/cFpEPnRVo5ddLRXtYw7CLHVY4W65Ey3BMHLYcZKqQxfxFecte4v3KZU VyZTBoWAZHsyVXZiPQ5Xrb/RK5G+pGqbFW7RBQyUxCHfzWeGVUBMs4HGsyEM+uO1yfRi Z4hxxlBNyk8tZC/qQcxSOrAHDDz4eux8mEOZPAhziKu/luzVjuB0+mBtX9fSc+3YPRax ZODg== X-Gm-Message-State: AHPjjUiets4bxMTl4LZWXvZ44SkW0Ljo7t0kAo56Dlr1OmSx3HKJ83Ex 5QKyyLjdwqy8wzq0ZKp4i/AnYrCiPsa4 X-Google-Smtp-Source: ADKCNb4fS4oFFWwRjB7msPz2TmBxm9o2krWWQHhAjglyDd2+n09bc7Q7aIZtgqcmtl7DnEkLPAgf9A/BbJgMSNefjvY= X-Received: by 10.37.198.16 with SMTP id k16mr397378ybf.301.1504647700024; Tue, 05 Sep 2017 14:41:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.71.70 with HTTP; Tue, 5 Sep 2017 14:41:39 -0700 (PDT) From: Kevin Wilson Date: Wed, 6 Sep 2017 00:41:39 +0300 Message-ID: To: dmidecode-devel@nongnu.org Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::230 Subject: [dmidecode] Fixing "DMI table is broken!" error X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 21:41:54 -0000 Hi, I hope someone can advise me about the following problem: I have an x86_64 machine with Ubuntu 14.04.5 on it. When I run: dmidecode I get the following error: # dmidecode 2.12 SMBIOS 2.5 present. 94 structures occupying 3566 bytes. Table at 0xBF7D9000. Invalid entry length (0). DMI table is broken! Stop I guess this can be due to some faulty hw (like RAM), or maybe something with BIOS. Is there a way I can find which is the hw part/BIOS setting which causes this error message and fix it ? Regards, Kevin From MAILER-DAEMON Wed Sep 06 04:27:23 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dpVgA-0007B0-Sd for mharc-dmidecode-devel@gnu.org; Wed, 06 Sep 2017 04:27:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpVg6-000798-G7 for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 04:27:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpVg5-0002WI-Ef for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 04:27:18 -0400 Received: from mail-io0-x236.google.com ([2607:f8b0:4001:c06::236]:33942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpVg5-0002VN-9Y for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 04:27:17 -0400 Received: by mail-io0-x236.google.com with SMTP id b142so3460825ioe.1 for ; Wed, 06 Sep 2017 01:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=yz69Qfj8vs/8thk1M3G5JD8gJ7WBZR6tmnEOn2V8cCU=; b=cKzFxPaO4dBCnM6EDLdq+PdTzRNK91R/LmH100S5U8nGsSI8D9qF6LiCE+EUzKnbuM e6ZGRrPrNI2YkQd0Y4PQYkdJNb2TrvS1IkXgZ/Q80NoNsUACBKxukgWxx5EFLy1MF0Mg R5baa/JaKPfUdFcBumO5HPNrYfhQw9Muno0TdKPe6/52affVyX6lkJit21trq/a0nn9e 4ywvbwHPakE/9L96VnbaidimS1zwOfnKYrzWa6eNLRTwMIo0J2Sq/Jb0x/w76qZH8MKp 2uAsqn/mKa9R8uk7hERVpWOPC2096xjOfhfYxZlYS4zbQk0heUyqj/jgqNfVt2HuBcdC hlVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=yz69Qfj8vs/8thk1M3G5JD8gJ7WBZR6tmnEOn2V8cCU=; b=TXljY7MAyTlb0qZeX+TsaPVVGVBlW9nFvxoJAHvdwWH/gNPvcwCMel5F5bWwm11pzW sho54kM9gKc+bBhIc1Quyt74x4j0n6wOVKzbtpDTDqXB0Fvl/FZJpTJLDubAQpg1zY9M WBJ2GoN/nOSZW7vsrflGflFCsDJQDc3ybW+bEegdQ2WtZY4pZf6iPSF3BgMSIkmjjPRU Vyn7VAxkdHGOuKOmN3VBmppBNtneDVK3K/E9GtyM/XjajnK/9+CI6Z93A3slDDnHeCIV q7Kpp3N7u54gPy8YEGkZfmO5jA/Pt/QR4cz7NiKqpYBe5nlz9cu0Q02ShYOatMbQvzXf jZig== X-Gm-Message-State: AHPjjUgZqZD6a7zQCGm4IOwLOUKiIfa2tOnXYMsmAeBTnJhXXGJHLXlo PvAk4x3pHvzR669731IBIQ0lxFPr/w== X-Google-Smtp-Source: AOwi7QBJnq5i8uArpT9nUsp2QtH6iGq1x/xJ960HuULOGOZOJ0WTIT3hDvRBe+cWo+mDTW3lEdt2VNBxU3fJiHCoaFY= X-Received: by 10.107.130.26 with SMTP id e26mr2050289iod.119.1504686434760; Wed, 06 Sep 2017 01:27:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.153.76 with HTTP; Wed, 6 Sep 2017 01:27:13 -0700 (PDT) Received: by 10.79.153.76 with HTTP; Wed, 6 Sep 2017 01:27:13 -0700 (PDT) In-Reply-To: References: From: Erwan Velu Date: Wed, 6 Sep 2017 10:27:13 +0200 Message-ID: To: dmidecode-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::236 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [dmidecode] Fixing "DMI table is broken!" error X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 08:27:20 -0000 Can you make a try with the latest version please ? Le 5 sept. 2017 11:41 PM, "Kevin Wilson" a =C3=A9crit : > Hi, > I hope someone can advise me about the following problem: > > I have an x86_64 machine with Ubuntu 14.04.5 on it. > When I run: > dmidecode > I get the following error: > > # dmidecode 2.12 > SMBIOS 2.5 present. > 94 structures occupying 3566 bytes. > Table at 0xBF7D9000. > > Invalid entry length (0). DMI table is broken! Stop > > > I guess this can be due to some faulty hw (like RAM), or maybe > something with BIOS. > > Is there a way I can find which is the hw part/BIOS setting which > causes this error message > and fix it ? > > Regards, > Kevin > > _______________________________________________ > https://lists.nongnu.org/mailman/listinfo/dmidecode-devel > From MAILER-DAEMON Wed Sep 06 08:29:58 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dpZSw-0004Mz-07 for mharc-dmidecode-devel@gnu.org; Wed, 06 Sep 2017 08:29:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpZSp-0004Me-MA for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 08:29:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpZSm-0003Cn-IE for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 08:29:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:58515 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dpZSm-0003CJ-7u for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 08:29:48 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1FA83AAD0; Wed, 6 Sep 2017 12:29:46 +0000 (UTC) Date: Wed, 6 Sep 2017 14:29:44 +0200 From: Jean Delvare To: Jerry Hoemann Cc: dmidecode-devel@nongnu.org, rwright@hpe.com Message-ID: <20170906142944.36d40ca3@endymion> In-Reply-To: <20170825235443.28768-1-jerry.hoemann@hpe.com> References: <20170825235443.28768-1-jerry.hoemann@hpe.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: Re: [dmidecode] [PATCH] dmioem: Reflect HPE's new company name. X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 12:29:56 -0000 Hi Jerry, Sorry for the delay, I was on vacation. Thanks Erwan for the preliminary review - overall I agree, the patch looks essentially good. To the details now... On Fri, 25 Aug 2017 17:54:43 -0600, Jerry Hoemann wrote: > After Hewlett Packard Enterprise split from Hewlett-Packard, DMI OEM > tables reflect the new company name. Gen10 and subsequent systems will > use HPE. Gen9 and prior systems continue to use the old "HP" name. > > Signed-off-by: Jerry Hoemann > Reviewed-by: Randy Wright > --- > dmioem.c | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/dmioem.c b/dmioem.c > index 034ad9f..a09b6e5 100644 > --- a/dmioem.c > +++ b/dmioem.c > @@ -35,6 +35,7 @@ enum DMI_VENDORS > VENDOR_UNKNOWN, > VENDOR_HP, > VENDOR_ACER, > + VENDOR_HPE, > }; > > static enum DMI_VENDORS dmi_vendor = VENDOR_UNKNOWN; > @@ -58,6 +59,8 @@ void dmi_set_vendor(const char *s) > > if (strncmp(s, "HP", len) == 0 || strncmp(s, "Hewlett-Packard", len) == 0) > dmi_vendor = VENDOR_HP; > + else if (strncmp(s, "HPE",len) == 0 || strncmp(s, "Hewlett Packard Enterprise", len) == 0) Coding style: missing space after comma. > + dmi_vendor = VENDOR_HPE; > else if (strncmp(s, "Acer", len) == 0) > dmi_vendor = VENDOR_ACER; > } > @@ -98,14 +101,15 @@ static int dmi_decode_hp(const struct dmi_header *h) > u8 *data = h->data; > int nic, ptr; > u32 feat; > + const char *company = (dmi_vendor == VENDOR_HP) ? "HP": "HPE"; Coding style: missing space before colon. > > switch (h->type) > { > case 204: > /* > - * Vendor Specific: HP ProLiant System/Rack Locator > + * Vendor Specific: HPE ProLiant System/Rack Locator > */ > - printf("HP ProLiant System/Rack Locator\n"); > + printf("%s ProLiant System/Rack Locator\n", company); > if (h->length < 0x0B) break; > printf("\tRack Name: %s\n", dmi_string(h, data[0x04])); > printf("\tEnclosure Name: %s\n", dmi_string(h, data[0x05])); > @@ -155,7 +159,7 @@ static int dmi_decode_hp(const struct dmi_header *h) > Did you leave cases 209 and 221 out on purpose? > case 233: > /* > - * Vendor Specific: HP ProLiant NIC MAC Information > + * Vendor Specific: HPE ProLiant NIC MAC Information > * > * This prints the BIOS NIC number, > * PCI bus/device/function, and MAC address > @@ -171,7 +175,7 @@ static int dmi_decode_hp(const struct dmi_header *h) > * 0x08 | MAC | 32B | MAC addr padded w/ 0s > * 0x28 | Port No| BYTE | Each NIC maps to a Port > */ > - printf("HP BIOS PXE NIC PCI and MAC Information\n"); > + printf("%s BIOS PXE NIC PCI and MAC Information\n", company); > if (h->length < 0x0E) break; > /* If the record isn't long enough, we don't have an ID > * use 0xFF to use the internal counter. > @@ -187,7 +191,7 @@ static int dmi_decode_hp(const struct dmi_header *h) > * > * Source: hpwdt kernel driver > */ > - printf("HP 64-bit CRU Information\n"); > + printf("%s 64-bit CRU Information\n", company); > if (h->length < 0x18) break; > printf("\tSignature: 0x%08x", DWORD(data + 0x04)); > if (is_printable(data + 0x04, 4)) > @@ -212,7 +216,7 @@ static int dmi_decode_hp(const struct dmi_header *h) > * > * Source: hpwdt kernel driver > */ > - printf("HP ProLiant Information\n"); > + printf("%s ProLiant Information\n", company); > if (h->length < 0x08) break; > printf("\tPower Features: 0x%08x\n", DWORD(data + 0x04)); > if (h->length < 0x0C) break; > @@ -281,6 +285,7 @@ int dmi_decode_oem(const struct dmi_header *h) > switch (dmi_vendor) > { > case VENDOR_HP: > + case VENDOR_HPE: > return dmi_decode_hp(h); > case VENDOR_ACER: > return dmi_decode_acer(h); For the first 2, you updated "HP" to "HPE" in the heading comment. For the last 2 you did not. Is it on purpose, or an overlook? (I don't really care if we update these comments or not, but I like consistency.) -- Jean Delvare SUSE L3 Support From MAILER-DAEMON Wed Sep 06 12:07:33 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dpcrV-0001AB-Jm for mharc-dmidecode-devel@gnu.org; Wed, 06 Sep 2017 12:07:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpcrO-00015g-Ed for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 12:07:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpcrJ-00044u-M8 for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 12:07:26 -0400 Received: from mail-yw0-x232.google.com ([2607:f8b0:4002:c05::232]:33187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpcrJ-00044X-Fv for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 12:07:21 -0400 Received: by mail-yw0-x232.google.com with SMTP id s62so7698466ywg.0 for ; Wed, 06 Sep 2017 09:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=Tp5w59vtw65DUisDtOjYYsGtvjZUGmXAYB++ZmZmoX4=; b=FK/yJegnVjXshHoRENWzKpSHB6VCzXi3BBO/cyTRXBATZQgrRsP7A+++an4bXlSsE7 cxRZmpRXxM6p3r1aiSAwOnUhaaclZhXhugc8iOSDzjeVqwWeZcbqjIn9swg412+vQY9z Q/9Xpv0YZRZo9Dqq8jVZOV6lhbL8kbab+dpyr3lBV15CzqJHbiMN3R93+slfdLBIQS8H hF2jdOnT2d2agIONT/hpH3G0iRTOY7zT5rTYwU3FsenNYfE4odQLNZ8hpnmm9Guw87V9 gxPGCPAH2f6hwUO+wPYy56gdUskbHvr3h+Qp12GutHD0CIcaBkd0HpVVChsoyvyfVRyy kiEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=Tp5w59vtw65DUisDtOjYYsGtvjZUGmXAYB++ZmZmoX4=; b=n6YyCcLJf/zLZO0BXpGDSyi8/t8srsrvQr5Tas5YnnJU6O8qiVL5qpmVYndG6W+1C0 vUz3CUwZYW3EX3ce4MqsXxrZFIYD5S280DdukfHZpT6SxdI7UZ7fk4KVpNh+ETUjzt5u bXXy116TdTXPqvyhW4v66UkkQnl4QSnEsAY6DLhJCJXWxAwjqvx+61Jj9piMZD3tkSe7 KH2Cmc5B4uA8jCvzBSblg+TI3WX/bO09WvODJa8rGOJSqWlITqHM4/3G3cvPlOOKUb6c K/2X4Vo4IjCcGYzyq+oIWAuXqteZ5JOmJNoCMBXrppEPPH49Qj5RxfvvW/HXXdI7Nqy5 pnWg== X-Gm-Message-State: AHPjjUjxwQZwoDFemYc6u2xkchzLUgCk0vfYN4KMhfKQWmDkhzEaxGk0 kykAySCOp3qfZNfhxlIvOxeB8OPdI9Sd X-Google-Smtp-Source: ADKCNb6s5B5cFpgn2JPE+yyulNABtvqDZfOvRMsSliIgh0kO2BkJYRl0bFQhTGK50S9a2jaLmhktS3pHmxQ1rhiuO2Q= X-Received: by 10.129.97.70 with SMTP id v67mr2427402ywb.402.1504714040584; Wed, 06 Sep 2017 09:07:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.71.70 with HTTP; Wed, 6 Sep 2017 09:07:20 -0700 (PDT) In-Reply-To: References: From: Kevin Wilson Date: Wed, 6 Sep 2017 19:07:20 +0300 Message-ID: To: dmidecode-devel@nongnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::232 Subject: Re: [dmidecode] Fixing "DMI table is broken!" error X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 16:07:32 -0000 Hi, Erwan, Thanks. I ran this sequence now: git clone https://git.savannah.nongnu.org/git/dmidecode.git make and ./dmidecode And got the same: # dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 2.5 present. 94 structures occupying 3566 bytes. Table at 0xBF7D9000. Invalid entry length (0). DMI table is broken! Stop Any ideas ? Regards, Kevin On Wed, Sep 6, 2017 at 11:27 AM, Erwan Velu wrote: > Can you make a try with the latest version please ? > > Le 5 sept. 2017 11:41 PM, "Kevin Wilson" a =C3=A9crit= : > >> Hi, >> I hope someone can advise me about the following problem: >> >> I have an x86_64 machine with Ubuntu 14.04.5 on it. >> When I run: >> dmidecode >> I get the following error: >> >> # dmidecode 2.12 >> SMBIOS 2.5 present. >> 94 structures occupying 3566 bytes. >> Table at 0xBF7D9000. >> >> Invalid entry length (0). DMI table is broken! Stop >> >> >> I guess this can be due to some faulty hw (like RAM), or maybe >> something with BIOS. >> >> Is there a way I can find which is the hw part/BIOS setting which >> causes this error message >> and fix it ? >> >> Regards, >> Kevin >> >> _______________________________________________ >> https://lists.nongnu.org/mailman/listinfo/dmidecode-devel >> > _______________________________________________ > https://lists.nongnu.org/mailman/listinfo/dmidecode-devel From MAILER-DAEMON Wed Sep 06 12:54:15 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dpdag-0007LE-Uf for mharc-dmidecode-devel@gnu.org; Wed, 06 Sep 2017 12:54:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpdaf-0007L2-2V for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 12:54:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpdae-0000Is-2S for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 12:54:13 -0400 Received: from mail-yw0-x22d.google.com ([2607:f8b0:4002:c05::22d]:34792) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpdad-0000Hy-Sw for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 12:54:11 -0400 Received: by mail-yw0-x22d.google.com with SMTP id r85so8310233ywg.1 for ; Wed, 06 Sep 2017 09:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=B/FPf6NP3NDoKo6EmRTW+Xt+WCqJdVg4UZ15KluAdaU=; b=okpEQch8AbIZwmNeZB0305ttUH/blRGdChqRtzQfJTsZbu75RnDwTckxs9gJ/Z5Igr tDQkd7hTGzlY1CvB6G39EiV4PAgANOWCOvO80W7gBMSCkUa+8UN69ExIB24St0BEkZTl OY3bvERfE2j++XJLrq166qR9xglW/x0MhTW9AQZmtykXklEryS2QKIe/1APRc/jA3/Jx Fcs4JfiUb22n7Vx1BjFH/cmTaqLAZ2idQFZ276dIHYtSJfQA9c/kvBOI/lH4+cBCG9tT Cs6qN6eyNiME8uJfyatj7Pj2Ws8MC3wBWzPH1dFG0Q7neLjHs4hyNOohIyd5AHUubKx8 AZIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=B/FPf6NP3NDoKo6EmRTW+Xt+WCqJdVg4UZ15KluAdaU=; b=hi4knJroWoiZtaIUh2Ry2Ltjc1832TgtpuWGauQi7rgxecV2CZHev3kiIt1snRoamc d0BPqE87ba7dN1VWTokB7s/c10oRHQRJPWAUfPYi/Ps97X7/sxbkjyiQVAL+QyAEg8Ls gL5kzo6HsO/jA7h8ConsUc9A5ci9sWiwJfUXXUxaxsjK/ScQpUeGm+wP5fdChFvWrLMR kmlfk0ZMkqMQYwMDdSr5yOCeSrOWu6yOPimlBYEyz80q70ckhVhjLLbcNbIwgri4lxe5 71Fi0e7PXXTU9kBwnJg/fTTXXFTI1uqhJ76fmSRPMp7mvIcxIvNv/J4n6UIMCC9B394b cDQA== X-Gm-Message-State: AHPjjUgmjXRBnkrlWw2IFC2Z1GhlpNyb9w1/nBfZG/voT1oOU7K4cUhJ z2z+ZWTSwwFQihBef9oDOMbvuQOSrBb5 X-Google-Smtp-Source: ADKCNb5LtY/WG5P4R4Sl9GGNZY7mRbTTZ884ZG489uGLyiVWjdq56/0880OnQAdr0VhdkVxME6bGiICtALi6/npid+A= X-Received: by 10.13.213.65 with SMTP id x62mr2769282ywd.170.1504716850869; Wed, 06 Sep 2017 09:54:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.71.70 with HTTP; Wed, 6 Sep 2017 09:54:10 -0700 (PDT) In-Reply-To: References: From: Kevin Wilson Date: Wed, 6 Sep 2017 19:54:10 +0300 Message-ID: To: dmidecode-devel@nongnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::22d Subject: Re: [dmidecode] Fixing "DMI table is broken!" error X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 16:54:14 -0000 Hi, I need to add, maybe this gives some hint: I also have these results: dmidecode --dump-bin foo.dump # dmidecode 2.12 SMBIOS 2.5 present. # Writing 3566 bytes to foo.dump. # Writing 31 bytes to foo.dump. $dmidecode --from-dump foo.dump # dmidecode 2.12 Reading SMBIOS/DMI data from file foo.dump. SMBIOS 2.5 present. 94 structures occupying 3566 bytes. Invalid entry length (0). DMI table is broken! Stop. Kevin On Wed, Sep 6, 2017 at 7:07 PM, Kevin Wilson wrote: > Hi, Erwan, > Thanks. > I ran this sequence now: > git clone https://git.savannah.nongnu.org/git/dmidecode.git > make > and > ./dmidecode > > And got the same: > > # dmidecode 3.1 > Getting SMBIOS data from sysfs. > SMBIOS 2.5 present. > 94 structures occupying 3566 bytes. > Table at 0xBF7D9000. > > Invalid entry length (0). DMI table is broken! Stop > > Any ideas ? > > Regards, > Kevin > > > On Wed, Sep 6, 2017 at 11:27 AM, Erwan Velu wrot= e: >> Can you make a try with the latest version please ? >> >> Le 5 sept. 2017 11:41 PM, "Kevin Wilson" a =C3=A9cri= t : >> >>> Hi, >>> I hope someone can advise me about the following problem: >>> >>> I have an x86_64 machine with Ubuntu 14.04.5 on it. >>> When I run: >>> dmidecode >>> I get the following error: >>> >>> # dmidecode 2.12 >>> SMBIOS 2.5 present. >>> 94 structures occupying 3566 bytes. >>> Table at 0xBF7D9000. >>> >>> Invalid entry length (0). DMI table is broken! Stop >>> >>> >>> I guess this can be due to some faulty hw (like RAM), or maybe >>> something with BIOS. >>> >>> Is there a way I can find which is the hw part/BIOS setting which >>> causes this error message >>> and fix it ? >>> >>> Regards, >>> Kevin >>> >>> _______________________________________________ >>> https://lists.nongnu.org/mailman/listinfo/dmidecode-devel >>> >> _______________________________________________ >> https://lists.nongnu.org/mailman/listinfo/dmidecode-devel From MAILER-DAEMON Wed Sep 06 16:29:26 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dpgww-0002Wp-65 for mharc-dmidecode-devel@gnu.org; Wed, 06 Sep 2017 16:29:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpgwq-0002WX-B9 for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 16:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpgwl-0000hd-PW for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 16:29:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:52888 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dpgwl-0000hP-IT for dmidecode-devel@nongnu.org; Wed, 06 Sep 2017 16:29:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 45771AEC2; Wed, 6 Sep 2017 20:29:14 +0000 (UTC) Date: Wed, 6 Sep 2017 22:29:12 +0200 From: Jean Delvare To: Kevin Wilson Cc: dmidecode-devel@nongnu.org Message-ID: <20170906222912.47cbab65@endymion> In-Reply-To: References: Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: Re: [dmidecode] Fixing "DMI table is broken!" error X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 20:29:25 -0000 Hi Kevin, On Wed, 6 Sep 2017 19:54:10 +0300, Kevin Wilson wrote: > I need to add, maybe this gives some hint: > > I also have these results: > > dmidecode --dump-bin foo.dump > # dmidecode 2.12 > SMBIOS 2.5 present. > # Writing 3566 bytes to foo.dump. > # Writing 31 bytes to foo.dump. > > $dmidecode --from-dump foo.dump > # dmidecode 2.12 > Reading SMBIOS/DMI data from file foo.dump. > SMBIOS 2.5 present. > 94 structures occupying 3566 bytes. > > Invalid entry length (0). DMI table is broken! Stop. Can you send the file to me in private? Also, what does: $ zgrep STRICT_DEVMEM /proc/config.gz return? -- Jean Delvare SUSE L3 Support From MAILER-DAEMON Thu Sep 07 01:54:59 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dppmE-0004LL-Vn for mharc-dmidecode-devel@gnu.org; Thu, 07 Sep 2017 01:54:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dppm9-0004L3-OR for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 01:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dppm8-00027k-SV for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 01:54:53 -0400 Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]:36515) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dppm8-000277-Mi for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 01:54:52 -0400 Received: by mail-yw0-x233.google.com with SMTP id w204so27528512ywg.3 for ; Wed, 06 Sep 2017 22:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=06wfFCmF0qOXMAmimbwRNxk6tyguk4zYV+YgkcVb5EA=; b=kogzUve1m51xWCToIahriHCYRWmzzxY8zxFH/YhaXuV+RrYrZquc0bbrDh7DsOSCrU 3pT47chiUAU3BuJlAKi4Y7vKiir2mCDhEA2+HvMhsrD2VIqK32Xmt+iHb0Auko4b4Okk tFJbPpGnAc3tE/j8VO+LnPDnkPkpIGEgx/x2TADDrqkJjPQEDDClcCxan+XtKditISDi JS04IJnU/NrMnm0ANybh2WOc5JYlYCNNqXbQi+obqypXiZz6VSgrSiWu0Lh6Ksp9KP1w /luqrMGfkyMywVWkWjo/nKaglCIF0Y/N2jFMJcNzPFyPEYS9oepi4RNsOq1SInHuCZZt z0yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=06wfFCmF0qOXMAmimbwRNxk6tyguk4zYV+YgkcVb5EA=; b=XtLd09m2q/G0Q5hbFlnsRMhFOf0ujto+RuGXnWYITf/HiFvBYHUexvX4MXUxFvxH3p hi36ozEIrealNrj00gWwSH3qMcjWGbP336FY5qXHyfUWom6vSBa2T0NMQFGwmtqGjhn4 QQsj+sGY4tSHIF3SSvwLdbjwndS/pOl7GLVoDjFA6/AQAqmAtmOUqK9pzTXFToRHSWbg YlxESbkwsy7WkP3mlslWHCjojFUEmEGTuBdwF40vjvuGqBUo926KlGxouSUDfGNx+oji yhOxZqOF8Innhyi+8CPHlQtVmFUEieR/6Qbp0bqmwIUGcESYEbZl+b9Aw47l9yl+lgWm VcUg== X-Gm-Message-State: AHPjjUgQmYOVACI8lL/Dp2pinU97ZMZRab8J/y+9EYJk7HHeZzJG1Iv0 tAmlU3LgiEhgVS4k4MxczOOm62bXQQ== X-Google-Smtp-Source: ADKCNb7hjqnpIAAqLpvDmiy+zxt4rpBueBiTr38pi9Vhs7rHCHJs446lXGiYqjNJypBPWyhuVTQ995vVo3niLXybbLU= X-Received: by 10.129.97.70 with SMTP id v67mr1229742ywb.402.1504763689717; Wed, 06 Sep 2017 22:54:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.71.70 with HTTP; Wed, 6 Sep 2017 22:54:49 -0700 (PDT) In-Reply-To: <20170906222912.47cbab65@endymion> References: <20170906222912.47cbab65@endymion> From: Kevin Wilson Date: Thu, 7 Sep 2017 08:54:49 +0300 Message-ID: To: Jean Delvare Cc: dmidecode-devel@nongnu.org Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::233 Subject: Re: [dmidecode] Fixing "DMI table is broken!" error X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 05:54:58 -0000 Hi, First: zgrep STRICT_DEVMEM /proc/config.gz gzip: /proc/config.gz: No such file or directory And also: ls -al /proc/config.gz ls: cannot access /proc/config.gz: No such file or director But: cat /boot/config-4.4.0-31-generic | grep STRICT_DEVMEM CONFIG_STRICT_DEVMEM=y And the kernel I use is the one who came with Ubuntu, 14.04.5 LTS , without any changes. Regards, Kevin On Wed, Sep 6, 2017 at 11:29 PM, Jean Delvare wrote: > Hi Kevin, > > On Wed, 6 Sep 2017 19:54:10 +0300, Kevin Wilson wrote: >> I need to add, maybe this gives some hint: >> >> I also have these results: >> >> dmidecode --dump-bin foo.dump >> # dmidecode 2.12 >> SMBIOS 2.5 present. >> # Writing 3566 bytes to foo.dump. >> # Writing 31 bytes to foo.dump. >> >> $dmidecode --from-dump foo.dump >> # dmidecode 2.12 >> Reading SMBIOS/DMI data from file foo.dump. >> SMBIOS 2.5 present. >> 94 structures occupying 3566 bytes. >> >> Invalid entry length (0). DMI table is broken! Stop. > > Can you send the file to me in private? > > Also, what does: > > $ zgrep STRICT_DEVMEM /proc/config.gz > > return? > > -- > Jean Delvare > SUSE L3 Support From MAILER-DAEMON Thu Sep 07 03:51:35 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dprb5-0000NP-So for mharc-dmidecode-devel@gnu.org; Thu, 07 Sep 2017 03:51:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dprb3-0000NA-Q9 for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 03:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpray-0001FH-RS for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 03:51:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:45812 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dpray-0001DQ-KF for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 03:51:28 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 46B1EAD57; Thu, 7 Sep 2017 07:51:27 +0000 (UTC) Date: Thu, 7 Sep 2017 09:51:25 +0200 From: Jean Delvare To: Kevin Wilson Cc: dmidecode-devel@nongnu.org Message-ID: <20170907095125.2a40fae0@endymion> In-Reply-To: References: <20170906222912.47cbab65@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: Re: [dmidecode] Fixing "DMI table is broken!" error X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 07:51:34 -0000 Hi Kevin, On Thu, 7 Sep 2017 08:54:49 +0300, Kevin Wilson wrote: > First: > zgrep STRICT_DEVMEM /proc/config.gz > gzip: /proc/config.gz: No such file or directory >=20 > And also: > ls -al /proc/config.gz > ls: cannot access /proc/config.gz: No such file or director I naively thought all distribution kernels had CONFIG_IKCONFIG_PROC=3Dy, but I was wrong. > But: > cat /boot/config-4.4.0-31-generic | grep STRICT_DEVMEM > CONFIG_STRICT_DEVMEM=3Dy You found it, but it turns out not to be the issue in the end anyway. > And the kernel I use is the one who came with Ubuntu, 14.04.5 LTS > , without any changes. =46rom the dump you sent to me, it appears that the DMI table is present and readable (so not a /dev/mem access problem as I originally suspectes), but the very beginning of the table is corrupted. Hard to tell for sure but I think the first 9 bytes have been overwritten by. As there is no indexing on DMI tables, this prevents us from parsing the whole table. I remember seeing a similar case, already on a Fujitsu server. The problem was a conflict with the ACPI Platform Error Interface (APEI) mechanism, as APEI was configured to make use of the same memory area where the DMI table was mapped. Can you try booting with "erst_disable" added to the bootloader command line to see is that makes the problem go away? (ERST is one of the APEI components.) --=20 Jean Delvare SUSE L3 Support From MAILER-DAEMON Thu Sep 07 04:34:36 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dpsGg-0002CO-1I for mharc-dmidecode-devel@gnu.org; Thu, 07 Sep 2017 04:34:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpsGZ-000278-G1 for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 04:34:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpsGU-0003QK-0n for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 04:34:27 -0400 Received: from mail-yw0-x232.google.com ([2607:f8b0:4002:c05::232]:34120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpsGT-0003Pr-Sj for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 04:34:21 -0400 Received: by mail-yw0-x232.google.com with SMTP id r85so13301670ywg.1 for ; Thu, 07 Sep 2017 01:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wRgDuIEXfyqQx79vBE0/qHbFco9kCnaML35/B5TqGr8=; b=HhUPQD9Y2qPIqcbqASwkdAE5OcJtoGQLxODgxQzTLHl0ZHn0aA6YkvjnoZpmFQO/MC D6wVJzJKnIAFXluHSZ90b058bSaFzSsqLLsEwlvfAG/nmKJOHGP4OiOj8q/e5GrO3zaI cI5Kk9pfLq54vX5Fi97xeQAaGTJ8A9pn+bvky7mQYyFKtxPOmckri504QFtYWrIUMKnS WOvEgh/x8tY68zQESjPs4JDxXexzVoJXxCh/qy8ee9SqjH9kL0MDBK0xBSper4fLZGbt Tq9eFhvSFc0CaavNzTwxNxZjrkpYEnlJqeN1/O4fk378AbKuQCDLiHmqn2HSmVUi7e++ 7PEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wRgDuIEXfyqQx79vBE0/qHbFco9kCnaML35/B5TqGr8=; b=qszAIJMnwnV4hH112l3KeWdeP1QyhdHt7PfKB349dSfeiFtGvVxt5xK6yY8L4I+T0a hVCmMOpOaCDejAxmRD/a91Y1M6MVMZBQ3T1ithIiWlF4IeQg9ELwVreEPN8hE22wnGxD TClnIKGS1OhTSGtELHs3JU8Gja5rdFEHRxt8+bw9kEEDdjdWK6oqF/tdXElohIurSzxi fLa0in2lcIn1i+4RQnqaqDik6shTYuGuvz4cMjlxfJ5f/tJ97LUdBDgFeeVWxHKGl0h9 mxtbezr5IWssIWZ268wt4ZtvHwHWuy3g66GTg2jIV5hKwKglIA3JAKj9p+TpYP5eN6Wn xRiQ== X-Gm-Message-State: AHPjjUjLKw8pgal94xE4lqCS1cGuAFPZ6wpOQNeKtwgm5loKfOXM9lWb uv1YJfPTThyzsqKcHfhGMRDyBnkgxg== X-Google-Smtp-Source: ADKCNb7qNi3Rqg6NDHYPTsq1BA1a6lKTewz2YTVt6s93hnuDdha9rTHvXhLsTAgALv/gzwkQD/4LCtxr2txvC5WZ2b8= X-Received: by 10.129.169.193 with SMTP id g184mr1504932ywh.118.1504773261167; Thu, 07 Sep 2017 01:34:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.71.70 with HTTP; Thu, 7 Sep 2017 01:34:20 -0700 (PDT) In-Reply-To: <20170907095125.2a40fae0@endymion> References: <20170906222912.47cbab65@endymion> <20170907095125.2a40fae0@endymion> From: Kevin Wilson Date: Thu, 7 Sep 2017 11:34:20 +0300 Message-ID: To: Jean Delvare Cc: dmidecode-devel@nongnu.org Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::232 Subject: Re: [dmidecode] Fixing "DMI table is broken!" error X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 08:34:32 -0000 Hi, Jean, Wow! This worked!! dmidecode shows all the tables now, no error whatsoever. Thanks a lot for your quick reply and this solution! BTW: Is there any potential issue about using this "erst_disable" kernel parameter if I will want to continue working with it ? Do you have any ideas? I just want to add that another strange thing that I see on this server is that /sys/devices/system/node there is no node 0 but only node1. I had to disable 3 faulty DIMMS via BIOS, but on a different machine on which I also disabled the same 3 faulty DIMMs (just for test) and rebooted it did show "node0" and "node1" after reboot. This has nothing to do with dmidecocde, still something else seems faulty on that machine. Maybe the BIOS does not provide to the kernel everything as it should. Regards, Kevin On Thu, Sep 7, 2017 at 10:51 AM, Jean Delvare wrote: > Hi Kevin, > > On Thu, 7 Sep 2017 08:54:49 +0300, Kevin Wilson wrote: >> First: >> zgrep STRICT_DEVMEM /proc/config.gz >> gzip: /proc/config.gz: No such file or directory >> >> And also: >> ls -al /proc/config.gz >> ls: cannot access /proc/config.gz: No such file or director > > I naively thought all distribution kernels had CONFIG_IKCONFIG_PROC=y, > but I was wrong. > >> But: >> cat /boot/config-4.4.0-31-generic | grep STRICT_DEVMEM >> CONFIG_STRICT_DEVMEM=y > > You found it, but it turns out not to be the issue in the end anyway. > >> And the kernel I use is the one who came with Ubuntu, 14.04.5 LTS >> , without any changes. > > From the dump you sent to me, it appears that the DMI table is present > and readable (so not a /dev/mem access problem as I originally > suspectes), but the very beginning of the table is corrupted. Hard to > tell for sure but I think the first 9 bytes have been overwritten by. > As there is no indexing on DMI tables, this prevents us from parsing > the whole table. > > I remember seeing a similar case, already on a Fujitsu server. The > problem was a conflict with the ACPI Platform Error Interface (APEI) > mechanism, as APEI was configured to make use of the same memory area > where the DMI table was mapped. > > Can you try booting with "erst_disable" added to the bootloader > command line to see is that makes the problem go away? (ERST is one > of the APEI components.) > > -- > Jean Delvare > SUSE L3 Support From MAILER-DAEMON Thu Sep 07 07:42:58 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dpvD0-0006GX-5B for mharc-dmidecode-devel@gnu.org; Thu, 07 Sep 2017 07:42:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpvCt-0006D4-RL for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 07:42:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpvCo-0003vN-V4 for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 07:42:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:33359 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dpvCo-0003v5-Nb for dmidecode-devel@nongnu.org; Thu, 07 Sep 2017 07:42:46 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BC9D6AB9B; Thu, 7 Sep 2017 11:42:44 +0000 (UTC) Date: Thu, 7 Sep 2017 13:42:43 +0200 From: Jean Delvare To: Kevin Wilson Cc: dmidecode-devel@nongnu.org Message-ID: <20170907134243.2e8bbb00@endymion> In-Reply-To: References: <20170906222912.47cbab65@endymion> <20170907095125.2a40fae0@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: Re: [dmidecode] Fixing "DMI table is broken!" error X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 11:42:56 -0000 Hi Kevin, On Thu, 7 Sep 2017 11:34:20 +0300, Kevin Wilson wrote: > Wow! This worked!! dmidecode shows all the tables now, no error > whatsoever. Thanks a lot for your quick reply and this solution! You're welcome. Ideally you shouldn't have to do that manually. Either the BIOS of your system is broken, or there's a bug in the kernel. Looking for a BIOS update may help. > BTW: Is there any potential issue about using this "erst_disable" > kernel parameter if I will want to continue working with it ? > Do you have any ideas? This isn't my area, so I had to do a fair bit of research to answer this question. My understanding is that ERST provides a relatively small amount of persistent storage, which is preserved across reboots. This is one of the possible backends of the pstore virtual filesystem, which can be used to save important debugging information in case of a system crash. As the storage is persistent, the saved information (typically the kernel logs buffer) can be retrieved for analysis after the system has restarted. There are other possible backends serving the same purpose, for example (U)EFI systems can use EFI variables to store the information. I don't know if this has much use in practice, as in many cases the same information can be written to the disk, and when it can't, anyone who really cares about recovering the system and crash information reliably would probably setup kdump. So my guess is that you won't miss much if you keep ERST disabled. When the system is running normally, it shouldn't make any difference. In fact many systems out there don't even implement ERST, I think this is essentially a feature of servers and high end workstation. My desktop and laptop don't have it. Then again, please keep in mind that my knowledge on the topic is fairly limited, so take the above analysis with a grain of salt, and if you are really worried, feel free to ask people who know more about the topic (please include me in these discussions.) I can't believe people would have been working on pstore for 7 years if it did not serve a purpose in at least some cases, so maybe I'm overlooking something. If anyone reading this knows more, please speak up :-) -- Jean Delvare SUSE L3 Support From MAILER-DAEMON Wed Sep 13 13:09:54 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dsBAg-0002ZK-JF for mharc-dmidecode-devel@gnu.org; Wed, 13 Sep 2017 13:09:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsBAe-0002XA-BQ for dmidecode-devel@nongnu.org; Wed, 13 Sep 2017 13:09:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsBAb-00086D-KG for dmidecode-devel@nongnu.org; Wed, 13 Sep 2017 13:09:52 -0400 Received: from g2t2354.austin.hpe.com ([15.233.44.27]:52285) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsBAb-0007zt-Dm for dmidecode-devel@nongnu.org; Wed, 13 Sep 2017 13:09:49 -0400 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2354.austin.hpe.com (Postfix) with ESMTP id C2E97C5; Wed, 13 Sep 2017 17:09:41 +0000 (UTC) Received: from anatevka.americas.hpqcorp.net (anatevka.americas.hpqcorp.net [10.34.81.205]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 73FF73D; Wed, 13 Sep 2017 17:09:41 +0000 (UTC) Date: Wed, 13 Sep 2017 11:09:41 -0600 From: Jerry Hoemann To: Jean Delvare Cc: dmidecode-devel@nongnu.org, rwright@hpe.com Message-ID: <20170913170941.GB4623@anatevka.americas.hpqcorp.net> Reply-To: Jerry.Hoemann@hpe.com References: <20170825235443.28768-1-jerry.hoemann@hpe.com> <20170906142944.36d40ca3@endymion> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170906142944.36d40ca3@endymion> User-Agent: Mutt/1.8.3 (2017-05-23) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 15.233.44.27 Subject: Re: [dmidecode] [PATCH] dmioem: Reflect HPE's new company name. X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2017 17:09:53 -0000 On Wed, Sep 06, 2017 at 02:29:44PM +0200, Jean Delvare wrote: > Hi Jerry, > > Sorry for the delay, I was on vacation. Thanks Erwan for the > preliminary review - overall I agree, the patch looks essentially good. > To the details now... > > On Fri, 25 Aug 2017 17:54:43 -0600, Jerry Hoemann wrote: > > After Hewlett Packard Enterprise split from Hewlett-Packard, DMI OEM > > tables reflect the new company name. Gen10 and subsequent systems will > > use HPE. Gen9 and prior systems continue to use the old "HP" name. > > > > Signed-off-by: Jerry Hoemann > > Reviewed-by: Randy Wright > > --- > > dmioem.c | 17 +++++++++++------ > > 1 file changed, 11 insertions(+), 6 deletions(-) > > > > diff --git a/dmioem.c b/dmioem.c > > index 034ad9f..a09b6e5 100644 > > --- a/dmioem.c > > +++ b/dmioem.c > > @@ -35,6 +35,7 @@ enum DMI_VENDORS > > VENDOR_UNKNOWN, > > VENDOR_HP, > > VENDOR_ACER, > > + VENDOR_HPE, > > }; > > > > static enum DMI_VENDORS dmi_vendor = VENDOR_UNKNOWN; > > @@ -58,6 +59,8 @@ void dmi_set_vendor(const char *s) > > > > if (strncmp(s, "HP", len) == 0 || strncmp(s, "Hewlett-Packard", len) == 0) > > dmi_vendor = VENDOR_HP; > > + else if (strncmp(s, "HPE",len) == 0 || strncmp(s, "Hewlett Packard Enterprise", len) == 0) > > Coding style: missing space after comma. Will fix. > > > + dmi_vendor = VENDOR_HPE; > > else if (strncmp(s, "Acer", len) == 0) > > dmi_vendor = VENDOR_ACER; > > } > > @@ -98,14 +101,15 @@ static int dmi_decode_hp(const struct dmi_header *h) > > u8 *data = h->data; > > int nic, ptr; > > u32 feat; > > + const char *company = (dmi_vendor == VENDOR_HP) ? "HP": "HPE"; > > Coding style: missing space before colon. Will fix. > > > > > switch (h->type) > > { > > case 204: > > /* > > - * Vendor Specific: HP ProLiant System/Rack Locator > > + * Vendor Specific: HPE ProLiant System/Rack Locator > > */ > > - printf("HP ProLiant System/Rack Locator\n"); > > + printf("%s ProLiant System/Rack Locator\n", company); > > if (h->length < 0x0B) break; > > printf("\tRack Name: %s\n", dmi_string(h, data[0x04])); > > printf("\tEnclosure Name: %s\n", dmi_string(h, data[0x05])); > > @@ -155,7 +159,7 @@ static int dmi_decode_hp(const struct dmi_header *h) > > > > Did you leave cases 209 and 221 out on purpose? Yes, intentional. But, upon reflection, not what we want. Will fix. > > > case 233: > > /* > > - * Vendor Specific: HP ProLiant NIC MAC Information > > + * Vendor Specific: HPE ProLiant NIC MAC Information > > * > > * This prints the BIOS NIC number, > > * PCI bus/device/function, and MAC address > > @@ -171,7 +175,7 @@ static int dmi_decode_hp(const struct dmi_header *h) > > * 0x08 | MAC | 32B | MAC addr padded w/ 0s > > * 0x28 | Port No| BYTE | Each NIC maps to a Port > > */ > > - printf("HP BIOS PXE NIC PCI and MAC Information\n"); > > + printf("%s BIOS PXE NIC PCI and MAC Information\n", company); > > if (h->length < 0x0E) break; > > /* If the record isn't long enough, we don't have an ID > > * use 0xFF to use the internal counter. > > @@ -187,7 +191,7 @@ static int dmi_decode_hp(const struct dmi_header *h) > > * > > * Source: hpwdt kernel driver > > */ > > - printf("HP 64-bit CRU Information\n"); > > + printf("%s 64-bit CRU Information\n", company); > > if (h->length < 0x18) break; > > printf("\tSignature: 0x%08x", DWORD(data + 0x04)); > > if (is_printable(data + 0x04, 4)) > > @@ -212,7 +216,7 @@ static int dmi_decode_hp(const struct dmi_header *h) > > * > > * Source: hpwdt kernel driver > > */ > > - printf("HP ProLiant Information\n"); > > + printf("%s ProLiant Information\n", company); > > if (h->length < 0x08) break; > > printf("\tPower Features: 0x%08x\n", DWORD(data + 0x04)); > > if (h->length < 0x0C) break; > > @@ -281,6 +285,7 @@ int dmi_decode_oem(const struct dmi_header *h) > > switch (dmi_vendor) > > { > > case VENDOR_HP: > > + case VENDOR_HPE: > > return dmi_decode_hp(h); > > case VENDOR_ACER: > > return dmi_decode_acer(h); > > For the first 2, you updated "HP" to "HPE" in the heading comment. For > the last 2 you did not. Is it on purpose, or an overlook? Missed. Will update comments to HPE in file. > > (I don't really care if we update these comments or not, but I like > consistency.) > > -- > Jean Delvare > SUSE L3 Support -- ----------------------------------------------------------------------------- Jerry Hoemann Software Engineer Hewlett Packard Enterprise ----------------------------------------------------------------------------- From MAILER-DAEMON Wed Sep 13 17:55:02 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dsFcc-0002AL-8n for mharc-dmidecode-devel@gnu.org; Wed, 13 Sep 2017 17:55:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsFcZ-00028M-PJ for dmidecode-devel@nongnu.org; Wed, 13 Sep 2017 17:55:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsFcU-0005Xq-4v for dmidecode-devel@nongnu.org; Wed, 13 Sep 2017 17:54:59 -0400 Received: from g4t3426.houston.hpe.com ([15.241.140.75]:45506) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsFcT-0005Wq-W1 for dmidecode-devel@nongnu.org; Wed, 13 Sep 2017 17:54:54 -0400 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3426.houston.hpe.com (Postfix) with ESMTP id C149E5A; Wed, 13 Sep 2017 21:54:52 +0000 (UTC) Received: from anatevka.americas.hpqcorp.net (anatevka.americas.hpqcorp.net [10.34.81.205]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 67B3D4A; Wed, 13 Sep 2017 21:54:52 +0000 (UTC) From: Jerry Hoemann To: jdelvare@suse.de Cc: dmidecode-devel@nongnu.org, rwright@hpe.com, Jerry Hoemann Date: Wed, 13 Sep 2017 15:54:21 -0600 Message-Id: X-Mailer: git-send-email 2.9.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 15.241.140.75 Subject: [dmidecode] [PATCH v2] dmioem: Reflect HPE's new company name. X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2017 21:55:00 -0000 After Hewlett Packard Enterprise split from Hewlett-Packard, DMI OEM tables reflect the new company name. Gen10 and subsequent systems will use HPE. Gen9 and prior systems continue to use the old "HP" name. Changes v2 Incorperate code review comments w.r.t. style/comments. Update company name on type 209 and 221. Jerry Hoemann (1): dmioem: Reflect HPE's new company name. dmioem.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) -- 2.9.4 From MAILER-DAEMON Wed Sep 13 17:55:06 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dsFcd-0002Ak-7P for mharc-dmidecode-devel@gnu.org; Wed, 13 Sep 2017 17:55:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsFcZ-00028N-PH for dmidecode-devel@nongnu.org; Wed, 13 Sep 2017 17:55:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsFcV-0005YV-4R for dmidecode-devel@nongnu.org; Wed, 13 Sep 2017 17:54:59 -0400 Received: from g9t5009.houston.hpe.com ([15.241.48.73]:44132) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsFcU-0005YC-UU for dmidecode-devel@nongnu.org; Wed, 13 Sep 2017 17:54:55 -0400 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 2D5085C; Wed, 13 Sep 2017 21:54:53 +0000 (UTC) Received: from anatevka.americas.hpqcorp.net (anatevka.americas.hpqcorp.net [10.34.81.205]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id D00D44B; Wed, 13 Sep 2017 21:54:52 +0000 (UTC) From: Jerry Hoemann To: jdelvare@suse.de Cc: dmidecode-devel@nongnu.org, rwright@hpe.com, Jerry Hoemann Date: Wed, 13 Sep 2017 15:54:22 -0600 Message-Id: <4735ebc4d326ad3ce521e6c16435dfa7dc7599c8.1505338717.git.jerry.hoemann@hpe.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 15.241.48.73 Subject: [dmidecode] [PATCH v2] dmioem: Reflect HPE's new company name. X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2017 21:55:01 -0000 After Hewlett Packard Enterprise split from Hewlett-Packard, DMI OEM tables reflect the new company name. Gen10 and subsequent systems will use HPE. Gen9 and prior systems continue to use the old "HP" name. Signed-off-by: Jerry Hoemann --- dmioem.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/dmioem.c b/dmioem.c index 034ad9f..a032344 100644 --- a/dmioem.c +++ b/dmioem.c @@ -35,6 +35,7 @@ enum DMI_VENDORS VENDOR_UNKNOWN, VENDOR_HP, VENDOR_ACER, + VENDOR_HPE, }; static enum DMI_VENDORS dmi_vendor = VENDOR_UNKNOWN; @@ -58,12 +59,14 @@ void dmi_set_vendor(const char *s) if (strncmp(s, "HP", len) == 0 || strncmp(s, "Hewlett-Packard", len) == 0) dmi_vendor = VENDOR_HP; + else if (strncmp(s, "HPE", len) == 0 || strncmp(s, "Hewlett Packard Enterprise", len) == 0) + dmi_vendor = VENDOR_HPE; else if (strncmp(s, "Acer", len) == 0) dmi_vendor = VENDOR_ACER; } /* - * HP-specific data structures are decoded here. + * HPE-specific data structures are decoded here. * * Code contributed by John Cagle and Tyler Bell. */ @@ -98,14 +101,15 @@ static int dmi_decode_hp(const struct dmi_header *h) u8 *data = h->data; int nic, ptr; u32 feat; + const char *company = (dmi_vendor == VENDOR_HP) ? "HP" : "HPE"; switch (h->type) { case 204: /* - * Vendor Specific: HP ProLiant System/Rack Locator + * Vendor Specific: HPE ProLiant System/Rack Locator */ - printf("HP ProLiant System/Rack Locator\n"); + printf("%s ProLiant System/Rack Locator\n", company); if (h->length < 0x0B) break; printf("\tRack Name: %s\n", dmi_string(h, data[0x04])); printf("\tEnclosure Name: %s\n", dmi_string(h, data[0x05])); @@ -119,7 +123,7 @@ static int dmi_decode_hp(const struct dmi_header *h) case 209: case 221: /* - * Vendor Specific: HP ProLiant NIC MAC Information + * Vendor Specific: HPE ProLiant NIC MAC Information * * This prints the BIOS NIC number, * PCI bus/device/function, and MAC address @@ -137,9 +141,10 @@ static int dmi_decode_hp(const struct dmi_header *h) * * Type 221: is deprecated in the latest docs */ - printf(h->type == 221 ? - "HP BIOS iSCSI NIC PCI and MAC Information\n" : - "HP BIOS PXE NIC PCI and MAC Information\n"); + printf("%s %s\n", company, + h->type == 221 ? + "BIOS iSCSI NIC PCI and MAC Information" : + "BIOS PXE NIC PCI and MAC Information"); nic = 1; ptr = 4; while (h->length >= ptr + 8) @@ -155,7 +160,7 @@ static int dmi_decode_hp(const struct dmi_header *h) case 233: /* - * Vendor Specific: HP ProLiant NIC MAC Information + * Vendor Specific: HPE ProLiant NIC MAC Information * * This prints the BIOS NIC number, * PCI bus/device/function, and MAC address @@ -171,7 +176,7 @@ static int dmi_decode_hp(const struct dmi_header *h) * 0x08 | MAC | 32B | MAC addr padded w/ 0s * 0x28 | Port No| BYTE | Each NIC maps to a Port */ - printf("HP BIOS PXE NIC PCI and MAC Information\n"); + printf("%s BIOS PXE NIC PCI and MAC Information\n", company); if (h->length < 0x0E) break; /* If the record isn't long enough, we don't have an ID * use 0xFF to use the internal counter. @@ -183,11 +188,11 @@ static int dmi_decode_hp(const struct dmi_header *h) case 212: /* - * Vendor Specific: HP 64-bit CRU Information + * Vendor Specific: HPE 64-bit CRU Information * * Source: hpwdt kernel driver */ - printf("HP 64-bit CRU Information\n"); + printf("%s 64-bit CRU Information\n", company); if (h->length < 0x18) break; printf("\tSignature: 0x%08x", DWORD(data + 0x04)); if (is_printable(data + 0x04, 4)) @@ -208,11 +213,11 @@ static int dmi_decode_hp(const struct dmi_header *h) case 219: /* - * Vendor Specific: HP ProLiant Information + * Vendor Specific: HPE ProLiant Information * * Source: hpwdt kernel driver */ - printf("HP ProLiant Information\n"); + printf("%s ProLiant Information\n", company); if (h->length < 0x08) break; printf("\tPower Features: 0x%08x\n", DWORD(data + 0x04)); if (h->length < 0x0C) break; @@ -281,6 +286,7 @@ int dmi_decode_oem(const struct dmi_header *h) switch (dmi_vendor) { case VENDOR_HP: + case VENDOR_HPE: return dmi_decode_hp(h); case VENDOR_ACER: return dmi_decode_acer(h); -- 2.9.4 From MAILER-DAEMON Thu Sep 14 04:05:37 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dsP9V-0004KZ-3x for mharc-dmidecode-devel@gnu.org; Thu, 14 Sep 2017 04:05:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsP9S-0004Il-OL for dmidecode-devel@nongnu.org; Thu, 14 Sep 2017 04:05:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsP9O-0005m3-Kh for dmidecode-devel@nongnu.org; Thu, 14 Sep 2017 04:05:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:47417 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsP9O-0005kP-DO for dmidecode-devel@nongnu.org; Thu, 14 Sep 2017 04:05:30 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 80E94ABB4; Thu, 14 Sep 2017 08:05:27 +0000 (UTC) Date: Thu, 14 Sep 2017 10:05:26 +0200 From: Jean Delvare To: Jerry Hoemann Cc: dmidecode-devel@nongnu.org, rwright@hpe.com Message-ID: <20170914100526.3542d2e6@endymion> In-Reply-To: <4735ebc4d326ad3ce521e6c16435dfa7dc7599c8.1505338717.git.jerry.hoemann@hpe.com> References: <4735ebc4d326ad3ce521e6c16435dfa7dc7599c8.1505338717.git.jerry.hoemann@hpe.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: Re: [dmidecode] [PATCH v2] dmioem: Reflect HPE's new company name. X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2017 08:05:35 -0000 On Wed, 13 Sep 2017 15:54:22 -0600, Jerry Hoemann wrote: > After Hewlett Packard Enterprise split from Hewlett-Packard, DMI OEM > tables reflect the new company name. Gen10 and subsequent systems will > use HPE. Gen9 and prior systems continue to use the old "HP" name. > > Signed-off-by: Jerry Hoemann > --- > dmioem.c | 32 +++++++++++++++++++------------- > 1 file changed, 19 insertions(+), 13 deletions(-) Applied, thanks. -- Jean Delvare SUSE L3 Support From MAILER-DAEMON Thu Sep 14 04:51:43 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dsPs6-0005RV-Tm for mharc-dmidecode-devel@gnu.org; Thu, 14 Sep 2017 04:51:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsPs4-0005RJ-IL for dmidecode-devel@nongnu.org; Thu, 14 Sep 2017 04:51:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsPs1-0001ru-E5 for dmidecode-devel@nongnu.org; Thu, 14 Sep 2017 04:51:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:52888 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsPs1-0001qt-3S for dmidecode-devel@nongnu.org; Thu, 14 Sep 2017 04:51:37 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ACDD5ABDB; Thu, 14 Sep 2017 08:51:35 +0000 (UTC) Date: Thu, 14 Sep 2017 10:51:34 +0200 From: Jean Delvare To: Alexey Dokuchaev Cc: dmidecode-devel@nongnu.org Message-ID: <20170914105134.542f50d7@endymion> In-Reply-To: <20170619020001.GA38866@regency.nsu.ru> References: <20170619020001.GA38866@regency.nsu.ru> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: Re: [dmidecode] [patch] UEFI support on FreeBSD X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2017 08:51:41 -0000 Hi Alexey, On Mon, 19 Jun 2017 08:00:01 +0600, Alexey Dokuchaev wrote: > Currently, dmidecode(8) does not work on FreeBSD booted in UEFI mode. > Previously it was understandable, since there are no things like Linuxish > /proc/efi/systab or /sys/firmware/efi/systab to read from under FreeBSD. >=20 > However, 7 months ago, ambrisko@ had added support for exposing the SMBIOS > anchor base address via kernel environment: >=20 > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D307326 >=20 > I've patched dmidecode.c to try to get the address from hint.smbios.0.mem > and fall back to traditional address space scanning. I've tested it both > on EFI (amd64 laptop) and non-EFI (i386 desktop) machines. Thanks. Here's my review: > --- dmidecode.c.orig 2017-05-23 13:34:14 UTC > +++ dmidecode.c > @@ -58,6 +58,10 @@ > * https://trustedcomputinggroup.org/pc-client-platform-tpm-profile-p= tp-specification/ > */ > =20 > +#ifdef __FreeBSD__ > +#include > +#include > +#endif I think I'd prefer them after the common ones, and with a separating blank line. > #include > #include > #include > @@ -4934,13 +4938,18 @@ static int legacy_decode(u8 *buf, const=20 > #define EFI_NO_SMBIOS (-2) > static int address_from_efi(off_t *address) > { > +#if defined(__linux__) > FILE *efi_systab; > const char *filename; > char linebuf[64]; > +#elif defined(__FreeBSD__) > + char addrstr[KENV_MVALLEN + 1]; > +#endif > int ret; > =20 > *address =3D 0; /* Prevent compiler warning */ > =20 > +#if defined(__linux__) > /* > * Linux up to 2.6.6: /proc/efi/systab > * Linux 2.6.7 and up: /sys/firmware/efi/systab > @@ -4973,6 +4982,25 @@ static int address_from_efi(off_t *addre > if (ret =3D=3D EFI_NO_SMBIOS) > fprintf(stderr, "%s: SMBIOS entry point missing\n", filename); > return ret; > +#elif defined(__FreeBSD__) > + /* > + * On FreeBSD, SMBIOS anchor base address in UEFI mode is exposed > + * via kernel environment: > + * https://svnweb.freebsd.org/base?view=3Drevision&revision=3D307326 > + */ > + ret =3D kenv(KENV_GET, "hint.smbios.0.mem", addrstr, sizeof(addrstr)); > + if (ret =3D=3D -1) { > + if (errno !=3D ENOENT) > + perror("kenv"); > + return EFI_NOT_FOUND; > + } > + > + *address =3D strtoull(addrstr, NULL, 0); > + if (!(opt.flags & FLAG_QUIET)) > + printf("# SMBIOS entry point at 0x%08llx\n", > + (unsigned long long)*address); > + return 0; This part of the code is the same as in the __linux__ case. It would be nice to avoid duplicating it. Maybe it could be moved to the end of the function, or moved to a separate function altogether (possibly easier.) > +#endif > } > =20 > int main(int argc, char * const argv[]) While it makes sense to restrict each section to its OS, I see two problems with your patch: 1* If building neither on Linux nor on FreeBSD, you get 2 warnings: dmidecode.c: In function =E2=80=98address_from_efi=E2=80=99: dmidecode.c:4948:6: warning: unused variable =E2=80=98ret=E2=80=99 [-Wunuse= d-variable] int ret; ^ dmidecode.c:5004:1: warning: no return statement in function returning non-= void [-Wreturn-type] } ^ This needs to be addressed. 2* I know that sysfs is Linux-specific, but /proc is not. Are you certain that no other operating system implements /proc/efi/systab? Well that can be sorted out later, if needed, not a big problem. Thanks, --=20 Jean Delvare SUSE L3 Support From MAILER-DAEMON Thu Sep 14 04:55:56 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dsPwC-0006a9-EB for mharc-dmidecode-devel@gnu.org; Thu, 14 Sep 2017 04:55:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsPw7-0006Wx-4w for dmidecode-devel@nongnu.org; Thu, 14 Sep 2017 04:55:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsPw3-0007TX-TK for dmidecode-devel@nongnu.org; Thu, 14 Sep 2017 04:55:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:53120 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsPw3-0007ST-LP for dmidecode-devel@nongnu.org; Thu, 14 Sep 2017 04:55:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 82E6BAC08; Thu, 14 Sep 2017 08:55:46 +0000 (UTC) Date: Thu, 14 Sep 2017 10:55:44 +0200 From: Jean Delvare To: Ryan Armstrong Cc: dmidecode-devel@nongnu.org Message-ID: <20170914105544.75612453@endymion> In-Reply-To: References: Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: Re: [dmidecode] [PATCH] Added support for Apple macOS X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2017 08:55:55 -0000 Hi Ryan, On Sat, 1 Jul 2017 06:13:59 -0700, Ryan Armstrong wrote: > Hi dmidecode team, >=20 > As discussed with Jean Delvare on Linked-In, please see attached for > my patch to add support for macOS to dmidecode. >=20 > This patch has been distributed for some time now via > https://github.com/cavaliercoder/dmidecode-osx=C2=A0and homebrew. I have > however, tidied the patch a little in preparation for submitting it to > you. >=20 > A few notes concerning the change: >=20 > - compiler warnings from upstream code were suppressed on macOS with > `-Wno-constant-logical-operand` >=20 > =C2=A0=C2=A0dmidecode.c:4514:26: warning: use of logical '&&' with consta= nt operand >=20 > -=C2=A0ALIGNMENT_WORKAROUND was required also on macOS and so the > conditional was expanded to include __LP64__ >=20 > - The call to CFRelease on 4814 throws 'Segmentation fault: 11' since > macOS 10.12, if=C2=A0the compiled binary is not signed with an Apple > developer profile >=20 > Thanks for your consideration. I=E2=80=99d be happy to adjust the patch t= o your liking. Did you intend to attach or inline the patch but forgot to do so? Or it was somehow eaten along the way? --=20 Jean Delvare SUSE L3 Support From MAILER-DAEMON Tue Sep 26 03:03:40 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dwju8-0006VO-K8 for mharc-dmidecode-devel@gnu.org; Tue, 26 Sep 2017 03:03:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwju6-0006V6-3M for dmidecode-devel@nongnu.org; Tue, 26 Sep 2017 03:03:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwjtz-0007jZ-MB for dmidecode-devel@nongnu.org; Tue, 26 Sep 2017 03:03:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:49532 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwjtz-0007iK-CA for dmidecode-devel@nongnu.org; Tue, 26 Sep 2017 03:03:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C8A40AEDB; Tue, 26 Sep 2017 07:03:28 +0000 (UTC) Date: Tue, 26 Sep 2017 09:03:27 +0200 From: Jean Delvare To: Alexey Dokuchaev Cc: dmidecode-devel@nongnu.org Message-ID: <20170926090327.76add7b4@endymion> In-Reply-To: <20170919171357.GA44057@regency.nsu.ru> References: <20170619020001.GA38866@regency.nsu.ru> <20170914105134.542f50d7@endymion> <20170919171357.GA44057@regency.nsu.ru> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: Re: [dmidecode] [patch] UEFI support on FreeBSD X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2017 07:03:39 -0000 Hi Alexey, On Wed, 20 Sep 2017 00:13:57 +0700, Alexey Dokuchaev wrote: > On Thu, Sep 14, 2017 at 10:51:34AM +0200, Jean Delvare wrote: > > On Mon, 19 Jun 2017 08:00:01 +0600, Alexey Dokuchaev wrote: > > > Currently, dmidecode(8) does not work on FreeBSD booted in UEFI mode. > > > Previously it was understandable, since there are no things like Linuxish > > > /proc/efi/systab or /sys/firmware/efi/systab to read from under FreeBSD. > > > > > > However, 7 months ago, ambrisko@ had added support for exposing the SMBIOS > > > anchor base address via kernel environment: > > > > > > https://svnweb.freebsd.org/base?view=revision&revision=307326 > > > > > > I've patched dmidecode.c to try to get the address from hint.smbios.0.mem > > > and fall back to traditional address space scanning. I've tested it both > > > on EFI (amd64 laptop) and non-EFI (i386 desktop) machines. > > > > Thanks. Here's my review: > > > > > --- dmidecode.c.orig 2017-05-23 13:34:14 UTC > > > +++ dmidecode.c > > > @@ -58,6 +58,10 @@ > > > * https://trustedcomputinggroup.org/pc-client-platform-tpm-profile-ptp-specification/ > > > */ > > > > > > +#ifdef __FreeBSD__ > > > +#include > > > +#include > > > +#endif > > > > I think I'd prefer them after the common ones, and with a separating > > blank line. > > Be my guest; I'm not trying to interfere with you coding style in any way; > feel free to reorder #include's to your liking. Done. > > > + *address = strtoull(addrstr, NULL, 0); > > > + if (!(opt.flags & FLAG_QUIET)) > > > + printf("# SMBIOS entry point at 0x%08llx\n", > > > + (unsigned long long)*address); > > > + return 0; > > > > This part of the code is the same as in the __linux__ case. It would be > > nice to avoid duplicating it. Maybe it could be moved to the end of the > > function, or moved to a separate function altogether (possibly easier.) > > Well, again, I wanted to have a working implementation, and if you can > refactor it to a better shape, I'll happily test the final patch to make > sure it works on FreeBSD for both BIOS and UEFI cases. I'll write a separate patch, and post it so you can test it. > > 1* If building neither on Linux nor on FreeBSD, you get 2 warnings: > > > > dmidecode.c: In function ???address_from_efi???: > > dmidecode.c:4948:6: warning: unused variable ???ret??? [-Wunused-variable] > > int ret; > > ^ > > dmidecode.c:5004:1: warning: no return statement in function returning non-void [-Wreturn-type] > > } > > ^ > > > > This needs to be addressed. > > Right, I've seen this warning, I think. Do you want me to fix it, or > rather address it on your own? I fixed it. > > 2* I know that sysfs is Linux-specific, but /proc is not. Are you > > certain that no other operating system implements /proc/efi/systab? > > Traditionally /proc was solely about processes, and FreeBSD adheres > to this, being Unix. Linux, on the other hand, had decided to abuse > /proc for a number of other, unrelated things, but than again: Linux > is not strictly a Unix, just a look-alike. > > That said, I do believe that /proc/efi/systab path is Linux-specific > and won't count on it being present and/or expectedly populated in > some other operating system. OK, thanks. Can you please test the following patch and confirm it still works for you? --- dmidecode.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) --- dmidecode.c.orig 2017-05-23 10:15:36.397386352 +0200 +++ dmidecode.c 2017-09-26 08:42:08.339871831 +0200 @@ -64,6 +64,11 @@ #include #include +#ifdef __FreeBSD__ +#include +#include +#endif + #include "version.h" #include "config.h" #include "types.h" @@ -4934,13 +4939,18 @@ static int legacy_decode(u8 *buf, const #define EFI_NO_SMBIOS (-2) static int address_from_efi(off_t *address) { +#if defined(__linux__) FILE *efi_systab; const char *filename; char linebuf[64]; +#elif defined(__FreeBSD__) + char addrstr[KENV_MVALLEN + 1]; +#endif int ret; *address = 0; /* Prevent compiler warning */ +#if defined(__linux__) /* * Linux up to 2.6.6: /proc/efi/systab * Linux 2.6.7 and up: /sys/firmware/efi/systab @@ -4972,6 +4982,27 @@ static int address_from_efi(off_t *addre if (ret == EFI_NO_SMBIOS) fprintf(stderr, "%s: SMBIOS entry point missing\n", filename); +#elif defined(__FreeBSD__) + /* + * On FreeBSD, SMBIOS anchor base address in UEFI mode is exposed + * via kernel environment: + * https://svnweb.freebsd.org/base?view=revision&revision=307326 + */ + ret = kenv(KENV_GET, "hint.smbios.0.mem", addrstr, sizeof(addrstr)); + if (ret == -1) + { + if (errno != ENOENT) + perror("kenv"); + return EFI_NOT_FOUND; + } + + *address = strtoull(addrstr, NULL, 0); + if (!(opt.flags & FLAG_QUIET)) + printf("# SMBIOS entry point at 0x%08llx\n", + (unsigned long long)*address); +#else + ret = EFI_NOT_FOUND; +#endif return ret; } -- Jean Delvare SUSE L3 Support From MAILER-DAEMON Tue Sep 26 03:27:34 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dwkHG-0002HK-8W for mharc-dmidecode-devel@gnu.org; Tue, 26 Sep 2017 03:27:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwkHE-0002GC-33 for dmidecode-devel@nongnu.org; Tue, 26 Sep 2017 03:27:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwkHD-0000SR-A8 for dmidecode-devel@nongnu.org; Tue, 26 Sep 2017 03:27:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:50838 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwkHD-0000SF-31 for dmidecode-devel@nongnu.org; Tue, 26 Sep 2017 03:27:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 706EEAD00; Tue, 26 Sep 2017 07:27:29 +0000 (UTC) Date: Tue, 26 Sep 2017 09:27:28 +0200 From: Jean Delvare To: dmidecode-devel@nongnu.org, Alexey Dokuchaev Message-ID: <20170926092728.539607c4@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [dmidecode] [PATCH] dmidecode: Share common EFI code X-BeenThere: dmidecode-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2017 07:27:33 -0000 Avoid duplicating code between OS-specific paths. --- Alexey, assuming the previous patch works for you, can you please test this one on top and confirm it doesn't break anything? Thanks. dmidecode.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) --- dmidecode.orig/dmidecode.c 2017-09-26 09:00:25.799403912 +0200 +++ dmidecode/dmidecode.c 2017-09-26 09:05:05.026038261 +0200 @@ -4946,6 +4946,7 @@ static int address_from_efi(off_t *addre #elif defined(__FreeBSD__) char addrstr[KENV_MVALLEN + 1]; #endif + const char *eptype; int ret; *address = 0; /* Prevent compiler warning */ @@ -4970,9 +4971,7 @@ static int address_from_efi(off_t *addre || strcmp(linebuf, "SMBIOS") == 0) { *address = strtoull(addrp, NULL, 0); - if (!(opt.flags & FLAG_QUIET)) - printf("# %s entry point at 0x%08llx\n", - linebuf, (unsigned long long)*address); + eptype = linebuf; ret = 0; break; } @@ -4997,12 +4996,15 @@ static int address_from_efi(off_t *addre } *address = strtoull(addrstr, NULL, 0); - if (!(opt.flags & FLAG_QUIET)) - printf("# SMBIOS entry point at 0x%08llx\n", - (unsigned long long)*address); + eptype = "SMBIOS"; #else ret = EFI_NOT_FOUND; #endif + + if (ret == 0 && !(opt.flags & FLAG_QUIET)) + printf("# %s entry point at 0x%08llx\n", + eptype, (unsigned long long)*address); + return ret; } -- Jean Delvare SUSE L3 Support