Kernel Newbies archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Lucas Tanure <tanure@linux.com>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: PCie card information for ACPI and Device Tree systems
Date: Sat, 17 Jun 2023 11:51:15 +0200	[thread overview]
Message-ID: <2023061738-lukewarm-surfboard-d0c5@gregkh> (raw)
In-Reply-To: <CAJX_Q+2MjHzvXuQQZ64P4FmNc+V+F9vuaw8Q8QtN_BGy60dkFg@mail.gmail.com>

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

      reply	other threads:[~2023-06-17  9:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-17  9:20 PCie card information for ACPI and Device Tree systems Lucas Tanure
2023-06-17  9:51 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2023061738-lukewarm-surfboard-d0c5@gregkh \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=tanure@linux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).