From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::443; helo=mail-wr1-x443.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 9671C2118FF2F for ; Thu, 22 Nov 2018 09:26:53 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id r10so9964694wrs.10 for ; Thu, 22 Nov 2018 09:26:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bs3vUL2s1hbVyXHURlM67Rz5kmloSZ5MLFegXx90uWg=; b=S0s1htIGyVi3rkX7aGFC7HlEVya1kEmH1lzff90oPtCQvm4hI/ySilHiG5m52xWVcB UYeNFokeeLI4eRZXkBM0ofAp5mGQQSJ7GWciFibDf94bDl/eThyBq4zbSBqr37NSeXJ8 1mwLwRymfTZ1Io55O6vaku9raacMjO4NGbiPU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bs3vUL2s1hbVyXHURlM67Rz5kmloSZ5MLFegXx90uWg=; b=IK0SX6t63J/hnM/uXGg1Ot2JlG0EeeJtf9Z8wjQzNuBHKb7BXHnz6uBteMlkXL2ypy rC190Nz2rsnAY5C6pDmiKtVHm+wRo69lJ6yDEYMnLIAo9C6Lk5YWX7gRFqtba81DxqP7 eAX5qO06FFRhBr3SVMCbZi33EmBQ/68iB/W/L8vhcaMv10DV2rVMzbM0Q20qrFpj0GYi dF1mZxFz6dY9cyFvwP94UhMfcZZcMDDorB6ZS2RNxouHtmpo0PNjNDxbBhvv23D1JZ5D QnehChaEg4dBuo+sP1aOCp7LmzuEj1X2yQpYEcuwhH5nthPcrXsxOkqD+7hRH4YYaBOo O/pw== X-Gm-Message-State: AA+aEWZ6z6UZc5wUbdNFDF1aehaAXsCdT2glzBiDACEdfhYkN0IKxmhV YnZZzmnWR6dJmL6oZJXhxhyKBuViolv6Cw== X-Google-Smtp-Source: AFSGD/Ub0fAiUI1S9MJOAde+0lw9ufn/fc/tvw/ktVGSEQz3j6JhcbIb7wngLT8IhxXOcm2Bm9CcHg== X-Received: by 2002:adf:9123:: with SMTP id j32-v6mr10175269wrj.0.1542907611561; Thu, 22 Nov 2018 09:26:51 -0800 (PST) Received: from mba13.wifi.ns.nl ([2a01:cb1d:112:6f00:6422:2edf:11bf:f2b]) by smtp.gmail.com with ESMTPSA id v1sm8874985wrw.90.2018.11.22.09.26.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 09:26:50 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, thomas.abraham@arm.com, nariman.poushin@linaro.org, lersek@redhat.com, philmd@redhat.com, Ard Biesheuvel Date: Thu, 22 Nov 2018 18:26:43 +0100 Message-Id: <20181122172645.20819-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181122172645.20819-1-ard.biesheuvel@linaro.org> References: <20181122172645.20819-1-ard.biesheuvel@linaro.org> Subject: [PATCH edk2-platforms 2/4] Platform/ARM/BdsLid: drop unused BdsStartEfiApplication () X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 17:26:54 -0000 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 --- 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; -} -- 2.17.1