Remapping mmio addresses.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
mindentropy
Member
Member
Posts: 42
Joined: Thu Jan 13, 2011 3:33 pm

Remapping mmio addresses.

Post 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.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Remapping mmio addresses.

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
mindentropy
Member
Member
Posts: 42
Joined: Thu Jan 13, 2011 3:33 pm

Re: Remapping mmio addresses.

Post 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?
Post Reply