mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
bsp/tms570: Improve POM handling
Place the vector table in the start section so that the overlay can be avoided if we execute from internal flash. The problem is that when the POM is enabled, the ECC cannot be enabled for the internal flash.
This commit is contained in:
@@ -24,6 +24,7 @@ REGION_ALIAS ("REGION_STACK", RAM_INT);
|
||||
REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
|
||||
REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
|
||||
|
||||
bsp_vector_table_in_start_section = 1;
|
||||
bsp_int_vec_overlay_start = ORIGIN(RAM_INT_VEC);
|
||||
|
||||
INCLUDE linkcmds.armv4
|
||||
|
||||
@@ -24,6 +24,7 @@ REGION_ALIAS ("REGION_STACK", RAM_INT);
|
||||
REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
|
||||
REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
|
||||
|
||||
bsp_vector_table_in_start_section = 1;
|
||||
bsp_int_vec_overlay_start = ORIGIN(RAM_INT_VEC);
|
||||
|
||||
INCLUDE linkcmds.armv4
|
||||
|
||||
@@ -24,6 +24,7 @@ REGION_ALIAS ("REGION_STACK", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_NOCACHE", RAM_EXT);
|
||||
REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_EXT);
|
||||
|
||||
bsp_vector_table_in_start_section = 1;
|
||||
bsp_int_vec_overlay_start = ORIGIN(RAM_INT_VEC);
|
||||
|
||||
INCLUDE linkcmds.armv4
|
||||
|
||||
@@ -25,6 +25,7 @@ REGION_ALIAS ("REGION_STACK", RAM_INT);
|
||||
REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
|
||||
REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
|
||||
|
||||
bsp_vector_table_in_start_section = 1;
|
||||
bsp_int_vec_overlay_start = ORIGIN(RAM_INT_VEC);
|
||||
|
||||
INCLUDE linkcmds.armv4
|
||||
|
||||
@@ -87,7 +87,12 @@ void tms570_initialize_and_clear(void)
|
||||
*/
|
||||
void tms570_pom_remap(void)
|
||||
{
|
||||
uint32_t vec_overlay_start = pom_global_overlay_target_address_start;
|
||||
void *vec_overlay_start = (void *) pom_global_overlay_target_address_start;
|
||||
void *addr_tab = (char *) bsp_start_vector_table_begin + 64;
|
||||
|
||||
if (vec_overlay_start == addr_tab) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy RTEMS the first level exception processing code
|
||||
@@ -99,7 +104,10 @@ void tms570_pom_remap(void)
|
||||
* table found in
|
||||
* c/src/lib/libbsp/arm/shared/start/start.S
|
||||
*/
|
||||
memcpy((void*)vec_overlay_start, bsp_start_vector_table_begin, 64);
|
||||
rtems_cache_invalidate_multiple_data_lines(addr_tab, 64);
|
||||
memcpy(vec_overlay_start, addr_tab, 64);
|
||||
rtems_cache_flush_multiple_data_lines(vec_overlay_start, 64);
|
||||
rtems_cache_invalidate_multiple_instruction_lines(vec_overlay_start, 64);
|
||||
|
||||
#if 0
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user