From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0041.outbound.protection.outlook.com [104.47.0.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A9D142095A6DF for ; Mon, 3 Jul 2017 00:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=IR3ZhkuQkuZn1jEryBgGfq5YhpsHvSSwEboleDeCVkw=; b=CfkbMfWJkl3ijpf+Y8zEA9Lf6I0qoCnPjEokzoZh2+xYDcRgtt7Gdx09T+Z7+1WnWpwUf9KLjvKS5j3U3W/zRT6AltkXTiN+wHWa85mrI1RySqGGJlMcOhTGHOPAPO5nsYQGza5dpJAnsdn/XmFeYU7Dd+fX7yx/+/rGk3jnW+k= Received: from DB3PR04MB0761.eurprd04.prod.outlook.com (10.160.51.152) by DB3PR04MB0762.eurprd04.prod.outlook.com (10.160.51.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Mon, 3 Jul 2017 07:18:45 +0000 Received: from DB3PR04MB0761.eurprd04.prod.outlook.com ([fe80::b9bd:c1d8:3250:7955]) by DB3PR04MB0761.eurprd04.prod.outlook.com ([fe80::b9bd:c1d8:3250:7955%17]) with mapi id 15.01.1199.022; Mon, 3 Jul 2017 07:18:45 +0000 From: Udit Kumar To: "edk2-devel@lists.01.org" Thread-Topic: Accessing global variables from Shell Thread-Index: AdLzy3oe7lQO5icYQtSBECeovPpwGQ== Date: Mon, 3 Jul 2017 07:18:44 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=nxp.com; x-originating-ip: [192.88.169.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR04MB0762; 7:kjv+zaLPi02CnGF8B19JyeSeZiqjmBAIVrpR39LCnXyxSap3nyPphaIcwSkoW46G2S0kUxXdX99Tsa7c4nojwdvUfln8wHPgvtHOjmoXQ2klJis6ZAVrt/si8iy7FBYT+A6DUppfHDPZMXdHowHg4RR5nhmMysKJFUxPDspuy6g44OGvj67kpiJBc9bsFgt8IreN4ws8uN/f8e7cA87ElMFSMk2qnzfEtkagfrycluPQU13pOc3L7AVmCFp+dmXvfP3S9B7HmwG4NswB2yVCyS2/t1vn7fdw9jPQYNWUwE2gWjlZbJrMBHqVkQ/0Amxb8IaK6+VgwjoJhC4BIR138LIfyyG+3+suOWas0K7l1QaaQgdZxqZUh0sWHMQIQTfWtfg0Xo+zBuLiy+XmvD4XZOw0OT3ts1iDV/yxGF7EazcLGeTcD0lkbjKyzPgK7IUxazSomz1zYpMX1GgySZtVajr7f9ryVmIET6bsGaOMG54y5/8peBeqWj7PbQfiqbDh26nfBhAKdNNK6FvIMztB844WBwUGKKpT2Mhz8Y1TpMJOywCK/kVCFNlhxK2nX+RKGZgvKbWA1QlIx/KwUUc+/Cdphdyh4Glp5B/oGXCvWA6q4PqJ4t27EWeuAOMhSkXZi/lnkiG0aZkG1e/NT1OyrwjvwT3F2JG1pme36f2wlE9WMMa7JUcKl40zjbHZGZVZy83ELC5jOJc8sIm5awwXgKJ0Lqo1dk0l7XuQcDPs3JHA9FmJSocEAKzOY4GuZQOf4g6gNr7s+2ntG0aepPm0G3r4Ojc9KwP5M2obWtADuRc= x-ms-office365-filtering-correlation-id: e55e1b3c-cf67-4a37-5646-08d4c1e3bdb2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DB3PR04MB0762; x-ms-traffictypediagnostic: DB3PR04MB0762: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(236129657087228)(92977632026198)(247924648384137); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123560025)(20161123558100)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB3PR04MB0762; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB3PR04MB0762; x-forefront-prvs: 035748864E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39850400002)(39410400002)(39450400003)(39840400002)(39860400002)(575784001)(413944005)(74316002)(33656002)(81166006)(86362001)(99286003)(110136004)(66066001)(9686003)(3660700001)(8936002)(38730400002)(55016002)(2906002)(25786009)(189998001)(3280700002)(2900100001)(8676002)(6916009)(14454004)(6116002)(102836003)(3846002)(478600001)(6506006)(7696004)(6436002)(2351001)(2501003)(54356999)(50986999)(5640700003)(7736002)(5660300001)(53936002)(5250100002)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR04MB0762; H:DB3PR04MB0761.eurprd04.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2017 07:18:44.7848 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR04MB0762 Subject: Accessing global variables from Shell X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 07:17:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dear Edk2,=20 I am trying to create one global variables, and access that from shell.=20 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.=20 Original code=20 STATIC CONST CHAR16 myVar[] =3D L"MacUniqueId"; Status =3D gRT->SetVariable ((CHAR16 *)myVar, &gEfiCallerIdGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, Size, On shell=20 FS0:\> setvar MacUniqueId -guid C9DCF469-A7C4-11D5-87DA-00062945C3B9 setvar: Unable to get - C9DCF469-A7C4-11D5-87DA-00062945C3B9 - MacUniqueId FS0:\> setvar MacUniqueId setvar: Unable to get - 8BE4DF61-93CA-11D2-AA0D-00E098032B8C - Hello When I changed the guid to gEfiGlobalVariableGuid STATIC CONST CHAR16 myVar[] =3D L"MacUniqueId"; Status =3D gRT->SetVariable ((CHAR16 *)myVar, &gEfiGlobalVariableGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, Size, I could access it=20 FS0:\> setvar MacUniqueId 8BE4DF61-93CA-11D2-AA0D-00E098032B8C - MacUniqueId - 0004 Bytes 42 FF 7A AF Thanks for suggestion.=20 Regards Udit