Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 145FAC433EF for ; Tue, 26 Apr 2022 17:07:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 50B1283993; Tue, 26 Apr 2022 19:07:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D4C2F83D53; Tue, 26 Apr 2022 19:07:16 +0200 (CEST) Received: from sibelius.xs4all.nl (80-61-163-207.fixed.kpn.net [80.61.163.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 72C8780107 for ; Tue, 26 Apr 2022 19:07:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=mark.kettenis@xs4all.nl Received: from localhost (bloch.sibelius.xs4all.nl [local]) by bloch.sibelius.xs4all.nl (OpenSMTPD) with ESMTPA id 3a1a3e90; Tue, 26 Apr 2022 19:07:13 +0200 (CEST) Date: Tue, 26 Apr 2022 19:07:13 +0200 (CEST) From: Mark Kettenis To: takahiro.akashi@linaro.org, sjg@chromium.org CC: xypron.glpk@gmx.de, u-boot@lists.denx.de Subject: efi_loader breakage Message-ID: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean commit d97e98c887ed8fa4a339350c02f093f03cd1cf4d breaks the OpenBSD bootloader. Or rather, it seems that this breaks access to raw devices through the UEFI interfaces, which is something the OpenBSD bootloader relies on. After this commit we end up calling dev_read() and dev_write() instead of blk_dread() and blk_dwrite(). But dev_read() and dev_write() only work if dev_get_blk() returns a valid struct blkdev, and that handles only for UCLASS_PARTITION. But when accessing raw devices we have a UCLASS_BLK. The easy fix would be to support UCLASS_BLK in dev_get_blk(), but that function has an explicit comment saying: /* * We won't support UCLASS_BLK with dev_* interfaces. */ So I'm a bit at a loss what is needed here.