All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Bin Meng <bmeng.cn@gmail.com>,
	 Christian Gmeiner <christian.gmeiner@gmail.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH] smbios: Fix BIOS Characteristics Extension Byte 2
Date: Sat, 26 Jun 2021 12:29:59 -0600	[thread overview]
Message-ID: <CAPnjgZ0M2MQJq=DwV8q8rEYHroRzOqza5QDcLXaf445moRtsUA@mail.gmail.com> (raw)
In-Reply-To: <20210609151448.828133-1-ilias.apalodimas@linaro.org>

Hi Ilias,

On Wed, 9 Jun 2021 at 09:14, Ilias Apalodimas
<ilias.apalodimas@linaro.org> 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 <ilias.apalodimas@linaro.org>
> ---
>  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

  parent reply	other threads:[~2021-06-26 18:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 15:14 [PATCH] smbios: Fix BIOS Characteristics Extension Byte 2 Ilias Apalodimas
2021-06-10 10:11 ` Heinrich Schuchardt
2021-06-10 10:18   ` Ilias Apalodimas
2021-06-26 18:29 ` Simon Glass [this message]
2021-06-26 18:40   ` Ilias Apalodimas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPnjgZ0M2MQJq=DwV8q8rEYHroRzOqza5QDcLXaf445moRtsUA@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=bmeng.cn@gmail.com \
    --cc=christian.gmeiner@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.