From: Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
To: Arend van Spriel <arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
Matt Fleming
<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: access efi variables
Date: Tue, 17 Sep 2013 16:46:30 +0100 [thread overview]
Message-ID: <20130917154630.GG3409@console-pimps.org> (raw)
In-Reply-To: <5234965F.3050404-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
On Sat, 14 Sep, at 07:01:19PM, Arend van Spriel wrote:
> On 09/14/13 00:37, H. Peter Anvin wrote:
> >On 09/13/2013 08:37 AM, Arend van Spriel wrote:
> >>I need to obtain a uefi variable so I went looking at the API in
> >>include/linux/efi.h. I found the following definition:
> >>
> >>But according to the specs the variable I need to obtain is 2k bytes.
> >>Should I expect trouble :-p
> >>
> >
> >efivarfs doesn't have those limitations.
>
> Thanks, Peter
>
> Looking into efivarfs it seems to use the functions that I looked at
> in efi.h so I guess I am misinterpreting the 1024 bytes limitation
> in the comment (either that or you are mistaken ;-) ). I need to
> access the variable from within a device driver so using efivarfs
> does not feel like the way to go here.
Look at how efivarfs_file_read() is implemented, e.g. using
efivar_entry_get(). In particular, note how it kmalloc()'s a buffer for
reading the variable data into, thereby avoiding any 1024-byte
limitation.
--
Matt Fleming, Intel Open Source Technology Center
WARNING: multiple messages have this Message-ID (diff)
From: Matt Fleming <matt@console-pimps.org>
To: Arend van Spriel <arend@broadcom.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Matt Fleming <matt.fleming@intel.com>,
linux-efi@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: access efi variables
Date: Tue, 17 Sep 2013 16:46:30 +0100 [thread overview]
Message-ID: <20130917154630.GG3409@console-pimps.org> (raw)
In-Reply-To: <5234965F.3050404@broadcom.com>
On Sat, 14 Sep, at 07:01:19PM, Arend van Spriel wrote:
> On 09/14/13 00:37, H. Peter Anvin wrote:
> >On 09/13/2013 08:37 AM, Arend van Spriel wrote:
> >>I need to obtain a uefi variable so I went looking at the API in
> >>include/linux/efi.h. I found the following definition:
> >>
> >>But according to the specs the variable I need to obtain is 2k bytes.
> >>Should I expect trouble :-p
> >>
> >
> >efivarfs doesn't have those limitations.
>
> Thanks, Peter
>
> Looking into efivarfs it seems to use the functions that I looked at
> in efi.h so I guess I am misinterpreting the 1024 bytes limitation
> in the comment (either that or you are mistaken ;-) ). I need to
> access the variable from within a device driver so using efivarfs
> does not feel like the way to go here.
Look at how efivarfs_file_read() is implemented, e.g. using
efivar_entry_get(). In particular, note how it kmalloc()'s a buffer for
reading the variable data into, thereby avoiding any 1024-byte
limitation.
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-09-17 15:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 15:37 access efi variables Arend van Spriel
2013-09-13 15:37 ` Arend van Spriel
2013-09-13 16:39 ` Arend van Spriel
[not found] ` <52333139.6020203-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2013-09-13 22:37 ` H. Peter Anvin
2013-09-13 22:37 ` H. Peter Anvin
[not found] ` <5233939B.3020401-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-09-14 17:01 ` Arend van Spriel
2013-09-14 17:01 ` Arend van Spriel
[not found] ` <5234965F.3050404-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2013-09-17 15:46 ` Matt Fleming [this message]
2013-09-17 15:46 ` Matt Fleming
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=20130917154630.GG3409@console-pimps.org \
--to=matt-hnk1s37rvnbexh+ff434mdi2o/jbrioy@public.gmane.org \
--cc=arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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.