Ignore:
Timestamp:
Jan 21, 2014, 7:20:06 PM (11 years ago)
Author:
cfuguet
Message:
  • Adding volatile attribute for pointers used to address memory mapped hardware registers.
  • Removing the activation of interruptions before the execution of the ctx_switch function on the ioc_access function. This is to avoid been interrupted during the modification of task context variables.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/xcu_driver.c

    r271 r275  
    7272
    7373#if USE_XICU
    74     unsigned int* xcu_address = (unsigned int *) ((unsigned int)&seg_xcu_base +
    75                                 (cluster_xy * (unsigned int)&vseg_cluster_increment));
     74    volatile unsigned int* xcu_address =
     75        (unsigned int *) ((unsigned int)&seg_xcu_base +
     76        (cluster_xy * (unsigned int)&vseg_cluster_increment));
     77
    7678    unsigned int func;
    7779    if      (irq_type == IRQ_TYPE_PTI) func = XICU_MSK_PTI_ENABLE;
     
    109111
    110112#if USE_XICU
    111     unsigned int* xcu_address = (unsigned int *) ((unsigned int)&seg_xcu_base +
    112                                 (cluster_xy * (unsigned int)&vseg_cluster_increment));
     113    volatile unsigned int* xcu_address =
     114        (unsigned int *) ((unsigned int)&seg_xcu_base +
     115        (cluster_xy * (unsigned int)&vseg_cluster_increment));
    113116
    114117    unsigned int prio = xcu_address[XICU_REG(XICU_PRIO, proc_id)];
     
    151154
    152155#if USE_XICU
    153     unsigned int* xcu_address = (unsigned int *) ((unsigned int)&seg_xcu_base +
    154                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     156    volatile unsigned int* xcu_address =
     157        (unsigned int *) ((unsigned int)&seg_xcu_base +
     158        (cluster_xy * (unsigned int)&vseg_cluster_increment));
     159
    155160    xcu_address[XICU_REG(XICU_WTI_REG, proc_id)] = wdata;
    156161    return 0;
     
    180185
    181186#if USE_XICU
    182     unsigned int* xcu_address = (unsigned int *) ((unsigned int)&seg_xcu_base +
    183                                 (cluster_xy * (unsigned int)&vseg_cluster_increment));
     187    volatile unsigned int* xcu_address =
     188        (unsigned int *) ((unsigned int)&seg_xcu_base +
     189        (cluster_xy * (unsigned int)&vseg_cluster_increment));
     190
    184191    xcu_address[XICU_REG(XICU_PTI_PER, pti_index)] = period;
    185192    return 0;
     
    208215
    209216#if USE_XICU
    210     unsigned int * xcu_address = (unsigned int *) ((unsigned int)&seg_xcu_base +
    211                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     217    volatile unsigned int * xcu_address =
     218        (unsigned int *) ((unsigned int)&seg_xcu_base +
     219        (cluster_xy * (unsigned int)&vseg_cluster_increment));
     220
    212221    xcu_address[XICU_REG(XICU_PTI_PER, pti_index)] = 0;
    213222    return 0;
     
    271280
    272281#if USE_XICU
    273     unsigned int * xcu_address = (unsigned int *) ((unsigned int) &seg_xcu_base +
    274                                  (cluster_xy * (unsigned int)&vseg_cluster_increment));
     282    volatile unsigned int * xcu_address =
     283        (unsigned int *) ((unsigned int) &seg_xcu_base +
     284        (cluster_xy * (unsigned int)&vseg_cluster_increment));
    275285
    276286    unsigned int period = xcu_address[XICU_REG(XICU_PTI_PER, pti_index)];
Note: See TracChangeset for help on using the changeset viewer.