Changeset 1048a165 in rtems


Ignore:
Timestamp:
Mar 26, 2018, 8:36:52 AM (19 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f8e4755f
Parents:
11a8296
git-author:
Sebastian Huber <sebastian.huber@…> (03/26/18 08:36:52)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/26/18 09:03:18)
Message:

bsp/tqm8xx: Use shared linker command file

Update #3339.

Location:
c/src/lib/libbsp/powerpc/tqm8xx
Files:
1 added
2 deleted
4 edited

Legend:

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

    r11a8296 r1048a165  
    2323
    2424project_lib_DATA += linkcmds
    25 dist_project_lib_DATA += startup/linkcmds.tqm8xx
    26 dist_project_lib_DATA += startup/linkcmds.tqm8xx_base
     25dist_project_lib_DATA += ../shared/startup/linkcmds.base
    2726
    2827noinst_LIBRARIES = libbsp.a
  • c/src/lib/libbsp/powerpc/tqm8xx/start/start.S

    r11a8296 r1048a165  
    2626.extern boot_card
    2727
    28 .section ".entry"
    29 PUBLIC_VAR (start)
    30 start:
     28PUBLIC_VAR (_start)
     29PUBLIC_VAR (bsp_interrupt_stack_start)
     30PUBLIC_VAR (bsp_interrupt_stack_end)
     31
     32.section ".bsp_start_text", "ax"
     33_start:
    3134
    3235        /*
     
    6063         */
    6164        /* get start address of text section in RAM */
    62         LA      r29, bsp_section_text_start
     65        LA      r29, bsp_section_text_begin
    6366        /* get start address of text section in ROM (add reloc offset) */
    6467        add     r30, r20, r29
    6568        /* get size of startup code */
    6669        LA      r28, end_reloc_startup
    67         LA      r31, bsp_section_text_start
     70        LA      r31, bsp_section_text_begin
    6871        sub     28,r28,r31
    6972        /* copy startup code from ROM to RAM location */
     
    8689        add     r30, r20, r29
    8790        /* get size of rest of code */
    88         LA      r28, bsp_section_text_start
     91        LA      r28, bsp_section_text_begin
    8992        LA      r31, bsp_section_text_size
    9093        add     r28,r28,r31
     
    9699         */
    97100        /* get start address of data section in RAM */
    98         LA      r29, bsp_section_data_start
     101        LA      r29, bsp_section_data_begin
    99102        /* get start address of data section in ROM (add reloc offset) */
    100103        add     r30, r20, r29
     
    109112         * ROM/RAM startup: clear bss in SDRAM
    110113         */
    111         LA      r3, bsp_section_bss_start  /* get start address of bss section */
     114        LA      r3, bsp_section_bss_begin  /* get start address of bss section */
    112115        LWI     r4, bsp_section_bss_size   /* get size of bss section */
    113116        bl      mpc8xx_zero_4          /* Clear the bss section */
     
    117120
    118121        /* Set stack pointer (common for RAM/ROM startup) */
    119         LA      r1, bsp_section_text_start
     122        LA      r1, bsp_section_text_begin
    120123        addi    r1, r1, -0x10 /* Set up stack pointer = beginning of text section - 0x10 */
    121124
     
    283286
    284287end_reloc_startup:
     288
     289        /* Interrupt stack */
     290        .section ".bsp_rwextra", "aw", @nobits
     291        .align 4
     292bsp_interrupt_stack_start:
     293        .space 32768
     294bsp_interrupt_stack_end:
  • c/src/lib/libbsp/powerpc/tqm8xx/startup/bspgetworkarea.c

    r11a8296 r1048a165  
    88
    99/*
    10  * Copyright (c) 2008-2012 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2008, 2018 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
    13  *  Obere Lagerstr. 30
     13 *  Dornierstr. 4
    1414 *  82178 Puchheim
    1515 *  Germany
     
    2121 */
    2222
    23 #include <libcpu/powerpc-utility.h>
    24 
    2523#include <bsp.h>
    2624#include <bsp/bootcard.h>
     25#include <bsp/linker-symbols.h>
    2726
    2827void bsp_work_area_initialize(void)
    2928{
    3029  char *ram_end = (char *) (TQM_BD_INFO.sdram_size - (uint32_t)TopRamReserved);
    31   void *area_start = bsp_work_area_start;
    32   uintptr_t area_size = (uintptr_t) ram_end - (uintptr_t) bsp_work_area_start;
     30  void *area_start = bsp_section_work_begin;
     31  uintptr_t area_size = (uintptr_t) ram_end - (uintptr_t) area_start;
    3332
    3433  bsp_work_area_initialize_default( area_start, area_size );
  • c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c

    r11a8296 r1048a165  
    9797
    9898  uintptr_t interrupt_stack_start = (uintptr_t) bsp_interrupt_stack_start;
    99   uintptr_t interrupt_stack_size = (uintptr_t) bsp_interrupt_stack_size;
     99  uintptr_t interrupt_stack_size = (uintptr_t) bsp_interrupt_stack_end
     100    - interrupt_stack_start;
    100101
    101102  /*
Note: See TracChangeset for help on using the changeset viewer.