diff options
Diffstat (limited to 'c/src/lib/libbsp/powerpc/mpc55xxevb')
7 files changed, 35 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.gwlcfm b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.gwlcfm index 42e6bb2aca..3f1bd3d9e4 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.gwlcfm +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.gwlcfm @@ -22,5 +22,6 @@ REGION_ALIAS ("REGION_RWEXTRA", RAM_EXT); REGION_ALIAS ("REGION_WORK", RAM_EXT); REGION_ALIAS ("REGION_STACK", RAM); REGION_ALIAS ("REGION_NOCACHE", NOCACHE); +REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE); INCLUDE linkcmds.mpc55xx diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb index c8bbb59d58..1989473d3d 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5566evb @@ -22,5 +22,6 @@ REGION_ALIAS ("REGION_RWEXTRA", RAM_EXT); REGION_ALIAS ("REGION_WORK", RAM_EXT); REGION_ALIAS ("REGION_STACK", RAM); REGION_ALIAS ("REGION_NOCACHE", NOCACHE); +REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE); INCLUDE linkcmds.mpc55xx diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674fevb b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674fevb index 49362b8979..cb7c1ed7b0 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674fevb +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674fevb @@ -22,5 +22,6 @@ REGION_ALIAS ("REGION_RWEXTRA", RAM_EXT); REGION_ALIAS ("REGION_WORK", RAM_EXT); REGION_ALIAS ("REGION_STACK", RAM); REGION_ALIAS ("REGION_NOCACHE", NOCACHE); +REGION_ALIAS ("REGION_NOCACHE_LOAD", ROM); INCLUDE linkcmds.mpc55xx diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.phycore_mpc5554 b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.phycore_mpc5554 index 450193b9bf..18a0e8f44d 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.phycore_mpc5554 +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.phycore_mpc5554 @@ -31,5 +31,6 @@ REGION_ALIAS ("REGION_RWEXTRA", RAM_EXT); REGION_ALIAS ("REGION_WORK", RAM_EXT); REGION_ALIAS ("REGION_STACK", RAM); REGION_ALIAS ("REGION_NOCACHE", NOCACHE); +REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE); INCLUDE linkcmds.mpc55xx diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.xkt564levb b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.xkt564levb index 72d3762da3..98cc0bc78a 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.xkt564levb +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.xkt564levb @@ -27,5 +27,6 @@ REGION_ALIAS ("REGION_RWEXTRA", RAM_0); REGION_ALIAS ("REGION_WORK", RAM_1); REGION_ALIAS ("REGION_STACK", RAM_1); REGION_ALIAS ("REGION_NOCACHE", NOCACHE); +REGION_ALIAS ("REGION_NOCACHE_LOAD", NOCACHE); INCLUDE linkcmds.mpc55xx diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-early.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-early.c index 62cf8f58d7..daffc22ac1 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-early.c +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-early.c @@ -7,7 +7,7 @@ */ /* - * Copyright (c) 2008-2011 embedded brains GmbH. All rights reserved. + * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Obere Lagerstr. 30 @@ -23,6 +23,14 @@ #include <bsp.h> #include <bsp/start.h> #include <bsp/mpc55xx-config.h> +#include <bsp/linker-symbols.h> + +/* This function is defined in start.S */ +BSP_START_TEXT_SECTION void mpc55xx_start_load_section( + void *dst, + const void *src, + size_t n +); static BSP_START_TEXT_SECTION void mpc55xx_start_mmu(void) { @@ -53,6 +61,19 @@ static BSP_START_TEXT_SECTION void mpc55xx_start_internal_ram(void) #endif } +static BSP_START_TEXT_SECTION void mpc55xx_start_load_nocache_section(void) +{ + mpc55xx_start_load_section( + bsp_section_nocache_begin, + bsp_section_nocache_load_begin, + (size_t) bsp_section_nocache_size + ); + rtems_cache_flush_multiple_data_lines( + bsp_section_nocache_begin, + (size_t) bsp_section_nocache_size + ); +} + static BSP_START_TEXT_SECTION void mpc55xx_start_mode_change(void) { #ifdef MPC55XX_HAS_MODE_CONTROL @@ -167,6 +188,7 @@ BSP_START_TEXT_SECTION void mpc55xx_start_early(void) mpc55xx_start_cache(); #endif mpc55xx_start_internal_ram(); + mpc55xx_start_load_nocache_section(); mpc55xx_start_mmu(); mpc55xx_start_mode_change(); mpc55xx_start_siu(); diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S index f05e2c7f1c..0b54b75734 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start.S @@ -7,7 +7,7 @@ */ /* - * Copyright (c) 2008-2011 embedded brains GmbH. All rights reserved. + * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Obere Lagerstr. 30 @@ -21,7 +21,7 @@ */ #include <bspopts.h> - +#include <bsp/linker-symbols.h> #include <libcpu/powerpc-utility.h> #if MPC55XX_CHIP_TYPE / 10 != 551 @@ -41,20 +41,12 @@ .extern __eabi .extern boot_card .extern bsp_ram_start - .extern bsp_section_data_begin - .extern bsp_section_data_load_begin - .extern bsp_section_data_size - .extern bsp_section_fast_data_begin - .extern bsp_section_fast_data_load_begin - .extern bsp_section_fast_data_size - .extern bsp_section_fast_text_begin - .extern bsp_section_fast_text_load_begin - .extern bsp_section_fast_text_size .extern mpc55xx_start_config_mmu_early .extern mpc55xx_start_config_mmu_early_count .extern mpc55xx_start_early .globl _start + .globl mpc55xx_start_load_section .globl mpc55xx_start_mmu_apply_config #ifdef MPC55XX_BOOTFLAGS @@ -225,15 +217,15 @@ zero_intermediate_stack_loop: LA r3, bsp_section_fast_text_begin LA r4, bsp_section_fast_text_load_begin LA r5, bsp_section_fast_text_size - bl load_section + bl mpc55xx_start_load_section LA r3, bsp_section_fast_data_begin LA r4, bsp_section_fast_data_load_begin LA r5, bsp_section_fast_data_size - bl load_section + bl mpc55xx_start_load_section LA r3, bsp_section_data_begin LA r4, bsp_section_data_load_begin LA r5, bsp_section_data_size - bl load_section + bl mpc55xx_start_load_section /* Set up EABI and SYSV environment */ bl __eabi @@ -270,7 +262,7 @@ mmu_init_loop: bdnz mmu_init_loop blr -load_section: +mpc55xx_start_load_section: cmpw cr7, r3, r4 beqlr cr7 b memcpy |