Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp14919930rwd; Sun, 25 Jun 2023 06:55:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WMT3H8Ye6o5j3gXeeBfnWgTG6zhFVhpG/P9ltedbLps2qy32vyWfZGh6N8jkqRfTh9dmT X-Received: by 2002:a05:6a20:1596:b0:10c:663c:31c3 with SMTP id h22-20020a056a20159600b0010c663c31c3mr24356610pzj.29.1687701303805; Sun, 25 Jun 2023 06:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687701303; cv=none; d=google.com; s=arc-20160816; b=cpRCR7ROmFOK6btIzq8K0PHbzJVNMWC6xvUaISf1Jp3dkIJ7eF4NbbVVcyI3cfV9AO 8JWybLOllpNANXA3vixTTLCMqJNlbm+xDJUvXuQvOh2V5Qw5xlZ+zV1x1XtDzMmSFECz qJn4dfHz21GurNhDci2D1sl/MeBAW9d5jLbjkrOU5qquE3W+Z7gBm+9jLs1YzqRTajz1 diBz0Eyd/lAEGOhAkKahFR97RStsve29VTceDuyUmexgxVdYB8sb1V2anKytCvGhOMvY n4dmKUiAcxd3gLmg9JlQ4y6guwfwis40E1FQXGoEDpTD60lgJhSu8XIkYtNAnm/N7F22 7r5Q== 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=5FJHMypCT9XeFQ2x89rNogcNnGm1QgKHn7RVAOX14kM=; fh=+EDxGvulbOm+gueTY9DyJFlSePG+oynIDmapeDunhus=; b=gE4kIHaSCCdieltgm/vXcg8s3Zc9nJtmWPHXGe2Lt/rai27ymOVNUEqREKzLs1S5DN Wf3KRBAduuxvfce8ycpUBj1Q17AGeA0kCYTbuImxmHdjcjAXONj/8nyukpDBto2nhxqU 1QMJNY662sZBLvayNMjJeDzm4laGNSvr9KNH0z3DJDlqaJfOxeshP6nt6T6rIkyAS15B QqoL0kPKwQiQiP7G0kOBoPLW6xhZw+bGDFJ3tQhnxEh7nv1CMl1MXvJwrtTxfF1oKZkO oQ1c2qnC0FbGRkhjRVUxNlFBRDh6BsdFzkS6GhbHDM1QVajBfPAVXFl+PzJ9Ge1hrsdi suow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MCqUd8Fy; 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 20-20020a630f54000000b00551bb2b99besi3173358pgp.85.2023.06.25.06.54.51; Sun, 25 Jun 2023 06:55:03 -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=MCqUd8Fy; 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 S229616AbjFYNNN (ORCPT + 99 others); Sun, 25 Jun 2023 09:13:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjFYNNK (ORCPT ); Sun, 25 Jun 2023 09:13:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E3751B7; Sun, 25 Jun 2023 06:13:09 -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) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E9E6C60B78; Sun, 25 Jun 2023 13:13:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BCF4C433CA; Sun, 25 Jun 2023 13:13:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687698788; bh=E+xepwben9vqxAh0oSk1MlseE+MhedOdYTv6e9aA7FU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MCqUd8FyjNonX9AA/C/BD2o2X2EyBBK07rB0wyj98n3Xw0qKiIgHa4HwaA19zSTPM LN3Hczxs+AFxKMtEVIK3rMHtGST1itZio1Nzz/MmHr0XCQrXZmsfUDqOJCXFZ8EkLy M7WWW7MMZJnVw7NY0BNQ1/eez0O7a0ZO6Gb2315bAh/k02nXT+/54bBO7mz22JyBjL zSsk3lJNhkWSoxqiFeJM9SEHxf3hPEgPAIdRIKAYXy+IMYwzY4wsNbrzeh2mMTW53l nVJQOVWwLujJYJ2ZCwj5/UUPEEt7veshFeHEzDUtQn0zbmSdDgq1/3Lyp7aFjxehXt 34vH6xQSynfug== Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-4f86fbe5e4fso2725884e87.2; Sun, 25 Jun 2023 06:13:08 -0700 (PDT) X-Gm-Message-State: AC+VfDxmq7oJFff9kezs56kKHSzYz5SB3a4ZMcGQDKWHH6T5pSH0+Wfw Ni6SyRW4CKwHLRU6Y7lQY9RysMXT5nOQbKgDixs= X-Received: by 2002:a05:6512:2825:b0:4fa:9dc3:1d41 with SMTP id cf37-20020a056512282500b004fa9dc31d41mr925670lfb.51.1687698786295; Sun, 25 Jun 2023 06:13:06 -0700 (PDT) MIME-Version: 1.0 References: <20230426034001.16-1-cuiyunhui@bytedance.com> In-Reply-To: From: Ard Biesheuvel Date: Sun, 25 Jun 2023 15:12:54 +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, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, geshijian@bytedance.com, weidong.wd@bytedance.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Sun, 25 Jun 2023 at 13:54, =E8=BF=90=E8=BE=89=E5=B4=94 wrote: > > Hi Ard, > > On Sun, Jun 25, 2023 at 3:43=E2=80=AFPM Ard Biesheuvel = wrote: > > > > acpi_os_ioremap() is used by all ACPI core code that needs to map MMIO > > regions or DRAM from AML code. AML does not pass memory type > > attributes, so we have to consult the EFI memory map for these. > > > > As I have explained to you multiple times, ACPI on arm64 is *broken* > > without the EFI memory map. > > > > As Ron's suggested: > "... > It would be nice to separate those pieces on RISC-V; certainly they > were separate for a very long time in the x86 world (we had ACPI+SMM > on coreboot laptops without UEFI for example) > ... > " > > If it cannot be solved temporarily on arm64, then we cannot let it > continue to be bound in RISC-V. > And on the linux-next branch, RISC-V arch is not bound to EFI. > void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) > { > return memremap(phys, size, MEMREMAP_WB); > } > > > > > > > Incorrect. We are talking about any physical region here, not just > > DRAM. And some DRAM regions may not be covered by memblock. > > > It is very strange that so many devices can complete the hardware > description through DTS without the problem you mentioned. > Even if there is, then it shouldn't be the problem that this patch > should solve, should it? > > > No, sorry. Please try to understand the objections that I am raising > > first. I am not saying this to annoy you, I am saying this because > > your approach is flawed. > > The implementation is right in front of us, we need to support ACPI on > RISC-V based on coreboot. > If this is only used on RISC-V, and implemented under arch/riscv, I have no objections.