Changeset ffbeb6f in rtems


Ignore:
Timestamp:
Jan 18, 2013, 8:42:49 AM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
bd39add
Parents:
bbed1866
git-author:
Sebastian Huber <sebastian.huber@…> (01/18/13 08:42:49)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/31/13 13:20:32)
Message:

smp: Add PowerPC support

Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • aclocal/enable-smp.m4

    rbbed1866 rffbeb6f  
    77[case "${enableval}" in
    88  yes) case "${RTEMS_CPU}" in
    9          sparc|i386) RTEMS_HAS_SMP=yes ;;
     9         powerpc|sparc|i386) RTEMS_HAS_SMP=yes ;;
    1010         *)          RTEMS_HAS_SMP=no ;;
    1111       esac
  • c/src/aclocal/enable-smp.m4

    rbbed1866 rffbeb6f  
    77[case "${enableval}" in
    88  yes) case "${RTEMS_CPU}" in
    9          sparc|i386) RTEMS_HAS_SMP=yes ;;
     9         powerpc|sparc|i386) RTEMS_HAS_SMP=yes ;;
    1010         *)          RTEMS_HAS_SMP=no ;;
    1111       esac
  • c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S

    rbbed1866 rffbeb6f  
    153153#endif
    154154
     155#ifndef RTEMS_SMP
    155156        /* Increment ISR nest level and thread dispatch disable level */
    156157        cmpwi   ISR_NEST_REGISTER, 0
     
    197198        stw     ISR_NEST_REGISTER, ISR_NEST_LEVEL@l(ISR_NEST_HADDR_REGISTER)
    198199        stw     DISPATCH_LEVEL_REGISTER, _Thread_Dispatch_disable_level@sdarel(r13)
     200#else /* RTEMS_SMP */
     201        /* ISR Enter */
     202        bl      _ISR_SMP_Enter
     203        cmpwi   r3, 0
     204
     205        /* Switch stack if necessary */
     206        mfspr   SCRATCH_0_REGISTER, SPRG1
     207        iselgt  r1, r1, SCRATCH_0_REGISTER
     208
     209        bl      bsp_interrupt_dispatch
     210
     211        /*
     212         * Switch back to original stack (FRAME_REGISTER == r1 if we are still
     213         * on the IRQ stack) and restore FRAME_REGISTER.
     214         */
     215        mr      r1, FRAME_REGISTER
     216        lwz     FRAME_REGISTER, FRAME_OFFSET(r1)
     217
     218        /* ISR Leave */
     219        bl      _ISR_SMP_Exit
     220        cmpwi   r3, 1
     221#endif /* RTEMS_SMP */
    199222
    200223        /* Call thread dispatcher if necessary */
  • cpukit/aclocal/enable-smp.m4

    rbbed1866 rffbeb6f  
    77[case "${enableval}" in
    88  yes) case "${RTEMS_CPU}" in
    9          sparc|i386) RTEMS_HAS_SMP=yes ;;
     9         powerpc|sparc|i386) RTEMS_HAS_SMP=yes ;;
    1010         *)          RTEMS_HAS_SMP=no ;;
    1111       esac
  • cpukit/score/cpu/powerpc/Makefile.am

    rbbed1866 rffbeb6f  
    99include_rtems_score_HEADERS += rtems/score/types.h
    1010include_rtems_score_HEADERS += rtems/score/cpuatomic.h
     11include_rtems_score_HEADERS += rtems/score/cpusmplock.h
    1112
    1213include_rtems_powerpcdir = $(includedir)/rtems/powerpc
  • cpukit/score/cpu/powerpc/preinstall.am

    rbbed1866 rffbeb6f  
    4444PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuatomic.h
    4545
     46$(PROJECT_INCLUDE)/rtems/score/cpusmplock.h: rtems/score/cpusmplock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
     47        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpusmplock.h
     48PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpusmplock.h
     49
    4650$(PROJECT_INCLUDE)/rtems/powerpc/$(dirstamp):
    4751        @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems/powerpc
  • cpukit/score/cpu/powerpc/rtems/score/cpu.h

    rbbed1866 rffbeb6f  
    473473 */
    474474
    475 #define CPU_ALLOCATE_INTERRUPT_STACK FALSE
     475#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
    476476
    477477/*
     
    996996
    997997void _CPU_Context_validate( uintptr_t pattern );
     998
     999#ifdef RTEMS_SMP
     1000  #define _CPU_Context_switch_to_first_task_smp( _context ) \
     1001    _CPU_Context_restore( _context )
     1002
     1003  static inline void _CPU_Processor_event_broadcast( void )
     1004  {
     1005    __asm__ volatile ( "" : : : "memory" );
     1006  }
     1007
     1008  static inline void _CPU_Processor_event_receive( void )
     1009  {
     1010    __asm__ volatile ( "" : : : "memory" );
     1011  }
     1012#endif
    9981013
    9991014typedef struct {
Note: See TracChangeset for help on using the changeset viewer.