comparison packages/hal/powerpc/arch/current/src/vectors.S @ 105:5a0cc6c243a9 ecos-sw-2000-06-30

Merge from eCos master repository on 2000-06-30-08:18:49-BST
author jlarmour
date Fri, 30 Jun 2000 16:27:35 +0000
parents c37d3a9e1b28
children a9ac27ec7abc
comparison
equal deleted inserted replaced
104:ad66e26a9e7c 105:5a0cc6c243a9
345 stwu sp,-CYGARC_PPC_STACK_FRAME_SIZE(sp) # create new stack frame 345 stwu sp,-CYGARC_PPC_STACK_FRAME_SIZE(sp) # create new stack frame
346 346
347 # Variant HALs may need to do something special before we continue 347 # Variant HALs may need to do something special before we continue
348 bl hal_variant_init 348 bl hal_variant_init
349 349
350 #ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this _check_ should go away
351 # Platform initialization 350 # Platform initialization
352 bl hal_platform_init 351 bl hal_platform_init
353 #endif
354 352
355 # MMU and cache are controlled by the same option since caching 353 # MMU and cache are controlled by the same option since caching
356 # on the PPC does not make sense without the MMU to mark regions 354 # on the PPC does not make sense without the MMU to mark regions
357 # which should not be cached. 355 # which should not be cached.
358 #ifdef CYGHWR_HAL_POWERPC_ENABLE_MMU 356 #ifdef CYGHWR_HAL_POWERPC_ENABLE_MMU
376 bl hal_IRQ_init 374 bl hal_IRQ_init
377 375
378 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS 376 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
379 bl initialize_stub 377 bl initialize_stub
380 #endif 378 #endif
381 #ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this _check_ should go away
382 #if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT) \ 379 #if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT) \
383 || defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT) 380 || defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT)
384 .extern hal_ctrlc_isr_init 381 .extern hal_ctrlc_isr_init
385 bl hal_ctrlc_isr_init 382 bl hal_ctrlc_isr_init
386 #endif
387 #endif 383 #endif
388 384
389 bl cyg_start # call cyg_start 385 bl cyg_start # call cyg_start
390 9: 386 9:
391 b 9b # if we return, loop 387 b 9b # if we return, loop
655 651
656 #endif 652 #endif
657 653
658 hal_intc_decode r15,r14 # get table index 654 hal_intc_decode r15,r14 # get table index
659 655
660 #ifndef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this should go away
661 #ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
662 .extern cyg_hal_gdb_isr
663 lwz r3,CYGARC_PPCREG_PC(r14) # for serial receive irq.
664 bl cyg_hal_gdb_isr # (arg1 is PC)
665 cmpwi r3,0x0000 # Call ISR proper?
666 beq 2f # (r3 is 0 when skipping
667 # to avoid DSR call)
668 1:
669 #endif
670
671 #else // the below should remain
672
673 #if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT) \ 656 #if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT) \
674 || defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT) 657 || defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT)
675 # If we are supporting Ctrl-C interrupts from GDB, we must squirrel 658 # If we are supporting Ctrl-C interrupts from GDB, we must squirrel
676 # away a pointer to the save interrupt state here so that we can 659 # away a pointer to the save interrupt state here so that we can
677 # plant a breakpoint at some later time. 660 # plant a breakpoint at some later time.
679 .extern hal_saved_interrupt_state 662 .extern hal_saved_interrupt_state
680 lwi r3,hal_saved_interrupt_state 663 lwi r3,hal_saved_interrupt_state
681 stw r14,0(r3) 664 stw r14,0(r3)
682 665
683 #endif 666 #endif
684 #endif // CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
685 667
686 #ifdef CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING 668 #ifdef CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING
687 669
688 #ifdef CYGPKG_HAL_POWERPC_MPC8xx 670 #ifdef CYGPKG_HAL_POWERPC_MPC8xx
689 # The CPM controller allows nested interrupts. However, 671 # The CPM controller allows nested interrupts. However,
705 687
706 mtctr r6 # put isr address in ctr 688 mtctr r6 # put isr address in ctr
707 689
708 bctrl # branch to ctr reg and link 690 bctrl # branch to ctr reg and link
709 691
710 #ifndef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this should go away
711 #ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
712 # If interrupt was caused by GDB, the ISR call above
713 # is skipped by jumping here.
714 2:
715 #endif
716 #endif
717
718 #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK 692 #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
719 693
720 # If we are returning from the last nested interrupt, move back 694 # If we are returning from the last nested interrupt, move back
721 # to the thread stack. interrupt_end() must be called on the 695 # to the thread stack. interrupt_end() must be called on the
722 # thread stack since it potentially causes a context switch. 696 # thread stack since it potentially causes a context switch.