kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* How is 'ranges' property of pci node of a device tree determined?
@ 2022-05-04  9:01 Chan Kim
  0 siblings, 0 replies; only message in thread
From: Chan Kim @ 2022-05-04  9:01 UTC (permalink / raw)
  To: kernelnewbies

Hello all,

I was reading
https://elinux.org/Device_Tree_Usage#Ranges_.28Address_Translation.29 and
have a question (I have read it in the past). 
In the device tree node for the PCI bridge, there is "ranges" property and
this is to show the address mapping between PCI address and CPU physical
address.
And this seems to be the relationship between BARs and the CPU physical
address and this is usually determined and set by the firmware before linux
boots by filling in the BARs and setting the PCI bridge's address
translation logic appropriately. So does this mean this pci node in the
device tree is filled (or modified) by the firmware(BIOS) during
initialization and passed to the OS? (I guess so). I know how the BIOS or
firmware detects the address ranges's type (memory or IO, cachable, and
size) from the initial BAR registers and fills them. I'd appreciate it if
someone could confirm this.
(and the dma-ranges property seems to be the relationship between PCI
address and the host side memory address)

Thank you!

Chan Kim





_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-04  9:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04  9:01 How is 'ranges' property of pci node of a device tree determined? Chan Kim

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 NNTP newsgroup(s).