Memory map and.. mapping on embedded

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
JulienDarc
Member
Member
Posts: 97
Joined: Tue Mar 10, 2015 10:08 am

Memory map and.. mapping on embedded

Post by JulienDarc »

Hi,

When a documentation gives a memory mapping, like this one:

Module Address (It is for Cluster CPU) Size
SRAM A1 0x0000 0000---0x0000 FFFF
SRAM A2 0x0004 4000---0x0004 BFFF
SRAM C 0x0001 0000---0x0001 AFFF
DE De-interlaced 0x0100 0000---0x013F FFFF
SMC
CCU
UART 1
...
DDR-III/LPDDR-II 0x4000 0000---0xBFFF FFFF (this is of interest)

Should I manually map all these or just the ddr3 (ram)?
Those other physical address link to memory mapped devices so they should not generate a page fault on kernel access, right? Because it is not RAM, the CPU automatically manage them (hmmm?)

Not sure on this one.

Please advise! :)
Octocontrabass
Member
Member
Posts: 5586
Joined: Mon Mar 25, 2013 7:01 pm

Re: Memory map and.. mapping on embedded

Post by Octocontrabass »

It depends on the MMU.

For example, the MMU in some MIPS CPUs has a portion of the virtual address space dedicated to a fixed virtual-to-physical mapping. In this case, you wouldn't have to set up the MMU because it's already set up for you. Just use the appropriate virtual address for whichever physical address you want to access.

On the other hand, the MMU in most x86 CPUs doesn't have any fixed mappings. If you want to access a memory-mapped device, you must configure the MMU to provide a valid mapping before you can access that device.
JulienDarc
Member
Member
Posts: 97
Joined: Tue Mar 10, 2015 10:08 am

Re: Memory map and.. mapping on embedded

Post by JulienDarc »

Thanks Octocontrabass :)
Post Reply