bsps/arm: Define index of the workspace entry.

The imx BSP contained a hack to change the workspace entry of the MMU
table. This makes the used define visible for other BSPs too so that the
same hack can be used for example in raspberry pi too.
This commit is contained in:
Christian Mauderer
2019-12-27 22:08:11 +01:00
parent a546de5249
commit c51f1fc526
2 changed files with 6 additions and 5 deletions

View File

@@ -24,8 +24,6 @@
#include <libfdt.h>
#define WORKSPACE_ENTRY_INDEX 8
BSP_START_DATA_SECTION static arm_cp15_start_section_config
imx_mmu_config_table[] = {
ARMV7_CP15_START_DEFAULT_SECTIONS,
@@ -68,7 +66,8 @@ BSP_START_TEXT_SECTION static void setup_mmu_and_cache(void)
size -= 4;
}
imx_mmu_config_table[WORKSPACE_ENTRY_INDEX].end = begin + size;
imx_mmu_config_table[ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX].end =
begin + size;
}
}
@@ -112,8 +111,8 @@ void bsp_work_area_initialize(void)
uintptr_t begin;
uintptr_t end;
begin = imx_mmu_config_table[WORKSPACE_ENTRY_INDEX].begin;
end = imx_mmu_config_table[WORKSPACE_ENTRY_INDEX].end;
begin = imx_mmu_config_table[ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX].begin;
end = imx_mmu_config_table[ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX].end;
bsp_work_area_initialize_default((void *) begin, end - begin);
}

View File

@@ -95,6 +95,8 @@ typedef struct {
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \
}
#define ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX 8
BSP_START_DATA_SECTION extern const arm_cp15_start_section_config
arm_cp15_start_mmu_config_table[];