From patchwork Thu Oct 22 03:08:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1385904 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=NkEWSoFu; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CGspy22WYz9sSn for ; Thu, 22 Oct 2020 14:12:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C693E8249B; Thu, 22 Oct 2020 05:09:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="NkEWSoFu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7A4B082490; Thu, 22 Oct 2020 05:09:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,T_SPF_HELO_TEMPERROR autolearn=no autolearn_force=no version=3.4.2 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (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 8A7348243D for ; Thu, 22 Oct 2020 05:08:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x141.google.com with SMTP id j17so366518ilr.2 for ; Wed, 21 Oct 2020 20:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HFGiyOStINIDyolAnGWahQzDIz9T/NUWE4BuHni4mUQ=; b=NkEWSoFuM1K/53jauIMI3PiNjqqyojFcCKrAi1s/5CvSIclRxBFV22OrXPKcNklbPs s/Wz6DYAr+gnvwXrm6NdM6Y22UfGZvJOSjMl5CRc62JAu2cLY/+n/j4DvGwpKeT44zAi YxEK1XFUI4iQw3W1vbGY6sNoGl4joZsqs4nQM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HFGiyOStINIDyolAnGWahQzDIz9T/NUWE4BuHni4mUQ=; b=Ln69ONGppce+iGN8Z+z7E5DFctBw0iJP7IwVu2FTWaYOMrXHvoBEfmZsrKHs6voJL9 HA4/WmcM2ZPELA92am1fGd7V9iLw3Vtul5M7dDQZj7KkBAAwKNuYOTadBqH92KB+5w+Y uAYsDaOBcjRTUMc/zMY8XjhIYUB3SSnMt3GjYdR0wae+IJPHsTIgGK7pw7FOfjIKYzoi zKG1WGGiXPT68yhRcPzGPspZlS6gRzPo93B78ci+Ek5XEVwdt8JinkIwrZSsM2PI/ZSA CXmBVfyKSS39ZC4jfgYM35svKk4RaIqL9dpS2n60WTW4W59Fp28OLE36QXqcRSnPdVsB Soug== X-Gm-Message-State: AOAM530/FlF8di70yxlvnG8FTBtEryQdf71esis3z21+yGGOa+co9ZqU U17OcDJq0A2reDsT4WQcFgI3OA7RlaNHA3eu X-Google-Smtp-Source: ABdhPJxqUEmmbcX5KQlBtehKN6Q37PhIEVUZwtZCDkjFyBYaNvdCd/byYLmsrlfoWm8UzftPQDjvVw== X-Received: by 2002:a92:9944:: with SMTP id p65mr403995ili.127.1603336122361; Wed, 21 Oct 2020 20:08:42 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id r2sm222586ile.1.2020.10.21.20.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 20:08:41 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Andy Shevchenko , Heinrich Schuchardt , Bernhard Messerklinger , Wolfgang Wallner , Walter Lozano , Simon Glass Subject: [PATCH v3 5/6] smbios: Add more properties Date: Wed, 21 Oct 2020 21:08:26 -0600 Message-Id: <20201022030828.586067-5-sjg@chromium.org> X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog In-Reply-To: <20201022030828.586067-1-sjg@chromium.org> References: <20201022030828.586067-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean The current tables only support a subset of the available fields defined by the SMBIOS spec. Add a few more. Signed-off-by: Simon Glass --- (no changes since v1) lib/smbios.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/smbios.c b/lib/smbios.c index 6d3c20a48ee..e97a3bfe6f3 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -173,12 +173,15 @@ static int smbios_write_type1(ulong *current, int handle, ofnode node) CONFIG_SMBIOS_MANUFACTURER); t->product_name = smbios_add_prop_default(t->eos, node, "product", CONFIG_SMBIOS_PRODUCT_NAME); + t->version = smbios_add_prop(t->eos, node, "version"); if (serial_str) { t->serial_number = smbios_add_string(t->eos, serial_str); strncpy((char *)t->uuid, serial_str, sizeof(t->uuid)); } else { t->serial_number = smbios_add_prop(t->eos, node, "serial"); } + t->sku_number = smbios_add_prop(t->eos, node, "sku"); + t->family = smbios_add_prop(t->eos, node, "family"); len = t->length + smbios_string_table_len(t->eos); *current += len; @@ -199,6 +202,7 @@ static int smbios_write_type2(ulong *current, int handle, ofnode node) CONFIG_SMBIOS_MANUFACTURER); t->product_name = smbios_add_prop_default(t->eos, node, "product", CONFIG_SMBIOS_PRODUCT_NAME); + t->asset_tag_number = smbios_add_prop(t->eos, node, "asset-tag"); t->feature_flags = SMBIOS_BOARD_FEATURE_HOSTING; t->board_type = SMBIOS_BOARD_MOTHERBOARD;