All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	util-linux-ng@vger.kernel.org
Cc: leif.lindholm@linaro.org, kzak@redhat.com
Subject: Re: [PATCH] lspcu: use sysfs for table access if available
Date: Wed, 12 Apr 2017 11:14:50 +0200	[thread overview]
Message-ID: <ca8730a8-c200-3f93-4997-ae20322265c8@suse.de> (raw)
In-Reply-To: <20170412091129.27283-1-ard.biesheuvel@linaro.org>



On 12.04.17 11:11, Ard Biesheuvel wrote:
> On ARM systems, accessing SMBIOS tables via /dev/mem using read()
> calls is not supported. The reason is that such tables are usually
> located in EFI_RUNTIME_SERVICE_DATA memory, which is not covered
> by the linear mapping on those systems, and so read() calls will
> fail.
>
> So instead, use the /sys/firmware/dmi/tables/DMI sysfs file, which
> contains the entire structure table array, and will be available
> on any recent Linux system, even on ones that only export the rev3
> SMBIOS entry point, which is currently ignored by lscpu.
>
> Note that the max 'num' value is inferred from the size. This is not
> a limitation of the sysfs interface, but a limitation of the rev3
> entry point, which no longer carries a number of array elements.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Tested-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Alexander Graf <agraf@suse.de>

Thanks :)


Alex

  reply	other threads:[~2017-04-12  9:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12  9:11 [PATCH] lspcu: use sysfs for table access if available Ard Biesheuvel
2017-04-12  9:14 ` Alexander Graf [this message]
2017-04-18  9:23 ` Karel Zak

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=ca8730a8-c200-3f93-4997-ae20322265c8@suse.de \
    --to=agraf@suse.de \
    --cc=ard.biesheuvel@linaro.org \
    --cc=kzak@redhat.com \
    --cc=leif.lindholm@linaro.org \
    --cc=util-linux-ng@vger.kernel.org \
    /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.