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=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 DA33CC49EA6 for ; Sat, 26 Jun 2021 18:32:52 +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 60FE661C3F for ; Sat, 26 Jun 2021 18:32:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60FE661C3F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.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 14EE182CDA; Sat, 26 Jun 2021 20:31:21 +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="mB+2YsK6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7BC4A82C40; Sat, 26 Jun 2021 20:30:53 +0200 (CEST) Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 5736382C3A for ; Sat, 26 Jun 2021 20:30:50 +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@google.com Received: by mail-ot1-x335.google.com with SMTP id i12-20020a05683033ecb02903346fa0f74dso13227725otu.10 for ; Sat, 26 Jun 2021 11:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HZZh7mtn85F27c9iT79pCvzQ/YU8PS0z/sO4rWGzbFw=; b=mB+2YsK6x49cBeoFhVn7Dd3rKtthXFzPADbaOR44OF6ozh66Rw1UDm19IAowFtAyeh kZRy89B6A2YfTRgAImfkYN+jUgjba/iTytsb2UvjhYwNyxPQ2mRNixQ6QWVg8up4DqgW wfZAZGHN6vcBDZGLPjkNSCmpxsjNWQvwmIpVQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HZZh7mtn85F27c9iT79pCvzQ/YU8PS0z/sO4rWGzbFw=; b=quEY8hgUXx2nKMjpLsC8XG//LluUegD/4czZUxPU3ewlA3ROSVlnz0V1YReZSAkbO0 WmzPy7MZnC3pRr8MegldnxriVQcIAi06wyz/NVkByhR/SZiuY3L+J8/NPAzR1I0zIJ8f usHIiDNawmblwwQdL1C7R6CF7kliksJ0UByEk5IlzB5wV5FSWJEsGwhdusJr2rsaXKZB PqNL0MI2sJa2aFqfkpRcfAnKcMX+k34yXx5rOn0ze9gDNWy4kIJJNemeOi7qXMOmrno8 R02BpAXgVWFOt0XpBU3zak7CThESIO9DoxGSjnJDrprUIG/oFPYk9oRJTZhlXXtr1Z7c M5pA== X-Gm-Message-State: AOAM5306/Uf27Mo3gRrgbJRHoXkwjJuLgbmPYKjidDVNfwl4ixrS/EgO cWdeg7qcKwxiFTaAuVRskZnQEEG0nvORwSeDcOmcFf0vX0Y= X-Google-Smtp-Source: ABdhPJwBgfj/kd0QCxBLjFCyN4Cqz0WGd5XXyQGUnMpVOrFgcnzC63rwnpytiIQk3Rh2H+y0iYZzDxmij0hCDskxjgc= X-Received: by 2002:a9d:74d4:: with SMTP id a20mr14750218otl.28.1624732248742; Sat, 26 Jun 2021 11:30:48 -0700 (PDT) MIME-Version: 1.0 References: <20210609151448.828133-1-ilias.apalodimas@linaro.org> In-Reply-To: <20210609151448.828133-1-ilias.apalodimas@linaro.org> From: Simon Glass Date: Sat, 26 Jun 2021 12:29:59 -0600 Message-ID: Subject: Re: [PATCH] smbios: Fix BIOS Characteristics Extension Byte 2 To: Ilias Apalodimas Cc: Heinrich Schuchardt , Bin Meng , Christian Gmeiner , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" 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.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Ilias, On Wed, 9 Jun 2021 at 09:14, Ilias Apalodimas wrote: > > 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 Can you please drop this #ifdef while you are here - should use IS_ENABLED() > - 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 > Regards, Simon