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 64CE9ECAAD8 for ; Fri, 16 Sep 2022 20:30:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1388B84BDA; Fri, 16 Sep 2022 22:30:37 +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="uN9fnwLj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3669C84BDB; Fri, 16 Sep 2022 22:30:36 +0200 (CEST) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 D2A5984BD8 for ; Fri, 16 Sep 2022 22:30:33 +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-x62c.google.com with SMTP id y3so52051718ejc.1 for ; Fri, 16 Sep 2022 13:30:33 -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=Mw/BD/BsDGrdEjsJFaHI7f9s24JrhYyL80iZNnqwrA8=; b=uN9fnwLjj9SLQss5pCDJmj0U2hExcCjF8aP6If8/nJGc+B0b8r8KSEtjXNMHLe1tRw NKVUcqDuMKGZplvSBlcyL2zr2+vQOM8FBYxBJsVu6DfqS5AR+Aua3IOcfnPay+j0pBVm HQkricRLGAgHVNyL0+RQwV+i7SlzdSRF0jLyghzqBrJe/+in3JHrvmr5rgjcs3C+gcvR +ocTI088B3JqsweeJCjMge3TOzvYgUDL0r+dVFFc6Y6bAjwd9U/aH7GJF7MY5gtFReVR K6f3da73hPj36BTH/L/LB/6zv4jyqDjvNBpANMTkzaXYOXtXJbiP+5aSm3uMOlSVcYrW 7dJg== 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=Mw/BD/BsDGrdEjsJFaHI7f9s24JrhYyL80iZNnqwrA8=; b=61Un9ZS7U9wMYntMxarqQS6I1N08fe+BRBpFoZH1UlKB0PWuFZUGMFlorpSFslXuNr W5tEB0ubtrp5TOmAGZ7lbVyiNThMCaHqXNUkzEiJNic8l5Pz9ApYpuaHVdp5opa8pbc3 Rck95271/aEYT1tLINuqSvROFz/UmCoH4HvNj9/mXH9Iidtzq4B8h8Vyir7s7DdY0Ll4 ZxEWEPNNZ+T72QoxE/+EHPQwf2e5+g/BDXkiI/ZgiyEQw+pAZdYeToOiQc2JVxMIPHw1 cRjfJxL7BtU5buFWWWYgXsksKRv7vrZLkNU9lKvoxv/YfjWd7ZHFEEvozkc5SYN+h6t5 MORQ== X-Gm-Message-State: ACrzQf14Ug0GAcAmxXOq7tFKcrz+Qlr1cT4I56hB3hdBS2IhYS/AMV36 mud182+KDJWXcmnAdEIA8k/9Yg== X-Google-Smtp-Source: AMsMyM5Xyow6VPfciUX4KJClYoYGxCnm9RbDRZMs2lV53M1HDYwZa1QhTEgjxPOOauoZFObIypMIkA== X-Received: by 2002:a17:906:ef8c:b0:77c:7b35:8b04 with SMTP id ze12-20020a170906ef8c00b0077c7b358b04mr4462342ejb.573.1663360233443; Fri, 16 Sep 2022 13:30:33 -0700 (PDT) Received: from hera ([46.103.15.185]) by smtp.gmail.com with ESMTPSA id my39-20020a1709065a6700b0073d9a0d0cbcsm10773023ejc.72.2022.09.16.13.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Sep 2022 13:30:32 -0700 (PDT) Date: Fri, 16 Sep 2022 23:30:30 +0300 From: Ilias Apalodimas To: Simon Glass Cc: U-Boot Mailing List , Tom Rini , Heinrich Schuchardt , Peter Robinson Subject: Re: [PATCH 1/2] smbios: Simplify reporting of unknown values Message-ID: References: <20220906134426.53748-1-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, [...] > > Signed-off-by: Ilias Apalodimas > > --- > > lib/smbios.c | 17 +++-------------- > > 1 file changed, 3 insertions(+), 14 deletions(-) > > Perhaps a better fix is to drop the smbios info? Unfortunately there's a ton of userspace tools still using it. So I think we still need it > > What upstream projects use this information to show things to the > user? You showed a screenshot of some sort of system-info app. We > could teach it about falling back to the device tree. That way we are > not adding fake information to SMBIOS. > What's fake here? The model and compatible are taken directly from the DT and that should be accurate. I'd rather fix the DT if that's problematic. What would make sense for me to change is take the first token of the compatible node instead of the entire string as it's format is expected to be anyway. > Also, SMBIOS is a legacy thing and a PITA to work with. How about we > use the device tree binding for the same info: > > smbios { > compatible = "u-boot,sysinfo-smbios"; > > smbios { > system { > manufacturer = "pine64"; > product = "rock64_rk3328"; > }; > > baseboard { > manufacturer = "pine64"; > product = "rock64_rk3328"; > }; > > chassis { > manufacturer = "pine64"; > product = "rock64_rk3328"; > }; > }; > }; > > This is easy to parse and gets us away from all this legacy junk that > we don't need. That's the exact opposite of the patch description. Most of these info are already included in the DT in it's standard properties. So if U-Boot ends up with a DT without these we get a usable smbios table. For example a DT handed over by the previous stage bootloader would not include these nodes. As far as sysinfo-smbios node is concerned, it's only present in 13 boards, so it's not like it's used by the majority of boards. Yes we could fix them, but imho we are better off re-using what's already there and defined on the DT spec at least for the simplistic values. Thanks /Ilias > > Regards, > Simon