In ARM, memory types are specified as :
within Device type, it seems this type also could be distinguished
what is the difference between Non-shareable, shareable Device memory? and how can we use these memory respectively?
Shareable attribute means different things when it is applied to Normal or Device memory and with ARMv7 there is no such thing as non-shareable Device memory.
Below is from Cortex A Series Programmers Guide:
For memory designated as Device:
... Shareable attribute of Device accesses is used to determine which memory interface will be used for the access, with memory accesses to areas marked as Device, Non-Shareable performed using a dedicated interface, the private peripheral port. This mechanism is not used on ARMv7 processors.
For memory designated as Normal:
Normal memory must also be designated either as Shareable or Non-Shareable. A region of Normal memory with the Non-Shareable attribute is one that is used only by this core. There is no requirement for the core to make accesses to this location coherent with other cores. If other cores do share this memory, any coherency issues must be handled in software.
For memory designated as Strongly-ordered:
All memory accesses to Strongly-ordered memory occur in program order. All Strongly-ordered accesses are assumed to be shared.