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 96551C433F5 for ; Wed, 27 Apr 2022 07:26:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 011BE83C05; Wed, 27 Apr 2022 09:26:38 +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="tMO6G6at"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5EE8683E15; Wed, 27 Apr 2022 09:26:35 +0200 (CEST) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 8051183B38 for ; Wed, 27 Apr 2022 09:26:32 +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-x62a.google.com with SMTP id k4so832424plk.7 for ; Wed, 27 Apr 2022 00:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=WaSRpW61TA27qamR1awB7rsTUhJFEy/tSMIMKNX0CiY=; b=tMO6G6atBFYmpjq56NrUih8puUkcOK6XaYH/E6hyIq25Hh39qNUTza3COpWfPGFcq0 i7KWjUz0eQ6eGRp/cL14u0V/3ImF6KtlCR6Qck4pkTvkhsT54cRnua7/SgWHCzXuzKXc PsNbCI0DuVpPnFWs7G4c4jKJy28SlXLubnEjsiWoP3MF6cBilWiIEbtOMqPhQGx2dNDL BP/sTiz8njLnlrnu7/EO/81WLA/6zUBoe/NW6HNl9Q++PdMaCq5LsZBRK3wCLULUxtc4 NEhEmll2QRabkiT5jwvGX1IDxl/bryzKLEWn1ap33+cpjlMCl5QNIsda7VylyKunmUvd LesQ== 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:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=WaSRpW61TA27qamR1awB7rsTUhJFEy/tSMIMKNX0CiY=; b=04fRYuoiOuR+WKNlMLzg1xxBZHMK4j3BjUXubs0F0L9NjS8cQMb3oexMm6ZVAYV+W1 jwS0yagA7Imd3Js4/B4of94fG+E8aPhY0+P135YhXaZ7WwxmyRx1p1Ac1rvRHmpOdRrb /J5Q1LriI7NEyZfICVeBEHV26I7LC0qXj4TYqLxycDKK8CGl/ToEnvWeXyZwlkwsiMuO tPpAQ0Lj1zhkjpnh+1tGYbp7A8k6kB06YVEwAdtbP2ImnxuDgVr8bLQrbnQFIJD2MSBl yvNIDUclM7wNgGOzd4Zm0ajc7p5Tq332Tf8oN6YbtR02coKJd6VFVT9JkU+7vxxjPQAb L3WA== X-Gm-Message-State: AOAM533N44+Rb/0XIsMCT50vaqRmGvf/Tbw9oeOFyPNFuAeqDmWHDcvC wcSPD6hTNG5AVd+9eC6mFCHyTQ== X-Google-Smtp-Source: ABdhPJwmRNEeENjss74NmvwYK0bgL5ul4SnGOP/w3w60CD3tpFItxXMneq7NglgwRnOejBwGAldzYg== X-Received: by 2002:a17:90b:1e4d:b0:1d2:a91e:24cc with SMTP id pi13-20020a17090b1e4d00b001d2a91e24ccmr31384404pjb.99.1651044390750; Wed, 27 Apr 2022 00:26:30 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:314b:b45f:a930:f992]) by smtp.gmail.com with ESMTPSA id x128-20020a636386000000b003ab00e731a8sm11863493pgb.0.2022.04.27.00.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 00:26:29 -0700 (PDT) Date: Wed, 27 Apr 2022 16:26:25 +0900 From: AKASHI Takahiro To: Mark Kettenis , sjg@chromium.org, xypron.glpk@gmx.de, u-boot@lists.denx.de Subject: Re: efi_loader breakage Message-ID: <20220427072625.GD34649@laputa> Mail-Followup-To: AKASHI Takahiro , Mark Kettenis , sjg@chromium.org, xypron.glpk@gmx.de, u-boot@lists.denx.de References: <20220427044813.GB34649@laputa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220427044813.GB34649@laputa> 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 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. -Takahiro Akashi > -Takahiro Akashi > > > /* > > * We won't support UCLASS_BLK with dev_* interfaces. > > */ > > > > So I'm a bit at a loss what is needed here.