Consider a bus hierarchy which comprises of a bus A which connects with another bus B. The bus B connects other two buses C and D. ab, bc and bd are corresponding bridges. Further each of these buses have their devices attached.
A<-ab->B
B<-bc->C
B<-bd->D
I understand that depending upon application of bus, it may have its speed and address range capacities. I want to focus on address space that each of these buses. Since A is the host to all buses down hierarchy, its address range should be wide enough to uniquely determine each of the devices in hierarchy.
My understanding is, in general, a device on bus C may have numerically same (or overlapping) bus local address range as that of device on bus D . However, when these address ranges are mapped to bus upper bus B, they are mapped two different addresses ranges. Meaning a device C.c may have assigned local address range 0x000 - 0xfff and a device D.d also has same local address range 0x000 - 0xfff, but on bus B, they may map on something like C.c (0x0000-0x0fff) and D.d as (0xaaaa - 0xeb3f). Though this is mapping is actually very much specific to a platform, wanted to understand if this understanding is correct in general.
Another point that I have been assuming all along is that the bridge performs this function of address translation when data crosses in either direction. Please let me know if this is correct.
My another question is if the bridge performs this translation, when the bridge is populated with the translation table? Is there any role of bridge controller driver? How does it does that (if at all)?