From patchwork Mon Nov 27 17:10:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 747589 Delivered-To: patch@linaro.org Received: by 2002:a5d:6706:0:b0:32d:baff:b0ca with SMTP id o6csp3317447wru; Mon, 27 Nov 2023 09:11:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFP/k7MfTfpgkqDmietvb7xVbCDS/lR7f8UxiStFIsjTWacldt2tLcJkR4U/370UCtS/g6l X-Received: by 2002:a05:6a20:1581:b0:18c:c37:35fb with SMTP id h1-20020a056a20158100b0018c0c3735fbmr11220982pzj.40.1701105076372; Mon, 27 Nov 2023 09:11:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701105076; cv=none; d=google.com; s=arc-20160816; b=lsHAr+OTscE4nyWSFlHUjYeW0oTNCVAwnTB5l6tPnKczfXClPJFdbCgluU1Fl7qqsO mUSWVbHNZ4FXEr9nzwawBgZ3r11FaCBKCzLQRQkRKEce2MAeiFDOtvK6QDSGYyjOqGuy MdyEJ0VAaJCoqXkgKAO/X/iAH/tqZeN2K9N+Um6gEkZlQRbED3RGsjDVOGEsGevyduQQ BGYT2fxES2vwTBurtUDPF/ZT/YeGQ6dxY1Ou7obKeS8CywMKKXAqbfCZZS/PsyzZsjTF E2KrhrR+xgSc91Ps27Fy8Jh89s2OHbo1hQIA0NT0YRvoSzyCHR7EdgjZrfyQTAPrigQL WXCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=pCIAsPHbQnJgycpBLxVyqd2Hv4TNA2AXnw545LUnbLM=; fh=jwNYhKSCOQrn213V8+YBbGYt7vXt27XyZBd+tAuc71M=; b=r5JToP6ZfO4jZlLUZPc9ttCgBqRDGrS+CfRO+8xQtXjwNSDgmHGONPOjyOCeHOSLEp DY29PrvLfRzr98ZCad4PfhYs8FuDqkcCXdEMuAFt/AGNfkYY4RHe1ruE5suUJUGg34A0 t0ruTkvGKGj1vBMaEM0d3Wq1OChDwX5WBEeZXUZyLik6LBhkovZ+EeAvpjmrtOZ2MZ0Y zw6kJre5EtEAnmLvmmeCnpwCqIPKIA1bemMiPs7GmDhHpjDpxHVEQFL/f3E+ZbWf0zvM J7Q6AeFBrllpXCZt5bH7SuiPYFqVqUaG8+pmaZh0b2k/RIMudl6VZ82sZ2ymwPetJJ1P GE7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qsNQvzPQ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id u1-20020a63d341000000b005be3c62f45fsi9993460pgi.638.2023.11.27.09.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 09:11:16 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qsNQvzPQ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DA07787622; Mon, 27 Nov 2023 18:11:10 +0100 (CET) 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="qsNQvzPQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EFB4D87634; Mon, 27 Nov 2023 18:11:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (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 77D7787547 for ; Mon, 27 Nov 2023 18:11:04 +0100 (CET) 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-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2c72e275d96so59694541fa.2 for ; Mon, 27 Nov 2023 09:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701105064; x=1701709864; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=pCIAsPHbQnJgycpBLxVyqd2Hv4TNA2AXnw545LUnbLM=; b=qsNQvzPQsNttMUpb/9T07dBq6PVnzz1eYqx7hb/fh2ZZPCC6WiULsb3hoPWh+L6Y+/ TjyEk0DbYOwlvBdBkpGdvj3ffavxL0FVGnCWGY0CRMnp0xBYeHV99iJ+dqmVeFTxDcXi GMrAuCMHqzz0cltyFm4CWDGhUIIDgsE1aEMJVFK7E24w+sO3+PvBscRxcbtJMpi0HqcI bxXuv/JeSISXK8HHlVNPaErsd/5gRt1Ktpqe/0+PJO8Dp+SIXTppGWWzSlRBw80uHcdO sJHqlBzkx1/stVR7LTznfEDiJ1YDIYFJ+0nOVfMDCYWix+s9nLynrPAlCIFuN1+O6aPm uwLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701105064; x=1701709864; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pCIAsPHbQnJgycpBLxVyqd2Hv4TNA2AXnw545LUnbLM=; b=EI3TJMOrIGBSghCdcQIAJMurYRZlJD628VWOXr93ebpQ8bUGrw/0rCt5++kUC5E0GM wAwDcUFhsVqjzpeDOIiqs3QQXXeW2l1a2yLskMSutKYz93GRpnjyUGIE7MDdJGEX4Y9W 9tDIU9jhl2MPdKwgwSy3wj7nmWqOLtGkKxPOhKzr1NjkpiO2S37j1RNEX7esSRDSn4hF r8KSQ6davAQHUKRBZfdgHuj+93nBZhjFXVQ1wCUG6DbqAqJk9MCz0jvKAqsa6PxKrs6L uQEkreBGAsC8bFpxBbv5aiJvtG12TH9qHjK4qx1WNkj9YPfwFbRcEn5bFnGal7MnmXaS Wj+A== X-Gm-Message-State: AOJu0YwYIho+frS6LxtJOk4UzkQvIB26H+qVzL71jmNY+bJchudfLpJp 4cJw/dISEy+nHkh+6/VF5RX/jA== X-Received: by 2002:a2e:8e6c:0:b0:2c9:a114:253c with SMTP id t12-20020a2e8e6c000000b002c9a114253cmr2724880ljk.15.1701105063621; Mon, 27 Nov 2023 09:11:03 -0800 (PST) Received: from localhost.localdomain (ppp046103219117.access.hol.gr. [46.103.219.117]) by smtp.gmail.com with ESMTPSA id cp12-20020a056000400c00b00333040a4752sm2401198wrb.114.2023.11.27.09.11.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 09:11:03 -0800 (PST) From: Ilias Apalodimas To: trini@konsulko.com Cc: sean.anderson@seco.com, sjg@chromium.org, neil.armstrong@linaro.org, heinrich.schuchardt@canonical.com, mark.kettenis@xs4all.nl, Ilias Apalodimas , Peter Robinson , u-boot@lists.denx.de Subject: [PATCH 0/2 v2] Provide a fallback to smbios tables Date: Mon, 27 Nov 2023 19:10:56 +0200 Message-Id: <20231127171058.165777-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Hi, Tom asked me to clean up and resend [0]. I've made some adjustments -- The DT nodes are tokenized and a single string is used. The DT node 'model' is used to fill the SMBIOS 'Product Name' and 'compatible' is used for 'Manufacturer'. The reason is explained in patch#2 but the tl;dr is that model doesn't always include the manufacturer despite the suggestions of the DT spec. [0] https://lore.kernel.org/u-boot/20220906134426.53748-1-ilias.apalodimas@linaro.org/ Ilias Apalodimas (2): smbios: Simplify reporting of unknown values smbios: Fallback to the default DT if sysinfo nodes are missing lib/smbios.c | 109 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 92 insertions(+), 17 deletions(-) Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on libretech-cc --- 2.40.1