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 X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15DF6C48BCD for ; Wed, 9 Jun 2021 15:15:00 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D617A611CC for ; Wed, 9 Jun 2021 15:14:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D617A611CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de 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) 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-Google-Smtp-Source: ABdhPJxjIKBkGG6ioQp7rzsWmtqMiBtrJguk8gk5RBCVwp8A9WZxykB3dG0aKFKUSGq6/Rhfo4TA9w== 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 Content-Transfer-Encoding: 8bit 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(-) 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; -- 2.32.0.rc0