Hi Heyi,

Thanks for this - committed as SVN r19148.

Regards,

Leif

On Mon, Nov 23, 2015 at 04:25:25PM +0800, Heyi Guo wrote:
> Load File protocol requires remaining device path rather than whole
> device path. For PXE, it actually requires end node device path only,
> or else invalid parameter will be returned directly.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Heyi Guo <[email protected]>
> Cc: Leif Lindholm <[email protected]>
> Cc: Ard Biesheuvel <[email protected]>
> ---
>  ArmPkg/Library/BdsLib/BdsFilePath.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ArmPkg/Library/BdsLib/BdsFilePath.c 
> b/ArmPkg/Library/BdsLib/BdsFilePath.c
> index 0410236..aefeaed 100644
> --- a/ArmPkg/Library/BdsLib/BdsFilePath.c
> +++ b/ArmPkg/Library/BdsLib/BdsFilePath.c
> @@ -752,14 +752,14 @@ BdsPxeLoadImage (
>      return Status;
>    }
>  
> -  Status = LoadFileProtocol->LoadFile (LoadFileProtocol, *DevicePath, TRUE, 
> &BufferSize, NULL);
> +  Status = LoadFileProtocol->LoadFile (LoadFileProtocol, 
> RemainingDevicePath, TRUE, &BufferSize, NULL);
>    if (Status == EFI_BUFFER_TOO_SMALL) {
>      Status = gBS->AllocatePages (Type, EfiBootServicesCode, 
> EFI_SIZE_TO_PAGES(BufferSize), Image);
>      if (EFI_ERROR (Status)) {
>        return Status;
>      }
>  
> -    Status = LoadFileProtocol->LoadFile (LoadFileProtocol, *DevicePath, 
> TRUE, &BufferSize, (VOID*)(UINTN)(*Image));
> +    Status = LoadFileProtocol->LoadFile (LoadFileProtocol, 
> RemainingDevicePath, TRUE, &BufferSize, (VOID*)(UINTN)(*Image));
>      if (!EFI_ERROR (Status) && (ImageSize != NULL)) {
>        *ImageSize = BufferSize;
>      }
> -- 
> 2.6.2
> 
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to