From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03olkn0823.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::823]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 98AC120D77DA5 for ; Thu, 6 Apr 2017 09:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=IFNmocBM1MfmZ3zz7eFvgcmlnalA7lj9qtb1k9ybsSw=; b=R/LxVUV+9Nq3nJ3LlKSg1pw3avOCR//fCJIjdBvlp+9DLNZ3VGslruCR3rtvatedOK3KuMYGc5MLGzv2PBUCz//I7dJFt8zTbYg+ewcz2+kohI1huJkHWjIRYRQVnXskYVni24r7i4lDF9XK98YiFIH+ShIzYZPAUWHP2AV8I3q65bV6XAEcEmQNup/vYzhc0M8IZFPTdg2+BagrZbykfx3WKhSQGdgH4qP+MXPim5gXYsZ7B4qt0DujEIN3Qvf3aJV6LSzPHHHvJwi72vXXuCS6x6nMX+whPWqK6JiaDRVs+nIvLEQHBDXz3nkq0mBTjYsXcCs0E5e7L3RT0teqcw== Received: from CO1NAM03FT006.eop-NAM03.prod.protection.outlook.com (10.152.80.56) by CO1NAM03HT144.eop-NAM03.prod.protection.outlook.com (10.152.81.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1019.14; Thu, 6 Apr 2017 16:44:41 +0000 Received: from MWHPR11MB1822.namprd11.prod.outlook.com (10.152.80.51) by CO1NAM03FT006.mail.protection.outlook.com (10.152.80.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.14 via Frontend Transport; Thu, 6 Apr 2017 16:44:41 +0000 Received: from MWHPR11MB1822.namprd11.prod.outlook.com ([10.175.53.137]) by MWHPR11MB1822.namprd11.prod.outlook.com ([10.175.53.137]) with mapi id 15.01.1019.014; Thu, 6 Apr 2017 16:44:41 +0000 From: Amit kumar To: Andrew Fish CC: "edk2-devel@lists.01.org" Thread-Topic: [edk2] How to get fs index from controller handle. Thread-Index: AQHSrr3tutVovAtWfUWhYEt1ieg82aG4LwAAgABbsgA= Date: Thu, 6 Apr 2017 16:44:40 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: apple.com; dkim=none (message not signed) header.d=none;apple.com; dmarc=none action=none header.from=hotmail.com; x-incomingtopheadermarker: OriginalChecksum:A447FED155600935D0AC801351A0B6F15A8498EB3166727D2104208287797D0A; UpperCasedChecksum:1142CB9CE67CBBDDBA96FA101DEAFCFFA188ADE87DA297F91320D3F56545F02A; SizeAsReceived:8132; Count:43 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [EauuHdxRLQbsBLPuz8gPCTWDXoyRDLo2] x-microsoft-exchange-diagnostics: 1; CO1NAM03HT144; 5:GptGmqGkqzkHcL+ONBPDA6BzBbDI5G7oa7AP+pJ5GCKWoMHLJN3w7jYAc6Qtc+SfdsdtWDFjgDwQl4b2ZCRLvBje7+zfOR1UjF2Jr91gp8VPw9Bq6AqGz1ZR/uJnQsQDPwxsKp8ey8WCd+gKJzYBYA==; 24:WRoexkOqCyiB9dfVGqP52AJ4W2e7po6b2Uq4khGF5nwPdJc+tZBlxbYs+s1LhdJ5DQCE0+8cU9aeIW39TUne8OeZ+qCiB96k369fhIdHmsI=; 7:d+eQDTPPwm2JdDh1D1VwnD0zXkOLKhC01hhklAIccL1Ie52iI7y1lWiQSAO1LTucI90RJXfSNijINXAza/5xggXiftOFq4uR7RJBqVzbUpv/CCZQ4XduJKRFdClZd+SToPY4IEHZaPMhVjw5013Q0fNVxi67T7huE3rs5XKGpLta8MMnsv1d/SmcaAwQ6QIkptQcHNm8xbMV2/OfbIMgpSOYDQHIJTRBTqbEMashRz7PXv9IUndD3C9I7aq0iL6xBVh3OihG1c8xMYc6wEnm60uL4yJ4EtkfK08Mu/Wgg7RB58tQlxwLgAPYc6MJ51Qv x-incomingheadercount: 43 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:CO1NAM03HT144; H:MWHPR11MB1822.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: 98af291d-3f3b-4b95-58db-08d47d0c38b2 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031322274)(1603101448)(1601125374)(1701031045); SRVR:CO1NAM03HT144; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:CO1NAM03HT144; BCL:0; PCL:0; RULEID:; SRVR:CO1NAM03HT144; x-forefront-prvs: 02698DF457 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2017 16:44:40.8562 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM03HT144 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: Re: How to get fs index from controller handle. 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: Thu, 06 Apr 2017 16:44:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Can i use gbs->loadimage() and gbs->startimage() to load an efi application= and execute it. Suppose i have a app1.efi and from app1.efi i want to execute app2.efi. Or is there some other way to do it ? Not considering ShellExecute(); Amit ________________________________ From: afish@apple.com on behalf of Andrew Fish Sent: Thursday, April 6, 2017 4:39:22 PM To: Amit kumar Cc: edk2-devel@lists.01.org Subject: Re: [edk2] How to get fs index from controller handle. On Apr 6, 2017, at 3:30 AM, Amit kumar > wrote: Hi, I want to get the fs index from the controller handle. e.g In map command i see my controller is mapped to fs10. So i there any API i can use in my code to get the fs index( which is 10 as= in example) from the controller handle. Amit, It is important to remember that fs0:, and the other device names are a She= ll concept and not an EFI concept. So they only exist in the context of the= shell. I took a quick look and I did not see an easy way to do this with the curre= nt Shell APIs. In the older Shell you could use this protocol EfiShellEnvironment2 Proto= col has a function that converts a EFI_DEVICE_PATH_PROTOCOL (would be on yo= ur controller handle) to a CHAR16. Thus you can get the volume name the She= ll would display to the user. I don't the index exists as a concept. So E= FI_SHELL_ENVIRONMENT2.GetFsName() and EFI_SHELL_ENVIRONMENT2.GetFsDevicepa= th() are the closest thing I can think of. https://github.com/tianocore/edk2/blob/master/ShellPkg/Include/Protocol/Efi= ShellEnvironment2.h#L812 The only problem with that is EfiShellEnvironment2 is not produced by the S= hell by default. ## This flag is used to control the protocols produced by the shell # If TRUE the shell will produce EFI_SHELL_ENVIRONMENT2 and EFI_SHELL_IN= TERFACE gEfiShellPkgTokenSpaceGuid.PcdShellSupportOldProtocols|FALSE|BOOLEAN|0x00= 000002 I've use the EFI_SHELL_ENVIRONMENT2 in the past to enable a non Shell appli= cation to print out volume names that match the map command of the shell. H= opefully some one knows how to do this in the modern Shell? Thanks, Andrew Fish Regards Amit _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel