summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2013-10-28 21:31:12 +0000
committerzbb <zbb@FreeBSD.org>2013-10-28 21:31:12 +0000
commitf48484777bf9ba963f4b00e5049695a66e902bd8 (patch)
treedb5f80781e98006413017666871807c632dbb5e4
parent306cd242d2ea333c51fa3a8f9c60db415aa911cb (diff)
downloadFreeBSD-src-f48484777bf9ba963f4b00e5049695a66e902bd8.zip
FreeBSD-src-f48484777bf9ba963f4b00e5049695a66e902bd8.tar.gz
Remove hard-coded mappings related to Armada XP support
Armada XP initialization flow requires SoC registers to be mapped very early in order to configure Snoop Filter for SMP. Additional mapping in locore.S is redundant as proper mapping is made in pmap_devmap_bootstrap() prior to calling cpu_setup() which configures the Snoop Filter. For secondaru CPUs it is better to pass VA of the SoC registers defined in MV_BASE and PA consistent with the value in the Device Tree. Tested by: kevlo
-rw-r--r--sys/arm/arm/locore.S4
-rw-r--r--sys/arm/arm/mp_machdep.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S
index ecd7f53..678f3bf 100644
--- a/sys/arm/arm/locore.S
+++ b/sys/arm/arm/locore.S
@@ -266,10 +266,6 @@ mmu_init_table:
/* map VA 0xc0000000..0xc3ffffff to PA */
MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW))
MMU_INIT(0x48000000, 0x48000000, 1, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW))
-#if defined(CPU_MV_PJ4B)
- /* map VA 0xf1000000..0xf1100000 to PA 0xd0000000 */
- MMU_INIT(0xf1000000, 0xd0000000, 1, L1_TYPE_S|L1_SHARED|L1_S_B|L1_S_AP(AP_KRW))
-#endif /* CPU_MV_PJ4B */
#endif /* SMP */
.word 0 /* end of table */
#endif
diff --git a/sys/arm/arm/mp_machdep.c b/sys/arm/arm/mp_machdep.c
index 2e5e1d3..c62e311 100644
--- a/sys/arm/arm/mp_machdep.c
+++ b/sys/arm/arm/mp_machdep.c
@@ -52,6 +52,10 @@ __FBSDID("$FreeBSD$");
#ifdef VFP
#include <machine/vfp.h>
#endif
+#ifdef CPU_MV_PJ4B
+#include <arm/mv/mvwin.h>
+#include <dev/fdt/fdt_common.h>
+#endif
#include "opt_smp.h"
@@ -131,8 +135,8 @@ cpu_mp_start(void)
#if defined(CPU_MV_PJ4B)
/* Add ARMADAXP registers required for snoop filter initialization */
- ((int *)(temp_pagetable_va))[0xf1000000 >> L1_S_SHIFT] =
- L1_TYPE_S|L1_SHARED|L1_S_B|L1_S_AP(AP_KRW)|0xd0000000;
+ ((int *)(temp_pagetable_va))[MV_BASE >> L1_S_SHIFT] =
+ L1_TYPE_S|L1_SHARED|L1_S_B|L1_S_AP(AP_KRW)|fdt_immr_pa;
#endif
temp_pagetable = (void*)(vtophys(temp_pagetable_va));
OpenPOWER on IntegriCloud