Changeset f88da30 in rtems


Ignore:
Timestamp:
Mar 11, 2013, 4:50:27 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
faad192
Parents:
b34401cc
git-author:
Sebastian Huber <sebastian.huber@…> (03/11/13 16:50:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/14/13 09:56:47)
Message:

mpc83xx: Use shared linkcmds.base

Location:
c/src/lib/libbsp/powerpc/gen83xx
Files:
1 added
2 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/gen83xx/Makefile.am

    rb34401cc rf88da30  
    1919include_bsp_HEADERS += ../../shared/include/u-boot.h
    2020include_bsp_HEADERS += ../../shared/include/utility.h
     21include_bsp_HEADERS += ../shared/include/linker-symbols.h
     22include_bsp_HEADERS += ../shared/include/start.h
    2123include_bsp_HEADERS += ../shared/include/tictac.h
    2224include_bsp_HEADERS += ../shared/include/u-boot-board-info.h
     
    4042
    4143dist_project_lib_DATA += startup/linkcmds \
    42     startup/linkcmds.base \
     44    ../shared/startup/linkcmds.base \
     45    startup/linkcmds.mpc83xx \
    4346    startup/linkcmds.mpc8309som \
    4447    startup/linkcmds.mpc8313erdb \
     
    4952noinst_LIBRARIES += libbsp.a
    5053libbsp_a_SOURCES =
    51 
    52 # mpc83xx_regs
    53 libbsp_a_SOURCES += startup/mpc83xx_regs.c
    5454
    5555# startup
  • c/src/lib/libbsp/powerpc/gen83xx/configure.ac

    rb34401cc rf88da30  
    1919RTEMS_BSPOPTS_SET_INSTRUCTION_CACHE_ENABLED([*],[1])
    2020RTEMS_BSPOPTS_HELP_INSTRUCTION_CACHE_ENABLED
     21
     22RTEMS_BSPOPTS_SET([BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN],[*],[1])
     23RTEMS_BSPOPTS_HELP([BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN],[indicate that the interrupt stack is at the work area begin])
    2124
    2225RTEMS_BSPOPTS_SET([MPC83XX_BOARD_MPC8313ERDB],[mpc8313erdb],[1])
  • c/src/lib/libbsp/powerpc/gen83xx/preinstall.am

    rb34401cc rf88da30  
    7070PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/utility.h
    7171
     72$(PROJECT_INCLUDE)/bsp/linker-symbols.h: ../shared/include/linker-symbols.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     73        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/linker-symbols.h
     74PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/linker-symbols.h
     75
     76$(PROJECT_INCLUDE)/bsp/start.h: ../shared/include/start.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     77        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/start.h
     78PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/start.h
     79
    7280$(PROJECT_INCLUDE)/bsp/tictac.h: ../shared/include/tictac.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    7381        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/tictac.h
     
    114122PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
    115123
    116 $(PROJECT_LIB)/linkcmds.base: startup/linkcmds.base $(PROJECT_LIB)/$(dirstamp)
     124$(PROJECT_LIB)/linkcmds.base: ../shared/startup/linkcmds.base $(PROJECT_LIB)/$(dirstamp)
    117125        $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base
    118126PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
     127
     128$(PROJECT_LIB)/linkcmds.mpc83xx: startup/linkcmds.mpc83xx $(PROJECT_LIB)/$(dirstamp)
     129        $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.mpc83xx
     130PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.mpc83xx
    119131
    120132$(PROJECT_LIB)/linkcmds.mpc8309som: startup/linkcmds.mpc8309som $(PROJECT_LIB)/$(dirstamp)
  • c/src/lib/libbsp/powerpc/gen83xx/start/start.S

    rb34401cc rf88da30  
    5454        bl rom_entry
    5555
    56 .section ".entry"
    57 PUBLIC_VAR (start)
    58 start:
    59 
     56.section ".bsp_start_text", "ax"
     57PUBLIC_VAR (_start)
     58_start:
    6059        /* Reset time base */
    6160        li      r0, 0
     
    360359         * ROM or relocatable startup: copy startup code to SDRAM
    361360         */
    362         /* get start address of text section in RAM */
    363         LA      r29, bsp_section_text_start
    364         /* get start address of text section in ROM (add reloc offset) */
     361        /* get start address of start section in RAM */
     362        LA      r29, bsp_section_start_begin
     363        /* get start address of start section in ROM (add reloc offset) */
    365364        add     r30, r20, r29
    366365        /* get size of startup code */
    367         LA      r28, end_reloc_startup
    368         LA      r31, bsp_section_text_start
    369         sub     28,r28,r31
     366        LA      r28, bsp_section_start_end
     367        sub     28,r28,r29
    370368        /* copy startup code from ROM to RAM location */
    371369        bl      copy_image
     
    386384         * ROM or relocatable startup: copy rest of code to SDRAM
    387385         */
    388         /* get start address of rest of code in RAM */
    389         LA      r29, end_reloc_startup
    390         /* get start address of text section in ROM (add reloc offset) */
     386        /* get start address of rest of loadable sections in RAM */
     387        LA      r29, bsp_section_text_begin
     388        /* get start address of loadable sections in ROM (add reloc offset) */
    391389        add     r30, r20, r29
    392         /* get size of rest of code */
    393         LA      r28, bsp_section_text_start
    394         LA      r31, bsp_section_text_size
    395         add     r28,r28,r31
     390        /* get size of rest of loadable sections */
     391        LA      r28, bsp_section_data_end
    396392        sub     r28,r28,r29
    397393        bl      copy_image      /* copy text section from ROM to RAM location */
    398394
    399         /*
    400          * ROM or relocatable startup: copy data to SDRAM
    401          */
    402         /* get start address of data section in RAM */
    403         LA      r29, bsp_section_data_start
    404         /* get start address of data section in ROM (add reloc offset) */
    405         add     r30, r20, r29
    406         /* get size of RAM image */
    407         LA      r28, bsp_section_data_size
    408         /* copy initialized data section from ROM to RAM location */
    409         bl      copy_image
    410 
    411395start_code_in_ram:
    412396
     
    414398         * ROM/RAM startup: clear bss in SDRAM
    415399         */
    416         LA      r3, bsp_section_bss_start  /* get start address of bss section */
    417         LWI     r4, bsp_section_bss_size   /* get size of bss section */
    418         bl      mpc83xx_zero_4          /* Clear the bss section */
     400        LA      r3, bsp_section_sbss_begin  /* get start address of bss section */
     401        LA      r4, bsp_section_bss_end     /* get end address of bss section */
     402        sub     r4, r4, r3                  /* get size of bss section */
     403        bl      mpc83xx_zero_4              /* Clear the bss section */
    419404
    420405#ifdef HAS_UBOOT
     
    422407        bl      bsp_uboot_copy_board_info
    423408#endif /* HAS_UBOOT */
    424         /*
    425          * call boot_card
    426          */
    427 
    428         /* Set stack pointer (common for RAM/ROM startup) */
    429         LA      r1, bsp_section_text_start
    430         addi    r1, r1, -0x10 /* Set up stack pointer = beginning of text section - 0x10 */
    431 
    432         /* Create NULL */
    433         li r0, 0
    434 
    435         /* Return address */
    436         stw r0, 4(r1)
    437 
    438         /* Back chain */
    439         stw r0, 0(r1)
    440409
    441410        /* Read-only small data */
     
    445414        LA r13, _SDA_BASE_
    446415
    447 /* clear arguments and do further init. in C (common for RAM/ROM startup) */
    448 
    449416        /* Clear cmdline */
    450         xor r3, r3, r3
    451 
    452         bl      SYM (boot_card)  /* Call the first C routine */
     417        li      r3, 0
     418
     419        /* Set start stack pointer */
     420        LA      r1, start_stack_end
     421        stwu    r3, -4(r1)
     422        stwu    r3, -4(r1)
     423
     424        /* Call the first C routine */
     425        bl      SYM (boot_card)
    453426
    454427twiddle:
     
    549522        blr
    550523
    551 end_reloc_startup:
     524.section ".bsp_rwextra", "aw", @nobits
     525
     526        /* Start stack area */
     527.align 4
     528.space 4096
     529start_stack_end:
  • c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c

    rb34401cc rf88da30  
    2828#include <bsp/bootcard.h>
    2929#include <bsp/irq-generic.h>
     30#include <bsp/linker-symbols.h>
    3031#include <bsp/u-boot.h>
    3132
     
    8081  ppc_cpu_id_t myCpu;
    8182  ppc_cpu_revision_t myCpuRevision;
    82 
    83   uintptr_t interrupt_stack_start = (uintptr_t) bsp_interrupt_stack_start;
    84   uintptr_t interrupt_stack_size = (uintptr_t) bsp_interrupt_stack_size;
    8583
    8684  /*
     
    137135  ppc_exc_initialize(
    138136    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    139     interrupt_stack_start,
    140     interrupt_stack_size
     137    (uintptr_t) bsp_section_work_begin,
     138    rtems_configuration_get_interrupt_stack_size()
    141139  );
    142140
  • c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.br_uid

    rb34401cc rf88da30  
    1 /**
    2  * @file
    3  *
    4  * MPC8309 System on Module.
    5  */
    6 
    71MEMORY {
    8         RAM : ORIGIN = 0x0, LENGTH = 256M
     2        RESCONF : ORIGIN = 0x0, LENGTH = 0x100
     3        VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
     4        WORK : ORIGIN = 0x10000, LENGTH = 256M - 0x10000
    95        ROM : ORIGIN = 0xfe000000, LENGTH = 2M
    10         MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 256k
    116}
    127
    13 INCLUDE linkcmds.base
     8REGION_ALIAS ("START", WORK);
     9
     10INCLUDE linkcmds.mpc83xx
  • c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.hsc_cm01

    rb34401cc rf88da30  
    1 /**
    2  * @file
    3  *
    4  * HSC_CM01 Board.
    5  */
    6 
    71MEMORY {
    8         RAM : ORIGIN = 0x0, LENGTH = 256M
     2        RESCONF : ORIGIN = 0x0, LENGTH = 0x100
     3        VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
     4        WORK : ORIGIN = 0x10000, LENGTH = 256M - 0x10000
    95        ROM : ORIGIN = 0xfe000000, LENGTH = 8M
    10         MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 1M
    116}
    127
    13 INCLUDE linkcmds.base
     8REGION_ALIAS ("START", WORK);
     9
     10INCLUDE linkcmds.mpc83xx
  • c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc8309som

    rb34401cc rf88da30  
    1 /**
    2  * @file
    3  *
    4  * MPC8309 System on Module.
    5  */
    6 
    71MEMORY {
    8         RAM : ORIGIN = 0x0, LENGTH = 256M
     2        RESCONF : ORIGIN = 0x0, LENGTH = 0x100
     3        VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
     4        WORK : ORIGIN = 0x10000, LENGTH = 256M - 0x10000
    95        ROM : ORIGIN = 0xfe000000, LENGTH = 8M
    10         MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 256k
    116}
    127
    13 INCLUDE linkcmds.base
     8REGION_ALIAS ("START", WORK);
     9
     10INCLUDE linkcmds.mpc83xx
  • c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc8313erdb

    rb34401cc rf88da30  
    1 /**
    2  * @file
    3  *
    4  * MPC8313E Reference Design Board.
    5  */
    6 
    71MEMORY {
    8         RAM : ORIGIN = 0x0, LENGTH = 128M
     2        RESCONF : ORIGIN = 0x0, LENGTH = 0x100
     3        VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
     4        WORK : ORIGIN = 0x10000, LENGTH = 128M - 0x10000
    95        ROM : ORIGIN = 0xfe000000, LENGTH = 8M
    10         MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 256k
    116}
    127
    13 INCLUDE linkcmds.base
     8REGION_ALIAS ("START", WORK);
     9
     10INCLUDE linkcmds.mpc83xx
  • c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc8349eamds

    rb34401cc rf88da30  
    1 /**
    2  * @file
    3  *
    4  * MPC8349EAMDS Board.
    5  */
    6 
    71MEMORY {
    8         RAM : ORIGIN = 0x0, LENGTH = 256M
     2        RESCONF : ORIGIN = 0x0, LENGTH = 0x100
     3        VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
     4        WORK : ORIGIN = 0x10000, LENGTH = 256M - 0x10000
    95        ROM : ORIGIN = 0xfe000000, LENGTH = 8M
    10         MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 256k
    116}
    127
    13 INCLUDE linkcmds.base
     8REGION_ALIAS ("START", WORK);
     9
     10INCLUDE linkcmds.mpc83xx
Note: See TracChangeset for help on using the changeset viewer.