Changeset d085df10 in mainline for kernel/arch/arm32/include
- Timestamp:
- 2012-09-23T16:19:26Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 21aab25
- Parents:
- 47d2ca9 (diff), 40ad375 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- kernel/arch/arm32/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/asm.h
r47d2ca9 rd085df10 46 46 * 47 47 * ARMv7 introduced wait for event and wait for interrupt (wfe/wfi). 48 * ARM920T has custom coprocessor action to do the same. See ARM920T Technical 49 * Reference Manual ch 4.9 p. 4-23 (103 in the PDF) 48 50 */ 49 51 NO_TRACE static inline void cpu_sleep(void) … … 51 53 #ifdef PROCESSOR_armv7_a 52 54 asm volatile ( "wfe" :: ); 55 #elif defined(MACHINE_gta02) 56 asm volatile ( "mcr p15,0,R0,c7,c0,4" :: ); 53 57 #endif 54 58 } -
kernel/arch/arm32/include/barrier.h
r47d2ca9 rd085df10 47 47 #define write_barrier() asm volatile ("" ::: "memory") 48 48 49 #define smc_coherence(a) 50 #define smc_coherence_block(a, l) 49 /* 50 * There are multiple ways ICache can be implemented on ARM machines. Namely 51 * PIPT, VIPT, and ASID and VMID tagged VIVT (see ARM Architecture Reference 52 * Manual B3.11.2 (p. 1383). However, CortexA8 Manual states: "For maximum 53 * compatibility across processors, ARM recommends that operating systems target 54 * the ARMv7 base architecture that uses ASID-tagged VIVT instruction caches, 55 * and do not assume the presence of the IVIPT extension. Software that relies 56 * on the IVIPT extension might fail in an unpredictable way on an ARMv7 57 * implementation that does not include the IVIPT extension." (7.2.6 p. 245). 58 * Only PIPT invalidates cache for all VA aliases if one block is invalidated. 59 * 60 * @note: Supporting ASID and VMID tagged VIVT may need to add ICache 61 * maintenance to other places than just smc. 62 */ 63 64 /* Available on both all supported arms, 65 * invalidates entire ICache so the written value does not matter. */ 66 #define smc_coherence(a) asm volatile ( "mcr p15, 0, r0, c7, c5, 0") 67 #define smc_coherence_block(a, l) smc_coherence(a) 68 51 69 52 70 #endif -
kernel/arch/arm32/include/regutils.h
r47d2ca9 rd085df10 41 41 #define STATUS_REG_MODE_MASK 0x1f 42 42 43 #define CP15_R1_MMU_ENABLE_BIT (1 << 0) 44 #define CP15_R1_ALIGNMENT_ENABLE_BIT (1 << 1) 45 #define CP15_R1_CACHE_ENABLE_BIT (1 << 2) 46 #define CP15_R1_BRANCH_PREDICT_BIT (1 << 11) 47 #define CP15_R1_INST_CACHE_BIT (1 << 12) 48 #define CP15_R1_HIGH_VECTORS_BIT (1 << 13) 49 #define CP15_R1_ROUND_ROBIN_BIT (1 << 14) 50 #define CP15_R1_HA_ENABLE_BIT (1 << 17) 51 #define CP15_R1_WXN_BIT (1 << 19) /* Only if virt. supported */ 52 #define CP15_R1_UWXN_BIT (1 << 20) /* Only if virt. supported */ 53 #define CP15_R1_FI_BIT (1 << 21) 54 #define CP15_R1_VE_BIT (1 << 24) 55 #define CP15_R1_EE_BIT (1 << 25) 56 #define CP15_R1_NMFI_BIT (1 << 27) 57 #define CP15_R1_TRE_BIT (1 << 28) 58 #define CP15_R1_AFE_BIT (1 << 29) 43 /* COntrol register bit values see ch. B4.1.130 of ARM Architecture Reference 44 * Manual ARMv7-A and ARMv7-R edition, page 1687 */ 45 #define CP15_R1_MMU_EN (1 << 0) 46 #define CP15_R1_ALIGN_CHECK_EN (1 << 1) /* Allow alignemnt check */ 47 #define CP15_R1_CACHE_EN (1 << 2) 48 #define CP15_R1_CP15_BARRIER_EN (1 << 5) 49 #define CP15_R1_B_EN (1 << 7) /* ARMv6- only big endian switch */ 50 #define CP15_R1_SWAP_EN (1 << 10) 51 #define CP15_R1_BRANCH_PREDICT_EN (1 << 11) 52 #define CP15_R1_INST_CACHE_EN (1 << 12) 53 #define CP15_R1_HIGH_VECTORS_EN (1 << 13) 54 #define CP15_R1_ROUND_ROBIN_EN (1 << 14) 55 #define CP15_R1_HW_ACCESS_FLAG_EN (1 << 17) 56 #define CP15_R1_WRITE_XN_EN (1 << 19) /* Only if virt. supported */ 57 #define CP15_R1_USPCE_WRITE_XN_EN (1 << 20) /* Only if virt. supported */ 58 #define CP15_R1_FAST_IRQ_EN (1 << 21) /* Disbale impl.specific features */ 59 #define CP15_R1_UNALIGNED_EN (1 << 22) /* Must be 1 on armv7 */ 60 #define CP15_R1_IRQ_VECTORS_EN (1 << 24) 61 #define CP15_R1_BIG_ENDIAN_EXC (1 << 25) 62 #define CP15_R1_NMFI_EN (1 << 27) 63 #define CP15_R1_TEX_REMAP_EN (1 << 28) 64 #define CP15_R1_ACCESS_FLAG_EN (1 << 29) 65 #define CP15_R1_THUMB_EXC_EN (1 << 30) 59 66 60 67 /* ARM Processor Operation Modes */
Note:
See TracChangeset
for help on using the changeset viewer.
