Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2704753ioo; Tue, 24 May 2022 04:12:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEmzITI9ZFnKhVi1S45haPszRveLxzPAbRRoyp4C/pabCtDXzpR7YQxprabplWDkihLEnN X-Received: by 2002:a17:90b:396:b0:1e0:7a64:cc10 with SMTP id ga22-20020a17090b039600b001e07a64cc10mr2302178pjb.78.1653390760938; Tue, 24 May 2022 04:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653390760; cv=none; d=google.com; s=arc-20160816; b=edLWDSIz6KtSHkLhfonDaFVY6HPtqGM8/IJDZb9hJgcWWey+x0XCKEVDneI8RZfW6g q/Fhf1JXvlJEKdfyzF7JI376lu9HbislXr2IBi+7iM7j0Aigc84m3pnwCwr5acP8woWJ OxoB0w67W/A6GIw9ikq6WbYiuYeeJCj4C71ku4YMtzQZp+HcNQelmUx+QYQ6HRsqiaDo fxGszszFea3OSNuaWkuwNgimPOmkn+meLdFAXJ1qwtriDogWj02HwV/rSV2oC4iVV073 5oHDbyI78zygGDGTvJzY1H7cJzgla5fQWYE79pk9JlHeSH5ZUSZy0FzsOpL9qOc1Z+lq /DkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=vv6Ht/11Vhm6xuquYW0SSmB/06vf/Y+aVUqQQahbL+4=; b=aR2/1agKtkwjpKSGt4WrzMGl2ljKR6yUQ6bzffKsHDm65p4nTvNdxonqNAVp3Hsspn eVjJKp5zk8HBbxL9CAM0yUkVofIBN+9+wwnGQnNmlmKX1wMxoDO6v91wwJjljSYTUuDz 9HI8OvKRSBKXDIH8paSgmQYv3RvLDCOvnWj36+i6X7OHeIy7PE6RKnnITllCDspwUFWl 1Pj9z/4cMfBuPD7KlnkuBzwtStGSXi3ozd1v/nb4yJ3DCSAUCh54vvqi0WJSmYNb2fpt I4lcDj1VG5sBz4b2wRPQfSXdjClePSLC/X+pcNgsmVh7ktFfcjVHR6xnwwptrXGa5PMZ VtOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=kruEWIml; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a9-20020a170902ecc900b00156ae419651si14840451plh.401.2022.05.24.04.12.26; Tue, 24 May 2022 04:12:40 -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=@xry111.site header.s=default header.b=kruEWIml; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232546AbiEXIfW (ORCPT + 99 others); Tue, 24 May 2022 04:35:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231989AbiEXIfT (ORCPT ); Tue, 24 May 2022 04:35:19 -0400 X-Greylist: delayed 477 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 24 May 2022 01:35:17 PDT Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0F3E633AE; Tue, 24 May 2022 01:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1653380839; bh=f86+du3NLa/SaLRfDIDrohJYCgyKaooMgS3GQURiRxE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=kruEWImlOIAaMsrf6ecSXnkopnnhQNB9Fygb9CS2ZNnu1BJdO2oY6yKbCPMkRJjwI BTm8Ib0ZuDPkEm+g2a8xdV2cYTO0a7KRZrw108aTxMheezVj/dx+986hrEkb682nvD SlqDR5UaOvmxS7cZJCXDzuxLJYHWF/SPGaJlEcA8= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id CE237668FE; Tue, 24 May 2022 04:27:14 -0400 (EDT) Message-ID: <14f922495a09898017e4db3baed5b434acadac12.camel@xry111.site> Subject: Re: [PATCH V11 09/22] LoongArch: Add boot and setup routines From: Xi Ruoyao To: Huacai Chen , Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Jonathan Corbet , Linus Torvalds Cc: linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Yanteng Si , Huacai Chen , Guo Ren , Xuerui Wang , Jiaxun Yang , Stephen Rothwell , linux-efi@vger.kernel.org, Ard Biesheuvel Date: Tue, 24 May 2022 16:27:13 +0800 In-Reply-To: <20220518092619.1269111-10-chenhuacai@loongson.cn> References: <20220518092619.1269111-1-chenhuacai@loongson.cn> <20220518092619.1269111-10-chenhuacai@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.1 MIME-Version: 1.0 X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Wed, 2022-05-18 at 17:26 +0800, Huacai Chen wrote: > Currently an existing interface between the kernel and the bootloader > is=C2=A0 implemented. Kernel gets 2 values from the bootloader, passed in > registers a0 and a1; a0 is an "EFI boot flag" distinguishing UEFI and > non-UEFI firmware, while a1 is a pointer to an FDT with systable, > memmap, cmdline and initrd information. If I understand this correctly, we can: - set a0 to 0 - set a1 a pointer (virtual address or physical address?) to the FDT with these information in the bootloader before invoking the kernel, then it will be possible to boot this kernel w/o firmware update? I'd prefer to receive a firmware update anyway, but we need an alternative if some vendor just say "no way, our customized distro works fine and you should use it". (I'm not accusing LoongArch: such annoying behavior is common among vendors of all architectures, and even worse with x86 because they often say "just use Windoge".) --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University