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 87625C433EF for ; Wed, 27 Apr 2022 04:48:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B6F85810E7; Wed, 27 Apr 2022 06:48:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ngaqU+vZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A029C83A95; Wed, 27 Apr 2022 06:48:23 +0200 (CEST) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5511C80762 for ; Wed, 27 Apr 2022 06:48:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x636.google.com with SMTP id h12so569197plf.12 for ; Tue, 26 Apr 2022 21:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=aMzyPBKBqBdBxLauhvGZ7SCyZLFhERgxpACKZk9C5IY=; b=ngaqU+vZwf9dwplh05DJ1AKlOaqXENjQ1CuFL5J1DFB2SAuiyuTsj/BVjfR33etZ+k UG2PwydPTwMR18C3a12RH6ACXUDedNjTVU285/cTfqYlrUgqCY2gA7JsOid33iJaRbtg MRLbFKtxoFticSWjcjQl8VnHmcHIJRYRb2W8i/TxTxH0EiPe/bBaGpjygUzCqZoHKIGe taal5M2aqAXWHp4LwaLYx+LscRVmNtg2Rm/K1jnNdMbEdDhhCyy2te6EcGZaIlm9YQPX dg2riwqy2OsH003BCil4EFBEXPXRIjgrIVwc8FBE3JDbnWdE380+qkYkBXa631gW7qLs bZHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=aMzyPBKBqBdBxLauhvGZ7SCyZLFhERgxpACKZk9C5IY=; b=EcpjLOWKiYBmmKxDg/8p/Rpxb7K5G8gG+nz0437ur4FTjnP3zNryKcfl4fkRviQTZH UJblgsa0VF7wBuHGZAs3BR3N5qTj6RMG8rigkAI+hpdTInJx4kL+CowzPd4pNRM9IHn6 S1FVo8I8dvYSnv9sdMRtmJLPmoquvJuBlM+6KNuWzgRNCF8OSaQisJQ7E5E6goTKjUXl MJKuw8zKDLzZFGs+Y2LL8XcAGmEeMxC1kqxbTtESjQIlY7uyE5/Bt1jFQxHiDUP2lfTW wHbQtChfQgN2LV1I4CZhcO+IrPwwblXCqll8YZloaSytpOd7XamNoBM8WSznN+JMNTve j7cQ== X-Gm-Message-State: AOAM5322lss3/zXCBRg4lTWWQDLdOmMlDypP4rvwjE9Abl2aKfw4Pdms lXWQsi9JeKrBy041B78pgXRVdA== X-Google-Smtp-Source: ABdhPJz1G/PRhldNB0m2W6oDdhqaeY6TesyHexJlbcJOqLC+XH5Yx6ntMkrrQeLRefga4Bwmvw/Sww== X-Received: by 2002:a17:902:a5cc:b0:158:9a2b:480e with SMTP id t12-20020a170902a5cc00b001589a2b480emr26795594plq.19.1651034897580; Tue, 26 Apr 2022 21:48:17 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:314b:b45f:a930:f992]) by smtp.gmail.com with ESMTPSA id 123-20020a620681000000b004fa7c20d732sm16669596pfg.133.2022.04.26.21.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 21:48:17 -0700 (PDT) Date: Wed, 27 Apr 2022 13:48:13 +0900 From: AKASHI Takahiro To: Mark Kettenis Cc: sjg@chromium.org, xypron.glpk@gmx.de, u-boot@lists.denx.de Subject: Re: efi_loader breakage Message-ID: <20220427044813.GB34649@laputa> Mail-Followup-To: AKASHI Takahiro , Mark Kettenis , sjg@chromium.org, xypron.glpk@gmx.de, u-boot@lists.denx.de References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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(). -Takahiro Akashi > /* > * We won't support UCLASS_BLK with dev_* interfaces. > */ > > So I'm a bit at a loss what is needed here.