Changeset b997f52 in rtems


Ignore:
Timestamp:
Jul 18, 2003, 5:22:33 PM (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
36e95a87
Parents:
8930426
Message:

2003-07-18 Till Straumann <strauman@…>

PR 288/rtems

  • irq/irq_asm.S, startup/bspstart.c: _ISR_Nest_level is now properly maintained and any BSP which does not do so will trip a panic in the shared code.
Location:
c/src/lib/libbsp/powerpc/shared
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/ChangeLog

    r8930426 rb997f52  
     12003-07-18      Till Straumann <strauman@slac.stanford.edu>
     2
     3        PR 288/rtems
     4        * irq/irq_asm.S, startup/bspstart.c: _ISR_Nest_level is now properly
     5        maintained and any BSP which does not do so will trip a panic in the
     6        shared code.
     7
    182003-07-18      Till Straumann <strauman@slac.stanford.edu>
    29
  • c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S

    r8930426 rb997f52  
    1010 *  Modifications Copyright (C) 1999 Eric Valette. valette@crf.canon.fr
    1111 *
     12 *  Till Straumann <strauman@slac.stanford.edu>, 2003/7:
     13 *    - store isr nesting level in _ISR_Nest_level rather than
     14 *      SPRG0 - RTEMS relies on that variable.
    1215 *
    1316 * $Id$
     
    141144         */
    142145        addis r15,0, _Thread_Dispatch_disable_level@ha
     146#if BROKEN_ISR_NEST_LEVEL
    143147        /*
    144148         * Get current nesting level in R3
    145149         */
    146150        mfspr   r3, SPRG0
     151#else
     152        /*
     153         * Retrieve current nesting level from _ISR_Nest_level
     154         */
     155        lis             r7, _ISR_Nest_level@ha
     156        lwz             r3, _ISR_Nest_level@l(r7)
     157#endif
    147158        /*
    148159         * Check if stack switch is necessary
     
    161172         */
    162173        lwz     r6,_Thread_Dispatch_disable_level@l(r15)
    163         /*
    164          * store new nesting level in SPRG0
     174#if BROKEN_ISR_NEST_LEVEL
     175        /*
     176         * Store new nesting level in SPRG0
    165177         */
    166178        mtspr   SPRG0, r3
     179#else
     180        /* store new nesting level in _ISR_Nest_level */
     181        stw             r3, _ISR_Nest_level@l(r7)
     182#endif
    167183       
    168184        addi    r6, r6, 1
     
    188204         * then _Thread_Dispatch_disable_level > 1
    189205         */
     206#if BROKEN_ISR_NEST_LEVEL
    190207        mfspr   r4, SPRG0
     208#else
     209        lis             r7, _ISR_Nest_level@ha
     210        lwz             r4, _ISR_Nest_level@l(r7)
     211#endif
    191212        /*
    192213         * start decrementing _Thread_Dispatch_disable_level
     
    195216        addi    r4, r4, -1      /* Continue decrementing nesting level */
    196217        addi    r3, r3, -1      /* Continue decrementing _Thread_Dispatch_disable_level */
     218#if BROKEN_ISR_NEST_LEVEL
    197219        mtspr   SPRG0, r4       /* End decrementing nesting level */
     220#else
     221        stw             r4, _ISR_Nest_level@l(r7) /* End decrementing nesting level */
     222#endif
    198223        stw     r3,_Thread_Dispatch_disable_level@l(r15) /* End decrementing _Thread_Dispatch_disable_level */
    199224        cmpwi   r3, 0
  • c/src/lib/libbsp/powerpc/shared/startup/bspstart.c

    r8930426 rb997f52  
    4646extern void                     BSP_vme_config();
    4747
    48 SPR_RW(SPR0)
    49 SPR_RW(SPR1)
     48SPR_RW(SPRG0)
     49SPR_RW(SPRG1)
    5050
    5151/*
     
    180180  unsigned l2cr;
    181181  register unsigned char* intrStack;
    182   register unsigned int intrNestingLevel = 0;
    183182  unsigned char *work_space_start;
    184183  ppc_cpu_id_t myCpu;
     
    220219  /*
    221220   * Initialize the interrupt related settings
    222    * SPRG0 = interrupt nesting level count
    223221   * SPRG1 = software managed IRQ stack
    224222   *
     
    234232  *((unsigned32 *)intrStack) = 0;
    235233
    236   _write_SPR1((unsigned int)intrStack);
    237   _write_SPR0(intrNestingLevel);
     234  _write_SPRG1((unsigned int)intrStack);
     235
     236  /* signal them that we have fixed PR288 - eventually, this should go away */
     237  _write_SPRG0(PPC_BSP_HAS_FIXED_PR288);
     238
    238239  /*
    239240   * Initialize default raw exception hanlders. See vectors/vectors_init.c
Note: See TracChangeset for help on using the changeset viewer.