Date: Mon, 28 Oct 2013 21:31:13 +0000 (UTC) From: Zbigniew Bodek <zbb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257278 - head/sys/arm/arm Message-ID: <201310282131.r9SLVDGD045953@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zbb Date: Mon Oct 28 21:31:12 2013 New Revision: 257278 URL: http://svnweb.freebsd.org/changeset/base/257278 Log: 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 Modified: head/sys/arm/arm/locore.S head/sys/arm/arm/mp_machdep.c Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Mon Oct 28 21:11:28 2013 (r257277) +++ head/sys/arm/arm/locore.S Mon Oct 28 21:31:12 2013 (r257278) @@ -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 Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Mon Oct 28 21:11:28 2013 (r257277) +++ head/sys/arm/arm/mp_machdep.c Mon Oct 28 21:31:12 2013 (r257278) @@ -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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310282131.r9SLVDGD045953>