Ignore:
Timestamp:
2015-09-17T07:19:30Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f834cc32
Parents:
5f310ec8
Message:

Access CP15 register 2 wrt. target architecture and implementation

CP15 register 2 controls the Translation Table Base and Translation
Table Base Control registers.

  • Do not define macros for functionality which is not supported by the target architecture or implementation.
  • ARMv4 and ARMv5 define bits 13:0 as unpredictable/should be zero.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/arch/cp15.h

    r5f310ec8 ra1d636e  
    309309enum {
    310310        TTBR_ADDR_MASK = 0xffffff80,
     311#if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a)
    311312        TTBR_NOS_FLAG = 1 << 5,
    312313        TTBR_RGN_MASK = 0x3 << 3,
     
    317318        TTBR_S_FLAG = 1 << 1,
    318319        TTBR_C_FLAG = 1 << 0,
     320#endif
    319321};
    320322CONTROL_REG_GEN_READ(TTBR0, c2, 0, c0, 0);
    321323CONTROL_REG_GEN_WRITE(TTBR0, c2, 0, c0, 0);
     324
     325#if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a)
    322326CONTROL_REG_GEN_READ(TTBR1, c2, 0, c0, 1);
    323327CONTROL_REG_GEN_WRITE(TTBR1, c2, 0, c0, 1);
    324328CONTROL_REG_GEN_READ(TTBCR, c2, 0, c0, 2);
    325329CONTROL_REG_GEN_WRITE(TTBCR, c2, 0, c0, 2);
    326 
     330#endif
     331
     332#if defined(PROCESSOR_ARCH_armv7)
    327333CONTROL_REG_GEN_READ(HTCR, c2, 4, c0, 2);
    328334CONTROL_REG_GEN_WRITE(HTCR, c2, 4, c0, 2);
     
    339345CONTROL_REG_GEN_READ(VTTBRH, c2, 0, c2, 6);
    340346CONTROL_REG_GEN_WRITE(VTTBRH, c2, 0, c2, 6);
     347#endif
    341348
    342349CONTROL_REG_GEN_READ(DACR, c3, 0, c0, 0);
Note: See TracChangeset for help on using the changeset viewer.