Changeset 84e59b7c in rtems


Ignore:
Timestamp:
Nov 15, 2018, 7:47:22 PM (8 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
508f319e
Parents:
cc61d5c
git-author:
Sebastian Huber <sebastian.huber@…> (11/15/18 19:47:22)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/19/18 06:15:47)
Message:

bsps/powerpc: Use interrupt stack for init stack

Move start.o to separate file.

Update #3459.

Files:
17 edited
1 moved

Legend:

Unmodified
Added
Removed
  • bsps/powerpc/gen5200/start/start.S

    rcc61d5c r84e59b7c  
    9191/***********************************************************************/
    9292
     93#include <rtems/asm.h>
    9394#include <rtems/powerpc/cache.h>
     95#include <libcpu/powerpc-utility.h>
    9496
    9597#include <bsp.h>
     
    471473#endif /* HAS_UBOOT */
    472474
    473 /* set stack pointer (common for RAM/ROM startup) */
    474         LA      r1, bsp_section_text_start
    475         addi    r1, r1, -0x10                   /* Set up stack pointer = beginning of text section - 0x10 */
    476         /* tag TOS with a NULL pointer (termination mark for stack dump) */
    477         li  r0, 0
    478         stw r0, 0(r1)
     475        /*
     476         * Initialize start stack (common for RAM/ROM startup).  The stacks are
     477         * statically allocated and properly aligned.
     478         */
     479        LA      r1, _ISR_Stack_area_end
     480        subi    r1, r1, PPC_DEFAULT_CACHE_LINE_SIZE
     481        li      r0, 0
     482        stw     r0, 0(r1)
    479483
    480484        bl      __eabi                          /* Set up EABI and SYSV environment */
  • bsps/powerpc/gen83xx/start/start.S

    rcc61d5c r84e59b7c  
    414414        LA r13, _SDA_BASE_
    415415
    416         /* Clear cmdline */
     416        /* Clear cmdline */
    417417        li      r3, 0
    418418
    419         /* Set start stack pointer */
     419        /*
     420         * Initialize start stack.  The stacks are statically allocated and
     421         * properly aligned.
     422         */
    420423        LA      r1, _ISR_Stack_area_end
    421         stwu    r3, -4(r1)
    422         stwu    r3, -4(r1)
     424        subi    r1, r1, PPC_DEFAULT_CACHE_LINE_SIZE
     425        stw     r3, 0(r1)
    423426
    424427        /* Call the first C routine */
  • bsps/powerpc/haleakala/start/linkcmds

    rcc61d5c r84e59b7c  
    1212OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
    1313OUTPUT_ARCH(powerpc)
     14STARTUP(start.o)
    1415ENTRY(download_entry)
    1516EXTERN(__vectors)
  • bsps/powerpc/mpc8260ads/start/start.S

    rcc61d5c r84e59b7c  
    3131
    3232#include <rtems/asm.h>
     33#include <libcpu/powerpc-utility.h>
    3334
    3435/*
    35  *  The initial stack is set to run BELOW the code base address.
    36  *  (between the vectors and text sections)
    37  *
    3836 *  The entry veneer has to clear the BSS and copy the read only
    3937 *  version of the data segment to the correct location.
     
    135133        lwz r2, toc_pointer-base_addr(r1)
    136134
    137         /* Set up stack pointer = beginning of text section - 56 */
    138         addi    r1, r1, -56-4
     135        /* Clear cmdline */
     136        li      r3, 0
    139137
    140         /* Clear cmdline */
    141         xor r3, r3, r3
     138        /*
     139         * Initialize start stack.  The stacks are statically allocated and
     140         * properly aligned.
     141         */
     142        LA      r1, _ISR_Stack_area_end
     143        subi    r1, r1, PPC_DEFAULT_CACHE_LINE_SIZE
     144        stw     r3, 0(r1)
    142145
    143146        .extern SYM (boot_card)
  • bsps/powerpc/mvme3100/start/start.S

    rcc61d5c r84e59b7c  
    1313
    1414#include <rtems/asm.h>
    15 #include <rtems/score/cpu.h>
    16 #include <rtems/powerpc/powerpc.h>
     15#include <libcpu/powerpc-utility.h>
    1716
    1817#include <bspopts.h>
     
    7271        mr      r7,r27
    7372        bl      save_boot_params
    74         addis   r9,r0, (__stack-PPC_MINIMUM_STACK_FRAME_SIZE)@ha
    75         addi    r9,r9, (__stack-PPC_MINIMUM_STACK_FRAME_SIZE)@l
    76         /* align down to 16-bytes */
    77         li  r5, (CPU_STACK_ALIGNMENT - 1)
    78         andc r1, r9, r5
    7973
    80         /* NULL ptr to back chain */
    81         li  r0, 0
    82         stw r0, 0(r1)
     74        /*
     75         * Initialize start stack.  The stacks are statically allocated and
     76         * properly aligned.
     77         */
     78        LA      r1, _ISR_Stack_area_end
     79        subi    r1, r1, PPC_DEFAULT_CACHE_LINE_SIZE
     80        li      r0, 0
     81        stw     r0, 0(r1)
    8382
    8483        /*
  • bsps/powerpc/mvme5500/start/start.S

    rcc61d5c r84e59b7c  
    1414
    1515#include <rtems/asm.h>
    16 #include <rtems/score/cpu.h>
    17 #include <rtems/powerpc/powerpc.h>
     16#include <libcpu/powerpc-utility.h>
    1817
    1918#include <libcpu/io.h>
     
    135134        mr      r7,r27
    136135        bl      save_boot_params
     136
    137137        /*
    138          * stack = &__rtems_end + 4096
     138         * Initialize start stack.  The stacks are statically allocated and
     139         * properly aligned.
    139140         */
    140         addis   r9,r0, __stack-PPC_MINIMUM_STACK_FRAME_SIZE@ha
    141         addi    r9,r9, __stack-PPC_MINIMUM_STACK_FRAME_SIZE@l
    142         /*
    143          * align initial stack
    144          * (we hope that the bootloader stack was 16-byte aligned
    145          * or we haven't used altivec yet...)
    146          */
    147         li   r0, (CPU_STACK_ALIGNMENT-1)
    148         andc r1, r9, r0
    149         /*
    150          * NULL ptr to back chain
    151          */
    152         li   r0, 0
    153         stw  r0, 0(r1)
     141        LA      r1, _ISR_Stack_area_end
     142        subi    r1, r1, PPC_DEFAULT_CACHE_LINE_SIZE
     143        li      r0, 0
     144        stw     r0, 0(r1)
    154145
    155146        /*
  • bsps/powerpc/shared/start/linkcmds.share

    rcc61d5c r84e59b7c  
    44/* Do we need any of these for elf?
    55   __DYNAMIC = 0;    */
    6 PROVIDE (__stack = 0);
    76MEMORY {
    87        VECTORS : ORIGIN = 0x0 ,  LENGTH = 0x3000
     
    248247  } > CODE
    249248  . = ALIGN(16);
    250   . += 0x1000;
    251   __stack = .;
    252249  _end = . ;
    253250  __rtems_end = . ;
  • bsps/powerpc/shared/start/start.S

    rcc61d5c r84e59b7c  
    1111
    1212#include <rtems/asm.h>
    13 #include <rtems/score/cpu.h>
    14 #include <rtems/powerpc/powerpc.h>
     13#include <libcpu/powerpc-utility.h>
    1514
    1615#include <libcpu/io.h>
     
    134133        mr      r7,r27
    135134        bl      save_boot_params
     135
    136136        /*
    137          * stack = &__rtems_end + 4096
     137         * Initialize start stack.  The stacks are statically allocated and
     138         * properly aligned.
    138139         */
    139         addis   r9,r0, __stack-PPC_MINIMUM_STACK_FRAME_SIZE@ha
    140         addi    r9,r9, __stack-PPC_MINIMUM_STACK_FRAME_SIZE@l
    141         /*
    142          * align initial stack
    143          * (we hope that the bootloader stack was 16-byte aligned
    144          * or we haven't used altivec yet...)
    145          */
    146         li   r0, (CPU_STACK_ALIGNMENT-1)
    147         andc r1, r9, r0
    148         /*
    149          * Tag TOS with a NULL (terminator for stack dump)
    150          */
    151         li   r0, 0
    152         stw  r0, 0(r1)
    153        
     140        LA      r1, _ISR_Stack_area_end
     141        subi    r1, r1, PPC_DEFAULT_CACHE_LINE_SIZE
     142        li      r0, 0
     143        stw     r0, 0(r1)
     144
    154145        /*
    155146         * We are now in a environment that is totally independent from
  • bsps/powerpc/ss555/start/linkcmds

    rcc61d5c r84e59b7c  
    1717OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
    1818OUTPUT_ARCH(powerpc)
     19STARTUP(start.o)
    1920ENTRY(start)
    2021EXTERN(_vectors)
  • bsps/powerpc/virtex/start/start.S

    rcc61d5c r84e59b7c  
    4848.endr
    4949
    50         /* Start stack area */
    51 .rept BSP_START_STACK_SIZE / 4
    52         b       twiddle
    53 .endr
    54 
    5550_start:
    5651
     
    6055        mtspr   TBWL, r0
    6156
    62         /* Initialize start stack */
    63         LWI     r1, _start
    64         stwu    r0, -4(r1)
    65         stwu    r0, -4(r1)
     57        /*
     58         * Initialize start stack.  The stacks are statically allocated and
     59         * properly aligned.
     60         */
     61        LA      r1, _ISR_Stack_area_end
     62        subi    r1, r1, PPC_DEFAULT_CACHE_LINE_SIZE
     63        stw     r0, 0(r1)
    6664
    6765        /* Copy fast text */
  • bsps/powerpc/virtex4/start/linkcmds

    rcc61d5c r84e59b7c  
    99OUTPUT_ARCH(powerpc)
    1010
     11STARTUP(start.o)
    1112ENTRY(download_entry)
    1213EXTERN(download_entry)
  • bsps/powerpc/virtex5/start/linkcmds

    rcc61d5c r84e59b7c  
    99OUTPUT_ARCH(powerpc)
    1010
     11STARTUP(start.o)
    1112ENTRY(download_entry)
    1213EXTERN(download_entry)
  • c/src/lib/libbsp/powerpc/haleakala/Makefile.am

    rcc61d5c r84e59b7c  
    66dist_project_lib_DATA = ../../../../../../bsps/powerpc/haleakala/start/bsp_specs
    77
    8 
     8start.$(OBJEXT): ../../../../../../bsps/powerpc/haleakala/start/start.S
     9        $(CPPASCOMPILE) -o $@ -c $<
     10project_lib_DATA = start.$(OBJEXT)
    911
    1012rtems_crti.$(OBJEXT): ../../../../../../bsps/powerpc/shared/start/rtems_crti.S
    1113        $(CPPASCOMPILE) -o $@ -c $<
    12 project_lib_DATA = rtems_crti.$(OBJEXT)
     14project_lib_DATA += rtems_crti.$(OBJEXT)
    1315
    1416project_lib_DATA += linkcmds
     
    2628librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/haleakala/start/mmu_405.c
    2729librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/haleakala/start/mmu_405asm.S
    28 
    29 # dlentry
    30 librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/haleakala/start/dlentry.S
    3130
    3231# console
  • c/src/lib/libbsp/powerpc/ss555/Makefile.am

    rcc61d5c r84e59b7c  
    66dist_project_lib_DATA = ../../../../../../bsps/powerpc/ss555/start/bsp_specs
    77
    8 
     8start.$(OBJEXT): ../../../../../../bsps/powerpc/ss555/start/start.S
     9        $(CPPASCOMPILE) -o $@ -c $<
     10project_lib_DATA = start.$(OBJEXT)
    911
    1012rtems_crti.$(OBJEXT): ../../../../../../bsps/powerpc/shared/start/rtems_crti.S
    1113        $(CPPASCOMPILE) -o $@ -c $<
    12 project_lib_DATA = rtems_crti.$(OBJEXT)
     14project_lib_DATA += rtems_crti.$(OBJEXT)
    1315
    1416project_lib_DATA += linkcmds
     
    2729librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
    2830librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
    29 librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/ss555/start/start.S
    3031librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
    3132librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
  • c/src/lib/libbsp/powerpc/virtex/configure.ac

    rcc61d5c r84e59b7c  
    1010AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
    1111RTEMS_BSP_CONFIGURE
    12 
    13 
    14 
    15 
    16 RTEMS_BSPOPTS_SET([BSP_START_STACK_SIZE],[*],[4096])
    17 RTEMS_BSPOPTS_HELP([BSP_START_STACK_SIZE],[size of low-level start stack])
    1812
    1913RTEMS_BSPOPTS_SET([RTEMS_XPARAMETERS_H],[*],[\<xparameters_dflt.h\>])
  • c/src/lib/libbsp/powerpc/virtex4/Makefile.am

    rcc61d5c r84e59b7c  
    1010
    1111# start
     12
     13start.$(OBJEXT): ../../../../../../bsps/powerpc/virtex4/start/start.S
     14        $(CPPASCOMPILE) -o $@ -c $<
     15project_lib_DATA = start.$(OBJEXT)
     16
    1217rtems_crti.$(OBJEXT): ../../../../../../bsps/powerpc/shared/start/rtems_crti.S
    1318        $(CPPASCOMPILE) -o $@ -c $<
    14 project_lib_DATA = rtems_crti.$(OBJEXT)
     19project_lib_DATA += rtems_crti.$(OBJEXT)
    1520
    1621project_lib_DATA += linkcmds
  • c/src/lib/libbsp/powerpc/virtex5/Makefile.am

    rcc61d5c r84e59b7c  
    99
    1010# start
     11
     12start.$(OBJEXT): ../../../../../../bsps/powerpc/virtex5/start/start.S
     13        $(CPPASCOMPILE) -o $@ -c $<
     14project_lib_DATA = start.$(OBJEXT)
     15
    1116rtems_crti.$(OBJEXT): ../../../../../../bsps/powerpc/shared/start/rtems_crti.S
    1217        $(CPPASCOMPILE) -o $@ -c $<
    13 project_lib_DATA = rtems_crti.$(OBJEXT)
     18project_lib_DATA += rtems_crti.$(OBJEXT)
    1419
    1520project_lib_DATA += linkcmds
Note: See TracChangeset for help on using the changeset viewer.