Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp14828752rwd; Sun, 25 Jun 2023 05:17:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7bp1XJqCytGzIhTSQVz1QKuB6lP4MZvXgH2/yOfEDRmAfyJi3kMrt3ocds5VwDruGZltRK X-Received: by 2002:a17:902:e88e:b0:1b6:941d:fb9b with SMTP id w14-20020a170902e88e00b001b6941dfb9bmr5857375plg.18.1687695457704; Sun, 25 Jun 2023 05:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687695457; cv=none; d=google.com; s=arc-20160816; b=GNF9cjeSC0yvHcBvturzHmdWelHTqS/oH3KPFQHXcyXl+m46nUtNukI/3ovhZisMJn Swsz37/FZOEqJKAnSIk333zO8W7a5x/wvsbsiR2FYRVZBxxI0TGuQTnjYgSLsT7+G3RA Ni3aqqbMoHjYHwVDn5pAkERmwHsb3a7ewQmlKpEMIjWo7evBR+KhHOKKFZq/DaewKEi0 XNm4zNSqi+nZ/xVY/b/3daW+3R/gif0Db0ckmcGNWc9lO/72EHx7OcrgTHNk8EIpCP3v H5nBprYBXOfMTk+usn4ynClAajj4xAKR4cpbPV2FHWk4RPdD8N7qeP3UIpWoQwhzpiM6 nmRg== 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=FutxFDyojhTB1VoP7BlVK4juCgnkY6pSYAe6U3OCTbI=; fh=qdqbdVuGVV0nh6piCIPZO+4VgDqK4I2oLWQkpgciyDE=; b=uSYI6UmR+pSJkMzHbQMZmA//L3NDcs9Mzvw0FGrZkl1bf+WEd0aj30TG3ZQFQfqTfe r9kJiOryTBEvxAIHbvdFVindmQD0Jii0xEXUnnkJx2OTjs8hIImYbpkaWoPGGdRF79/j duSeK0rnRcqHfpxuhoGkWHtRHd29s+D6EMrIC1XRdTUlQE6MsZHt49rzQBYkIZ9/K4ei 0WJz8lRxmMdixRI5K1vnPfXvZ4nscIZObMaFILQW7m5wg/EfnCC6UKGNkmF5QLit6WoB iJJM8FzfBg8tmBuwTWRn/UsPPmIFwli124Jwaf+wno5vPplXRuFBQD9fqEpHEuyaE73N tTTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=dtRQGimw; 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 q62-20020a632a41000000b0053fbe7c8d3dsi3254417pgq.632.2023.06.25.05.17.25; Sun, 25 Jun 2023 05:17:37 -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=dtRQGimw; 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 S231709AbjFYLzj (ORCPT + 99 others); Sun, 25 Jun 2023 07:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231688AbjFYLzE (ORCPT ); Sun, 25 Jun 2023 07:55:04 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F835E43 for ; Sun, 25 Jun 2023 04:54:40 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-313e09a5b19so882578f8f.0 for ; Sun, 25 Jun 2023 04:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1687694078; x=1690286078; 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=FutxFDyojhTB1VoP7BlVK4juCgnkY6pSYAe6U3OCTbI=; b=dtRQGimw3ml5X7h4zMQ6nCi+z8QJ8Dhu035HOdPmBxpQMw87NEboKY+eJLd40atLS/ mASv28b+E4qseH/HKXXjmTwUTE6jB9sKB7UIcHEvYIVtbGsCCxYIW4xyQTAjJpF6uUh2 tUxWAXHuxw9geky4kGM0T1gV3tRf52LpwcRyKSoQtNpP8odFHkNcKRvRznKy8f4cjsWF cvRRHfrXZMGEu2Xeqou7JdYun9eOeb/TyQHeqQQneKyRWlV6M6jWoy1iuxSVO0Dgptf6 vIgaKDni6GizWDBTWAhNQ6pkm6SR1vEl4q6x/aP+kxw0Yr063AQYX1TFaw3pBbW+jkkF G+3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687694078; x=1690286078; 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=FutxFDyojhTB1VoP7BlVK4juCgnkY6pSYAe6U3OCTbI=; b=NwaljhuHhuieoMPPex6wjMy+NejoECVJ59O/gQhTuytSqa4jrdwXGHBVa3VvAA1oCj vCHk40TMH+8Q+QM1bEiW5iBGMT+tkIi+BNSUfQ9EGxjsAB1ilfeUNS+ImFjnRIxXvMuo eQs+XmYG7Wxmc8HIHibFyquYMz0qOGKx5Erv56APstcSvCHdz5ZR4Agv+90+JFY/zG9y Uh5pa6coXLrndIPsiVDWgvu6ybnUR+dSH4+R+YSn+UaJ2cSdWToRp+1i2tcuc9/+DiQI US1u8frxfYB+jf7mgeIU4K4ZPK5YHzuqAPmu+Y5jMhH0e1fRL+yXStChvx2s4TEos4SG kMjg== X-Gm-Message-State: AC+VfDz4Lf8/9zaeIMOLsZBfk5/GKQcU+nJ8BHp+d1Rth8GD7nHAJLL8 0LmJYklD5Ew/oLykXZKSHoiXQIZhdPBO3rEF/9eZ0Q== X-Received: by 2002:adf:fed1:0:b0:312:849d:acc8 with SMTP id q17-20020adffed1000000b00312849dacc8mr12175696wrs.9.1687694078543; Sun, 25 Jun 2023 04:54:38 -0700 (PDT) MIME-Version: 1.0 References: <20230426034001.16-1-cuiyunhui@bytedance.com> In-Reply-To: From: =?UTF-8?B?6L+Q6L6J5bSU?= Date: Sun, 25 Jun 2023 19:54:27 +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, 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=-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 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, On Sun, Jun 25, 2023 at 3:43=E2=80=AFPM Ard Biesheuvel wr= ote: > > 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. Thanks, Yunhui