Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15831397rwd; Mon, 26 Jun 2023 01:48:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4mm60tM9dpbBYhxPgP78wRhFbbUd8Nd/Kh4svjoXPCh0gu+PQ3uqfM/mvROkTxuncuzG4K X-Received: by 2002:a17:903:41d0:b0:1b7:f64b:379b with SMTP id u16-20020a17090341d000b001b7f64b379bmr5262097ple.17.1687769328669; Mon, 26 Jun 2023 01:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687769328; cv=none; d=google.com; s=arc-20160816; b=m7jhfTN4sV6p0VN/B0yN3dlIHlN1LK1Hng5FreS3u5lXk7Z2X8tUpleQqJF1lLix2J ugix56gHp+rzdRIe5tp2++YtlYtm6r7t4iOW5AM6bvtH3tY8jUQMKl7PXcjLX4xKNCio sxfdZYX/zsB/40IZR/vQM2RbvZcZskXcBA+Qr9kGki1CnoD8mpEJyTIHrvTZ7kOMrahb 71T95tXYUVkCOPegPsmeNtph/fTf/KU7Csk6xl1evom7pvSjg2ZDX9/ffrTW7FPEupkq EAF/Lxye5Gd3O32vRzDvZdNyqvrjC4sAvRQhU2OSUNfgCyzK7JNIgcxa+06PoJns+tUA RVaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=P3+JV6+Pn1MuKtmU6/nLqOAPWXJCPA/e3Ct5ze9xX9w=; fh=9CU6za5ws9O5Juh3bo3vSWJwaLFvJBgb8+gxWOQR6Ao=; b=LNecqsLG1HKpuIYyWR9BQ7+u9n/kRQ68Vjlh2qR7RK5Eowh7iTeZJ9fRrHOQKGmI2/ uJ86q4eW8xBHFsGoDZisYtG5wqdoQIc2wnF87fFCNfZy1+tBnE0HRqnJican2ts4k7bG cjWGk4qICk4IwitxIo05NOAdV2nVzc203VpeVEd7X25zd05WM9KDD1i+TXrw2IHHwpXT gJp9E4bhUiYBmhCVIcuv+7X2KA7dZP8e+yKnIqmu+MJUCpVP2iZ1MXBAlPiv8fFDEuGu VU5sTKXxAwCB6vAUR8h+CeTuZdl67VP6muqorZfJ5FY3xYkX1qnWylrO7ljW8o6IlJ2C aTTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UPy8Yc+L; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e19-20020a170902f1d300b001b80de4d3f7si475940plc.558.2023.06.26.01.48.34; Mon, 26 Jun 2023 01:48:48 -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=@kernel.org header.s=k20201202 header.b=UPy8Yc+L; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230041AbjFZIXD (ORCPT + 99 others); Mon, 26 Jun 2023 04:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbjFZIXB (ORCPT ); Mon, 26 Jun 2023 04:23:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7ED795; Mon, 26 Jun 2023 01:22:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6431860D24; Mon, 26 Jun 2023 08:22:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C59B9C433CB; Mon, 26 Jun 2023 08:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687767778; bh=P3+JV6+Pn1MuKtmU6/nLqOAPWXJCPA/e3Ct5ze9xX9w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UPy8Yc+LKOA9er8GGm/aH8bjiBPMrWQAPWrEvbPSAqpA8/uaKVfzGHFw6PLs06QiZ DzynlleyBjlGZJpOBqOtSLywu2BNftjemBLXRiGuw9WgVNQ9jwRnjiLRovYoyC/AGv x13rbO9JIdwK21T5lsY+O84KkZDQfcLj0QhIJAhAds0Y4NM78GD5uaCKhzplmmo/dQ jAzx67DiwY3LaEb7E7f4tRvz4e9W2DCTYfBpbCbysGSmWU6R9IvKB/AXeCrjlyphz/ 9B3c57xMGnORmHCVwjc+Ugl+dUS9iOzp4pJItsTjvTA9Kh/zxOky5rERa3kx7JUO+m AbNHpk3dv3vyA== Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-4f8777caaa1so3805898e87.3; Mon, 26 Jun 2023 01:22:58 -0700 (PDT) X-Gm-Message-State: AC+VfDwvblg464Zws8SHfzm+W+yA/nCfUtFB7O9QrTJXVhVBT1GbeS3Q 1zeZap4GmfhQAGoyx55R1g9bq3vVCD68wYOgWfQ= X-Received: by 2002:a19:ab12:0:b0:4f9:5933:8ee8 with SMTP id u18-20020a19ab12000000b004f959338ee8mr8109583lfe.32.1687767776741; Mon, 26 Jun 2023 01:22:56 -0700 (PDT) MIME-Version: 1.0 References: <20230426034001.16-1-cuiyunhui@bytedance.com> In-Reply-To: From: Ard Biesheuvel Date: Mon, 26 Jun 2023 10:22:45 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [External] Re: [PATCH] firmware: added a firmware information passing method FFI To: =?UTF-8?B?6L+Q6L6J5bSU?= Cc: ron minnich , Mark Rutland , Lorenzo Pieralisi , rafael@kernel.org, lenb@kernel.org, jdelvare@suse.com, yc.hung@mediatek.com, angelogioacchino.delregno@collabora.com, allen-kh.cheng@mediatek.com, pierre-louis.bossart@linux.intel.com, tinghan.shen@mediatek.com, lkml - Kernel Mailing List , linux-acpi@vger.kernel.org, =?UTF-8?B?6JGb5aOr5bu6?= , =?UTF-8?B?6Z+m5Lic?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 On Mon, 26 Jun 2023 at 10:05, =E8=BF=90=E8=BE=89=E5=B4=94 wrote: > > Hi Ard, > > On Mon, Jun 26, 2023 at 2:43=E2=80=AFPM Ard Biesheuvel = wrote: > > > I think all of this belongs under arch/riscv > > Could you look at the content of the patch again? As we discussed > before, we need to connect to the ACPI and the SMBIOS entry > At least this part of the code has to be placed in the corresponding plac= e: > drivers/acpi/osl.c: acpi_os_get_root_pointer() > drivers/firmware/dmi_scan.c:dmi_scan_machine() > > Because obtaining firmware information through DTS belongs to the > content of the driver firmware, it is appropriate to put this piece of > code in drivers/firmware/ffi.c. > > So I insist on the current revision, what do you think? > DT support for SMBIOS can live in generic code, but the binding has to be sane. As I suggested before, it probably makes sense to supplant the entrypoint rather than just carry its address - this means a 'reg' property with base and size to describe the physical region, and at least major/minor/docrev fields to describe the version. In any case, there is really no point in supporting both entrypoints (this applies to the ACPI root pointer as well). For the ACPI side, you should just implement acpi_arch_get_root_pointer() under arch/riscv, and wire it up in whichever way you want. But please check with the RISC-V maintainers if they are up for this, and whether they want to see this mechanism contributed to one of the pertinent specifications. So NAK on the current revision, in case this was unclear.