Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1412780rwl; Thu, 5 Jan 2023 13:14:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXsXSXN/7SQbjdA1147QFDhLIFZgzY6dhXYn31NI6FAJMb9feDjJaxyr+a+V/q87qL8HXQ6Z X-Received: by 2002:a17:907:c712:b0:7bd:6372:fdb4 with SMTP id ty18-20020a170907c71200b007bd6372fdb4mr62553275ejc.41.1672953256853; Thu, 05 Jan 2023 13:14:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672953256; cv=none; d=google.com; s=arc-20160816; b=GhJ6ILtYDG81JFOvyQiLcdOcKaiKiGbFxHZ8orrBwJNUTKrUsO7M3/UONX6aDIY6KS S4v1U0O+OhQRfOWgHRcRAU/QAnhF+0amo/ovp91WMbWsW1MmprkBWNqSnRwz59TZjUys nPN4Ud+DDeGmt/5/JbBVoUvAs/3xr9QUoEFMcy5MXfgfD0q0LD4L/F3uqbSTX48PnyA0 7clAEnEru2rl4f0o4kvy5ykF+EVEo28f8lCq0ou1K4EGWV9L/hHZtGVlr0AYSxgzgXnI Hf4dYjRDso01hh9bhFoVxutKNYrbFU+WQN8xMN6BMBMKEL0lAVt3D2vtuVRsFNMKG73m aqmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=lAKxcU1VnLVUt2Sx/eH2UB3WwK6xRPlvNikfVmyMOmY=; b=NSt4muJUPvYNsz9452SHI+SKmof62RwumTOiK7AbdiWBOdknJ3fwWdJJnMLqgpwpx/ CVdz/PV7sIUGbk6andF+Kh4DmBvozpuLbm/+RANHpSOId5er3knvynhRgciHhgA459UJ wFWrfnhDAPqLzByULvwBfC3nt0hZYarGAOs/tjbKftVfI1DHfrI4ZVtT2+nXCK0MMzJs uYMtr9Z0ddKeCEG6e7iLjNhC0q+xXAV0LfaOr7RVROFmT3khfkBUnbIRzdO+4QanF294 Shzt0FEmlVeaJqqeJlRLX0YjfsF8Ji6aa5pfo813BeKPwQcGe0dU5J8uhOSeWpzJIWQe ktew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jviNP1dR; 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 dn8-20020a17090794c800b007c4f6c371a8si37810332ejc.519.2023.01.05.13.14.03; Thu, 05 Jan 2023 13:14:16 -0800 (PST) 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=jviNP1dR; 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 S234263AbjAEUXa (ORCPT + 55 others); Thu, 5 Jan 2023 15:23:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235286AbjAEUX2 (ORCPT ); Thu, 5 Jan 2023 15:23:28 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B84C6338A; Thu, 5 Jan 2023 12:23:27 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0824361C21; Thu, 5 Jan 2023 20:23:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 411B3C433F0; Thu, 5 Jan 2023 20:23:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672950206; bh=FIfxMl/MEG5bk0JUtoAVlSmA7pBb8INFQCFomPkOSgU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=jviNP1dRQ/Boul30ZlWwseIubbN//VU9CL5VMazCkB6Uh1DGfBZVzWHZSIffQSnkG sa/RHpzAGfA3GN3h+nSpOKBs2qirSbOPywsPebSX9Tcn7czTcvmRpVyrrRdo45kU0H r3hxrpYGvKUd/2T+7IeYiFa9l5ghfQiQG+77KZx1++gG1uWC1pYU6IrmQAUdnU1p7o 8CP54tlKt98pmkk/ZwYS8P3e4sSt9mVEDlSwCkU3R9+iMInt+ve0/WNlKnjhtihnza WE3ZWON21/S3ZHWsf7CzB67tJ4HG3+jqRDzKkq5PaEUdcxl4yWNZFuO7S5/AGYBv7G kKnGXoJlGl++g== Date: Thu, 5 Jan 2023 14:23:24 -0600 From: Bjorn Helgaas To: Dan Williams Cc: "Luck, Tony" , "Liang, Kan" , "bhelgaas@google.com" , "hdegoede@redhat.com" , "kernelorg@undead.fr" , "kjhambrick@gmail.com" , "2lprbe78@duck.com" <2lprbe78@duck.com>, "nicholas.johnson-opensource@outlook.com.au" , "benoitg@coeus.ca" , "mika.westerberg@linux.intel.com" , "wse@tuxedocomputers.com" , "mumblingdrunkard@protonmail.com" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Box, David E" , "Sun, Yunying" Subject: Re: Bug report: the extended PCI config space is missed with 6.2-rc2 Message-ID: <20230105202324.GA1165237@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63b7289cb7439_5174129445@dwillia2-xfh.jf.intel.com.notmuch> 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 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 Thu, Jan 05, 2023 at 11:44:28AM -0800, Dan Williams wrote: > Bjorn Helgaas wrote: > > Apparently the only mention of [mem 0x80000000-0x8fffffff] in the > > firmware/kernel interface is as an EfiMemoryMappedIO region. > > > > I think this is a firmware bug, but obviously we're going to have to > > figure out a way around it. > > Definitely an ambiguity / conflict, but not sure it is a bug when you > look at from the perspective of how would an EFI runtime service use > ECAM/MMCONFIG space? I think it's perfectly fine for firmware to advertise ECAM space as an EfiMemoryMappedIO region via EFI GetMemoryMap() because it certainly makes sense that EFI runtime services would use config space. My understanding is that the OS should learn about device address space via ACPI _CRS, not GetMemoryMap(). The MCFG spec (PCI Firmware Spec, r3.3, sec 4.1.2) requires ECAM space to be reserved via a PNP0C02 motherboard device _CRS. So what I think *is* a bug is that this firmware doesn't report the ECAM space via PNP0C02 _CRS. If somebody thinks the lack of this reservation is not a bug, I would love to hear ideas about how Linux *should* be handling this. There are many variations on how firmware does things like this, and it's been a nightmare trying to figure out something that works with all of them. > Would it be enough to add this clarification in "EFI 2.9 Table 7-6 > Memory Type Usage after ExitBootServices()"? > > s/This memory is not used by the OS./This memory is not used by the OS, > unless ACPI declares it for another purpose./ I guess the idea is that MCFG is a form of "ACPI declaring it"? I don't have an explicit citation for it, but I infer at [1] that ACPI static tables are second-class citizens and not intended as a way of reserving address space because that would lead to problems booting old OSes on firmware that provides new tables unknown to the OS. Bjorn [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/PCI/acpi-info.rst?id=v6.1#n32