From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BC4AC433F5 for ; Thu, 29 Sep 2022 10:23:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EE35884C7A; Thu, 29 Sep 2022 12:23:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="WTgc1mz3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5B57F84C7D; Thu, 29 Sep 2022 12:23:07 +0200 (CEST) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 96F2680444 for ; Thu, 29 Sep 2022 12:23:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ej1-x62a.google.com with SMTP id bj12so1777588ejb.13 for ; Thu, 29 Sep 2022 03:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=KlKqLJpPMEJJpoMauqthuqRwbpWzOmomZwBaSrv0ppU=; b=WTgc1mz3rbT+Wl/5XRiv5klDjYE0Euse9z93N7jms5lC2IpC2q3J2iLUxf2Av0GYma Rw11G+hm/bj1oqx3idg3A7YNemkkRMnWwOslxDTpm8N2f/r+ybKYK6GOZdtoADQlFnt2 RB9/4Cf9K9sPWXgEZ8VYDKrO27aa8FkJp7vvscf8WlqfhnwjRSJGpjU9Q1rqETgmAzwA UiypxQP5w3QR2P+3ped5luFlaViZYCOb/7ZgqMpFIRXlvQRdi1gsqKISHnI3Vc/xOOiU cpcy77pSmVQ100LOkArKH15+W9O7gzYefAgrvMzY8gkypLy3tc2KoQbbDISH5CKUBfOs z0Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=KlKqLJpPMEJJpoMauqthuqRwbpWzOmomZwBaSrv0ppU=; b=3FtV0UakoFLy9yKBriFjnnaL1yKJk8Sx6dhpoDnR9rCiIzJz65Om3tWlAfL0iXsjkH Uf5GuBrf/wJUUykXzwzzblUOdZvThG3LPytIQ5xP0NJ/XVx7QUGHabIotpdzRroXKLkj Hh769smum/8ERY1uCF6tDhUuVLaghlB3JXalgGtZSF/dvG3CWhPLirt10g1wchK1UGL2 ZN4llVPQ2w15hr7AwbtF6n4CgpADWhCd2S/hnR8lV3RTxLC6vbg63LstahnbnhDj0S/z b0bV9FPxrF80eNU8Np8kWFex37DjbXWCocjImP/VzKm2BkiODT0aTISXO0ET/PXJoaZC 4q5g== X-Gm-Message-State: ACrzQf01ESi9sPKHFk/ZFWFCnC3z9xOh3Djz8vgRkkosl2Td5RLf5hPj LM1lqVI027Hr1XMViMsVx76GIw== X-Google-Smtp-Source: AMsMyM60ACL4+6Vo1xNDCQgT/rnnBVpLq1W1Hh8WIUvUimVEEevmRKpOP3DlJmhONhUkDLH6YtFlMg== X-Received: by 2002:a17:907:762d:b0:787:a8e3:17f2 with SMTP id jy13-20020a170907762d00b00787a8e317f2mr2091789ejc.661.1664446984260; Thu, 29 Sep 2022 03:23:04 -0700 (PDT) Received: from hera ([46.103.15.185]) by smtp.gmail.com with ESMTPSA id j2-20020a17090623e200b0078015cebd8csm3801496ejg.117.2022.09.29.03.23.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 03:23:03 -0700 (PDT) Date: Thu, 29 Sep 2022 13:23:01 +0300 From: Ilias Apalodimas To: Simon Glass Cc: Peter Robinson , U-Boot Mailing List , Tom Rini , Heinrich Schuchardt Subject: Re: [PATCH 2/2] smbios: Fallback to the default DT if sysinfo nodes are missing Message-ID: References: <20220906134426.53748-1-ilias.apalodimas@linaro.org> <20220906134426.53748-2-ilias.apalodimas@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Simon, On Thu, Sep 29, 2022 at 03:59:51AM -0600, Simon Glass wrote: > Hi, > > On Tue, 20 Sept 2022 at 05:10, Peter Robinson wrote: > > > > On Tue, Sep 6, 2022 at 2:44 PM Ilias Apalodimas > > wrote: > > > > > > In order to fill in the SMBIOS tables U-Boot currently relies on a > > > "u-boot,sysinfo-smbios" compatible node. This is fine for the boards > > > that already include such nodes. However with some recent EFI changes, > > > the majority of boards can boot up distros, which usually rely on > > > things like dmidecode etc for their reporting. For boards that > > > lack this special node the SMBIOS output looks like: > > > > > > System Information > > > Manufacturer: Unknown > > > Product Name: Unknown > > > Version: Unknown > > > Serial Number: Unknown > > > UUID: Not Settable > > > Wake-up Type: Reserved > > > SKU Number: Unknown > > > Family: Unknown > > > > > > This looks problematic since most of the info are "Unknown". The DT spec > > > specifies standard properties containing relevant information like > > > 'model' and 'compatible' for which the suggested format is > > > . So let's add a last resort to our current > > > smbios parsing. If none of the sysinfo properties are found, we can > > > scan the root node for 'model' and 'compatible'. > > > > I don't think the information below all needs to go in the commit, > > maybe in the cover letter? > > > > > pre-patch dmidecode: > > > > > > Handle 0x0001, DMI type 1, 27 bytes > > > System Information > > > Manufacturer: Unknown > > > Product Name: Unknown > > > Version: Unknown > > > Serial Number: Unknown > > > UUID: Not Settable > > > Wake-up Type: Reserved > > > SKU Number: Unknown > > > Family: Unknown > > > > > > Handle 0x0002, DMI type 2, 14 bytes > > > Base Board Information > > > Manufacturer: Unknown > > > Product Name: Unknown > > > Version: Unknown > > > Serial Number: Not Specified > > > Asset Tag: Unknown > > > Features: > > > Board is a hosting board > > > Location In Chassis: Not Specified > > > Chassis Handle: 0x0000 > > > Type: Motherboard > > > > > > Handle 0x0003, DMI type 3, 21 bytes > > > Chassis Information > > > Manufacturer: Unknown > > > Type: Desktop > > > Lock: Not Present > > > Version: Not Specified > > > Serial Number: Not Specified > > > Asset Tag: Not Specified > > > Boot-up State: Safe > > > Power Supply State: Safe > > > Thermal State: Safe > > > Security Status: None > > > OEM Information: 0x00000000 > > > Height: Unspecified > > > Number Of Power Cords: Unspecified > > > Contained Elements: 0 > > > > > > > > > post-pastch dmidecode: > > > > > > Handle 0x0001, DMI type 1, 27 bytes > > > System Information > > > Manufacturer: socionext,developer-box > > > Product Name: Socionext Developer Box > > > Version: Unknown > > > Serial Number: Unknown > > > UUID: Not Settable > > > Wake-up Type: Reserved > > > SKU Number: Unknown > > > Family: Unknown > > > > > > Handle 0x0002, DMI type 2, 14 bytes > > > Base Board Information > > > Manufacturer: socionext,developer-box > > > Product Name: Socionext Developer Box > > > Version: Unknown > > > Serial Number: Not Specified > > > Asset Tag: Unknown > > > Features: > > > Board is a hosting board > > > Location In Chassis: Not Specified > > > Chassis Handle: 0x0000 > > > Type: Motherboard > > > > > > Handle 0x0003, DMI type 3, 21 bytes > > > Chassis Information > > > Manufacturer: socionext,developer-box > > > Type: Desktop > > > Lock: Not Present > > > Version: Not Specified > > > Serial Number: Not Specified > > > Asset Tag: Not Specified > > > Boot-up State: Safe > > > Power Supply State: Safe > > > Thermal State: Safe > > > Security Status: None > > > OEM Information: 0x00000000 > > > Height: Unspecified > > > Number Of Power Cords: Unspecified > > > Contained Elements: 0 > > > > > > > > > Signed-off-by: Ilias Apalodimas > > > > Reviewed-by: Peter Robinson > > Tested-by: Peter Robinson > > > > > --- > > > lib/smbios.c | 41 +++++++++++++++++++++++++++++++++++++++-- > > > 1 file changed, 39 insertions(+), 2 deletions(-) > > I've thought about this a lot. > > As I mentioned earlier, we should require boards to add this > information when they enable GENERATE_SMBIOS_TABLE > > It is a simple patch for each board vendor and it solves the problem. > What we have here just masks it. Not entirely. I think we just see the problem differently here. I agree that the code here masks a problem (but only for *some* boards) and ideally we should go and add smbios nodes on the boards that miss it. However we conveniently keep ignoring OF_BOARD here. Until those things are documented in a spec and you can *demand* a previous bootloader to include it, we'll have boards that display "Unknown" all over the place. Personally I don't think that's acceptable, hence the last resort solution. I'd be much happier if we popped a warning on boards that miss the smbios node and are not compiling with OF_BOARD, explaining smbios will be disabled for them in the future, while having the flexibility to not display values that make no sense. Thanks /Ilias > > Regards, > Simon