From 99648958668d3a33ee57974479b36201fe303f34 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 20 Apr 2018 10:35:35 +0200 Subject: bsps: Move startup files to bsps Adjust build support files to new directory layout. This patch is a part of the BSP source reorganization. Update #3285. --- bsps/arm/gumstix/start/bsp_specs | 9 +++++++++ bsps/arm/gumstix/start/bspreset.c | 18 ++++++++++++++++++ bsps/arm/gumstix/start/bspstart.c | 40 +++++++++++++++++++++++++++++++++++++++ bsps/arm/gumstix/start/linkcmds | 27 ++++++++++++++++++++++++++ bsps/arm/gumstix/start/memmap.c | 17 +++++++++++++++++ 5 files changed, 111 insertions(+) create mode 100644 bsps/arm/gumstix/start/bsp_specs create mode 100644 bsps/arm/gumstix/start/bspreset.c create mode 100644 bsps/arm/gumstix/start/bspstart.c create mode 100644 bsps/arm/gumstix/start/linkcmds create mode 100644 bsps/arm/gumstix/start/memmap.c (limited to 'bsps/arm/gumstix') diff --git a/bsps/arm/gumstix/start/bsp_specs b/bsps/arm/gumstix/start/bsp_specs new file mode 100644 index 0000000000..47dd31d46b --- /dev/null +++ b/bsps/arm/gumstix/start/bsp_specs @@ -0,0 +1,9 @@ +%rename endfile old_endfile +%rename startfile old_startfile + +*startfile: +%{!qrtems: %(old_startfile)} \ +%{!nostdlib: %{qrtems: crti.o%s crtbegin.o%s}} + +*endfile: +%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s} diff --git a/bsps/arm/gumstix/start/bspreset.c b/bsps/arm/gumstix/start/bspreset.c new file mode 100644 index 0000000000..ab7c5ffc8f --- /dev/null +++ b/bsps/arm/gumstix/start/bspreset.c @@ -0,0 +1,18 @@ +/* + * By Yang Xi . + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#include +#include +#include + +void bsp_reset( void ) +{ +#if ON_SKYEYE == 1 + SKYEYE_MAGIC_ADDRESS = 0xff; +#endif +} diff --git a/bsps/arm/gumstix/start/bspstart.c b/bsps/arm/gumstix/start/bspstart.c new file mode 100644 index 0000000000..f86bf3d6e3 --- /dev/null +++ b/bsps/arm/gumstix/start/bspstart.c @@ -0,0 +1,40 @@ +/* + * By Yang Xi . + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#include +#include +#include +#include +#include + +/* + * + * NAME: bsp_start_default - BSP initialization function + * + * DESCRIPTION: + * This function is called before RTEMS is initialized and used + * adjust the kernel's configuration. + * + * This function also configures the CPU's memory protection unit. + * + * RESTRICTIONS/LIMITATIONS: + * Since RTEMS is not configured, no RTEMS functions can be called. + * + */ +static void bsp_start_default( void ) +{ + /* disable interrupts */ + XSCALE_INT_ICMR = 0x0; + bsp_interrupt_initialize(); +} /* bsp_start */ + +/* + * By making this a weak alias for bsp_start_default, a brave soul + * can override the actual bsp_start routine used. + */ +void bsp_start (void) __attribute__ ((weak, alias("bsp_start_default"))); diff --git a/bsps/arm/gumstix/start/linkcmds b/bsps/arm/gumstix/start/linkcmds new file mode 100644 index 0000000000..08cb2fc47a --- /dev/null +++ b/bsps/arm/gumstix/start/linkcmds @@ -0,0 +1,27 @@ +MEMORY { + SDRAM_MMU : ORIGIN = 0xa0000000, LENGTH = 16k + SDRAM : ORIGIN = 0xa0004000, LENGTH = 64M - 16k + SRAM : ORIGIN = 0x00000000, LENGTH = 16k +} + +REGION_ALIAS ("REGION_START", SDRAM); +REGION_ALIAS ("REGION_VECTOR", SDRAM); +REGION_ALIAS ("REGION_TEXT", SDRAM); +REGION_ALIAS ("REGION_TEXT_LOAD", SDRAM); +REGION_ALIAS ("REGION_RODATA", SDRAM); +REGION_ALIAS ("REGION_RODATA_LOAD", SDRAM); +REGION_ALIAS ("REGION_DATA", SDRAM); +REGION_ALIAS ("REGION_DATA_LOAD", SDRAM); +REGION_ALIAS ("REGION_FAST_TEXT", SDRAM); +REGION_ALIAS ("REGION_FAST_TEXT_LOAD", SDRAM); +REGION_ALIAS ("REGION_FAST_DATA", SDRAM); +REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM); +REGION_ALIAS ("REGION_BSS", SDRAM); +REGION_ALIAS ("REGION_WORK", SDRAM); +REGION_ALIAS ("REGION_STACK", SDRAM); +REGION_ALIAS ("REGION_NOCACHE", SDRAM); +REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM); + +_ttbl_base = ORIGIN (SDRAM_MMU); + +INCLUDE linkcmds.armv4 diff --git a/bsps/arm/gumstix/start/memmap.c b/bsps/arm/gumstix/start/memmap.c new file mode 100644 index 0000000000..8923083576 --- /dev/null +++ b/bsps/arm/gumstix/start/memmap.c @@ -0,0 +1,17 @@ +/* + * Gumstix Memory Map + * 2008 By Yang Xi + * Copyright (c) 2004 by Cogent Computer Systems + * Written by Jay Monkman + */ + +#include +#include + +mmu_sect_map_t mem_map[] = { +/* */ + {0x40000000, 0x40000000, 1216, MMU_CACHE_NONE}, /*Map I/O*/ + {0xA0000000, 0x00000000, 1, MMU_CACHE_NONE}, /*sram*/ + {0xA0000000, 0xA0000000, 64, MMU_CACHE_WBACK}, /* SDRAM */ + {0x00000000, 0x00000000, 0, 0} /* The end */ +}; -- cgit v1.2.3