From patchwork Wed Jun 9 15:14:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 456825 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp5413215jae; Wed, 9 Jun 2021 08:14:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5Ig++mO78BZH9g63AMySK14F80N7IjewZRAOC3RXx51CAy5t6/9caMdpVmZ8pH699lDOi X-Received: by 2002:a17:906:488f:: with SMTP id v15mr377187ejq.428.1623251699244; Wed, 09 Jun 2021 08:14:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623251699; cv=none; d=google.com; s=arc-20160816; b=m0j2X+YTbUXxWDQ6fn1a0jWJih8KrdOn77p9S+nfYs8ZyH5AxhkK6bK0qQX7PLfKPe fYzMCK6k08+dMSxo886Dr5tHWv4W/FrSbRzC4nKAbfcIXD4p3MgTZs1WFtaiW1wvdrsW 6VEghywGxEVziDCmUOlJpcUrRM4ZLJb8MbMbrOTx745yi8p1r57uT7sQpebTFB8V0Voe FDMPgptargVEaYwBHbPY/Nn8BJErbai7Fl5YcqHmH1fPl1izi88C60KkRXRsrObhGAsm VNdKcDRJj4ZLz0jRN1tYAhRqpi9Qw7WrSYNWHetilJKo6bkhq8H8YVYaUuVkX1RGFpxK fhZg== 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=CsZmjwRcTgVRhrt/RGDyVrzEcSWg5R+Cf45MJDdIr+o=; b=eh+RIxNniXuhEJB7fTkKg7mJuLyD9oUOIxfKsVml0URtEKwFAMQIfpK6bfI7WJ8BBC DtMbUY2b9yUHdU27FXspMiqGbh9mp/bVrD7OLZUL4B8wvYmGo0PsHNcrGJNmvbkrK10x NxHX1XriA6bKzl4Gu4pbVQhJipCCYg4jt570lkMj5x5lHcUxglXcSBAAwyrF/L2wSV8a timNvgshi7j/va1kM4RF0XGmnuKvq37jszWPjGRDgYdbKxAdagoozpX0zMLfXio0r40o DY2CFIGrBxz0/lGAiR2v/uk1yXEFk1btvvzerxiyLuI01V6bEbB9h0C3ITp//NDvJ+N3 l+Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sPtJYD7b; 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 v22si98105eji.478.2021.06.09.08.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 08:14:59 -0700 (PDT) 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=sPtJYD7b; 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 7767382F04; Wed, 9 Jun 2021 17:14:56 +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="sPtJYD7b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ADDA982F07; Wed, 9 Jun 2021 17:14:54 +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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (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 DD89082EF5 for ; Wed, 9 Jun 2021 17:14:51 +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-wm1-x32b.google.com with SMTP id l11-20020a05600c4f0bb029017a7cd488f5so4494765wmq.0 for ; Wed, 09 Jun 2021 08:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CsZmjwRcTgVRhrt/RGDyVrzEcSWg5R+Cf45MJDdIr+o=; b=sPtJYD7b/Zudyq+atwcuz/P4LfhzjYfDnpg+YFVnPCkcO6NCHF9hvBeBObxJDA8UPb JjssTHLw9B4a6M3m2i5G0P1eBmGrDnYEkUBJsIlDGhkw5FIKlzdGEO17SxFG3moCGLZk YFqyPKp0/VNwoDs4vV3Hl2Tr/OYVoPQbG68zVdNHcDFPpl6VPGJBKFjhG/rXxMuwfCw2 ycA4JDCI/3y9GBePSspdU8b8g9ZUmuFtJxrqx/5a6pCEKuCW/NMBCFaOLFtYSpwEZ01y i98R+UsR+UgnvRYk6qJ6Cs0D2gAQXdKDPmfzEl/vwHBm6MiYwgRqEiRe+ztUtS+IVko8 qFQQ== 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:mime-version :content-transfer-encoding; bh=CsZmjwRcTgVRhrt/RGDyVrzEcSWg5R+Cf45MJDdIr+o=; b=qGwLRE6DiN6C2XCB1N5k5QW7kMeL30u3f5bp5TKyd4a+Ix/Ptwd0BTVFPdEd4u7kAX vJGCyKtrXPLS2kMOCtmj7CLOcjNjLf+lxC/1isZLTY7zLCHK2N9yd/sQr+GZ73BRtaJu /ZEQpLeHUw9EYt5gVk341QHAOhnhtUcEGN2kGHUrKvW5JHw7ltmrqn/uHhRNwe0HVGFI flh+kX7Qgqyi3HQe2p4dOjLJzt8mtIT5549WgqhdClqhKuu23ZjuU4+kjSdDOkvEzLWB KhjOxCuYN0lz/mWMytmNZxsrfFR05XWCoaj500NtHBBkcs+FL7lSxxrIY6gl0TIA+F/J NOBQ== X-Gm-Message-State: AOAM531oBGSpGriszAIgGxPZuAkMCIHVPeC5nqS6M5b7RoJz1+4GaK1c 3+WCE/yjZ4BUqecsy2F/3mlhlw== X-Received: by 2002:a05:600c:190f:: with SMTP id j15mr10634761wmq.4.1623251691477; Wed, 09 Jun 2021 08:14:51 -0700 (PDT) Received: from localhost.localdomain (ppp-94-66-220-227.home.otenet.gr. [94.66.220.227]) by smtp.gmail.com with ESMTPSA id t9sm89158wmq.14.2021.06.09.08.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 08:14:51 -0700 (PDT) From: Ilias Apalodimas To: xypron.glpk@gmx.de Cc: Ilias Apalodimas , Bin Meng , Simon Glass , Christian Gmeiner , u-boot@lists.denx.de Subject: [PATCH] smbios: Fix BIOS Characteristics Extension Byte 2 Date: Wed, 9 Jun 2021 18:14:47 +0300 Message-Id: <20210609151448.828133-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.32.0.rc0 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.4 at phobos.denx.de X-Virus-Status: Clean We currently define the EFI support of an SMBIOS table as the third bit of "BIOS Characteristics Extension Byte 1". The latest DMTF spec defines it on "BIOS Characteristics Extension Byte 2". Signed-off-by: Ilias Apalodimas --- include/smbios.h | 2 +- lib/smbios.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) -- 2.32.0.rc0 diff --git a/include/smbios.h b/include/smbios.h index ffeefb47372d..fc49fc10b9d7 100644 --- a/include/smbios.h +++ b/include/smbios.h @@ -60,7 +60,7 @@ struct __packed smbios_entry { #define BIOS_CHARACTERISTICS_SELECTABLE_BOOT (1 << 16) #define BIOS_CHARACTERISTICS_EXT1_ACPI (1 << 0) -#define BIOS_CHARACTERISTICS_EXT1_UEFI (1 << 3) +#define BIOS_CHARACTERISTICS_EXT2_UEFI (1 << 3) #define BIOS_CHARACTERISTICS_EXT2_TARGET (1 << 2) struct __packed smbios_type0 { diff --git a/lib/smbios.c b/lib/smbios.c index 9eb226ec9fbd..abdd157a7084 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -214,6 +214,7 @@ static int smbios_write_type0(ulong *current, int handle, gd->smbios_version = ctx->last_str; log_debug("smbios_version = %p: '%s'\n", gd->smbios_version, gd->smbios_version); + t->bios_characteristics_ext2 = 0; #ifdef LOG_DEBUG print_buffer((ulong)gd->smbios_version, gd->smbios_version, 1, strlen(gd->smbios_version) + 1, 0); @@ -229,9 +230,9 @@ static int smbios_write_type0(ulong *current, int handle, t->bios_characteristics_ext1 = BIOS_CHARACTERISTICS_EXT1_ACPI; #endif #ifdef CONFIG_EFI_LOADER - t->bios_characteristics_ext1 |= BIOS_CHARACTERISTICS_EXT1_UEFI; + t->bios_characteristics_ext2 |= BIOS_CHARACTERISTICS_EXT2_UEFI; #endif - t->bios_characteristics_ext2 = BIOS_CHARACTERISTICS_EXT2_TARGET; + t->bios_characteristics_ext2 |= BIOS_CHARACTERISTICS_EXT2_TARGET; /* bios_major_release has only one byte, so drop century */ t->bios_major_release = U_BOOT_VERSION_NUM % 100;