Changeset 3ee38a9 in mainline


Ignore:
Timestamp:
2013-06-07T19:22:02Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e006ba5
Parents:
74dcc07
Message:

arm32: More cp15 macro usage

Location:
kernel/arch/arm32/include/arch
Files:
3 edited

Legend:

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

    r74dcc07 r3ee38a9  
    3838
    3939#include <typedefs.h>
     40#include <arch/cp15.h>
    4041#include <arch/stack.h>
    4142#include <config.h>
     
    5152 * chapter 2.3.8 p.2-22 (52 in the PDF)
    5253 *
    53  * @note Although mcr p15, 0, R0, c7, c0, 4 is defined in ARM Architecture
    54  * reference manual for armv4/5 CP15 implementation is mandatory only for
    55  * armv6+.
     54 * @note Although CP15WFI (mcr p15, 0, R0, c7, c0, 4) is defined in ARM
     55 * Architecture reference manual for armv4/5, CP15 implementation is mandatory
     56 * only for armv6+.
    5657 */
    5758NO_TRACE static inline void cpu_sleep(void)
     
    6061        asm volatile ( "wfe" );
    6162#elif defined(PROCESSOR_ARCH_armv6) | defined(PROCESSOR_arm926ej_s) | defined(PROCESSOR_arm920t)
    62         asm volatile ( "mcr p15, 0, R0, c7, c0, 4" );
     63        WFI_write(0);
    6364#endif
    6465}
  • kernel/arch/arm32/include/arch/mm/page_armv4.h

    r74dcc07 r3ee38a9  
    4141#error "Do not include arch specific page.h directly use generic page.h instead"
    4242#endif
     43
     44#include <arch/cp15.h>
    4345
    4446/* Macros for querying the last-level PTE entries. */
     
    128130NO_TRACE static inline void set_ptl0_addr(pte_t *pt)
    129131{
    130         asm volatile (
    131                 "mcr p15, 0, %[pt], c2, c0, 0\n"
    132                 :: [pt] "r" (pt)
    133         );
     132        TTBR0_write((uint32_t)pt);
    134133}
    135134
  • kernel/arch/arm32/include/arch/mm/page_armv6.h

    r74dcc07 r3ee38a9  
    4040#error "Do not include arch specific page.h directly use generic page.h instead"
    4141#endif
     42
     43#include <arch/cp15.h>
    4244
    4345/* Macros for querying the last-level PTE entries. */
     
    132134NO_TRACE static inline void set_ptl0_addr(pte_t *pt)
    133135{
    134         asm volatile (
    135                 "mcr p15, 0, %[pt], c2, c0, 0\n"
    136                 :: [pt] "r" (pt)
    137         );
     136        TTBR0_write((uint32_t)pt);
    138137}
    139138
Note: See TracChangeset for help on using the changeset viewer.