Changeset 55741886 in rtems


Ignore:
Timestamp:
11/19/14 13:19:13 (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
52d24b00
Parents:
d53de34
git-author:
Sebastian Huber <sebastian.huber@…> (11/19/14 13:19:13)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/20/14 09:30:28)
Message:

bsps/arm: L2C 310 exclusive config is fatal

Location:
c/src/lib/libbsp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h

    rd53de34 r55741886  
    154154  uint32_t ctrl; /* Control */
    155155/** @brief Enables the L2CC */
    156 #define L2C_310_ENABLE_MASK 0x00000001
     156#define L2C_310_CTRL_ENABLE 0x00000001
     157
     158#define L2C_310_CTRL_EXCL_CONFIG (1 << 12)
    157159
    158160  /** @brief Auxiliary control */
     
    963965
    964966  /* Only flush if level 2 cache is active */
    965   if( ( l2cc->ctrl & L2C_310_ENABLE_MASK ) != 0 ) {
     967  if( ( l2cc->ctrl & L2C_310_CTRL_ENABLE ) != 0 ) {
    966968
    967969    /* ensure ordering with previous memory accesses */
     
    10311033  rtems_interrupt_lock_context lock_context;
    10321034
    1033   if( ( l2cc->ctrl & L2C_310_ENABLE_MASK ) != 0 ) {
     1035  if( ( l2cc->ctrl & L2C_310_CTRL_ENABLE ) != 0 ) {
    10341036    /* Invalidate the caches */
    10351037
     
    11531155  uint32_t id_mask =
    11541156    L2C_310_ID_IMPL_MASK | L2C_310_ID_PART_MASK;
     1157  uint32_t ctrl;
    11551158
    11561159  /*
     
    11671170  l2c_310_check_errata( rtl_release );
    11681171
     1172  ctrl = l2cc->ctrl;
     1173
     1174  if ( ( ctrl & L2C_310_CTRL_EXCL_CONFIG ) != 0 ) {
     1175    bsp_fatal( ARM_FATAL_L2C_310_EXCLUSIVE_CONFIG );
     1176  }
     1177
    11691178  /* Only enable if L2CC is currently disabled */
    1170   if( ( l2cc->ctrl & L2C_310_ENABLE_MASK ) == 0 ) {
     1179  if( ( ctrl & L2C_310_CTRL_ENABLE ) == 0 ) {
    11711180    uint32_t aux_ctrl;
    11721181    int ways;
     
    12051214
    12061215    /* Enable the L2CC */
    1207     l2cc->ctrl |= L2C_310_ENABLE_MASK;
     1216    l2cc->ctrl = ctrl | L2C_310_CTRL_ENABLE;
    12081217  }
    12091218}
     
    12151224  rtems_interrupt_lock_context lock_context;
    12161225
    1217   if ( l2cc->ctrl & L2C_310_ENABLE_MASK ) {
     1226  if ( l2cc->ctrl & L2C_310_CTRL_ENABLE ) {
    12181227    /* Clean and Invalidate L2 Cache */
    12191228    l2c_310_flush_entire();
     
    12231232
    12241233    /* Disable the L2 cache */
    1225     l2cc->ctrl &= ~L2C_310_ENABLE_MASK;
     1234    l2cc->ctrl &= ~L2C_310_CTRL_ENABLE;
    12261235    rtems_interrupt_lock_release( &l2c_310_lock, &lock_context );
    12271236  }
  • c/src/lib/libbsp/shared/include/fatal.h

    rd53de34 r55741886  
    111111  /* ARM fatal codes */
    112112  ARM_FATAL_L2C_310_UNEXPECTED_ID = BSP_FATAL_CODE_BLOCK(9),
    113   ARM_FATAL_L2C_310_UNEXPECTED_NUM_WAYS
     113  ARM_FATAL_L2C_310_UNEXPECTED_NUM_WAYS,
     114  ARM_FATAL_L2C_310_EXCLUSIVE_CONFIG
    114115} bsp_fatal_code;
    115116
Note: See TracChangeset for help on using the changeset viewer.