From patchwork Thu Oct 22 14:19:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1386287 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=IvORdscV; 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 4CH8fD43PSz9s0b for ; Fri, 23 Oct 2020 01:20:36 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7CFB782456; Thu, 22 Oct 2020 16:20: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="IvORdscV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2310E82424; Thu, 22 Oct 2020 16:20:08 +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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (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 0BAB982424 for ; Thu, 22 Oct 2020 16:20:04 +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-x142.google.com with SMTP id j17so1885371ilr.2 for ; Thu, 22 Oct 2020 07:20:03 -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=NNU8Edll9pJa9s3YsHEk6HUd3feeZvxxtG6ibxzIwLQ=; b=IvORdscVC4iN7tzH+DWj0n8R27Lt0oNZsgxJWaNKW2Be+AIiXOVYUfxPZW8TO7kqxG 2pU/h+pfPme6ZLgneMEGuCu17a/zevy43k3ss+6eduS78XWu6oKsepgexg60fOlVW4mw UU/nBW2EhG6/J7xrq95RASDzr5unUOU4CQkRM= 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=NNU8Edll9pJa9s3YsHEk6HUd3feeZvxxtG6ibxzIwLQ=; b=rZzt7+y3Groa2EX/5de8QOPWFVZmpsgerxHsuuj40SymwdsCF8TMId08kvS+zLEMOa 373fKhYvUA/pHMbipZEU1qLZGMrlEI4WHT1jWiAqeySxSNvsguX+eL/zb/ZnPTJnUZBw nAa9gEVqRIx2cqAa0rHmdQdfzqGFWIoG6dpOa8ZLVFr18lmjpgr6qHD4wnXSv0Mm1+u/ 1uvx2SIdfPuOWOQPIz2/3JkXmmJvqC/3buuqNIHE+V+TM/c7Yevfk0gTFE8XZfWdTdC9 PM39YJRdQ44jQVjeSWb4zXBPCIcLClIFuFN3hft5NWp3dY7AOTJnY3NhpagkPE2NwTht WN+A== X-Gm-Message-State: AOAM5321ktb16OSl8amStD/E6jghTlh6voQN0ExJX12FSnvhgegQAP/W F/YIvUTfGVQerDw+yvYZuYegvcVFc1f78kr0 X-Google-Smtp-Source: ABdhPJzGmdBM//NtDNMPA+TC8zjH0p2qeFs/pwkdKWQZGDI0L2gr31529J9XHUq42F4w8FV6ePt+wA== X-Received: by 2002:a92:89d0:: with SMTP id w77mr1046038ilk.101.1603376402670; Thu, 22 Oct 2020 07:20:02 -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 j3sm1211115ilq.85.2020.10.22.07.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 07:20:02 -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 v4 05/13] smbios: Add more properties Date: Thu, 22 Oct 2020 08:19:40 -0600 Message-Id: <20201022141949.711984-5-sjg@chromium.org> X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog In-Reply-To: <20201022141949.711984-1-sjg@chromium.org> References: <20201022141949.711984-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 be72a98c49d..87dd4be415d 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;