From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70EFDC282DE for ; Mon, 10 Mar 2025 10:45:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3AE03280002; Mon, 10 Mar 2025 06:45:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 35C13280001; Mon, 10 Mar 2025 06:45:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 24C39280002; Mon, 10 Mar 2025 06:45:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 08859280001 for ; Mon, 10 Mar 2025 06:45:25 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2630E80D96 for ; Mon, 10 Mar 2025 10:45:26 +0000 (UTC) X-FDA: 83205309852.18.A88994A Received: from zg8tmja5ljk3lje4ms43mwaa.icoremail.net (zg8tmja5ljk3lje4ms43mwaa.icoremail.net [209.97.181.73]) by imf05.hostedemail.com (Postfix) with ESMTP id 813CA100008 for ; Mon, 10 Mar 2025 10:45:21 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of wangyuquan1236@phytium.com.cn designates 209.97.181.73 as permitted sender) smtp.mailfrom=wangyuquan1236@phytium.com.cn ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1741603524; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e4wmaNuhrXl7gauvp2XRpmm0yWnD89cpCXxegn01Stk=; b=geNFNVIoR5EWEBSs2zF+CqZHnF7rF5iCtbI1gkVQ2cIWilo6+csPxxmMdKNbcfS9K2rt9i Kj7QBcvkal8FBXfzfGrSorSI+PRp5XoR7gtHAe+fxpcRSLGMOLpZZvBXgGo7igpZQ/WjlU UH3JlswELd6/6LWQBvYcUfwZp8vQj1E= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of wangyuquan1236@phytium.com.cn designates 209.97.181.73 as permitted sender) smtp.mailfrom=wangyuquan1236@phytium.com.cn ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741603524; a=rsa-sha256; cv=none; b=o6PcmWaACqbQpfGNMS+aIpjjhl13HyGoho1sYchEnj80Ytiv0zqzvRAu+lgSqVA+WFH+uG sWbjzgsD7GPNIPn4eo4akqV0B0xp+vmc/2PJ6lmpu502fZBotf9GxwwIPLJ9YDnKinlfRN 8paANH6BBDEBGF1r++r8SroR/CeMMX0= Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-7 (Coremail) with SMTP id AQAAfwD3_Gi6ws5n6s9SCA--.1014S2; Mon, 10 Mar 2025 18:45:14 +0800 (CST) Received: from localhost (unknown [123.150.8.50]) by mail (Coremail) with SMTP id AQAAfwD394O4ws5nqbhBAA--.4972S2; Mon, 10 Mar 2025 18:45:14 +0800 (CST) Date: Mon, 10 Mar 2025 18:45:12 +0800 From: Yuquan Wang To: Gregory Price Cc: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [LSF/MM] CXL Boot to Bash - Section 1: BIOS, EFI, and Early Boot Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CM-TRANSID:AQAAfwD394O4ws5nqbhBAA--.4972S2 X-CM-SenderInfo: 5zdqw5pxtxt0arstlqxsk13x1xpou0fpof0/1tbiAQAFAWfN84QD-gACsn X-Coremail-Antispam: 1Uk129KBjvJXoW7ArWDAF18ArWftFW3Xw1UWrg_yoW8Kw1fpr nxJryxGr4kGryxJr18Zw1rJr1UJw1YkF45Jr18Jr10kw15Cryjvr47tr18Zr9rGryUAF1U XrWjqryDtF4DAaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU UUUUU X-Rspam-User: X-Rspamd-Queue-Id: 813CA100008 X-Rspamd-Server: rspam03 X-Stat-Signature: st4nq9hhe66811iujt5mw36s5yq3hcjy X-HE-Tag: 1741603521-950917 X-HE-Meta: U2FsdGVkX18pVEDu/4U1+0YU2I+RqapbfU6J/J2FDpnFkXAleobxSblNNqboidLzMPVz9ZXsNSJ5WhgIbJ8Sk10hLAaVgc/ihLSsV1IA2naiAtpkl+YjCG+STNl2SSI8YLEHsL/MYr8l3pAu4kBb1Ma/QaCCLBzeLmkkUgU4Uqnd7H0CPHGgejlllas7p+w05VbAtAg8EO34ik0w1dX31/LyXhd23lTf70KwlRA6i602ofLm4MvVjm3ADXa3+15RoS4Qng13YweOoq46LZc6Il5odeg8BnLo2hO9oza5ikkTLOC95o69ajga1HkYCZ1Utl/be3F2xRqVhY30ALrWy3st7s3bkrKWuw5wPrmacBlTivRp/VKSzhk/5EuCzZvUM2+JqdR3o0zmoG5oKIKY0Tu74NWX6A6jmNDQam0etCKJLbf4LamsgsuzaifXp5c+tcaUbI6RJOd5y4Dz/1vmNjoJig0zbkn+qorhea8qiWN+Mf5cUdZS4hyUzPckiV6wx4q0V88N6OGrrmCIsvMuRd22frWPPT2hIbD+I+vOHcza948G1RdELUsEoEyi+66Bij4A4r13eYFZ9jWefkrzanqqhrTanmjnIxBleAf3metQafLAzqqAZMblQVsbi4jwhZ29wwIxJJ7KGKf2EDrrhGo+ngF9ka9rUYmvtTdA5fFRvwS/uPh6kVJOEdqWpqXWUNvUjdJUP3qG18nFmF6b9/1Z2iljXW62kiKYliBc5mSxaqzCTzY/UvjTj0oISjI9nHRtR6VT3ARK2TiJj1h+/Fo5BV0AwAbCwI/Q56YujYuJ5yDFK4UIC6ZzGaMtJUxK+Zlnj78Cb2iMlhL7lAhhEPJXzqNf0CuWAm4JvbNVjPz0jqM30WETrzMKoPEbkaVBYXJWxeeFIYQef2evIrQG8GhbQ8sFHfw1wWAhlNhQ7E4QSG8c86ICFmXILIsFqDPQM/oFJjRko+cS4j3DrST IQ6p46oH ei2g7M/LvXsKxa9D4bK5QtyteviZMXeQu6PwQ91oHi4jp4fMY0waYvpiK5CI7tTKWyJsAvm3/mr0QwTaogtInNdAHHjLeMI2coklUxKGXaQ99mJhvfvoE99tpxPjBmCUT5RfzSikUdOHiTBs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Feb 04, 2025 at 09:17:09PM -0500, Gregory Price wrote: > > Platform / BIOS / EFI Configuraiton > =================================== > --------------------------------------- > Step 1: BIOS-time hardware programming. > --------------------------------------- > > I don't want to focus on platform specifics, so really all you need > to know about this phase for the purpose of MM is that platforms may > program the CXL device heirarchy and lock the configuration. > This question can be very naive, what's the meaning of 'MM' here? And since I am not familiar with cxl bios configurations, based on my understanding of its acpi results, there are roughly two configuration schemes in my analysis: a) users should enter some configuration information manually (like region base/size). b) bios could provide a recommendatory configuration by device information. Is my understanding right? > In practice it means you probably can't reconfigure things after boot > without doing major teardowns of the devices and resetting them - > assuming the platform doesn't have major quirks that prevent this. > > This has implications for Hotplug, Interleave, and RAS, but we'll > cover those explicitly elsewhere. Otherwise, if something gets mucked > up at this stage - complain to your platform / hardware vendor. > > > ------------------------------------------------------------------ > Step 2: BIOS / EFI generates the CEDT (CXL Early Detection Table). > ------------------------------------------------------------------ > > This table is responsible for reporting each "CXL Host Bridge" and > "CXL Fixed Memory Window" present at boot - which enables early boot > software to manage those devices and the memory capacity presented > by those devices. > > Example CEDT Entries (truncated) > Subtable Type : 00 [CXL Host Bridge Structure] > Reserved : 00 > Length : 0020 > Associated host bridge : 00000005 > > Subtable Type : 01 [CXL Fixed Memory Window Structure] > Reserved : 00 > Length : 002C > Reserved : 00000000 > Window base address : 000000C050000000 > Window size : 0000003CA0000000 > > If this memory is NOT marked "Special Purpose" by BIOS (next section), > you should find a matching entry EFI Memory Map and /proc/iomem > > BIOS-e820: [mem 0x000000c050000000-0x000000fcefffffff] usable > /proc/iomem: c050000000-fcefffffff : System RAM >