From: Udit Kumar <udit.kumar@nxp.com>
To: Laszlo Ersek <lersek@redhat.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Accessing global variables from Shell
Date: Tue, 4 Jul 2017 04:33:59 +0000 [thread overview]
Message-ID: <DB3PR04MB07612AE4FB3CB740322FA9AF91D70@DB3PR04MB0761.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <06f5fd7b-bb17-5bfe-e30d-ffc766c02a1c@redhat.com>
Thanks Laszlo
Using file_guid works for me
Regards
Udit
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Monday, July 03, 2017 11:44 PM
> To: Udit Kumar <udit.kumar@nxp.com>; edk2-devel@lists.01.org
> Subject: Re: [edk2] Accessing global variables from Shell
>
> On 07/03/17 09:18, Udit Kumar wrote:
> > Dear Edk2,
> >
> > I am trying to create one global variables, and access that from shell.
> > If I am using gEfiGlobalVariableGuid to create variable then I could access it
> perfectly ok , If I use other Guid (even vendor guid) then I couldn't access from
> shell.
> >
> > Original code
> > STATIC CONST CHAR16 myVar[] = L"MacUniqueId";
> > Status = gRT->SetVariable ((CHAR16 *)myVar,
> > &gEfiCallerIdGuid,
> > EFI_VARIABLE_NON_VOLATILE |
> > EFI_VARIABLE_BOOTSERVICE_ACCESS |
> > EFI_VARIABLE_RUNTIME_ACCESS, Size,
> >
> > On shell
> > FS0:\> setvar MacUniqueId -guid C9DCF469-A7C4-11D5-87DA-00062945C3B9
> > setvar: Unable to get - C9DCF469-A7C4-11D5-87DA-00062945C3B9 -
> > MacUniqueId
>
> This GUID (in the shell command) is not one that you generated afresh with
> "uuidgen", namely it is found in
> "EdkCompatibilityPkg/Foundation/Guid/StatusCodeCallerId/StatusCodeCallerId.
> h".
>
> My take is that "gEfiCallerIdGuid" denotes a different GUID from C9DCF469-... If
> you take the actual FILE_GUID of the module INF where your example code is
> from, and use that GUID in the shell command too, it should work.
>
> Laszlo
prev parent reply other threads:[~2017-07-04 4:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 7:18 Accessing global variables from Shell Udit Kumar
2017-07-03 18:13 ` Laszlo Ersek
2017-07-04 4:33 ` Udit Kumar [this message]
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-list 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=DB3PR04MB07612AE4FB3CB740322FA9AF91D70@DB3PR04MB0761.eurprd04.prod.outlook.com \
--to=devel@edk2.groups.io \
/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