Changeset c80add4 in rtems
- Timestamp:
- 03/25/98 18:46:47 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 5e0fbcc
- Parents:
- 059dbcf
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/score/cpu/m68k/cpu.c
r059dbcf rc80add4 148 148 149 149 asm volatile ( "movec %0,%%isp" : "=r" (isp) : "0" (isp) ); 150 #else151 #warning "PLEASE IMPLEMENT ME... There is NO dedicated interrupt stack"152 #warning "on CPUs without a dedicated hardware interrupt stack!!!"153 #warning "INTERRUPTS RUN ON A TASK STACK!!!"154 150 #endif 155 151 } -
c/src/exec/score/cpu/m68k/cpu.h
r059dbcf rc80add4 35 35 * Use the m68k's hardware interrupt stack support and have the 36 36 * interrupt manager allocate the memory for it. 37 *38 * NOTE: The definitions when M68K_HAS_SEPARATE_STACKS is 0 should39 * change when the software interrupt stack support is implemented.40 37 */ 41 38 42 39 #if ( M68K_HAS_SEPARATE_STACKS == 1) 43 #define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE44 #define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE45 #define CPU_ALLOCATE_INTERRUPT_STACK TRUE40 #define CPU_HAS_SOFTWARE_INTERRUPT_STACK 0 41 #define CPU_HAS_HARDWARE_INTERRUPT_STACK 1 42 #define CPU_ALLOCATE_INTERRUPT_STACK 1 46 43 #else 47 #define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE48 #define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE49 #define CPU_ALLOCATE_INTERRUPT_STACK FALSE44 #define CPU_HAS_SOFTWARE_INTERRUPT_STACK 1 45 #define CPU_HAS_HARDWARE_INTERRUPT_STACK 0 46 #define CPU_ALLOCATE_INTERRUPT_STACK 1 50 47 #endif 51 48 -
c/src/exec/score/cpu/m68k/cpu_asm.s
r059dbcf rc80add4 109 109 */ 110 110 111 /* m68000 notes: 112 * 113 * with this approach, lower interrupts (1-5 for efi68k) may 111 /* 112 * With this approach, lower priority interrupts may 114 113 * execute twice if a higher priority interrupt is 115 114 * acknowledged before _Thread_Dispatch_disable is … … 120 119 * permitted by the new interrupt level mask, and (2) when 121 120 * the original context regains the cpu. 122 *123 * XXX: Code for switching to a software maintained interrupt stack is124 * not in place.125 121 */ 126 122 … … 142 138 SYM (_ISR_Handler): 143 139 addql #1,SYM (_Thread_Dispatch_disable_level) | disable multitasking 144 addql #1,SYM (_ISR_Nest_level) | one nest level deeper145 140 moveml d0-d1/a0-a1,a7@- | save d0-d1,a0-a1 146 147 /*148 * NOTE FOR CPUs WITHOUT HARDWARE INTERRUPT STACK:149 *150 * After the interrupted codes registers have been saved, it is save151 * to switch to the software maintained interrupt stack.152 *153 * PLEASE, if you have a m68k without a dedicated interrupt stack,154 * implement the stack switching code.155 */156 157 141 movew a7@(SAVED+FVO_OFFSET),d0 | d0 = F/VO 158 142 andl #0x0fff,d0 | d0 = vector offset in vbr 143 144 145 #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 ) 146 movew sr,d1 | Save status register 147 oriw #0x700,sr | Disable interrupts 148 tstl SYM (_ISR_Nest_level) | Interrupting an interrupt handler? 149 bne 1f | Yes, just skip over stack switch code 150 movel SYM(_CPU_Interrupt_stack_high),a0 | End of interrupt stack 151 movel a7,a0@- | Save task stack pointer 152 movel a0,a7 | Switch to interrupt stack 153 1: 154 addql #1,SYM(_ISR_Nest_level) | one nest level deeper 155 movew d1,sr | Restore status register 156 #else 157 addql #1,SYM (_ISR_Nest_level) | one nest level deeper 158 #endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */ 159 159 160 160 #if ( M68K_HAS_PREINDEXING == 1 ) … … 171 171 addql #4,a7 | remove vector number 172 172 173 subql #1,SYM (_ISR_Nest_level) | one less nest level 173 #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 ) 174 movew sr,d0 | Save status register 175 oriw #0x700,sr | Disable interrupts 176 subql #1,SYM(_ISR_Nest_level) | Reduce interrupt-nesting count 177 bne 1f | Skip if return to interrupt 178 movel (a7),a7 | Restore task stack pointer 179 1: 180 movew d0,sr | Restore status register 181 #else 182 subql #1,SYM (_ISR_Nest_level) | one less nest level 183 #endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */ 184 174 185 subql #1,SYM (_Thread_Dispatch_disable_level) 175 186 | unnest multitasking -
c/src/lib/libbsp/m68k/gen68360/start/start360.s
r059dbcf rc80add4 328 328 #if ( M68K_HAS_SEPARATE_STACKS == 1 ) 329 329 oriw #0x3000,sr | Switch to Master Stack Pointer 330 lea SYM(m360)+1024-64,a7 | Load stack pointer with space331 | for the Interrupt Stack330 lea SYM(m360)+1024-64,a7 | Put stack in dual-port ram 331 | a little below the interrupt stack 332 332 #endif 333 333 -
c/src/lib/libbsp/m68k/gen68360/start360/start360.s
r059dbcf rc80add4 328 328 #if ( M68K_HAS_SEPARATE_STACKS == 1 ) 329 329 oriw #0x3000,sr | Switch to Master Stack Pointer 330 lea SYM(m360)+1024-64,a7 | Load stack pointer with space331 | for the Interrupt Stack330 lea SYM(m360)+1024-64,a7 | Put stack in dual-port ram 331 | a little below the interrupt stack 332 332 #endif 333 333 -
cpukit/score/cpu/m68k/cpu.c
r059dbcf rc80add4 148 148 149 149 asm volatile ( "movec %0,%%isp" : "=r" (isp) : "0" (isp) ); 150 #else151 #warning "PLEASE IMPLEMENT ME... There is NO dedicated interrupt stack"152 #warning "on CPUs without a dedicated hardware interrupt stack!!!"153 #warning "INTERRUPTS RUN ON A TASK STACK!!!"154 150 #endif 155 151 }
Note: See TracChangeset
for help on using the changeset viewer.