Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15936836rwd; Mon, 26 Jun 2023 03:35:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6g0VLykknNzzSVDaO9x3ylT1F/OLyej8q9ojI/qztM9WLrg5AMGYEQmksqmImeL6r7YYXf X-Received: by 2002:a17:906:b844:b0:991:b554:e64b with SMTP id ga4-20020a170906b84400b00991b554e64bmr1828730ejb.54.1687775702743; Mon, 26 Jun 2023 03:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687775702; cv=none; d=google.com; s=arc-20160816; b=IkzCXfbBFsOYJHkkY6V3gWJ3uoAGeGf0gdDUpPE67ybsqahV+vYaYRppNNzg98yC/k fpFUJ4RvCw294yOo1o9cDFbJJqYRmj6TcrPm97wLns+GcNEGosOzx+MbA+Do6d9FXbqQ QQkL/2l/AUflDorifiDlXULpEImYEKZNBTEKKD3oHtiFlnXtAYtaF6YN4uIKGex4vwJ/ PHCqI5Xu0ZvjB9i17qgnr5JXoKl4oD/btbdVb9U0KeKlbQnIqk89Oqcuc1Ndx2fjciQ5 GZCgDKdmkuSJl9wSF7do49edCW+RFJ/TwPHis+CfKJtkLdnqFCE5WHUBBvSzc3fLTmv6 Watg== 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=3dsFv4FgmnPd67WQkT8yMKl3a2nj9aCiexx+yXgesZ4=; fh=KK3+ckrYJBYYRdVlKa7cICeLFmDq2X0JvG0URe0kWsE=; b=ZyikSyWT3UMU9OeNUOXlnEh4UrE077tNFHRlRG2mvtYGPLXi3Pb6WNym9NsqqQXm02 KQ60G0iLOKal1bjjSqs23Yz5vTwKb01nagBMXIpnEPG4skdKLuo9Ju1KDbTeF2udKq9K VFInGUCxSGyCKruLnpqJBcHhkjphNt3ciceLN3m24WiZoIbTQC6pz3z5XuGVxlnzRqxN h/Ywtki5utjmPh5Kqh2ZQn1x6DWQkb0N02TL2JDcBUaCmU294DWNaje4pPpYUeY1zC7x WYLBgGcZbGJmdPJAzwhC2d9SjV3DdhDO4DOLx/XWAq+v1kyL7AA8BF+p9jaXjwE/UxUj kg2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=KZ5sT0LE; 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 o24-20020a170906359800b00991b7749bd8si1040323ejb.786.2023.06.26.03.34.37; Mon, 26 Jun 2023 03:35:02 -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=KZ5sT0LE; 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 S230089AbjFZKUA (ORCPT + 99 others); Mon, 26 Jun 2023 06:20:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjFZKT6 (ORCPT ); Mon, 26 Jun 2023 06:19:58 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA6319A for ; Mon, 26 Jun 2023 03:19:57 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3113dabc549so4672665f8f.1 for ; Mon, 26 Jun 2023 03:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1687774795; x=1690366795; 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=3dsFv4FgmnPd67WQkT8yMKl3a2nj9aCiexx+yXgesZ4=; b=KZ5sT0LEQJcO8YZzBdW2ecUYfzYHVnA1IABWN1LZqFzx0in22M2xIMLMoifEmB+aqw 6wphw8n3AxBQFjTofDyuAq4+kdX4oogbTaFzjzcTTKcYTUiGoX5c1aMVaxGzlzlINWFQ Xhr2gz39JeOU48jJnQPsE4rSFeT4GctvyVchE9ja8FJU18O0mLswIWkTjAg/PU3nQ87g 8+yXWB4P4gLxADJR2Y/5Hvvc6iZMitWRfhn+ykRFv2jsJWRNA5AU+SBsFRHrCP2POhoc 5ZxfDSl8FGJlkXVDSK6KZ1ZbkfHk3I+g/ZeDg4obCjnpOXOdEaMaFM0YxJLZSN4/jxZP 4VcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687774795; x=1690366795; 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=3dsFv4FgmnPd67WQkT8yMKl3a2nj9aCiexx+yXgesZ4=; b=gLcKg14xC5eoMvAkwIbLzX2/LETN3tv9bDSCE1/K3xXgIZOzl4+N3r2ZHHhBkjXkEU 7SjYtfE6qq769xIrYFHu48t4fTYy3oLiQ6W6z/O+fF5UH8LSSYEzfIjykTb8OPZQ2SKD dDgnF7/QdNXh8eYElzrUSGqzhy1cHV/6o/1hFTC2uMXxMbMVCpyFEkxVlDnPEUvE50ft WTXgHJIalRikB96Bi345H+AMSDSxCFTUu0nLj1vOG3xfzsk9OPujxTdZeP1riIM9KEwg 7ZHyTQFBRdFfdzqJq2XqOJms7Uqz8VaJ0vL4KP/xYSSo9D4ENjqmeEf9xgRx6hvOOdfA Ke7A== X-Gm-Message-State: AC+VfDyo7m3/B/Ue2dHBsDVwP2QYNz9QaVmdmLnNxPdHbR4ZQxOctqMJ G0fcc5PBf5zL5kZl4mjttAN5T7dA8gb5J9Vo083iog== X-Received: by 2002:a5d:62d2:0:b0:313:e8f9:dbfa with SMTP id o18-20020a5d62d2000000b00313e8f9dbfamr6753622wrv.35.1687774795509; Mon, 26 Jun 2023 03:19:55 -0700 (PDT) MIME-Version: 1.0 References: <20230426034001.16-1-cuiyunhui@bytedance.com> In-Reply-To: From: =?UTF-8?B?6L+Q6L6J5bSU?= Date: Mon, 26 Jun 2023 18:19:44 +0800 Message-ID: Subject: Re: [External] Re: [PATCH] firmware: added a firmware information passing method FFI To: Ard Biesheuvel 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=-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_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 Hi Ard, Mark, On Mon, Jun 26, 2023 at 4:23=E2=80=AFPM Ard Biesheuvel wr= ote: > 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. Regarding dts node binding, our current definition is as follows: /dts { ... cfgtables { acpi_phy_ptr =3D 0000000000000000; //u64 smbios_phy_ptr =3D 0000000000000000; //u64 ... } ... } x86 only gave a root_pointer entry address u64 x86_default_get_root_pointer(void) { return boot_params.acpi_rsdp_addr; } Regarding the naming of the binding above, Mark, do you have any suggestio= ns? > 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. You suggest putting SMBIOS in general code instead of ACPI, why? From the perspective of firmware information passing, they are a class. SMBIOS and ACPI are not related to ARCH, nor is DTS to obtain firmware information, Why do you have to put part of the ACPI code under arch/risc-v/? The scope of the previous discussion was limited to RISC-V because of historical reasons such as the binding with EFI on ARM64. We will only enable this function on RISC-V in subsequent patches. The realization of the FFI scheme itself is irrelevant to the arch. Thanks=EF=BC=8C Yunhui