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 4218DC021B1 for ; Thu, 20 Feb 2025 16:30:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BBD3C4401FB; Thu, 20 Feb 2025 11:30:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B6E344401FA; Thu, 20 Feb 2025 11:30:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A32D64401FB; Thu, 20 Feb 2025 11:30:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 86BDD4401FA for ; Thu, 20 Feb 2025 11:30:52 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 306A01CC37C for ; Thu, 20 Feb 2025 16:30:52 +0000 (UTC) X-FDA: 83140861944.06.1B5EE0D Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf24.hostedemail.com (Postfix) with ESMTP id AB382180008 for ; Thu, 20 Feb 2025 16:30:49 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1740069050; a=rsa-sha256; cv=none; b=WyPBl77MHpc2qzMQInVFxm+4lYQ6BZdho1ywxB5z/OZqmWbTXD6IfGgpUls7M/xck09o3j 3PSfhhc3RPYgyiui9QYuzLXuhy9wONHMXapkVUtpbw6Rj5JG2M8gwmchlXwHiOtCqQx91U ergzjiVsjC4lCZMX7o8bN23+BWBaRlg= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1740069050; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jT45et5B+k8ddZpLGP8zGIZq8ygt4RXgr7Q3J2LI7BI=; b=01Ux2ycerZzeUIhuGvciE5NyyddKzP54ER0RaNuvO99BSly28mQC93EUUv87F+0DUokvsl Mglg0sS1ZDOKiVY3zqRhKMvCo+5OYug9SEke025YdQEjoD2PjYcbz/coFh/ll1kbu552eS SxzF0JDLGPawlrm+gIAryFPQnZxeJ8Q= Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4YzJZH19G7z6L4tx; Fri, 21 Feb 2025 00:27:19 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 355FB140257; Fri, 21 Feb 2025 00:30:45 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 20 Feb 2025 17:30:44 +0100 Date: Thu, 20 Feb 2025 16:30:43 +0000 From: Jonathan Cameron To: Gregory Price CC: , , , Subject: Re: [LSF/MM] CXL Boot to Bash - Section 1: BIOS, EFI, and Early Boot Message-ID: <20250220163043.000000cd@huawei.com> In-Reply-To: References: X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100010.china.huawei.com (7.191.174.197) To frapeml500008.china.huawei.com (7.182.85.71) X-Rspam-User: X-Rspamd-Queue-Id: AB382180008 X-Rspamd-Server: rspam12 X-Stat-Signature: eecy8batfsihcptij7u7juao1n1dpf75 X-HE-Tag: 1740069049-752806 X-HE-Meta: U2FsdGVkX1/6Y1wQMpIqoXdgyLT9H41Rpo3qDT9fC7EMOiZi/6EdWR0SqczfkPzCK/s5FC/+cPXUeTIlvRWfXDy7ZRwSfWpZc4Bf0ivQXgILIR/vWrrK/9DsfnxzydMvn+l073wC7EJn133bmxSI66KsqL1osoJ7BkjgXOVXi8Gp+7pXvVb8mfz8gE2tmjjWacBbYffIalNcOQw9O8PJelhQj84uFH4SwjHsIqT9kkGLGrLOg/4mDMdEm8EtByQZWEl3N6Q3TdcKgTytAyc7Tmiut+R96lHsjsKBw1+TG9KC9a7VB7fTXTSel6dpyhuAznBmKMrxPxo40V1r6HmxP07M14iC8oCahAa+IrkQWeA4iNdfj7zAdEacHjG/7DUCal1oVvrDLLBvTnkZ02jLe0nFPLaufo3i/0Zk8Feyg1XAQFkDm0OWsPss3n6mM5phbW6bl19wO9GQ3qwy2QBYvigLcKBsq5nLUbMsYPGvWZxTrejtCOiZlVhG841ffMQWFsxAXY8upitiqcKxZFmDVZ0m6Yw9QJJxyWUgi7Pe9TEkLWL5x8ePBT+urM420gtI3p1xE/KL1efTqxfn/ErYejkP2tjw9O83GbqoHLSJjkRRulfPJkdvHj35VoQNCUJjFhErosLUdRCAO7VSr0l3xsbxfYS4bN6bqpB9rSy8wEBK24IT6aaHWWfUOyUYu33fEYvCzI5N//tNzm1aJljNdSmdi1ftArK/jIoowBOE7ScI/CQaBoWc38tHXEg5TA/2G6evjPfIWIF0Ki9eWvxIK0Emam0WGehmwc0ZbWlXV1mmMEKnRkj8BAiR5iJDzCld9HH/aM4hfV/T1pmwdzSehUtjQaa6EpzXVNODEuJhvX4c+/kbn4I3Z4VPcYo4vohnO9kmgfA/7UEDRfdWG+tlEe+rgS4NVJiFZLJIT80NByk50QAPJ5tPWRmC0qNTwJ0YtxdLk8+1lgXma+b5M3q K+vk5o4l KFcnrs0pSb1Z/YdpheRrPBIUjVc19ZNmIO5p8QV1Ip2DLRhJ81JRIqSjV1QpPKE4buZYh0VH67S7x+1SJwUwbJxopW+qvF4kX/krWoAb166sbUPTNGFy4OF3deolTcJxuPswIWNsrknZxAGFOGbdeKJNNYKPHKfJMSnY/Gzl5xoJat0c= 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: > > 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), Specific purpose. You don't want to know how long that term took to agree on... > you should find a matching entry EFI Memory Map and /proc/iomem > > BIOS-e820: [mem 0x000000c050000000-0x000000fcefffffff] usable Trivial but that's not the EFI memory map, that's the e820. On some architectures this really will be coming from the EFI memory map. > /proc/iomem: c050000000-fcefffffff : System RAM > > > --------------------------------------------------------------- > Step 3: EFI_MEMORY_SP - Deferring Management to the CXL Driver. > --------------------------------------------------------------- > > Assuming you DON'T want CXL memory to default to SystemRAM and prefer > NOT to have your kernel allocate arbitrary resources on CXL, you > probably want to defer managing these memory regions to the CXL driver. > > The mechanism for is setting EFI_MEMORY_SP bit on CXL memory in BIOS. > This will mark the memory "Special Purpose". Specific purpose if we are keeping the UEFI naming.