From mboxrd@z Thu Jan 1 00:00:00 1970 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 5A4E9C433F5 for ; Wed, 27 Apr 2022 09:31:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CCA8D83C05; Wed, 27 Apr 2022 11:31:39 +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 B722383E15; Wed, 27 Apr 2022 11:31:37 +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 4837D83B80 for ; Wed, 27 Apr 2022 11:31:35 +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 695074bd; Wed, 27 Apr 2022 11:31:34 +0200 (CEST) Date: Wed, 27 Apr 2022 11:31:34 +0200 (CEST) From: Mark Kettenis To: AKASHI Takahiro Cc: takahiro.akashi@linaro.org, sjg@chromium.org, xypron.glpk@gmx.de, u-boot@lists.denx.de In-Reply-To: <20220427072625.GD34649@laputa> (message from AKASHI Takahiro on Wed, 27 Apr 2022 16:26:25 +0900) Subject: Re: efi_loader breakage References: <20220427044813.GB34649@laputa> <20220427072625.GD34649@laputa> 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 > Date: Wed, 27 Apr 2022 16:26:25 +0900 > From: AKASHI Takahiro > > On Wed, Apr 27, 2022 at 01:48:13PM +0900, AKASHI Takahiro wrote: > > On Tue, Apr 26, 2022 at 07:07:13PM +0200, Mark Kettenis wrote: > > > 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. > > > > Probably I forgot this use case. > > > > > The easy fix would be to support UCLASS_BLK in dev_get_blk(), but that > > > function has an explicit comment saying: > > > > The best way to do is to modify efi_disk_rw_blocks(). > > I have already made necessary changes, but found another problem > (not relating to my patch) in device path handling. > > So I will post the patch once I fix the latter issue as well. Thanks, Looking forward to a patch to test. Mark