Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp107559imm; Thu, 30 Aug 2018 09:24:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaMMp+Pf27tOdimdbByD3TzlOStU4rCE4A/J8qC1Toa3b04JjFFTgtpw91kZEBWgK4pXWHU X-Received: by 2002:a62:d74e:: with SMTP id v14-v6mr7724008pfl.88.1535646266894; Thu, 30 Aug 2018 09:24:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535646266; cv=none; d=google.com; s=arc-20160816; b=Fs51JpFgUFh627OrVHXaeW2SHPjtORkZFWQjjvMyglU5ruRi6vw90hurhEv/QiT2zr tWmQln6tV6oo6Y4UVWUVfpCl6flD4m+39/7JOzgG+beDykVUEv7msS3C0pwy8xyk47Oa jB3HVue31ZVlqALf9j/1AKFLAUuTxpr0DA8lOoFRs5YLKyWhSj4tCGLh4FZyRZXAwTk0 ospLG0QRJGKpjZOTGTVz39i6ECMfuKzXHR+ylcIiTwsMPxmdUeQaYsIHGHY+Imq23QYn kX6t5gjp2sH9rHnILq0ILBxDECNlR4X61CWWtCV3S5/04v6WYokJuzCj+NtDdSof3sNI Ubnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=YiCG75RsxiC4V9bYQLWHLXMbEvVwaSVLMlg36jGwtBY=; b=fJtvevKrVnsaWmHx/lr8BIK5MfKcOalPfjBEZjfcxI+3OuuL1wVsvYUhuG36ZD9rsw JRSqDMEk4YhzBdv6Ym1J19HP3XwfeeiRFn3iU/Mp3cGUeEZgGVwH3RPjthYReA5JL1AF rP0FnM8c/pIoBj1lQ+0NlICZg18CboDjk3vcmN2gEiqslT+lKWHjeHNHUHoaOLpo6rkc 3nSAzL1lzp2IaLL4+9zAynDVjFIRvfPeqQmuPVAFVbMnjvfTKYpC1k4g3pBCDjAsc4FS 6dkNvpgMRmP6aIxOjkcsMcFvNZoAm7QjAPafyySDw/otxYMBQ1gFJ0z61bEYTVFt+Jg0 ESuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gqM0Zocn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d34-v6si6831871pld.301.2018.08.30.09.24.10; Thu, 30 Aug 2018 09:24:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gqM0Zocn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727281AbeH3UZ4 (ORCPT + 99 others); Thu, 30 Aug 2018 16:25:56 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:39454 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbeH3UZ4 (ORCPT ); Thu, 30 Aug 2018 16:25:56 -0400 Received: by mail-io0-f196.google.com with SMTP id l7-v6so8048396iok.6 for ; Thu, 30 Aug 2018 09:23:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YiCG75RsxiC4V9bYQLWHLXMbEvVwaSVLMlg36jGwtBY=; b=gqM0ZocnNpIPv7Eqfk3Ymvrn/WEYdbiog9QmtwDjwMuqahvK3wfiXsCPvQbQJjINgb Wakd3w7FSbDKDXU6F16m6MMMwFnXaKkEUaDCoS7q5GhbLeDYghzdh+XrTIjrR4I3fYjr GYq5r3emz/NIgiphAZce9/7jEqsdvnNYW+s0c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YiCG75RsxiC4V9bYQLWHLXMbEvVwaSVLMlg36jGwtBY=; b=fMoVfA4tukC3BeGL1Y8dTjMvUa5lc5qYhuN0qbM+IbAbNU/YtA9v90GKO4EJRZVWG6 uPS45+8jHfvCaE1w85OId0ldYsLt2cI2i7vdtS7eRP4nPczC5lXvGpsCnXjEb8PZJcDY mcfF2W7TB72tCwBo2egT8o7rSGG6Ine38H+huvYEY5y7+xLVvQcZUEM4WBN0wEa8EMv2 gDNLa2fSar6BXqrOD8BPMO/6aryqs6jQ02NkwixS7QQX7fNGbyIoh33le4mf/42Q9kKU 4FZi1cgAbAqEraXMFIUtmqvANbOed5rSDqmzHs5aPgHBdaIbMLiUP0A1+7s9DyNBJ0nv Sp6g== X-Gm-Message-State: APzg51A6fm0xn4fi6mlZ2xppX2OUVvKHh3wlgXkonRu5gHi4nWMGhZWQ d4pb1WB071amJTsGMjkYRWuT68noOP4XRI+klDIU1w== X-Received: by 2002:a6b:be83:: with SMTP id o125-v6mr9608389iof.173.1535646181018; Thu, 30 Aug 2018 09:23:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:ac05:0:0:0:0:0 with HTTP; Thu, 30 Aug 2018 09:23:00 -0700 (PDT) In-Reply-To: References: <1535563287-24803-1-git-send-email-scott.branden@broadcom.com> From: Ard Biesheuvel Date: Thu, 30 Aug 2018 18:23:00 +0200 Message-ID: Subject: Re: [PATCH] arm64: defconfig: enable EFI_ARMSTUB_DTB_LOADER To: Olof Johansson Cc: Scott Branden , Catalin Marinas , Will Deacon , Arnd Bergmann , BCM Kernel Feedback , Linux ARM Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30 August 2018 at 17:06, Olof Johansson wrote: > On Wed, Aug 29, 2018 at 10:54 PM, Ard Biesheuvel > wrote: >> On 29 August 2018 at 20:59, Scott Branden wrote: >>> Hi Olof, >>> >>> >>> On 18-08-29 11:44 AM, Olof Johansson wrote: >>>> >>>> Hi, >>>> >>>> On Wed, Aug 29, 2018 at 10:21 AM, Scott Branden >>>> wrote: >>>>> >>>>> Enable EFI_ARMSTUB_DTB_LOADER to add support for the dtb= command line >>>>> parameter to function with efi loader. >>>>> >>>>> Required to boot on existing bootloaders that do not support devicetree >>>>> provided by the platform or by the bootloader. >>>>> >>>>> Fixes: 3d7ee348aa41 ("efi/libstub/arm: Add opt-in Kconfig option for the >>>>> DTB loader") >>>>> Signed-off-by: Scott Branden >>>> >>>> Why did Ard create an option for this if it's just going be turned on >>>> in default configs? Doesn't make sense to me. >>>> >>>> It would help to know what firmware still is crippled and how common >>>> it is, since it's been a few years that this has been a requirement by >>>> now. >>> >>> Broadcom NS2 and Stingray in current development and production need this >>> option in the kernel enabled in order to boot. >> >> And these production systems run mainline kernels in a defconfig configuration? >> >> The simply reality is that the DTB loader has been deprecated for a >> good reason: it was only ever intended as a development hack anyway, >> and if we need to treat the EFI stub provided DTB as a first class >> citizen, there are things we need to fix to make things works as >> expected. For instance, GRUB will put a property in the /chosen node >> for the initramfs which will get dropped if you boot with dtb=. >> >> Don't be surprised if some future enhancements of the EFI stub code >> depend on !EFI_ARMSTUB_DTB_LOADER. On UEFI systems, DTBs [or ACPI >> tables] are used by the firmware to describe itself and the underlying >> platform to the OS, and the practice of booting with DTB file images >> (taken from the kernel build as well) conflicts with that view. Note >> that GRUB still permits you to load DTBs from files (and supports more >> sources than just the file system the kernel Image was loaded from). > > Ard, > > Maybe a WARN() splat would be more useful as a phasing-out method than > removing functionality for them that needs to be reinstated through > changing the config? > We don't have any of that in the stub, and inventing new ways to pass such information between the stub and the kernel proper seems like a cart-before-horse kind of thing to me. The EFI stub diagnostic messages you get on the serial console are not recorded in the kernel log buffer, so they only appear if you actually look at the serial output. > Once the stub and the boot method is there, it's hard to undo as we > can see here. Being loud and warn might be more useful, and set a > timeline for hard removal (12 months?). > The dtb= handling is still there, it is just not enabled by default. We can keep it around if people are still using it. But as I pointed out, we may decide to make new functionality available only if it is disabled, and at that point, we'll have to choose between one or the other in defconfig, which is annoying. > Scott; an alternative for you is to do a boot wrapper that bundles a > DT and kernel, and boot that instead of the kernel image (outside of > the kernel tree). Some 32-bit platforms from Marvell use that. That > way the kernel will just see it as a normally passed in DT. > Or use GRUB. It comes wired up in all the distros, and let's you load a DT binary from anywhere you can imagine, as opposed to the EFI stub which can only load it if it happens to reside in the same file system (or even directory - I can't remember) as the kernel image. Note that the same reservations apply to doing that - the firmware is no longer able to describe itself to the OS via the DT, which is really the only conduit it has available on an arm64 system..