forked from Imagelibrary/rtems
mpc83xx: Use shared linkcmds.base
This commit is contained in:
@@ -18,6 +18,8 @@ include_bsp_HEADERS += ../../shared/include/irq-generic.h
|
|||||||
include_bsp_HEADERS += ../../shared/include/irq-info.h
|
include_bsp_HEADERS += ../../shared/include/irq-info.h
|
||||||
include_bsp_HEADERS += ../../shared/include/u-boot.h
|
include_bsp_HEADERS += ../../shared/include/u-boot.h
|
||||||
include_bsp_HEADERS += ../../shared/include/utility.h
|
include_bsp_HEADERS += ../../shared/include/utility.h
|
||||||
|
include_bsp_HEADERS += ../shared/include/linker-symbols.h
|
||||||
|
include_bsp_HEADERS += ../shared/include/start.h
|
||||||
include_bsp_HEADERS += ../shared/include/tictac.h
|
include_bsp_HEADERS += ../shared/include/tictac.h
|
||||||
include_bsp_HEADERS += ../shared/include/u-boot-board-info.h
|
include_bsp_HEADERS += ../shared/include/u-boot-board-info.h
|
||||||
include_bsp_HEADERS += include/hwreg_vals.h
|
include_bsp_HEADERS += include/hwreg_vals.h
|
||||||
@@ -39,7 +41,8 @@ libbspstart_a_SOURCES += ../../powerpc/shared/start/rtems_crti.S
|
|||||||
project_lib_DATA += rtems_crti.$(OBJEXT)
|
project_lib_DATA += rtems_crti.$(OBJEXT)
|
||||||
|
|
||||||
dist_project_lib_DATA += startup/linkcmds \
|
dist_project_lib_DATA += startup/linkcmds \
|
||||||
startup/linkcmds.base \
|
../shared/startup/linkcmds.base \
|
||||||
|
startup/linkcmds.mpc83xx \
|
||||||
startup/linkcmds.mpc8309som \
|
startup/linkcmds.mpc8309som \
|
||||||
startup/linkcmds.mpc8313erdb \
|
startup/linkcmds.mpc8313erdb \
|
||||||
startup/linkcmds.br_uid \
|
startup/linkcmds.br_uid \
|
||||||
@@ -49,9 +52,6 @@ dist_project_lib_DATA += startup/linkcmds \
|
|||||||
noinst_LIBRARIES += libbsp.a
|
noinst_LIBRARIES += libbsp.a
|
||||||
libbsp_a_SOURCES =
|
libbsp_a_SOURCES =
|
||||||
|
|
||||||
# mpc83xx_regs
|
|
||||||
libbsp_a_SOURCES += startup/mpc83xx_regs.c
|
|
||||||
|
|
||||||
# startup
|
# startup
|
||||||
libbsp_a_SOURCES += ../../shared/bsplibc.c \
|
libbsp_a_SOURCES += ../../shared/bsplibc.c \
|
||||||
../../shared/bsppost.c \
|
../../shared/bsppost.c \
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ RTEMS_BSPOPTS_HELP_DATA_CACHE_ENABLED
|
|||||||
RTEMS_BSPOPTS_SET_INSTRUCTION_CACHE_ENABLED([*],[1])
|
RTEMS_BSPOPTS_SET_INSTRUCTION_CACHE_ENABLED([*],[1])
|
||||||
RTEMS_BSPOPTS_HELP_INSTRUCTION_CACHE_ENABLED
|
RTEMS_BSPOPTS_HELP_INSTRUCTION_CACHE_ENABLED
|
||||||
|
|
||||||
|
RTEMS_BSPOPTS_SET([BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN],[*],[1])
|
||||||
|
RTEMS_BSPOPTS_HELP([BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN],[indicate that the interrupt stack is at the work area begin])
|
||||||
|
|
||||||
RTEMS_BSPOPTS_SET([MPC83XX_BOARD_MPC8313ERDB],[mpc8313erdb],[1])
|
RTEMS_BSPOPTS_SET([MPC83XX_BOARD_MPC8313ERDB],[mpc8313erdb],[1])
|
||||||
RTEMS_BSPOPTS_HELP([MPC83XX_BOARD_MPC8313ERDB],
|
RTEMS_BSPOPTS_HELP([MPC83XX_BOARD_MPC8313ERDB],
|
||||||
[if defined, then use settings for the MPC8313ERDB board])
|
[if defined, then use settings for the MPC8313ERDB board])
|
||||||
|
|||||||
@@ -69,6 +69,14 @@ $(PROJECT_INCLUDE)/bsp/utility.h: ../../shared/include/utility.h $(PROJECT_INCLU
|
|||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/utility.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/utility.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/utility.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/utility.h
|
||||||
|
|
||||||
|
$(PROJECT_INCLUDE)/bsp/linker-symbols.h: ../shared/include/linker-symbols.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/linker-symbols.h
|
||||||
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/linker-symbols.h
|
||||||
|
|
||||||
|
$(PROJECT_INCLUDE)/bsp/start.h: ../shared/include/start.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/start.h
|
||||||
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/start.h
|
||||||
|
|
||||||
$(PROJECT_INCLUDE)/bsp/tictac.h: ../shared/include/tictac.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
$(PROJECT_INCLUDE)/bsp/tictac.h: ../shared/include/tictac.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/tictac.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/tictac.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/tictac.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/tictac.h
|
||||||
@@ -113,10 +121,14 @@ $(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
|
|||||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
|
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
|
||||||
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
|
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
|
||||||
|
|
||||||
$(PROJECT_LIB)/linkcmds.base: startup/linkcmds.base $(PROJECT_LIB)/$(dirstamp)
|
$(PROJECT_LIB)/linkcmds.base: ../shared/startup/linkcmds.base $(PROJECT_LIB)/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base
|
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base
|
||||||
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
|
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
|
||||||
|
|
||||||
|
$(PROJECT_LIB)/linkcmds.mpc83xx: startup/linkcmds.mpc83xx $(PROJECT_LIB)/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.mpc83xx
|
||||||
|
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.mpc83xx
|
||||||
|
|
||||||
$(PROJECT_LIB)/linkcmds.mpc8309som: startup/linkcmds.mpc8309som $(PROJECT_LIB)/$(dirstamp)
|
$(PROJECT_LIB)/linkcmds.mpc8309som: startup/linkcmds.mpc8309som $(PROJECT_LIB)/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.mpc8309som
|
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.mpc8309som
|
||||||
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.mpc8309som
|
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.mpc8309som
|
||||||
|
|||||||
@@ -53,10 +53,9 @@ PUBLIC_VAR (reset_vec)
|
|||||||
reset_vec:
|
reset_vec:
|
||||||
bl rom_entry
|
bl rom_entry
|
||||||
|
|
||||||
.section ".entry"
|
.section ".bsp_start_text", "ax"
|
||||||
PUBLIC_VAR (start)
|
PUBLIC_VAR (_start)
|
||||||
start:
|
_start:
|
||||||
|
|
||||||
/* Reset time base */
|
/* Reset time base */
|
||||||
li r0, 0
|
li r0, 0
|
||||||
mtspr TBWU, r0
|
mtspr TBWU, r0
|
||||||
@@ -359,14 +358,13 @@ start_rom_skip1:
|
|||||||
/*
|
/*
|
||||||
* ROM or relocatable startup: copy startup code to SDRAM
|
* ROM or relocatable startup: copy startup code to SDRAM
|
||||||
*/
|
*/
|
||||||
/* get start address of text section in RAM */
|
/* get start address of start section in RAM */
|
||||||
LA r29, bsp_section_text_start
|
LA r29, bsp_section_start_begin
|
||||||
/* get start address of text section in ROM (add reloc offset) */
|
/* get start address of start section in ROM (add reloc offset) */
|
||||||
add r30, r20, r29
|
add r30, r20, r29
|
||||||
/* get size of startup code */
|
/* get size of startup code */
|
||||||
LA r28, end_reloc_startup
|
LA r28, bsp_section_start_end
|
||||||
LA r31, bsp_section_text_start
|
sub 28,r28,r29
|
||||||
sub 28,r28,r31
|
|
||||||
/* copy startup code from ROM to RAM location */
|
/* copy startup code from ROM to RAM location */
|
||||||
bl copy_image
|
bl copy_image
|
||||||
|
|
||||||
@@ -385,58 +383,29 @@ copy_rest_of_text:
|
|||||||
/*
|
/*
|
||||||
* ROM or relocatable startup: copy rest of code to SDRAM
|
* ROM or relocatable startup: copy rest of code to SDRAM
|
||||||
*/
|
*/
|
||||||
/* get start address of rest of code in RAM */
|
/* get start address of rest of loadable sections in RAM */
|
||||||
LA r29, end_reloc_startup
|
LA r29, bsp_section_text_begin
|
||||||
/* get start address of text section in ROM (add reloc offset) */
|
/* get start address of loadable sections in ROM (add reloc offset) */
|
||||||
add r30, r20, r29
|
add r30, r20, r29
|
||||||
/* get size of rest of code */
|
/* get size of rest of loadable sections */
|
||||||
LA r28, bsp_section_text_start
|
LA r28, bsp_section_data_end
|
||||||
LA r31, bsp_section_text_size
|
|
||||||
add r28,r28,r31
|
|
||||||
sub r28,r28,r29
|
sub r28,r28,r29
|
||||||
bl copy_image /* copy text section from ROM to RAM location */
|
bl copy_image /* copy text section from ROM to RAM location */
|
||||||
|
|
||||||
/*
|
|
||||||
* ROM or relocatable startup: copy data to SDRAM
|
|
||||||
*/
|
|
||||||
/* get start address of data section in RAM */
|
|
||||||
LA r29, bsp_section_data_start
|
|
||||||
/* get start address of data section in ROM (add reloc offset) */
|
|
||||||
add r30, r20, r29
|
|
||||||
/* get size of RAM image */
|
|
||||||
LA r28, bsp_section_data_size
|
|
||||||
/* copy initialized data section from ROM to RAM location */
|
|
||||||
bl copy_image
|
|
||||||
|
|
||||||
start_code_in_ram:
|
start_code_in_ram:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ROM/RAM startup: clear bss in SDRAM
|
* ROM/RAM startup: clear bss in SDRAM
|
||||||
*/
|
*/
|
||||||
LA r3, bsp_section_bss_start /* get start address of bss section */
|
LA r3, bsp_section_sbss_begin /* get start address of bss section */
|
||||||
LWI r4, bsp_section_bss_size /* get size of bss section */
|
LA r4, bsp_section_bss_end /* get end address of bss section */
|
||||||
|
sub r4, r4, r3 /* get size of bss section */
|
||||||
bl mpc83xx_zero_4 /* Clear the bss section */
|
bl mpc83xx_zero_4 /* Clear the bss section */
|
||||||
|
|
||||||
#ifdef HAS_UBOOT
|
#ifdef HAS_UBOOT
|
||||||
mr r3, r14
|
mr r3, r14
|
||||||
bl bsp_uboot_copy_board_info
|
bl bsp_uboot_copy_board_info
|
||||||
#endif /* HAS_UBOOT */
|
#endif /* HAS_UBOOT */
|
||||||
/*
|
|
||||||
* call boot_card
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Set stack pointer (common for RAM/ROM startup) */
|
|
||||||
LA r1, bsp_section_text_start
|
|
||||||
addi r1, r1, -0x10 /* Set up stack pointer = beginning of text section - 0x10 */
|
|
||||||
|
|
||||||
/* Create NULL */
|
|
||||||
li r0, 0
|
|
||||||
|
|
||||||
/* Return address */
|
|
||||||
stw r0, 4(r1)
|
|
||||||
|
|
||||||
/* Back chain */
|
|
||||||
stw r0, 0(r1)
|
|
||||||
|
|
||||||
/* Read-only small data */
|
/* Read-only small data */
|
||||||
LA r2, _SDA2_BASE_
|
LA r2, _SDA2_BASE_
|
||||||
@@ -444,12 +413,16 @@ start_code_in_ram:
|
|||||||
/* Read-write small data */
|
/* Read-write small data */
|
||||||
LA r13, _SDA_BASE_
|
LA r13, _SDA_BASE_
|
||||||
|
|
||||||
/* clear arguments and do further init. in C (common for RAM/ROM startup) */
|
|
||||||
|
|
||||||
/* Clear cmdline */
|
/* Clear cmdline */
|
||||||
xor r3, r3, r3
|
li r3, 0
|
||||||
|
|
||||||
bl SYM (boot_card) /* Call the first C routine */
|
/* Set start stack pointer */
|
||||||
|
LA r1, start_stack_end
|
||||||
|
stwu r3, -4(r1)
|
||||||
|
stwu r3, -4(r1)
|
||||||
|
|
||||||
|
/* Call the first C routine */
|
||||||
|
bl SYM (boot_card)
|
||||||
|
|
||||||
twiddle:
|
twiddle:
|
||||||
/* We don't expect to return from boot_card but if we do */
|
/* We don't expect to return from boot_card but if we do */
|
||||||
@@ -548,4 +521,9 @@ mpc83xx_zero_4_tail:
|
|||||||
/* Return */
|
/* Return */
|
||||||
blr
|
blr
|
||||||
|
|
||||||
end_reloc_startup:
|
.section ".bsp_rwextra", "aw", @nobits
|
||||||
|
|
||||||
|
/* Start stack area */
|
||||||
|
.align 4
|
||||||
|
.space 4096
|
||||||
|
start_stack_end:
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <bsp/vectors.h>
|
#include <bsp/vectors.h>
|
||||||
#include <bsp/bootcard.h>
|
#include <bsp/bootcard.h>
|
||||||
#include <bsp/irq-generic.h>
|
#include <bsp/irq-generic.h>
|
||||||
|
#include <bsp/linker-symbols.h>
|
||||||
#include <bsp/u-boot.h>
|
#include <bsp/u-boot.h>
|
||||||
|
|
||||||
/* Configuration parameters for console driver, ... */
|
/* Configuration parameters for console driver, ... */
|
||||||
@@ -80,9 +81,6 @@ void bsp_start( void)
|
|||||||
ppc_cpu_id_t myCpu;
|
ppc_cpu_id_t myCpu;
|
||||||
ppc_cpu_revision_t myCpuRevision;
|
ppc_cpu_revision_t myCpuRevision;
|
||||||
|
|
||||||
uintptr_t interrupt_stack_start = (uintptr_t) bsp_interrupt_stack_start;
|
|
||||||
uintptr_t interrupt_stack_size = (uintptr_t) bsp_interrupt_stack_size;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get CPU identification dynamically. Note that the get_ppc_cpu_type() function
|
* Get CPU identification dynamically. Note that the get_ppc_cpu_type() function
|
||||||
* store the result in global variables so that it can be used latter...
|
* store the result in global variables so that it can be used latter...
|
||||||
@@ -136,8 +134,8 @@ void bsp_start( void)
|
|||||||
#endif
|
#endif
|
||||||
ppc_exc_initialize(
|
ppc_exc_initialize(
|
||||||
PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
|
PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
|
||||||
interrupt_stack_start,
|
(uintptr_t) bsp_section_work_begin,
|
||||||
interrupt_stack_size
|
rtems_configuration_get_interrupt_stack_size()
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Install default handler for the decrementer exception */
|
/* Install default handler for the decrementer exception */
|
||||||
|
|||||||
@@ -1,357 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* Derived from internal linker script of GNU ld (GNU Binutils) 2.18 for elf32ppc emulation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
OUTPUT_FORMAT ("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
|
|
||||||
OUTPUT_ARCH (powerpc)
|
|
||||||
ENTRY (start)
|
|
||||||
|
|
||||||
bsp_ram_start = ORIGIN (RAM);
|
|
||||||
bsp_ram_end = ORIGIN (RAM) + LENGTH (RAM);
|
|
||||||
bsp_ram_size = LENGTH (RAM);
|
|
||||||
|
|
||||||
bsp_rom_start = ORIGIN (ROM);
|
|
||||||
bsp_rom_end = ORIGIN (ROM) + LENGTH (ROM);
|
|
||||||
bsp_rom_size = LENGTH (ROM);
|
|
||||||
|
|
||||||
bsp_section_align = 32;
|
|
||||||
|
|
||||||
RamBase = bsp_ram_start;
|
|
||||||
RamSize = bsp_ram_size;
|
|
||||||
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
|
|
||||||
|
|
||||||
MEMORY {
|
|
||||||
UNEXPECTED_SECTIONS : ORIGIN = 0xffffffff, LENGTH = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
SECTIONS {
|
|
||||||
/*
|
|
||||||
* BSP: MPC83XX registers
|
|
||||||
*/
|
|
||||||
.mpc83xx_regs (NOLOAD) : {
|
|
||||||
IMMRBAR = .;
|
|
||||||
mpc83xx_regs*(.text)
|
|
||||||
mpc83xx_regs*(.data)
|
|
||||||
mpc83xx_regs*(.bss)
|
|
||||||
mpc83xx_regs*(COMMON)
|
|
||||||
} > MPC83XX_REGS
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Reset configuration
|
|
||||||
*/
|
|
||||||
.resconf 0x0 : {
|
|
||||||
*(.resconf)
|
|
||||||
} > RAM
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Exception vectors
|
|
||||||
*/
|
|
||||||
.vectors 0x100 : {
|
|
||||||
*(.vectors)
|
|
||||||
} > RAM
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: The initial stack will live in this area - between the vectors
|
|
||||||
* and the text section.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.text 0x10000 : {
|
|
||||||
/*
|
|
||||||
* BSP: Start of text section
|
|
||||||
*/
|
|
||||||
bsp_section_text_start = .;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: System startup entry
|
|
||||||
*/
|
|
||||||
KEEP (*(.entry))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Moved into .text from .init
|
|
||||||
*/
|
|
||||||
KEEP (*(.init))
|
|
||||||
|
|
||||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
|
||||||
KEEP (*(.text.*personality*))
|
|
||||||
/* .gnu.warning sections are handled specially by elf32.em. */
|
|
||||||
*(.gnu.warning)
|
|
||||||
*(.glink)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Special FreeBSD sysctl sections
|
|
||||||
*/
|
|
||||||
. = ALIGN (16);
|
|
||||||
__start_set_sysctl_set = .;
|
|
||||||
*(set_sysctl_*);
|
|
||||||
__stop_set_sysctl_set = ABSOLUTE(.);
|
|
||||||
*(set_domain_*);
|
|
||||||
*(set_pseudo_*);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Moved into .text from .*
|
|
||||||
*/
|
|
||||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
|
||||||
*(.rodata1)
|
|
||||||
*(.interp)
|
|
||||||
*(.note.gnu.build-id)
|
|
||||||
*(.hash)
|
|
||||||
*(.gnu.hash)
|
|
||||||
*(.dynsym)
|
|
||||||
*(.dynstr)
|
|
||||||
*(.gnu.version)
|
|
||||||
*(.gnu.version_d)
|
|
||||||
*(.gnu.version_r)
|
|
||||||
*(.eh_frame_hdr)
|
|
||||||
|
|
||||||
. = ALIGN (4);
|
|
||||||
|
|
||||||
_bsd__start_set_modmetadata_set = .;
|
|
||||||
*(_bsd_set_modmetadata_set);
|
|
||||||
_bsd__stop_set_modmetadata_set = .;
|
|
||||||
|
|
||||||
_bsd__start_set_sysctl_set = .;
|
|
||||||
*(_bsd_set_sysctl_set);
|
|
||||||
_bsd__stop_set_sysctl_set = .;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Magic PPC stuff
|
|
||||||
*/
|
|
||||||
*(.PPC.*)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Required by cpukit/score/src/threadhandler.c
|
|
||||||
*/
|
|
||||||
PROVIDE (_fini = .);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Moved into .text from .fini
|
|
||||||
*/
|
|
||||||
KEEP (*(.fini))
|
|
||||||
|
|
||||||
. = ALIGN (bsp_section_align);
|
|
||||||
|
|
||||||
PROVIDE (__etext = .);
|
|
||||||
PROVIDE (_etext = .);
|
|
||||||
PROVIDE (etext = .);
|
|
||||||
} > RAM
|
|
||||||
|
|
||||||
.sdata2 : {
|
|
||||||
PROVIDE (_SDA2_BASE_ = 32768);
|
|
||||||
|
|
||||||
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
|
|
||||||
|
|
||||||
. = ALIGN (bsp_section_align);
|
|
||||||
} > RAM
|
|
||||||
|
|
||||||
.sbss2 : {
|
|
||||||
*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
|
|
||||||
|
|
||||||
. = ALIGN (bsp_section_align);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of text section
|
|
||||||
*/
|
|
||||||
bsp_section_text_end = .;
|
|
||||||
} > RAM
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
/*
|
|
||||||
* BSP: Start of data section
|
|
||||||
*/
|
|
||||||
bsp_section_data_start = .;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Moved into .data from .ctors
|
|
||||||
*/
|
|
||||||
/* gcc uses crtbegin.o to find the start of
|
|
||||||
the constructors, so we make sure it is
|
|
||||||
first. Because this is a wildcard, it
|
|
||||||
doesn't matter if the user does not
|
|
||||||
actually link against crtbegin.o; the
|
|
||||||
linker won't look for a file to match a
|
|
||||||
wildcard. The wildcard also means that it
|
|
||||||
doesn't matter which directory crtbegin.o
|
|
||||||
is in. */
|
|
||||||
KEEP (*crtbegin.o(.ctors))
|
|
||||||
KEEP (*crtbegin?.o(.ctors))
|
|
||||||
/* We don't want to include the .ctor section from
|
|
||||||
the crtend.o file until after the sorted ctors.
|
|
||||||
The .ctor section from the crtend file contains the
|
|
||||||
end of ctors marker and it must be last */
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
|
|
||||||
KEEP (*(SORT(.ctors.*)))
|
|
||||||
KEEP (*(.ctors))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Moved into .data from .dtors
|
|
||||||
*/
|
|
||||||
KEEP (*crtbegin.o(.dtors))
|
|
||||||
KEEP (*crtbegin?.o(.dtors))
|
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
|
||||||
KEEP (*(SORT(.dtors.*)))
|
|
||||||
KEEP (*(.dtors))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Moved into .data from .*
|
|
||||||
*/
|
|
||||||
*(.tdata .tdata.* .gnu.linkonce.td.*)
|
|
||||||
*(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
|
|
||||||
*(.data1)
|
|
||||||
KEEP (*(.eh_frame))
|
|
||||||
*(.gcc_except_table .gcc_except_table.*)
|
|
||||||
KEEP (*(.jcr))
|
|
||||||
*(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*)
|
|
||||||
*(.fixup)
|
|
||||||
*(.got1)
|
|
||||||
*(.got2)
|
|
||||||
*(.dynamic)
|
|
||||||
*(.got)
|
|
||||||
*(.plt)
|
|
||||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
|
||||||
KEEP (*(.preinit_array))
|
|
||||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
|
||||||
PROVIDE_HIDDEN (__init_array_start = .);
|
|
||||||
KEEP (*(SORT(.init_array.*)))
|
|
||||||
KEEP (*(.init_array))
|
|
||||||
PROVIDE_HIDDEN (__init_array_end = .);
|
|
||||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
|
||||||
KEEP (*(.fini_array))
|
|
||||||
KEEP (*(SORT(.fini_array.*)))
|
|
||||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
|
||||||
|
|
||||||
*(.data .data.* .gnu.linkonce.d.*)
|
|
||||||
KEEP (*(.gnu.linkonce.d.*personality*))
|
|
||||||
SORT(CONSTRUCTORS)
|
|
||||||
|
|
||||||
. = ALIGN (4);
|
|
||||||
|
|
||||||
_bsd__start_set_sysinit_set = .;
|
|
||||||
*(_bsd_set_sysinit_set);
|
|
||||||
_bsd__stop_set_sysinit_set = .;
|
|
||||||
|
|
||||||
. = ALIGN (bsp_section_align);
|
|
||||||
} > RAM
|
|
||||||
|
|
||||||
.sdata : {
|
|
||||||
PROVIDE (_SDA_BASE_ = 32768);
|
|
||||||
*(.sdata .sdata.* .gnu.linkonce.s.*)
|
|
||||||
|
|
||||||
. = ALIGN (bsp_section_align);
|
|
||||||
|
|
||||||
_edata = .;
|
|
||||||
PROVIDE (edata = .);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of data section
|
|
||||||
*/
|
|
||||||
bsp_section_data_end = .;
|
|
||||||
} > RAM
|
|
||||||
|
|
||||||
.sbss : {
|
|
||||||
/*
|
|
||||||
* BSP: Start of bss section
|
|
||||||
*/
|
|
||||||
bsp_section_bss_start = .;
|
|
||||||
|
|
||||||
__bss_start = .;
|
|
||||||
|
|
||||||
PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
|
|
||||||
*(.scommon)
|
|
||||||
*(.dynsbss)
|
|
||||||
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
|
||||||
PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
|
|
||||||
|
|
||||||
. = ALIGN (bsp_section_align);
|
|
||||||
} > RAM
|
|
||||||
|
|
||||||
.bss : {
|
|
||||||
*(COMMON)
|
|
||||||
*(.dynbss)
|
|
||||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
|
||||||
|
|
||||||
. = ALIGN (bsp_section_align);
|
|
||||||
|
|
||||||
__end = .;
|
|
||||||
_end = .;
|
|
||||||
PROVIDE (end = .);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of bss section
|
|
||||||
*/
|
|
||||||
bsp_section_bss_end = .;
|
|
||||||
} > RAM
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Section sizes
|
|
||||||
*/
|
|
||||||
bsp_section_text_size = bsp_section_text_end - bsp_section_text_start;
|
|
||||||
bsp_section_data_size = bsp_section_data_end - bsp_section_data_start;
|
|
||||||
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_start;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Interrupt stack
|
|
||||||
*/
|
|
||||||
bsp_interrupt_stack_start = bsp_section_bss_end;
|
|
||||||
bsp_interrupt_stack_end = bsp_interrupt_stack_start + 32k;
|
|
||||||
bsp_interrupt_stack_size = bsp_interrupt_stack_end - bsp_interrupt_stack_start;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Work area start
|
|
||||||
*/
|
|
||||||
bsp_work_area_start = bsp_interrupt_stack_end;
|
|
||||||
WorkAreaBase = bsp_work_area_start;
|
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
|
||||||
.stab 0 : { *(.stab) }
|
|
||||||
.stabstr 0 : { *(.stabstr) }
|
|
||||||
.stab.excl 0 : { *(.stab.excl) }
|
|
||||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
||||||
.stab.index 0 : { *(.stab.index) }
|
|
||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
||||||
.comment 0 : { *(.comment) }
|
|
||||||
/* DWARF debug sections.
|
|
||||||
Symbols in the DWARF debugging sections are relative to the beginning
|
|
||||||
of the section so we begin them at 0. */
|
|
||||||
/* DWARF 1 */
|
|
||||||
.debug 0 : { *(.debug) }
|
|
||||||
.line 0 : { *(.line) }
|
|
||||||
/* GNU DWARF 1 extensions */
|
|
||||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
|
||||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
|
||||||
/* DWARF 1.1 and DWARF 2 */
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
/* DWARF 2 */
|
|
||||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_frame 0 : { *(.debug_frame) }
|
|
||||||
.debug_str 0 : { *(.debug_str) }
|
|
||||||
.debug_loc 0 : { *(.debug_loc) }
|
|
||||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
|
||||||
/* SGI/MIPS DWARF 2 extensions */
|
|
||||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
|
||||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
|
||||||
.debug_typenames 0 : { *(.debug_typenames) }
|
|
||||||
.debug_varnames 0 : { *(.debug_varnames) }
|
|
||||||
/* DWARF 3 */
|
|
||||||
.debug_pubtypes 0 : { *(.debug_pubtypes) }
|
|
||||||
.debug_ranges 0 : { *(.debug_ranges) }
|
|
||||||
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
|
||||||
|
|
||||||
/DISCARD/ : {
|
|
||||||
*(.note.GNU-stack) *(.gnu_debuglink)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is a RTEMS specific section to catch all unexpected input
|
|
||||||
* sections. In case you get an error like
|
|
||||||
* "section `.unexpected_sections' will not fit in region
|
|
||||||
* `UNEXPECTED_SECTIONS'"
|
|
||||||
* you have to figure out the offending input section and add it to the
|
|
||||||
* appropriate output section definition above.
|
|
||||||
*/
|
|
||||||
.unexpected_sections : { *(*) } > UNEXPECTED_SECTIONS
|
|
||||||
}
|
|
||||||
@@ -1,13 +1,10 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* MPC8309 System on Module.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
RAM : ORIGIN = 0x0, LENGTH = 256M
|
RESCONF : ORIGIN = 0x0, LENGTH = 0x100
|
||||||
|
VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
|
||||||
|
WORK : ORIGIN = 0x10000, LENGTH = 256M - 0x10000
|
||||||
ROM : ORIGIN = 0xfe000000, LENGTH = 2M
|
ROM : ORIGIN = 0xfe000000, LENGTH = 2M
|
||||||
MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 256k
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE linkcmds.base
|
REGION_ALIAS ("START", WORK);
|
||||||
|
|
||||||
|
INCLUDE linkcmds.mpc83xx
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* HSC_CM01 Board.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
RAM : ORIGIN = 0x0, LENGTH = 256M
|
RESCONF : ORIGIN = 0x0, LENGTH = 0x100
|
||||||
|
VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
|
||||||
|
WORK : ORIGIN = 0x10000, LENGTH = 256M - 0x10000
|
||||||
ROM : ORIGIN = 0xfe000000, LENGTH = 8M
|
ROM : ORIGIN = 0xfe000000, LENGTH = 8M
|
||||||
MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 1M
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE linkcmds.base
|
REGION_ALIAS ("START", WORK);
|
||||||
|
|
||||||
|
INCLUDE linkcmds.mpc83xx
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* MPC8309 System on Module.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
RAM : ORIGIN = 0x0, LENGTH = 256M
|
RESCONF : ORIGIN = 0x0, LENGTH = 0x100
|
||||||
|
VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
|
||||||
|
WORK : ORIGIN = 0x10000, LENGTH = 256M - 0x10000
|
||||||
ROM : ORIGIN = 0xfe000000, LENGTH = 8M
|
ROM : ORIGIN = 0xfe000000, LENGTH = 8M
|
||||||
MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 256k
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE linkcmds.base
|
REGION_ALIAS ("START", WORK);
|
||||||
|
|
||||||
|
INCLUDE linkcmds.mpc83xx
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* MPC8313E Reference Design Board.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
RAM : ORIGIN = 0x0, LENGTH = 128M
|
RESCONF : ORIGIN = 0x0, LENGTH = 0x100
|
||||||
|
VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
|
||||||
|
WORK : ORIGIN = 0x10000, LENGTH = 128M - 0x10000
|
||||||
ROM : ORIGIN = 0xfe000000, LENGTH = 8M
|
ROM : ORIGIN = 0xfe000000, LENGTH = 8M
|
||||||
MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 256k
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE linkcmds.base
|
REGION_ALIAS ("START", WORK);
|
||||||
|
|
||||||
|
INCLUDE linkcmds.mpc83xx
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
/**
|
|
||||||
* @file
|
|
||||||
*
|
|
||||||
* MPC8349EAMDS Board.
|
|
||||||
*/
|
|
||||||
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
RAM : ORIGIN = 0x0, LENGTH = 256M
|
RESCONF : ORIGIN = 0x0, LENGTH = 0x100
|
||||||
|
VECTORS : ORIGIN = 0x100, LENGTH = 0x10000 - 0x100
|
||||||
|
WORK : ORIGIN = 0x10000, LENGTH = 256M - 0x10000
|
||||||
ROM : ORIGIN = 0xfe000000, LENGTH = 8M
|
ROM : ORIGIN = 0xfe000000, LENGTH = 8M
|
||||||
MPC83XX_REGS : ORIGIN = 0xe0000000, LENGTH = 256k
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE linkcmds.base
|
REGION_ALIAS ("START", WORK);
|
||||||
|
|
||||||
|
INCLUDE linkcmds.mpc83xx
|
||||||
|
|||||||
45
c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc83xx
Normal file
45
c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc83xx
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
bsp_ram_start = ORIGIN (RESCONF);
|
||||||
|
bsp_ram_end = ORIGIN (WORK) + LENGTH (WORK);
|
||||||
|
bsp_ram_size = bsp_ram_end - bsp_ram_start;
|
||||||
|
|
||||||
|
bsp_rom_start = ORIGIN (ROM);
|
||||||
|
bsp_rom_size = LENGTH (ROM);
|
||||||
|
bsp_rom_end = bsp_rom_start + bsp_rom_size;
|
||||||
|
|
||||||
|
IMMRBAR = 0xe0000000;
|
||||||
|
mpc83xx = IMMRBAR;
|
||||||
|
|
||||||
|
MEMORY {
|
||||||
|
EMPTY : ORIGIN = 0x0, LENGTH = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS {
|
||||||
|
.resconf : {
|
||||||
|
*(.resconf)
|
||||||
|
} > RESCONF AT > RESCONF
|
||||||
|
|
||||||
|
.vectors : {
|
||||||
|
*(.vectors)
|
||||||
|
} > VECTORS AT > VECTORS
|
||||||
|
}
|
||||||
|
|
||||||
|
REGION_ALIAS ("REGION_START", START);
|
||||||
|
REGION_ALIAS ("REGION_FAST_TEXT", WORK);
|
||||||
|
REGION_ALIAS ("REGION_FAST_TEXT_LOAD", WORK);
|
||||||
|
REGION_ALIAS ("REGION_TEXT", WORK);
|
||||||
|
REGION_ALIAS ("REGION_TEXT_LOAD", WORK);
|
||||||
|
REGION_ALIAS ("REGION_RODATA", WORK);
|
||||||
|
REGION_ALIAS ("REGION_RODATA_LOAD", WORK);
|
||||||
|
REGION_ALIAS ("REGION_FAST_DATA", WORK);
|
||||||
|
REGION_ALIAS ("REGION_FAST_DATA_LOAD", WORK);
|
||||||
|
REGION_ALIAS ("REGION_DATA", WORK);
|
||||||
|
REGION_ALIAS ("REGION_DATA_LOAD", WORK);
|
||||||
|
REGION_ALIAS ("REGION_BSS", WORK);
|
||||||
|
REGION_ALIAS ("REGION_RWEXTRA", WORK);
|
||||||
|
REGION_ALIAS ("REGION_WORK", WORK);
|
||||||
|
REGION_ALIAS ("REGION_STACK", WORK);
|
||||||
|
REGION_ALIAS ("REGION_NOCACHE", EMPTY);
|
||||||
|
REGION_ALIAS ("REGION_NOCACHE_LOAD", EMPTY);
|
||||||
|
REGION_ALIAS ("REGION_NVRAM", EMPTY);
|
||||||
|
|
||||||
|
INCLUDE linkcmds.base
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/*===============================================================*\
|
|
||||||
| Project: RTEMS generic MPC83xx BSP |
|
|
||||||
+-----------------------------------------------------------------+
|
|
||||||
| Partially based on the code references which are named below. |
|
|
||||||
| Adaptions, modifications, enhancements and any recent parts of |
|
|
||||||
| the code are: |
|
|
||||||
| Copyright (c) 2005 |
|
|
||||||
| Embedded Brains GmbH |
|
|
||||||
| Obere Lagerstr. 30 |
|
|
||||||
| D-82178 Puchheim |
|
|
||||||
| Germany |
|
|
||||||
| rtems@embedded-brains.de |
|
|
||||||
+-----------------------------------------------------------------+
|
|
||||||
| The license and distribution terms for this file may be |
|
|
||||||
| found in the file LICENSE in this distribution or at |
|
|
||||||
| |
|
|
||||||
| http://www.rtems.com/license/LICENSE. |
|
|
||||||
| |
|
|
||||||
+-----------------------------------------------------------------+
|
|
||||||
| this file places the mpc83xx registers into a special section |
|
|
||||||
\*===============================================================*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <mpc83xx/mpc83xx.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* this uninitialized variable will be overlayed to the hardware
|
|
||||||
* registers in the linker command file
|
|
||||||
*/
|
|
||||||
m83xxRegisters_t mpc83xx;
|
|
||||||
Reference in New Issue
Block a user