summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-02 13:32:44 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-03 09:10:13 +0100
commit73de9393e305e466028b60bcee84a7731043bf13 (patch)
treecc8f09a421a76ae61a9885004420c2849643ffa8
parente468ba5532232e2ea7bac6b0f5787e0a49008a53 (diff)
downloadrtems-73de9393e305e466028b60bcee84a7731043bf13.tar.bz2
bsp/qoriq: Do not touch MMU config for SMP start
Assume that the boot page is visible in the currently unused heap area.
-rw-r--r--c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c42
-rw-r--r--c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb2
2 files changed, 4 insertions, 40 deletions
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c b/c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c
index 119d3f023a..e84058a38f 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/bspsmp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2013, 2016 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -147,12 +147,9 @@ static void bsp_inter_processor_interrupt(void *arg)
static uboot_spin_table *spin_table_addr[QORIQ_CPU_COUNT / QORIQ_THREAD_COUNT];
#endif
-static uint32_t discover_processors(uint32_t *boot_begin, uint32_t *boot_last)
+static uint32_t discover_processors(void)
{
#if defined(HAS_UBOOT)
- *boot_begin = BOOT_BEGIN;
- *boot_last = BOOT_LAST;
-
return QORIQ_CPU_COUNT;
#elif defined(U_BOOT_USE_FDT)
const void *fdt = bsp_fdt_get();
@@ -185,9 +182,6 @@ static uint32_t discover_processors(uint32_t *boot_begin, uint32_t *boot_last)
node = fdt_next_subnode(fdt, node);
}
- *boot_begin = begin;
- *boot_last = last;
-
return cpu * QORIQ_THREAD_COUNT;
#endif
}
@@ -197,24 +191,7 @@ uint32_t _CPU_SMP_Initialize(void)
uint32_t cpu_count = 1;
if (rtems_configuration_get_maximum_processors() > 0) {
- qoriq_mmu_context mmu_context;
- uint32_t boot_begin;
- uint32_t boot_last;
-
- cpu_count = discover_processors(&boot_begin, &boot_last);
-
- qoriq_mmu_context_init(&mmu_context);
- qoriq_mmu_add(
- &mmu_context,
- boot_begin,
- boot_last,
- 0,
- 0,
- FSL_EIS_MAS3_SR | FSL_EIS_MAS3_SW,
- 0
- );
- qoriq_mmu_partition(&mmu_context, TLB_COUNT);
- qoriq_mmu_write_to_tlb1(&mmu_context, TLB_BEGIN);
+ cpu_count = discover_processors();
}
start_thread_if_necessary(0);
@@ -269,21 +246,8 @@ bool _CPU_SMP_Start_processor(uint32_t cpu_index)
#endif
}
-static void mmu_config_undo(void)
-{
- int i;
-
- for (i = TLB_BEGIN; i < TLB_END; ++i) {
- qoriq_tlb1_invalidate(i);
- }
-}
-
void _CPU_SMP_Finalize_initialization(uint32_t cpu_count)
{
- if (rtems_configuration_get_maximum_processors() > 0) {
- mmu_config_undo();
- }
-
if (cpu_count > 1) {
rtems_status_code sc;
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb
index 7360843856..9d1fed2ff2 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_p1020rdb
@@ -6,7 +6,7 @@
MEMORY {
LOW : ORIGIN = 0x4000, LENGTH = 16M - 16k
- HIGH : ORIGIN = 0x1000000, LENGTH = 32M
+ HIGH : ORIGIN = 0x1000000, LENGTH = 512M - 16M
EMPTY : ORIGIN = 0x0, LENGTH = 0
}