Page 1 of 1

Remapping mmio addresses.

Posted: Wed Apr 20, 2011 9:26 am
by mindentropy
Hi,

In the case of memory mapped i/o is there any way of remapping the addresses already mapped? After reading up I have assumed that this is dependent on the bus. I am pretty sure that pci devices can be remapped.
Also in the case of creating a development board would the board manufacturer specify at what addresses would his IP core suppliers map the addresses to? For eg: would the board manufacturer tell the ethernet controller manufacturer the mappings or should the board manufacturer deal with it later?
Also are there cases where different devices had clashes with their mappings?
I am also assuming the BIOS has a role in mappings. Correct me if I am wrong.

Thanks.

Re: Remapping mmio addresses.

Posted: Wed Apr 20, 2011 11:05 am
by Brendan
Hi,
mindentropy wrote: In the case of memory mapped i/o is there any way of remapping the addresses already mapped? After reading up I have assumed that this is dependent on the bus. I am pretty sure that pci devices can be remapped.
You're right. For PCI it's controlled by the "BAR" registers in PCI configuration space. For "Plug and Play" ISA devices, EISA and MCA it's a similar idea but implemented differently and has other restrictions. For USB, only the host controller (typically a PCI device) has any MMIO capabilities.
mindentropy wrote: Also in the case of creating a development board would the board manufacturer specify at what addresses would his IP core suppliers map the addresses to? For eg: would the board manufacturer tell the ethernet controller manufacturer the mappings or should the board manufacturer deal with it later?
As far as I know, PCI devices are meant to be in the "disabled" state at power on; except for anything needed for the CPU to access the firmware/ROM. For embedded devices I'd assume it's mostly the same, but there could be some cheating (e.g. inbuilt devices that start in some pre-arranged default state so that firmware doesn't need to do as much).

In general, for any specific device and/or chipset, the relevant datasheet/s will tell you what the default (power-on) values for things are.


Cheers,

Brendan

Re: Remapping mmio addresses.

Posted: Wed Apr 20, 2011 11:36 am
by mindentropy
Thanks for the reply.
In general, for any specific device and/or chipset, the relevant datasheet/s will tell you what the default (power-on) values for things are.
For one of the boards for programming the dma controller there is a table given with the register name and the address. Correct me if I am wrong, I am assuming these registers would be memory mapped initially. The bus interface is AMBA. The processor is an ARM920T.

Also I have another PPC board for which the documentation is missing. Is there any way I can probe and reconstruct the memory mappings manually without relying on the bios or firmware? Are there any other techniques may be using an external hardware?