Changeset ec821af in rtems
- Timestamp:
- Jul 18, 2003, 5:24:48 PM (18 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 1ede24c
- Parents:
- 7b59de1c
- Location:
- c/src/lib/libbsp/powerpc/shared
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/powerpc/shared/ChangeLog
r7b59de1c rec821af 1 2003-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 1 8 2003-07-18 Till Straumann <strauman@slac.stanford.edu> 2 9 -
c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S
r7b59de1c rec821af 10 10 * Modifications Copyright (C) 1999 Eric Valette. valette@crf.canon.fr 11 11 * 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. 12 15 * 13 16 * $Id$ … … 141 144 */ 142 145 addis r15,0, _Thread_Dispatch_disable_level@ha 146 #if BROKEN_ISR_NEST_LEVEL 143 147 /* 144 148 * Get current nesting level in R3 145 149 */ 146 150 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 147 158 /* 148 159 * Check if stack switch is necessary … … 161 172 */ 162 173 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 165 177 */ 166 178 mtspr SPRG0, r3 179 #else 180 /* store new nesting level in _ISR_Nest_level */ 181 stw r3, _ISR_Nest_level@l(r7) 182 #endif 167 183 168 184 addi r6, r6, 1 … … 188 204 * then _Thread_Dispatch_disable_level > 1 189 205 */ 206 #if BROKEN_ISR_NEST_LEVEL 190 207 mfspr r4, SPRG0 208 #else 209 lis r7, _ISR_Nest_level@ha 210 lwz r4, _ISR_Nest_level@l(r7) 211 #endif 191 212 /* 192 213 * start decrementing _Thread_Dispatch_disable_level … … 195 216 addi r4, r4, -1 /* Continue decrementing nesting level */ 196 217 addi r3, r3, -1 /* Continue decrementing _Thread_Dispatch_disable_level */ 218 #if BROKEN_ISR_NEST_LEVEL 197 219 mtspr SPRG0, r4 /* End decrementing nesting level */ 220 #else 221 stw r4, _ISR_Nest_level@l(r7) /* End decrementing nesting level */ 222 #endif 198 223 stw r3,_Thread_Dispatch_disable_level@l(r15) /* End decrementing _Thread_Dispatch_disable_level */ 199 224 cmpwi r3, 0 -
c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
r7b59de1c rec821af 46 46 extern void BSP_vme_config(); 47 47 48 SPR_RW(SPR 0)49 SPR_RW(SPR 1)48 SPR_RW(SPRG0) 49 SPR_RW(SPRG1) 50 50 51 51 /* … … 180 180 unsigned l2cr; 181 181 register unsigned char* intrStack; 182 register unsigned int intrNestingLevel = 0;183 182 unsigned char *work_space_start; 184 183 ppc_cpu_id_t myCpu; … … 220 219 /* 221 220 * Initialize the interrupt related settings 222 * SPRG0 = interrupt nesting level count223 221 * SPRG1 = software managed IRQ stack 224 222 * … … 234 232 *((unsigned32 *)intrStack) = 0; 235 233 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 238 239 /* 239 240 * Initialize default raw exception hanlders. See vectors/vectors_init.c
Note: See TracChangeset
for help on using the changeset viewer.