Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 096d4a6b in mainline


Ignore:
Timestamp:
2012-03-11T19:29:38Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
914e063
Parents:
7c13c55
Message:

arm32: Register for enabling high exc. vector moved in armv7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/exception.c

    r7c13c55 r096d4a6b  
    120120static void high_vectors(void)
    121121{
    122         uint32_t control_reg;
    123        
     122        register uint32_t control_reg = 0;
     123       
     124#if defined(PROCESSOR_armv7)
     125        asm volatile (
     126                "mrc p15, 0, %[control_reg], c1, c0"
     127                : [control_reg] "=r" (control_reg)
     128        );
     129#elif defined(PROCESSOR_armv4) | defined(PROCESSOR_armv5)
    124130        asm volatile (
    125131                "mrc p15, 0, %[control_reg], c1, c1"
    126132                : [control_reg] "=r" (control_reg)
    127133        );
     134#endif
    128135       
    129136        /* switch on the high vectors bit */
    130137        control_reg |= CP15_R1_HIGH_VECTORS_BIT;
    131138       
    132         asm volatile (
    133                 "mcr p15, 0, %[control_reg], c1, c1"
     139#if defined(PROCESSOR_armv7)
     140        asm volatile (
     141                "mcr p15, 0, %[control_reg], c1, c0"
    134142                :: [control_reg] "r" (control_reg)
    135143        );
     144#elif defined(PROCESSOR_armv4) | defined(PROCESSOR_armv5)
     145        asm volatile (
     146                "mcr p15, 0, %[control_reg], c1, c0"
     147                :: [control_reg] "r" (control_reg)
     148        );
     149#endif
    136150}
    137151#endif
Note: See TracChangeset for help on using the changeset viewer.