Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17656795rwd; Tue, 27 Jun 2023 06:08:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7h0RseLOK+zJjRE4Uu/dM0bu6GSmA6RG1b2ZDbEVx4+REfBK6fYohV/UyVyMSEHD8WICkP X-Received: by 2002:a05:6a20:8e19:b0:11f:7aa:1b27 with SMTP id y25-20020a056a208e1900b0011f07aa1b27mr24013442pzj.51.1687871330160; Tue, 27 Jun 2023 06:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687871330; cv=none; d=google.com; s=arc-20160816; b=ETRHxVPXY5/gYgxNgAiQ+/T9vJcM4B/K8QcbSv0HUMqFOL/EYuicuexVFOqSLcC6Xt KnxCtXmUyCDyFwEujTgxkkvQkkaFQCnfO4pjKP4swMvXHFMvnSmsllWpMYJQqt8QBYlz Rb4kqrfph2JSClpaD8u7YM0iFsFmFOPKEIckmyP4P08dgJVVD8Uhn4Y3YG4685O6/cJE i90K9JeTosSJDFu+XdJhUYxOTHKzaPxsf7dWrwG3rzSBc7PJmtHTOoVjIuASn9KOiTPQ f6xtEQ8BPM1O+fvRb11cTKxLPJDGgODALL2E9lycUO36MjQSoHx5FuzUd2viJC+zj8/w D0Uw== 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=QsX4SXg32pBoD8x6wheSWux3YvW6+LLlu5lLGvU4A08=; fh=kdQ+sf/nzfWK+Z71u3JyO2kVVgy9YievDimXSU31/XM=; b=eh1VOGQ8F3tApvZhgJMgFWib8lI9Z3ny33LL/yZWcGoZMS5GBTlsHisxJnZrzRV5B4 x0SRIY/xUDAjnEH7GTCpkf7rk5qMlCR2WuXDhS/B+00PnTHHDG6Cmzd0acFb5mAEJU/8 w7xIoSfwC5gYRYiXKi6KjiSeji3ebBPuu6cRjBmsMGC/fV0nhdkJrolqggg28JCT0zZK qvd8hC2lH90AkppcogxudDCzrdaKXqS/K0Bpgdx/h81DW91+pYYcBYLBZmjtei7zlEue +egH+57ZITiVgvVD0KG+vahrUC6fknuatgeAtWiJYT6LMkCqsrsnqg0zo3ogIP31CrbW gqyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=NYX4MwTD; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a056a00239200b0067c12c99c56si2110520pfc.117.2023.06.27.06.08.24; Tue, 27 Jun 2023 06:08:49 -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=@bytedance.com header.s=google header.b=NYX4MwTD; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbjF0Mke (ORCPT + 99 others); Tue, 27 Jun 2023 08:40:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbjF0Mkd (ORCPT ); Tue, 27 Jun 2023 08:40:33 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C064213F for ; Tue, 27 Jun 2023 05:40:05 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3f9b4a71623so43209115e9.1 for ; Tue, 27 Jun 2023 05:40:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1687869604; x=1690461604; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QsX4SXg32pBoD8x6wheSWux3YvW6+LLlu5lLGvU4A08=; b=NYX4MwTDi6LDbWSS2P+1hTN3MClyVGAhhslCEAPQIKnmlnbe25HJjHhRIRBb+f//w3 nsQztM7eoHxIWyjwPGDxcj6LrpYH6y4eQomxbFNJf9Js/a58EDwYlrfg+o5z3iFSd59z dlHxlGieOEHIow0lzEbjmyEzYo562R+2dcbl60VsU06s8+uF75/daPwM4dSCJ/8TGI5d 4Xj9xEPxkZFJ08TX/yQTOxg61XdHXSYPYr3HIGlX7E4m9i80/RaucMWtOvk/blq/dF7D iK8Gt0LCi6jYQiD60h50H6vu70SuJ+dwOA/RJkux6e0a+jfnzIRp+Rt02YyRzNh+0Qi+ PWCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687869604; x=1690461604; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QsX4SXg32pBoD8x6wheSWux3YvW6+LLlu5lLGvU4A08=; b=dblJo3GDW6T9RN/5ce0M8ZZTxRXs+HMqVQ/RgGdlOHYpcpE8OtG+/NgVxvuHfkdCUa yeBFwCzRKS9bGLKWJYi6hXYjiEvAX8Kzt8gi4vnA4X0nJSOz4RP10owrTTvqKilSJdPr S06M9PQ33pQXN0sqc7zVvBZ6iOZa61DuqvuQOeKJ8tWKjRD0NAR8H3XJnD5Imugtdm4b ePd8+kxNNA52nm42vko7prhnFeFCSGSQjZnk/sZoJvRy5fjUeZqcg6fBODMmI3qMQIEJ eFasvo8Y/guCezruH9MLPdN5AfnMZu/aX2vPP745c4WfJcKoSLHbBFBJTLw4KzaarwSh P+fg== X-Gm-Message-State: AC+VfDxkRJavrwkgNWZGpj8+vd8J8voq9lFQcoGjNbE73F+7rxeUPH0W 19QXNnB5fyb7pfQNNb3JkgWDtQ/7/QOcHKbee09ecw== X-Received: by 2002:adf:ee51:0:b0:311:1dfb:2907 with SMTP id w17-20020adfee51000000b003111dfb2907mr21187428wro.68.1687869604088; Tue, 27 Jun 2023 05:40:04 -0700 (PDT) MIME-Version: 1.0 References: <20230426034001.16-1-cuiyunhui@bytedance.com> In-Reply-To: From: =?UTF-8?B?6L+Q6L6J5bSU?= Date: Tue, 27 Jun 2023 20:39:52 +0800 Message-ID: Subject: Re: [External] Re: [PATCH] firmware: added a firmware information passing method FFI To: Ard Biesheuvel Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , linux-riscv , 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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Ard, > > I will defer to Mark or other DT experts to help decide on the naming > and general shape of these. Okay, thanks. > However, as I have indicated twice now, it would be better to describe > the SMBIOS structured data directly, instead of passing the physical > address of one of the existing entry points. This avoids the need for > mapping and reserving additional pages that don't carry any relevant > information. > > So the node in question should have at least (base, size) and the > major, minor and docrev version fields. Other platforms also need related memory to store this table, don't they? Coreboot also completes the construction of this table according to its existing code, rather than creating a new description method. Furthermore, As we discussed before, SMBIOS-related code should be placed in the general code, and an entry address is required to connect to dmi_scan_machine(). according to what you said (base, size, region) how can it be connected to dmi_scan with an entry address? So, For SMBIOS, only keep the smbios part in drivers/firmware/ffi.c in this patch? If yes in terms of code structure, I will update it in v2. > SMBIOS is a separate set of firmware tables that have little > significance to the kernel itself, and describing it via DT makes > sense. > > ACPI serves a similar purpose as DT, and so having both at the same > time results in a maintenance burden, where the arch code is forced to > reason about whether they are consistent with each other, and if not, > which description has precedence. > Well... I don=E2=80=99t want to discuss too much, according to your suggestion, To implement acpi_arch_get_root_pointer() under arch/riscv. I'll update it on v2. > If the firmware uses DT as a conduit to deliver the ACPI system > description to the OS, it is probably better to pass this via the > /chosen node as a special boot argument. > This is not the focus of our discussion this time, and we will discuss it when we discuss node naming with DTS experts. Thanks, Yunhui