How can I change the memory access type from CortexA9 through the GP0 to PL to other options such as shared device accesses when running Linux?
The access type for memory in the Xilinx GIT tree (git.xilinx.com) can be altered by using the ioremap function associated with Linux. The function of ioremap is to assign virtual addresses to physical memory regions on the device. This allows data that is important to a certain task to be stored in the same relative location even if there is not enough free continuous physical space on the device. The advantage of this is physical memory no longer has to go through address relocation calculations each time a task is performed.
During the mapping of virtual memory space, it is possible to change certain attributes of the memory, such as access types. Within the Xilinx GIT tree, there are multiple ioremap functions that users can use to map their memory, each having different attributes.
For example, in the arch/arm/include/asm/io.h header file the following ioremap functions exist:
The difference between these functions is the MT_DEVICE attributes which can be found in the arch/arm/mm/mmu.c file:
(Note: MT_DEVICE for pre-ARMv6 will have 'strongly ordered' memory and ARMv6/post-ARMv6 will have 'shared device' memory)
Each instance of the ioremap function will allow for a different access type.