Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35554997rwd; Mon, 10 Jul 2023 09:04:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlG71/vJEDkgWUOyYwYkaq7h7EtkHNMYOXmKaniPidjYYZCW+AsrYvcTQiO5qWsDeAbtDlWn X-Received: by 2002:a17:903:230d:b0:1b8:7bd2:f77d with SMTP id d13-20020a170903230d00b001b87bd2f77dmr12285602plh.64.1689005046426; Mon, 10 Jul 2023 09:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689005046; cv=none; d=google.com; s=arc-20160816; b=M9g9i9PfekGT7n7m4wzX2l1VNIfYKZAyz0XDlQb+jfsK57VyjN/zFC2QgN3xnzak07 boz7wW+c6s3K4PyxGxzibXgA7Rw1oFJeu4ZAuvd3SnqJlwGngIgPvJmseD15M6qSU3NF tXLBwIbDNsgyw5I01eAgCS50s+dZ+JtHPqNIEs13yCJX1Zm6e4zg0PiUh7kVK4EA0k8c AuAXXWc53a2b5T8X7L1Q7Hanp+FaSVYAwJZ8spZbdiyZkmOoNRV06XLt0BmUjZVxZsXP Hd+mOIDyQhuTZqELkqtnl2OcTLlAKW/p3fo3Segqm1g8Uv5r2dnM4djDdfzNsPnLMxmg Q/Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=IqtE8bxydGnxenKOefy+ykO3CYnjrck24uGHgIZ57LA=; fh=k3Pwm1/Msq1yIJT/cF7w3tGCpxQsPwid5Vy9I74Nr+U=; b=XfF7ee5F6YxWVDQtJXHXBtX/L6Mvlm/Xl04kdPbeJrjBFfId5fLr7BiFq+eB2nKS+t KdOM7FjxgBu2dnK3q7dqs6TVXTwl24gdO88yN+YA4TNf3x/JtAvYiBaebmVEqtlzGehb diQgrNhhbZ6GtiycwN9kz95APO01NB1+YEZTqqGQfDxQNPvJOm25AO9GlWYYauEOER// ID+c0lQm96gFjL7ZJt6FsJSTVzY5S/Ii7vFydw0UjLVZAkAf2aIsMXMsEhRtr5dWU+rO k9br+TAtefc9Ekfe7f1CTQrWPePVrrPLnJhkbTuGUoIlopZbyFtjr4XV3KWeawQmnjPx dKEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=pT+d7I5w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13-20020a170902da8d00b001b9db68a5fesi74394plx.164.2023.07.10.09.03.53; Mon, 10 Jul 2023 09:04:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=pT+d7I5w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232483AbjGJPlx (ORCPT + 99 others); Mon, 10 Jul 2023 11:41:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232475AbjGJPls (ORCPT ); Mon, 10 Jul 2023 11:41:48 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC8AF115 for ; Mon, 10 Jul 2023 08:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=IqtE8bxydGnxenKOefy+ykO3CYnjrck24uGHgIZ57LA=; b=pT+d7I5wUMIU2xUL0+YD7beR9+ dWe4feT6a0V4y0upUnLpY9E8iH+I8IT4UFgkveS+ji0Zvj1uQImighbAmI0QRbspgjm1HRjdBVsqu lpLQ1lyoWqWVzisZ47AV0fOh83/8lXZ/PbPbhrcOboVOHPSImxWsWjDXw5mC77YRt71Y2VBJJ51Kd skmrGUujQdOsyk7T84fK2395yU6NoKC9IGxgNoNBBwfqrJz1MG1R+s4xCTHJFMkH729jvsUxseAbG cWi+Vp+u49tjb4SiVmQ0bCIP8qGYS9fJKYvonQ51vaqo9hGR2WPzuXqOEXAdUVao7YigDpAFPe0se 4s6JZTpA==; Received: from [2601:1c2:980:9ec0::2764] by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qIt1C-00C2Qn-2x; Mon, 10 Jul 2023 15:41:42 +0000 Message-ID: Date: Mon, 10 Jul 2023 08:41:41 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] init: Don't proxy console= to earlycon Content-Language: en-US To: Raul Rangel Cc: Mario Limonciello , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Petr Mladek , kramasub@chromium.org, Alexander Potapenko , Andrew Morton , Ard Biesheuvel , "Jason A. Donenfeld" , Li Zhe , "Liam R. Howlett" , Mark Rutland , Will Deacon , Wolfram Sang , Zhou jie References: <20230707191721.1.Id08823b2f848237ae90ce5c5fa7e027e97c33ad3@changeid> <6101a3bb-30eb-97fc-3a8e-6d15afc4efb5@amd.com> <3de1ff24-3970-6e22-a73c-70446b8de4bd@infradead.org> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 7/10/23 08:30, Raul Rangel wrote: > On Sun, Jul 9, 2023 at 8:43 PM Randy Dunlap wrote: >> >> >> >> On 7/9/23 18:15, Mario Limonciello wrote: >>> On 7/9/23 18:46, Randy Dunlap wrote: >>>> >>>> >>>> On 7/7/23 18:17, Raul E Rangel wrote: >>>>> Right now we are proxying the `console=XXX` command line args to the >>>>> param_setup_earlycon. This is done because the following are >>>>> equivalent: >>>>> >>>>> console=uart[8250],mmio,[,options] >>>>> earlycon=uart[8250],mmio,[,options] >>>>> >>>>> In addition, when `earlycon=` or just `earlycon` is specified on the >>>>> command line, we look at the SPCR table or the DT to extract the device >>>>> options. >>>>> >>>>> When `console=` is specified on the command line, it's intention is to >>>>> disable the console. Right now since we are proxying the `console=` >>>> >>>> How do you figure this (its intention is to disable the console)? >>> > > https://www.kernel.org/doc/html/v6.1/admin-guide/kernel-parameters.html > says the following: > console= [many lines deleted here in kernel-parameters.txt] > { null | "" } > Use to disable console output, i.e., to have kernel > console messages discarded. > This must be the only console= parameter used on the > kernel command line. > OK, I see what you are referring to: "console=" without any following parameters, not the general "console=" command line parameter. Thanks for the clarification. > earlycon= [KNL] Output early console device and options. > > When used with no options, the early console is > determined by stdout-path property in device tree's > chosen node or the ACPI SPCR table if supported by > the platform. > > The reason this bug showed up is that ChromeOS has set `console=` for a > very long time: > https://chromium.googlesource.com/chromiumos/platform/crosutils/+/main/build_kernel_image.sh#282 > I'm not sure on the exact history, but AFAIK, we don't have the ttyX devices. > > Coreboot recently added support for the ACPI SPCR table which in > combination with the > `console=` arg, we are now seeing earlycon enabled when it shouldn't be. > >>> I read that as "it's intention is to disable the default console (tty0)". >> >> Yes, that "default" word should be there IMO. >> >> Does this patch affect behavior if someone uses >> console=tty0 >> i.e., the default? >> > > No, it shouldn't. This change makes it so that the > param_setup_earlycon function gets > skipped if there is no value. > See https://chromium.googlesource.com/chromiumos/third_party/kernel/+/v6.1/drivers/tty/serial/earlycon.c#223 -- ~Randy