From patchwork Thu Nov 22 17:26:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 151804 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1018599ljp; Thu, 22 Nov 2018 09:26:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/UtlVhr9OjzEKrLWPczt/AWAtIOSZYQBJDS28Jtvkbxk0iNL3sgnWSYCbrD+yfhr6zuCdRN X-Received: by 2002:a63:7c13:: with SMTP id x19mr10699277pgc.45.1542907615541; Thu, 22 Nov 2018 09:26:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542907615; cv=none; d=google.com; s=arc-20160816; b=HRL5NWMc0s08vEvtw4UoLSG4gVj4QBxhVwNSSvzumuK3ZeTh4B5NcoNGxikdnKYCdD k5PUauQFxd4lLPnLdfK8VIqVZDBCSkQI24NUD+LHQjcjGlRyxNkLvn0YmYmf4lI2PC0/ rRpVEMV9pbUr4Rch2PBEo5cno8D6sdk2igyR9oq000u63TBIejuONN971XC+1ICiUrIW G8SiQ/JHW0tn+r6Y5XHq046k0xddC5rnvUJuBg3ckud2zs3IMQOPZ7d6RnfT2U6dMYhJ 5nO7ghWw1saR73RfxJvcZ9uSjFpm7Dtzz7MtrOkQPmUoNSAmfQbTxx8IQZIAMCYi2yOU 9PYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=cvk0XXAHy2jfZBdSDPjoWwYlgCH0F4Sw3x735JFP0E8=; b=qbOoKUTW3pu+ofVJp+TXnketFjrxTVx//IyjF4/TLvBJlcpUl2n4Q0EBaXa4t+Cj6F OP/cfLRDcJnqFQnNyspE5a2ngAqRoD89Q1RCsNQcx1Z5dPwdIfxMxfgMFzBF8BMLzfCd lI4VoJwO3hxzFuWAYFLwFp4G0/8v4xlJVTL9HApFl7AW0lATtAIfpTSI4N/HyKb6XhHk +zm/s/B/GpddsnkMZ2myMQlinQsBGlM8/vLcsXf5Jix1Ns4zMh+zmjWvAOoWQT7Xozhs 2IXzDg20bKaR+lkuTDg31Ze6YiorAVLxjqI01MOQK7x8sQYfcssTQ5N4Jo+Aswl/eMRQ lhYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=S0s1htIG; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id 5-v6si53141734plt.408.2018.11.22.09.26.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 09:26:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=S0s1htIG; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2A2142119486B; Thu, 22 Nov 2018 09:26:55 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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-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 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: [edk2] [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: , Cc: lersek@redhat.com, nariman.poushin@linaro.org MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek 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; -}