diff options
Diffstat (limited to 'bsps/arm/lpc32xx/start')
-rw-r--r-- | bsps/arm/lpc32xx/start/boot.c | 32 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/bspidle.c | 31 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/bspreset.c | 31 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/bspstart.c | 31 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/bspstarthooks.c | 31 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/emc.c | 32 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/linkcmds.lpc32xx | 2 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx | 22 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_1 | 20 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_2 | 22 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/linkcmds.lpc32xx_phycore | 21 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/mmu.c | 81 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/restart.c | 31 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/system-clocks.c | 31 | ||||
-rw-r--r-- | bsps/arm/lpc32xx/start/timer.c | 32 |
15 files changed, 285 insertions, 165 deletions
diff --git a/bsps/arm/lpc32xx/start/boot.c b/bsps/arm/lpc32xx/start/boot.c index 431273a8c6..84577d105b 100644 --- a/bsps/arm/lpc32xx/start/boot.c +++ b/bsps/arm/lpc32xx/start/boot.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -7,16 +9,28 @@ */ /* - * Copyright (c) 2010 - * embedded brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Copyright (c) 2010 embedded brains GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #include <string.h> diff --git a/bsps/arm/lpc32xx/start/bspidle.c b/bsps/arm/lpc32xx/start/bspidle.c index 5324479fb5..17f195b8fa 100644 --- a/bsps/arm/lpc32xx/start/bspidle.c +++ b/bsps/arm/lpc32xx/start/bspidle.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -7,17 +9,28 @@ */ /* - * Copyright (c) 2012 embedded brains GmbH. All rights reserved. + * Copyright (c) 2012 embedded brains GmbH & Co. KG * - * embedded brains GmbH - * Obere Lagerstr. 30 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #include <bsp.h> diff --git a/bsps/arm/lpc32xx/start/bspreset.c b/bsps/arm/lpc32xx/start/bspreset.c index ba1165c551..26da2037c5 100644 --- a/bsps/arm/lpc32xx/start/bspreset.c +++ b/bsps/arm/lpc32xx/start/bspreset.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -7,17 +9,28 @@ */ /* - * Copyright (c) 2009-2010 embedded brains GmbH. All rights reserved. + * Copyright (C) 2009, 2010 embedded brains GmbH & Co. KG * - * embedded brains GmbH - * Obere Lagerstr. 30 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #include <stdbool.h> diff --git a/bsps/arm/lpc32xx/start/bspstart.c b/bsps/arm/lpc32xx/start/bspstart.c index 3bc9792265..7b6c1230f3 100644 --- a/bsps/arm/lpc32xx/start/bspstart.c +++ b/bsps/arm/lpc32xx/start/bspstart.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -7,17 +9,28 @@ */ /* - * Copyright (c) 2009-2014 embedded brains GmbH. All rights reserved. + * Copyright (C) 2009, 2014 embedded brains GmbH & Co. KG * - * embedded brains GmbH - * Obere Lagerstr. 30 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #include <rtems/counter.h> diff --git a/bsps/arm/lpc32xx/start/bspstarthooks.c b/bsps/arm/lpc32xx/start/bspstarthooks.c index 8e79ce479f..213cb43c19 100644 --- a/bsps/arm/lpc32xx/start/bspstarthooks.c +++ b/bsps/arm/lpc32xx/start/bspstarthooks.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -7,17 +9,28 @@ */ /* - * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved. + * Copyright (C) 2009, 2013 embedded brains GmbH & Co. KG * - * embedded brains GmbH - * Dornierstr. 4 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #define ARM_CP15_TEXT_SECTION BSP_START_TEXT_SECTION diff --git a/bsps/arm/lpc32xx/start/emc.c b/bsps/arm/lpc32xx/start/emc.c index d8b82e7051..5d1bea77b5 100644 --- a/bsps/arm/lpc32xx/start/emc.c +++ b/bsps/arm/lpc32xx/start/emc.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -7,16 +9,28 @@ */ /* - * Copyright (c) 2010 - * embedded brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Copyright (c) 2010 embedded brains GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #include <bsp/emc.h> diff --git a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx index 200e7f3e04..f38f7903b2 100644 --- a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx +++ b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx @@ -12,6 +12,6 @@ lpc32xx = 0x20020000; lpc32xx_magic_zero_begin = 0x05000000; lpc32xx_magic_zero_end = 0x07000000; -lpc32xx_magic_zero_size = lpc32xx_magic_zero_end - lpc32xx_magic_zero_end; +lpc32xx_magic_zero_size = lpc32xx_magic_zero_end - lpc32xx_magic_zero_begin; INCLUDE linkcmds.armv4 diff --git a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx index cf388dfbba..b0d2ecd8a6 100644 --- a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx +++ b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx @@ -12,33 +12,13 @@ * @ingroup bsp_linker * * @brief MZX application memory map. - * - * <table> - * <tr><th>Region Name</th><th>Region Begin</th><th>Region Size</th></tr> - * <tr><td>RAM_INT</td><td>0x08000000</td><td>256k</td></tr> - * <tr><td>RAM_MMU</td><td>0x80000000</td><td>16k</td></tr> - * <tr><td>RAM_EXT</td><td>0x80004000</td><td>32M - 16k</td></tr> - * </table> - * - * <table> - * <tr><th>Section Name</th><th>Section Runtime Region</th><th>Section Load Region</th></tr> - * <tr><td>.start</td><td>RAM_EXT</td><td></td></tr> - * <tr><td>.vector</td><td>RAM_INT</td><td></td></tr> - * <tr><td>.text</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.rodata</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.data</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.fast</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.bss</td><td>RAM_EXT</td><td></td></tr> - * <tr><td>.work</td><td>RAM_EXT</td><td></td></tr> - * <tr><td>.stack</td><td>RAM_INT</td><td></td></tr> - * </table> */ MEMORY { RAM_INT : ORIGIN = 0x08000000, LENGTH = 256k RAM_MMU : ORIGIN = 0x80000000, LENGTH = 16k /* SDRAM on DYCS0 */ RAM_SCRATCH : ORIGIN = 0x80004000, LENGTH = 4k /* SDRAM on DYCS0 */ - RAM_EXT : ORIGIN = 0x80005000, LENGTH = 32M - 20k /* SDRAM on DYCS0 */ + RAM_EXT : ORIGIN = 0x80005000, LENGTH = 64M - 20k /* SDRAM on DYCS0 */ } REGION_ALIAS ("REGION_START", RAM_EXT); diff --git a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_1 b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_1 index eae076e235..d50f17d7b7 100644 --- a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_1 +++ b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_1 @@ -12,26 +12,6 @@ * @ingroup bsp_linker * * @brief MZX stage-1 program memory map. - * - * <table> - * <tr><th>Region Name</th><th>Region Begin</th><th>Region Size</th></tr> - * <tr><td>RAM_INT</td><td>0x08000000</td><td>232k</td></tr> - * <tr><td>RAM_MMU</td><td>0x0803a000</td><td>16k</td></tr> - * <tr><td>RAM_VEC</td><td>0x0803d000</td><td>8k</td></tr> - * </table> - * - * <table> - * <tr><th>Section Name</th><th>Section Runtime Region</th><th>Section Load Region</th></tr> - * <tr><td>.start</td><td>RAM_INT</td><td></td></tr> - * <tr><td>.vector</td><td>RAM_INT</td><td></td></tr> - * <tr><td>.text</td><td>RAM_INT</td><td>RAM_INT</td></tr> - * <tr><td>.rodata</td><td>RAM_INT</td><td>RAM_INT</td></tr> - * <tr><td>.data</td><td>RAM_INT</td><td>RAM_INT</td></tr> - * <tr><td>.fast</td><td>RAM_INT</td><td>RAM_INT</td></tr> - * <tr><td>.bss</td><td>RAM_INT</td><td></td></tr> - * <tr><td>.work</td><td>RAM_INT</td><td></td></tr> - * <tr><td>.stack</td><td>RAM_INT</td><td></td></tr> - * </table> */ MEMORY { diff --git a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_2 b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_2 index 2aa8c34091..4950ce735e 100644 --- a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_2 +++ b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_mzx_stage_2 @@ -12,26 +12,6 @@ * @ingroup bsp_linker * * @brief MZX stage-2 program memory map. - * - * <table> - * <tr><th>Region Name</th><th>Region Begin</th><th>Region Size</th></tr> - * <tr><td>RAM_INT</td><td>0x08000000</td><td>256k</td></tr> - * <tr><td>RAM_MMU</td><td>0x81c00000</td><td>16k</td></tr> - * <tr><td>RAM_EXT</td><td>0x81c04000</td><td>4M - 16k</td></tr> - * </table> - * - * <table> - * <tr><th>Section Name</th><th>Section Runtime Region</th><th>Section Load Region</th></tr> - * <tr><td>.start</td><td>RAM_EXT</td><td></td></tr> - * <tr><td>.vector</td><td>RAM_INT</td><td></td></tr> - * <tr><td>.text</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.rodata</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.data</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.fast</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.bss</td><td>RAM_EXT</td><td></td></tr> - * <tr><td>.work</td><td>RAM_EXT</td><td></td></tr> - * <tr><td>.stack</td><td>RAM_INT</td><td></td></tr> - * </table> */ MEMORY { @@ -39,7 +19,7 @@ MEMORY { RAM_FAST : ORIGIN = 0x0803c000, LENGTH = 16k RAM_MMU : ORIGIN = 0x80000000, LENGTH = 16k /* SDRAM on DYCS0 */ RAM_SCRATCH : ORIGIN = 0x80004000, LENGTH = 4k /* SDRAM on DYCS0 */ - RAM_EXT : ORIGIN = 0x81c00000, LENGTH = 4M /* SDRAM on DYCS0 */ + RAM_EXT : ORIGIN = 0x83000000, LENGTH = 16M /* SDRAM on DYCS0 */ } REGION_ALIAS ("REGION_START", RAM_EXT); diff --git a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_phycore b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_phycore index 2459da2557..34542a6dcb 100644 --- a/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_phycore +++ b/bsps/arm/lpc32xx/start/linkcmds.lpc32xx_phycore @@ -12,27 +12,6 @@ * @ingroup bsp_linker * * @brief phyCORE-LPC3250 memory map. - * - * <table> - * <tr><th>Region Name</th><th>Region Begin</th><th>Region Size</th></tr> - * <tr><td>RAM_INT</td><td>0x08000000</td><td>256k</td></tr> - * <tr><td>RAM_MMU</td><td>0x80000000</td><td>16k</td></tr> - * <tr><td>RAM_EXT</td><td>0x80004000</td><td>64M - 16k</td></tr> - * <tr><td>ROM_EXT</td><td>0xe0000000</td><td>2M</td></tr> - * </table> - * - * <table> - * <tr><th>Section Name</th><th>Section Runtime Region</th><th>Section Load Region</th></tr> - * <tr><td>.start</td><td>RAM_EXT</td><td></td></tr> - * <tr><td>.vector</td><td>RAM_INT</td><td></td></tr> - * <tr><td>.text</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.rodata</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.data</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.fast</td><td>RAM_EXT</td><td>RAM_EXT</td></tr> - * <tr><td>.bss</td><td>RAM_EXT</td><td></td></tr> - * <tr><td>.work</td><td>RAM_EXT</td><td></td></tr> - * <tr><td>.stack</td><td>RAM_INT</td><td></td></tr> - * </table> */ MEMORY { diff --git a/bsps/arm/lpc32xx/start/mmu.c b/bsps/arm/lpc32xx/start/mmu.c new file mode 100644 index 0000000000..0c2f355a45 --- /dev/null +++ b/bsps/arm/lpc32xx/start/mmu.c @@ -0,0 +1,81 @@ +/** + * @file + * + * @ingroup lpc32xx_mmu + * + * @brief MMU support implementation. + */ + +/* + * Copyright (c) 2010-2011 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Obere Lagerstr. 30 + * 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. + */ + +#include <bsp/mmu.h> + +static uint32_t disable_mmu(void) +{ + uint32_t ctrl = 0; + + arm_cp15_data_cache_test_and_clean_and_invalidate(); + + ctrl = arm_cp15_get_control(); + arm_cp15_set_control(ctrl & ~ARM_CP15_CTRL_M); + + arm_cp15_tlb_invalidate(); + + return ctrl; +} + +static void restore_mmu_control(uint32_t ctrl) +{ + arm_cp15_set_control(ctrl); +} + +static uint32_t set_translation_table_entries( + const void *begin, + const void *end, + uint32_t section_flags +) +{ + uint32_t *ttb = arm_cp15_get_translation_table_base(); + uint32_t i = ARM_MMU_SECT_GET_INDEX(begin); + uint32_t iend = ARM_MMU_SECT_GET_INDEX(ARM_MMU_SECT_MVA_ALIGN_UP(end)); + uint32_t ctrl = disable_mmu(); + uint32_t section_flags_of_first_entry = ttb [i]; + + while (i < iend) { + ttb [i] = (i << ARM_MMU_SECT_BASE_SHIFT) | section_flags; + ++i; + } + + restore_mmu_control(ctrl); + + return section_flags_of_first_entry; +} + +uint32_t lpc32xx_set_translation_table_entries( + const void *begin, + const void *end, + uint32_t section_flags +) +{ + rtems_interrupt_level level; + uint32_t section_flags_of_first_entry = 0; + + rtems_interrupt_disable(level); + section_flags_of_first_entry = + set_translation_table_entries(begin, end, section_flags); + rtems_interrupt_enable(level); + + return section_flags_of_first_entry; +} diff --git a/bsps/arm/lpc32xx/start/restart.c b/bsps/arm/lpc32xx/start/restart.c index be09b02e39..c92dfc6174 100644 --- a/bsps/arm/lpc32xx/start/restart.c +++ b/bsps/arm/lpc32xx/start/restart.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -7,17 +9,28 @@ */ /* - * Copyright (c) 2010, 2011 embedded brains GmbH. All rights reserved. + * Copyright (C) 2010, 2011 embedded brains GmbH & Co. KG * - * embedded brains GmbH - * Obere Lagerstr. 30 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #include <rtems.h> diff --git a/bsps/arm/lpc32xx/start/system-clocks.c b/bsps/arm/lpc32xx/start/system-clocks.c index e38e5c62b1..a82d8c2bd7 100644 --- a/bsps/arm/lpc32xx/start/system-clocks.c +++ b/bsps/arm/lpc32xx/start/system-clocks.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -7,17 +9,28 @@ */ /* - * Copyright (c) 2011 embedded brains GmbH. All rights reserved. + * Copyright (c) 2011 embedded brains GmbH & Co. KG * - * embedded brains GmbH - * Obere Lagerstr. 30 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #include <bsp.h> diff --git a/bsps/arm/lpc32xx/start/timer.c b/bsps/arm/lpc32xx/start/timer.c index 5b156ffb37..998bc73f7f 100644 --- a/bsps/arm/lpc32xx/start/timer.c +++ b/bsps/arm/lpc32xx/start/timer.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -7,16 +9,28 @@ */ /* - * Copyright (c) 2008, 2009 - * embedded brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * <rtems@embedded-brains.de> + * Copyright (C) 2008, 2009 embedded brains GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #include <rtems.h> |