From patchwork Thu Jul 18 17:46:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1133786 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="isOIH+nC"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45qM576FtTz9s3l for ; Fri, 19 Jul 2019 03:46:35 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7E57AC21FE1; Thu, 18 Jul 2019 17:46:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E20BCC21F01; Thu, 18 Jul 2019 17:46:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A017EC21F01; Thu, 18 Jul 2019 17:46:28 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lists.denx.de (Postfix) with ESMTPS id 57B8BC21DED for ; Thu, 18 Jul 2019 17:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1563471984; bh=zu0DHb4Hmr9IkSENGk5iBEYQg2lm9TsbR335wdSlus8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=isOIH+nCFt+ObXqDN88jdGxfCh+3F5tz1jjfiwONyrbRAkejQ7qRrdPooXwwYZRoo /piOWzuKRdzxJ/qtCogm9WnhMFnDkmUJoko+aX0kVCMZ8R1qKlpAD7pn7mpWXJza0Y cmwegiZ64iCSnTYzuV+FGrs+ZPYEoFtMrNlIhW5M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([84.118.159.3]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1M8ykW-1hlPKI0JJm-0066f0; Thu, 18 Jul 2019 19:46:24 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Thu, 18 Jul 2019 19:46:16 +0200 Message-Id: <20190718174616.5193-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:myV93yQfcn+Ca7nC3SK5JZu1SLXWf4Xn2Iw8m/yUiJz4cl95LTw QSjCRVX5NcoqKPGp+nMb6u6N6We/8o9O0TONtrHjUI6KSrBnXMl2lXwG+pS7cItwLWIVro2 mIkn4egbbn1JGYUnlo7kkQE94ApOm4+KhJMLGu05ch39A+VwemjPk70nbu2diiweiknJfzU tP9LEBVtODv16qV+oOcNw== X-UI-Out-Filterresults: notjunk:1; V03:K0:cjXYzD/rAoM=:lB/fSR1zrO+MdKjM4YkmRo 5P9eCpRyl3eUFNpmHNAfS0QNhZjGSQp1sUr4NFnN3PRLz5LswDV+NmxZB55m80bx2STOVNBUF 2UX1SiC88oGW1WHvOveSCISVXDa5zSADTbc9hM3WgBKpSfLK3YjMZYaCwn/aiX6576vCJhRR9 V0enknLGgxai2khuaoheANyN2SiU1B8C3hfDEVxG2smM9FNm6ZIpK8aFcDDp4Ps8SAWZSqxa8 HAsZYTrniOxPGzYv/492WfO9hUKUGaTXAb675hMdGAAJLZ3LMbZ1uDl6Xk7KXREGz0vqoal6E AiYzu528W2hh3I6pjQnEMpoUaOzgHSAUFLICWAurPQmzhooDmbmMRi7w55aKnScxiQuc6tAtR 4I2OMnjUnqox0r/OPIxphwLNFXdMcuEbceWOIKVrK51qpgvK3sacFiZPtZhR1ZhnNwdf4kHMe zNyMts2M0pLC5QDL64aSRLDTsZbmWDLcV0tw63vPYvY+Rsrhwz9vj84OAoAIpBhDH2GSx5eE3 Y3hYy0mYR0cirI+mQe4wnp//oLvdG8rY8J0LTxKX4GZICKjbD52lSrKPLZw6kdWrkX3uASvGi oVdXj0JwgAfz6lL8dWvy+BhcYo7ywNOb+3jjlmHv5sjqBQ7T7Qgmrx5GDPZrscyRiMKBO3335 IT5Dn76pqmGOVmqn9OIfs3PrVGdhHZmHt7yxZ3zpT/CPAh2U7rLa0KcgqYe9E3x0U/yO+WWFT mhd8Pxxo5LzqZl0tbX8nP+CX5r3wrbvKAJ57SZeYHRvd/Gk67cR+F4ulBXqt+eZnq2+zTmklV Mk21fiA+EtwA+cPint+X0bvBUCBWdmIXiGBvU/FnF1c/OY5tJiHV23/iYP9/ZC/bPuHaX6STT J0WobZeU3Yd8oX0Fp7lJBA0/cs45wkOCB0RQs9EuGLc7fz1pp+5MXd5wrFxJPWLYNEfe2G58B N48h5P66SUiqDxYZQ+6uMYKndZuC+2Ao456rt5Mzqw7ogSNS5PLeWcAb7zRnqezj0XaDqVT8L 4FER5eVSI4rxMzMIPmI71YbpnbsNV8hkCM/m36AQwypu3yeABCwi/nl/AOtV1vUkLgGlLPSPq q8FyDEggMdF1Hs= Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Jonathan Gray Subject: [U-Boot] [RFC 1/1] efi_loader: usage of cleanup_before_linux() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Always call cleanup_before_linux() on ARM 32bit during ExitBootServices(). This fixes a problem problem for booting BSD on ARM 32bit. Reported-by: Jonathan Gray Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_boottime.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- 2.20.1 diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 4f6e8d1679..171f485f6b 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -39,14 +39,6 @@ LIST_HEAD(efi_register_notify_events); /* Handle of the currently executing image */ static efi_handle_t current_image; -/* - * If we're running on nasty systems (32bit ARM booting into non-EFI Linux) - * we need to do trickery with caches. Since we don't want to break the EFI - * aware boot path, only apply hacks when loading exiting directly (breaking - * direct Linux EFI booting along the way - oh well). - */ -static bool efi_is_direct_boot = true; - #ifdef CONFIG_ARM /* * The "gd" pointer lives in a register on ARM and AArch64 that we declare @@ -1916,8 +1908,7 @@ static void efi_exit_caches(void) * Grub on 32bit ARM needs to have caches disabled before jumping into * a zImage, but does not know of all cache layers. Give it a hand. */ - if (efi_is_direct_boot) - cleanup_before_linux(); + cleanup_before_linux(); #endif } @@ -2893,8 +2884,6 @@ efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle, if (ret != EFI_SUCCESS) return EFI_EXIT(EFI_INVALID_PARAMETER); - efi_is_direct_boot = false; - image_obj->exit_data_size = exit_data_size; image_obj->exit_data = exit_data;