Received: by 10.223.185.116 with SMTP id b49csp5312596wrg; Tue, 27 Feb 2018 11:02:46 -0800 (PST) X-Google-Smtp-Source: AH8x227n18lLRnkzUELpVcPOCpUwJXMk6W4hUISEE9qPhwaxCYtlOKl33/oZpFAJtrSTsi7oV4kp X-Received: by 10.98.13.24 with SMTP id v24mr14962466pfi.89.1519758166227; Tue, 27 Feb 2018 11:02:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519758166; cv=none; d=google.com; s=arc-20160816; b=Flw7kOYcrbXxMEpNafiJoTCZhPwA307sw15ti3S48Vbf7FVgkv62ZRAihGnz3VXFkI WF7Q8wfTXP6Lx9SjijTaVbEsKlXTrnGwYCECXFqapMgVMHyDndOkPgyDi3YEjjFN4MF6 3mEj+qiTWRYXTvEFxhifuEik88Jl4P1ynSa9ovWAe3+oKUePcfX8Vo9xwPXNc4DtFaWX rhL68ziyG0wbwpmxXpzkTuRnrZfoyzTvRGTGsB7AZEOGC9IlI9qwAKFII3lSs13p5OUj 5fTsLYf7yy8HJmnWh3QyxE7P/jU+aESVNnqTW0heokUYdGs5g8thBSNyddcvGLopjjgr o+3w== 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:arc-authentication-results; bh=dLNyBmagojqk8Tg+Igw3wHjFvLt/MbV7a/VmrYpdaII=; b=d+ZeNEMt+abeOBZdxqi1LlRaqbvm27O7XMer15v5m11jX3B631sDfDW6esanNB2EzI kBiKpfGX4fDbrFbd9TbTr65LY8oTBOzskjUP4Y12h6XSqqpBGOeChDZbTdYswYWDze86 9jS1bPGT4Wh9yUHmvWduGtF0Ylck/nK8w8Ij5WA4jASc62P/aV9tlvmyVjuXByYo75b7 UwYrCaEsfUjxXy2f15Un78WOP1sHTqFel+kpKHXz6GCmEhWmm5J7CetbYhJQP+z8URPu wV4HLQ0xbTvZf7OZu9RtSqxTj5K5Xe5B9cW97p38+KbJc4lCgIf7XmbiwSvpSyOXedta QAew== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9-v6si8833062plk.311.2018.02.27.11.02.31; Tue, 27 Feb 2018 11:02:46 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751876AbeB0S7t (ORCPT + 99 others); Tue, 27 Feb 2018 13:59:49 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:46656 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751782AbeB0S7T (ORCPT ); Tue, 27 Feb 2018 13:59:19 -0500 Received: by mail-lf0-f67.google.com with SMTP id r80so29095089lfe.13 for ; Tue, 27 Feb 2018 10:59:18 -0800 (PST) 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=dLNyBmagojqk8Tg+Igw3wHjFvLt/MbV7a/VmrYpdaII=; b=LN5fU3pkRKJpVva7GhARP+G2K5kbWbTDZpACXl0HuA6nskzTCVh/vIGRfC+MDAyHLk L6/BNz00rzH5L/BoAWzfHvuZKtyvakkSi+eE2Naa0Vd0PxUbEOlKWH4Q/YrQ7PFte1r/ PjOWSPeN4CAkK7bJVM2rTQ05eMo+WcFSjLvqeDhV6qzZehPaErjZlCVvKG5yv+C6v6z+ IgBtcKQdyRHcMTdpwYc2EaNO2KPdJwYEKsr5ce7qq2Cx65/Lmn0V9HQiRAxeZq31qVQv mqBCV+6sDBnhr9iT+DWFxSB0rGnDdRdGrYJpFel1T3wuUnG4T+EQmmnBLg9jjdj1GSdc JgBg== X-Gm-Message-State: APf1xPBANe/oYQhYEKzS1ZWPBsdyN8FqGk1YCOm+JdXmNEgMJU63qs21 haikDFcIfP7nFI7ZN/EP+RLbyearJ/mEfZE6aA7Y6g== X-Received: by 10.25.89.206 with SMTP id n197mr11708612lfb.134.1519757957224; Tue, 27 Feb 2018 10:59:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.43.149 with HTTP; Tue, 27 Feb 2018 10:59:16 -0800 (PST) In-Reply-To: <1b5a55bd-5bc7-ecd0-99f0-71dd05119743@redhat.com> References: <85047448dc1d2d3c725b6b78d5ef2a89fc81b83b.1519659254.git.jtoppins@redhat.com> <1b5a55bd-5bc7-ecd0-99f0-71dd05119743@redhat.com> From: Bhupesh Sharma Date: Wed, 28 Feb 2018 00:29:16 +0530 Message-ID: Subject: Re: [PATCH] arm64/acpi: make ACPI boot preference configurable To: Jonathan Toppins Cc: linux-arm-kernel , astone@redhat.com, Jonathan Masters , Catalin Marinas , Will Deacon , rafael.j.wysocki@intel.com, Ingo Molnar , Prarit Bhargava , James Morse , andriy.shevchenko@linux.intel.com, linux-kernel@vger.kernel.org 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 Tue, Feb 27, 2018 at 8:14 PM, Jonathan Toppins wrote: > On 02/27/2018 07:40 AM, Bhupesh Sharma wrote: >> Hi, >> >> On Tue, Feb 27, 2018 at 11:35 AM, Jonathan Toppins wrote: >>> This patch allows a user to configure ACPI to be preferred over >>> device-tree. >>> >>> Currently for ACPI to be used a user either has to set acpi=on on the >>> kernel command line or make sure any device tree passed to the kernel >>> is empty. If the dtb passed to the kernel is non-empty then device-tree >>> will be chosen as the boot method of choice even if it is not correct. >> >> Hmm. Not sure if I correctly understand what you mean here by the term >> 'incorrect device tree'. Do you mean a corrupted device tree blob (but >> normally we can catch those cases via the device tree header) or a >> deliberate (or a broken) firmware attempt to pass an incorrect device >> tree blob to the OS. > > I mean a device tree that doesn't list all devices in the SOC. So it is > more incomplete than incorrect. It could also be incorrect in that it > doesn't list proper timings, memory/pci/etc. > >> >> If its the later, I think the onus should be on the firmware (u-boot >> or UEFI or others.. ) to fix the problems. I know we carry a lot of >> fixes in the kernel for x86 firmware quirks but then we have several >> broken x86 machines on which kernel has been running since several >> years now. >> >> IMO, if we have a known firmware quirk (to fix the broken DTB being >> passed from the firmware), we can look at adding it in the early arm64 >> kernel code (similar to the quirk handling we do in the x86 early >> kernel code for broken firmware), rather than forcing ACPI as the boot >> method. >> >>> To prevent this situation where a system is only intended to be booted >>> via ACPI a user can set this kernel configuration so it ignores >>> device-tree settings unless ACPI table checks fail. >> >> Or, if decide to depreciate DTB as the boot method for such boards, >> can we look at setting 'acpi=force' in the bootagrs always to make >> sure that ACPI (and no fallback on DTB) is forced as the boot method >> for such arm64 machines. > > For arm64 DT is suppose to *not* be the preferred method, yet still DT > is preferred if the firmware provides both tables to the kernel. That is true mainly for arm64 systems which are compliant to SBSA/SBBR specifications and are mainly targeted for server markets. However several arm64 products in embedded applications are still not SBSA/SBBR compliant (and I have worked on a couple of such implementations earlier) and still use bootloaders like u-boot (and also closed-source implementations) which have no support for ACPI currently and still rely on a DT to pass the system hardware information to the kernel. So far only open source implementation of a ACPI compliant firmware is EDK2/UEFI which supports ACPI as the preferred boot method and I am not sure if all u-boot/in-house firmware implementations are planned to be ported over to EDK2/UEFI for embedded applications. Even if they do, it would be safe to assume that to maintain backward compatibility they will still look to support boot via DT as the default boot method rather than ACPI. Regards, Bhupesh