From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, thomas.abraham@arm.com,
nariman.poushin@linaro.org, philmd@redhat.com
Subject: Re: [PATCH edk2-platforms 2/4] Platform/ARM/BdsLid: drop unused BdsStartEfiApplication ()
Date: Thu, 22 Nov 2018 18:55:11 +0100 [thread overview]
Message-ID: <b4bcdeaf-3268-5eb7-081c-5915d76df891@redhat.com> (raw)
In-Reply-To: <20181122172645.20819-3-ard.biesheuvel@linaro.org>
On 11/22/18 18:26, Ard Biesheuvel wrote:
> To prevent having to fix it, let's drop BdsStartEfiApplication
> entirely since it is never used.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> Platform/ARM/Include/Library/BdsLib.h | 19 -------
> Platform/ARM/Library/BdsLib/BdsFilePath.c | 58 --------------------
> 2 files changed, 77 deletions(-)
>
> diff --git a/Platform/ARM/Include/Library/BdsLib.h b/Platform/ARM/Include/Library/BdsLib.h
> index 4528c2e8739b..23f777d4097d 100644
> --- a/Platform/ARM/Include/Library/BdsLib.h
> +++ b/Platform/ARM/Include/Library/BdsLib.h
> @@ -140,25 +140,6 @@ BootOptionAllocateBootIndex (
> VOID
> );
>
> -/**
> - Start an EFI Application from a Device Path
> -
> - @param ParentImageHandle Handle of the calling image
> - @param DevicePath Location of the EFI Application
> -
> - @retval EFI_SUCCESS All drivers have been connected
> - @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
> - @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.
> -
> -**/
> -EFI_STATUS
> -BdsStartEfiApplication (
> - IN EFI_HANDLE ParentImageHandle,
> - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
> - IN UINTN LoadOptionsSize,
> - IN VOID* LoadOptions
> - );
> -
> EFI_STATUS
> BdsLoadImage (
> IN EFI_DEVICE_PATH *DevicePath,
> diff --git a/Platform/ARM/Library/BdsLib/BdsFilePath.c b/Platform/ARM/Library/BdsLib/BdsFilePath.c
> index 7a4a5052a786..67dafa4f3651 100644
> --- a/Platform/ARM/Library/BdsLib/BdsFilePath.c
> +++ b/Platform/ARM/Library/BdsLib/BdsFilePath.c
> @@ -1353,61 +1353,3 @@ BdsLoadImage (
> {
> return BdsLoadImageAndUpdateDevicePath (&DevicePath, Type, Image, FileSize);
> }
> -
> -/**
> - Start an EFI Application from a Device Path
> -
> - @param ParentImageHandle Handle of the calling image
> - @param DevicePath Location of the EFI Application
> -
> - @retval EFI_SUCCESS All drivers have been connected
> - @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
> - @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.
> -
> -**/
> -EFI_STATUS
> -BdsStartEfiApplication (
> - IN EFI_HANDLE ParentImageHandle,
> - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
> - IN UINTN LoadOptionsSize,
> - IN VOID* LoadOptions
> - )
> -{
> - EFI_STATUS Status;
> - EFI_HANDLE ImageHandle;
> - EFI_PHYSICAL_ADDRESS BinaryBuffer;
> - UINTN BinarySize;
> - EFI_LOADED_IMAGE_PROTOCOL* LoadedImage;
> -
> - // Find the nearest supported file loader
> - Status = BdsLoadImageAndUpdateDevicePath (&DevicePath, AllocateAnyPages, &BinaryBuffer, &BinarySize);
> - if (EFI_ERROR (Status)) {
> - return Status;
> - }
> -
> - // Load the image from the Buffer with Boot Services function
> - Status = gBS->LoadImage (TRUE, ParentImageHandle, DevicePath, (VOID*)(UINTN)BinaryBuffer, BinarySize, &ImageHandle);
> - if (EFI_ERROR (Status)) {
> - return Status;
> - }
> -
> - // Passed LoadOptions to the EFI Application
> - if (LoadOptionsSize != 0) {
> - Status = gBS->HandleProtocol (ImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &LoadedImage);
> - if (EFI_ERROR (Status)) {
> - return Status;
> - }
> -
> - LoadedImage->LoadOptionsSize = LoadOptionsSize;
> - LoadedImage->LoadOptions = LoadOptions;
> - }
> -
> - // Before calling the image, enable the Watchdog Timer for the 5 Minute period
> - gBS->SetWatchdogTimer (5 * 60, 0x0000, 0x00, NULL);
> - // Start the image
> - Status = gBS->StartImage (ImageHandle, NULL, NULL);
> - // Clear the Watchdog Timer after the image returns
> - gBS->SetWatchdogTimer (0x0000, 0x0000, 0x0000, NULL);
> -
> - return Status;
> -}
>
Makes sense; first we import BdsLib.h, then fix it up together with the
(sole) lib instance.
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
next prev parent reply other threads:[~2018-11-22 17:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 17:26 [PATCH edk2-platforms 0/4] Platform/ARM: fix DevicePath mishandling in BdsLib Ard Biesheuvel
2018-11-22 17:26 ` [PATCH edk2-platforms 1/4] Platform/ARM: import ARM platform specific BdsLib header Ard Biesheuvel
2018-11-22 17:36 ` Laszlo Ersek
2018-11-22 17:26 ` [PATCH edk2-platforms 2/4] Platform/ARM/BdsLid: drop unused BdsStartEfiApplication () Ard Biesheuvel
2018-11-22 17:55 ` Laszlo Ersek [this message]
2018-11-22 17:26 ` [PATCH edk2-platforms 3/4] Platform/ARM/BdsLib: don't clobber BdsLoadImage() DevicePath IN param Ard Biesheuvel
2018-11-22 18:09 ` Laszlo Ersek
2018-11-22 18:14 ` Ard Biesheuvel
2018-11-22 18:23 ` Laszlo Ersek
2018-11-22 17:26 ` [PATCH edk2-platforms 4/4] Platform/ARM/BdsLib: maintain alignment for DevicePaths Ard Biesheuvel
2018-11-22 18:35 ` Laszlo Ersek
2018-11-23 8:35 ` Ard Biesheuvel
2018-11-23 9:39 ` Laszlo Ersek
2018-11-23 4:20 ` [PATCH edk2-platforms 0/4] Platform/ARM: fix DevicePath mishandling in BdsLib Thomas Abraham
2018-11-23 8:44 ` Ard Biesheuvel
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=b4bcdeaf-3268-5eb7-081c-5915d76df891@redhat.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