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 shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44725EB64D9 for ; Sat, 17 Jun 2023 09:52:16 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1qASak-0006ld-0O; Sat, 17 Jun 2023 05:51:34 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qASah-0006l8-1P for kernelnewbies@kernelnewbies.org; Sat, 17 Jun 2023 05:51:32 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5EBD95C011C; Sat, 17 Jun 2023 05:51:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 17 Jun 2023 05:51:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1686995478; x=1687081878; bh=oH IFD05w6KhNI0qe1wcW3EF1AQvFyZaz1DZCXGW/1n0=; b=uGX2sdpaeDeObuGtKP gLSjgTLGDnWG1zhrZcumCV29dpWVFEBVoKIo1WQRtGPz3bTdgbcOx3CYNdzqG/s+ LbrEVUA3yLu6DSAGN/dk1CYEOwxnrAMT7m6kv8ByiE13GcpHwjnGGanpeUmBQdxT 1wzmr5ZGM2EEb2+qHngCn30W8YuRFWsCkTUllvtPuFODCHm8BEdT/rGLdGHfKGrH UxcY+E7BAM+Ul2cclNOpHrYZ5SDKS6+dwymoerMYPxbhygwOU+CjIdHVcBUHswn2 RkgXrFz3tZL/GxASbi3oE2bFfBVmsUOHVqz3k9S+zjVQ/vZHTM1ZWP6YI/rzSlav neIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686995478; x=1687081878; bh=oHIFD05w6KhNI 0qe1wcW3EF1AQvFyZaz1DZCXGW/1n0=; b=ObhajiU3XqVr4ypGZSGaS0qhIn6oP SHHbKFVdJYgorgA8fDJ6MPiISVUSq8C40YhTW6PN3ReSdWldt6WgtVBTbAdX9fS+ muig5DgBAgv5VXXXfbGxclfa8i+lOP0DSfBkrKs9rPqOAzzm1JDrtTuLDsXsoAdy J6Exx+sxNYZ5PC1Na8VnVRSmxfOeoBoQserQnCOIYsqHuYCcFS6RFaN7pQC677qm 9cgC5croe1wSEd/4bpnWprcbR3gZ3faoIKJqXOI0mA8iJfoo4nuDSBh6wHTfRFxN GQhAQBtEjRmk+T/8UO/vqXqz6W8xfk7eWBCwmvQBfzgZhJBj03aCKBQVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvjedgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepheegvd evvdeljeeugfdtudduhfekledtiefhveejkeejuefhtdeufefhgfehkeetnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorg hhrdgtohhm X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 17 Jun 2023 05:51:17 -0400 (EDT) Date: Sat, 17 Jun 2023 11:51:15 +0200 From: Greg KH To: Lucas Tanure Subject: Re: PCie card information for ACPI and Device Tree systems Message-ID: <2023061738-lukewarm-surfboard-d0c5@gregkh> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Sat, Jun 17, 2023 at 10:20:01AM +0100, Lucas Tanure wrote: > Hi, > > How can the kernel read hardware information for a PCIe card if ACPI > in the BIOS doesn't have it? > The DSDT/ACPI information doesn't contain information about an > external PCIe inserted in the motherboard, so how can the Kenerl > discover its hardware information? The PCI bus protocol has a function to walk the devices and let the host operating system know a device is present and then the operating system does the device probe and reads the hardware information from the device itself. > If the kernel has the rule of not hardcoding hardware information in > its driver, what is the method to get hardware information for a PCIe > not part of the motherboard? Because that's not how PCI works :) > And the same question for ARM device trees. How can the driver find > hardware information about a PCIe card that is not in the loaded DTB > for the system? PCI is CPU agnostic. Just like USB and other self-discoverable busses. See the PCI specification for more details if you are curious, there are some good books out there on how this works at the low level if you want to know more. hope this helps, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies