From owner-svn-src-all@FreeBSD.ORG Mon Oct 28 21:31:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AC6221B6; Mon, 28 Oct 2013 21:31:13 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F8C4206E; Mon, 28 Oct 2013 21:31:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9SLVDGE045955; Mon, 28 Oct 2013 21:31:13 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9SLVDGD045953; Mon, 28 Oct 2013 21:31:13 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201310282131.r9SLVDGD045953@svn.freebsd.org> From: Zbigniew Bodek Date: Mon, 28 Oct 2013 21:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257278 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Oct 2013 21:31:13 -0000 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 #endif +#ifdef CPU_MV_PJ4B +#include +#include +#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));