From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 10DDD21A18AAB for ; Tue, 11 Apr 2017 04:19:01 -0700 (PDT) Received: by mail-io0-x231.google.com with SMTP id r16so74781296ioi.2 for ; Tue, 11 Apr 2017 04:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=uVtRewa4hqnMZ+WoLpxBxu0vq/rGrX5hrMfm26ROWOM=; b=EqWHE3w/nyFseKxY8IbqwCKkKxLE9dykwlT51s8q6GyCShjK5/vw46M1odMvGjmFlQ uDJD6b4m3fasHEOx3Sm4xX3/YBsuwyFDL3scgjdbr42QfVNH9zgjlra789eKvao4U2ot wFr4VQd0JepF5qxQpU5qCv3HRCeYh8AOoTXUI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=uVtRewa4hqnMZ+WoLpxBxu0vq/rGrX5hrMfm26ROWOM=; b=MGCu/4QELuG7jgcf4izl+FFBbtdgGMwu1/unUVSLqEjHp2XzumZmKmwbWGWtiMN2V3 3bXRlQgMkgy3AMd5MLVjvrrunP2OsSZuRtgsebd6UARCSI5zQB/cO1s/SuZ9WM8HVuNg cZOpe6zAzOPUgox2YXX133g7PMbdEBl3zetQi5ym37UJYtmkU+gkcA6EQPW8NyR9MynB 41PPcmcHC23n4HEFqRZAXSwZm5cgUs3a5lQ+wcGaL5aP/B3UpywsguubR6xvn5DeBWmU ic7JZ9ssHpSBxH1uqXiWeTmvQC2cvMFQrKkYpFr9Aj9mLQ1xmGdLPHUNCrMfOp/RFhpm 5ZuA== X-Gm-Message-State: AN3rC/7lATVp1P2bBCpLHX0xjMrFehp8CmYUzkK40wRxEN3Z6bsG5s/RZmixjLVO3PYwPmF0542B64NvFFtwTDvQ X-Received: by 10.107.186.134 with SMTP id k128mr2035714iof.83.1491909540353; Tue, 11 Apr 2017 04:19:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.201.76 with HTTP; Tue, 11 Apr 2017 04:18:59 -0700 (PDT) In-Reply-To: References: <20170411091434.22967-1-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Tue, 11 Apr 2017 12:18:59 +0100 Message-ID: To: Evan Lloyd Cc: "edk2-devel@lists.01.org" , "leif.lindholm@linaro.org" , "ryan.harkin@linaro.org" Subject: Re: [PATCH] ArmPlatformPkg/EblCmdLib: remove dependency on deprecared ARM BdsLib 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: Tue, 11 Apr 2017 11:19:01 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11 April 2017 at 12:18, Evan Lloyd wrote: > Minor typo in title: "deprecared" should probably be deprecated? > Thanks Evan -- I spotted that myself, so I managed to fix it before pushing= . > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ar= d Biesheuvel > Sent: 11 April 2017 10:15 > To: edk2-devel@lists.01.org; leif.lindholm@linaro.org > Cc: ryan.harkin@linaro.org; ard.biesheuvel@linaro.org > Subject: [edk2] [PATCH] ArmPlatformPkg/EblCmdLib: remove dependency on de= precared ARM BdsLib > > The EBL alternative shell depends indirectly on the deprecated ARM BdsLib= via EblCmdLib, which only uses a single helper function that can easily be= cloned. So clone it, and remove the dependency. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c | 49 +++++++++++++++++++- > ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf | 1 - > 2 files changed, 48 insertions(+), 2 deletions(-) > > diff --git a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c b/ArmPlatformPk= g/Library/EblCmdLib/EblCmdLib.c > index 4a5f2be3947e..5bcd750bf9f8 100644 > --- a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c > +++ b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c > @@ -50,6 +50,53 @@ EblDumpFdt ( > ); > > /** > + Connect all DXE drivers > + > + @retval EFI_SUCCESS All drivers have been connected > + @retval EFI_NOT_FOUND No handles match the search. > + @retval EFI_OUT_OF_RESOURCES There is not resource pool memory to sto= re the matching results. > + > +**/ > +STATIC > +EFI_STATUS > +ConnectAllDrivers ( > + VOID > + ) > +{ > + UINTN HandleCount, Index; > + EFI_HANDLE *HandleBuffer; > + EFI_STATUS Status; > + > + do { > + // Locate all the driver handles > + Status =3D gBS->LocateHandleBuffer ( > + AllHandles, > + NULL, > + NULL, > + &HandleCount, > + &HandleBuffer > + ); > + if (EFI_ERROR (Status)) { > + break; > + } > + > + // Connect every handles > + for (Index =3D 0; Index < HandleCount; Index++) { > + gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE); > + } > + > + if (HandleBuffer !=3D NULL) { > + FreePool (HandleBuffer); > + } > + > + // Check if new handles have been created after the start of the pre= vious handles > + Status =3D gDS->Dispatch (); > + } while (!EFI_ERROR(Status)); > + > + return EFI_SUCCESS; > +} > + > +/** > Simple arm disassembler via a library > > Argv[0] - symboltable > @@ -393,7 +440,7 @@ EblDevicePaths ( > EFI_DEVICE_PATH_PROTOCOL* DevicePathProtocol; > EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* DevicePathToTextProtocol; > > - BdsConnectAllDrivers(); > + ConnectAllDrivers(); > > Status =3D gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL= , (VOID **)&DevicePathToTextProtocol); > if (EFI_ERROR (Status)) { > diff --git a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf b/ArmPlatform= Pkg/Library/EblCmdLib/EblCmdLib.inf > index c4b2ae1f6473..f33456abf3c2 100644 > --- a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf > +++ b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf > @@ -51,7 +51,6 @@ [LibraryClasses] > ArmDisassemblerLib > PerformanceLib > TimerLib > - BdsLib > FdtLib > > [Protocols] > -- > 2.9.3 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > IMPORTANT NOTICE: The contents of this email and any attachments are conf= idential and may also be privileged. If you are not the intended recipient,= please notify the sender immediately and do not disclose the contents to a= ny other person, use it for any purpose, or store or copy the information i= n any medium. Thank you.