From: Simon Glass <sjg@chromium.org>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: Rick Chen <rick@andestech.com>, Leo <ycliang@andestech.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
u-boot@lists.denx.de
Subject: Re: [PATCH 1/2] smbios: enable setting processor family > 0xff
Date: Thu, 28 Dec 2023 13:37:13 +0000 [thread overview]
Message-ID: <CAFLszTikYxynGe3o3Sg2qTUgy-oXot=9BJ9F8vxCYF3-puDC4g@mail.gmail.com> (raw)
In-Reply-To: <20231228073024.6508-2-heinrich.schuchardt@canonical.com>
Hi Heinrich,
On Thu, Dec 28, 2023 at 7:30 AM Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> Many value of processor type exceed 0xff and have to be stored as u16
> value. In the type 4 table set processor_family = 0xfe signaling that
> field processor_family2 is used and write the actual value into the
> processor_family2 field.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> lib/smbios.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
> diff --git a/lib/smbios.c b/lib/smbios.c
> index 45480b01af..550b2471f9 100644
> --- a/lib/smbios.c
> +++ b/lib/smbios.c
> @@ -467,7 +467,8 @@ static void smbios_write_type4_dm(struct smbios_type4 *t,
> }
> #endif
>
> - t->processor_family = processor_family;
> + t->processor_family = 0xfe;
> + t->processor_family2 = processor_family;
Why not use 'family' if it fits?
> t->processor_manufacturer = smbios_add_prop(ctx, NULL, vendor);
> t->processor_version = smbios_add_prop(ctx, NULL, name);
> }
> @@ -489,7 +490,6 @@ static int smbios_write_type4(ulong *current, int handle,
> t->l1_cache_handle = 0xffff;
> t->l2_cache_handle = 0xffff;
> t->l3_cache_handle = 0xffff;
> - t->processor_family2 = t->processor_family;
>
> len = t->length + smbios_string_table_len(ctx);
> *current += len;
> --
> 2.43.0
>
Regards,
Simon
next prev parent reply other threads:[~2023-12-28 13:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 7:30 [PATCH 0/2] smbios: riscv: set correct SMBIOS processor family value Heinrich Schuchardt
2023-12-28 7:30 ` [PATCH 1/2] smbios: enable setting processor family > 0xff Heinrich Schuchardt
2023-12-28 13:37 ` Simon Glass [this message]
2023-12-29 11:18 ` Heinrich Schuchardt
2023-12-28 7:30 ` [PATCH 2/2] cpu: riscv: set correct SMBIOS processor family value Heinrich Schuchardt
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='CAFLszTikYxynGe3o3Sg2qTUgy-oXot=9BJ9F8vxCYF3-puDC4g@mail.gmail.com' \
--to=sjg@chromium.org \
--cc=heinrich.schuchardt@canonical.com \
--cc=ilias.apalodimas@linaro.org \
--cc=rick@andestech.com \
--cc=u-boot@lists.denx.de \
--cc=ycliang@andestech.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).