Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Dec 2013 01:12:13 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r259377 - in stable/10/sys/arm: arm at91 econa s3c2xx0 sa11x0 xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa
Message-ID:  <201312140112.rBE1CDIF017564@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Sat Dec 14 01:12:13 2013
New Revision: 259377
URL: http://svnweb.freebsd.org/changeset/base/259377

Log:
  MFC r258392, r258412:
  
    Call cpu_setup() immediately after the page tables are installed.  This
    enables data cache and other chip-specific features.  It was previously
    done via an early SYSINIT, but it was being done after pmap and vm setup,
    and those setups need to use mutexes.  On some modern ARM platforms,
    the ldrex/strex instructions that implement mutexes require the data cache
    to be enabled.
  
    Call cpu_setup() from the initarm() routine on platforms that don't use
    the common FDT-aware initarm() in arm/machdep.c.

Modified:
  stable/10/sys/arm/arm/machdep.c
  stable/10/sys/arm/at91/at91_machdep.c
  stable/10/sys/arm/econa/econa_machdep.c
  stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c
  stable/10/sys/arm/sa11x0/assabet_machdep.c
  stable/10/sys/arm/xscale/i80321/ep80219_machdep.c
  stable/10/sys/arm/xscale/i80321/iq31244_machdep.c
  stable/10/sys/arm/xscale/i8134x/crb_machdep.c
  stable/10/sys/arm/xscale/ixp425/avila_machdep.c
  stable/10/sys/arm/xscale/pxa/pxa_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/machdep.c
==============================================================================
--- stable/10/sys/arm/arm/machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/arm/machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -361,7 +361,6 @@ cpu_startup(void *dummy)
 #endif
 #endif
 
-	cpu_setup("");
 	identify_arm_cpu();
 
 	printf("real memory  = %ju (%ju MB)\n", (uintmax_t)ptoa(physmem),
@@ -1427,6 +1426,12 @@ initarm(struct arm_boot_params *abp)
 	cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2));
 
 	/*
+	 * Now that proper page tables are installed, call cpu_setup() to enable
+	 * instruction and data caches and other chip-specific features.
+	 */
+	cpu_setup("");
+
+	/*
 	 * Only after the SOC registers block is mapped we can perform device
 	 * tree fixups, as they may attempt to read parameters from hardware.
 	 */

Modified: stable/10/sys/arm/at91/at91_machdep.c
==============================================================================
--- stable/10/sys/arm/at91/at91_machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/at91/at91_machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -604,6 +604,7 @@ initarm(struct arm_boot_params *abp)
 	 * of the stack memory.
 	 */
 	cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
+	cpu_setup("");
 
 	set_stackptrs(0);
 

Modified: stable/10/sys/arm/econa/econa_machdep.c
==============================================================================
--- stable/10/sys/arm/econa/econa_machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/econa/econa_machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -309,6 +309,7 @@ initarm(struct arm_boot_params *abp)
 	 * this problem will not occur after initarm().
 	 */
 	cpu_idcache_wbinv_all();
+	cpu_setup("");
 
 	/* Set stack for exception handlers */
 	data_abort_handler_address = (u_int)data_abort_handler;

Modified: stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c
==============================================================================
--- stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -355,6 +355,7 @@ initarm(struct arm_boot_params *abp)
 	 * this problem will not occur after initarm().
 	 */
 	cpu_idcache_wbinv_all();
+	cpu_setup("");
 
 	/* Disable all peripheral interrupts */
 	ioreg_write32(S3C24X0_INTCTL_BASE + INTCTL_INTMSK, ~0);

Modified: stable/10/sys/arm/sa11x0/assabet_machdep.c
==============================================================================
--- stable/10/sys/arm/sa11x0/assabet_machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/sa11x0/assabet_machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -371,6 +371,7 @@ initarm(struct arm_boot_params *abp)
 
 	cpufunc_control(0x337f, 0x107d);
 	arm_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL);
+	cpu_setup("");
 
 	pmap_curmaxkvaddr = freemempos + KERNEL_PT_VMDATA_NUM * 0x400000;
 

Modified: stable/10/sys/arm/xscale/i80321/ep80219_machdep.c
==============================================================================
--- stable/10/sys/arm/xscale/i80321/ep80219_machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/xscale/i80321/ep80219_machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -334,6 +334,8 @@ initarm(struct arm_boot_params *abp)
 	 * this problem will not occur after initarm().
 	 */
 	cpu_idcache_wbinv_all();
+	cpu_setup("");
+
 	/*
 	 * Fetch the SDRAM start/size from the i80321 SDRAM configration
 	 * registers.

Modified: stable/10/sys/arm/xscale/i80321/iq31244_machdep.c
==============================================================================
--- stable/10/sys/arm/xscale/i80321/iq31244_machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/xscale/i80321/iq31244_machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -335,6 +335,8 @@ initarm(struct arm_boot_params *abp)
 	 * this problem will not occur after initarm().
 	 */
 	cpu_idcache_wbinv_all();
+	cpu_setup("");
+
 	/*
 	 * Fetch the SDRAM start/size from the i80321 SDRAM configration
 	 * registers.

Modified: stable/10/sys/arm/xscale/i8134x/crb_machdep.c
==============================================================================
--- stable/10/sys/arm/xscale/i8134x/crb_machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/xscale/i8134x/crb_machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -320,6 +320,8 @@ initarm(struct arm_boot_params *abp)
 	 * this problem will not occur after initarm().
 	 */
 	cpu_idcache_wbinv_all();
+	cpu_setup("");
+
 	i80321_calibrate_delay();
 	i81342_sdram_bounds(&obio_bs_tag, IOP34X_VADDR, &memstart, &memsize);
 	physmem = memsize / PAGE_SIZE;

Modified: stable/10/sys/arm/xscale/ixp425/avila_machdep.c
==============================================================================
--- stable/10/sys/arm/xscale/ixp425/avila_machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/xscale/ixp425/avila_machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -405,6 +405,8 @@ initarm(struct arm_boot_params *abp)
 	 * this problem will not occur after initarm().
 	 */
 	cpu_idcache_wbinv_all();
+	cpu_setup("");
+
 	/* ready to setup the console (XXX move earlier if possible) */
 	cninit();
 	/*

Modified: stable/10/sys/arm/xscale/pxa/pxa_machdep.c
==============================================================================
--- stable/10/sys/arm/xscale/pxa/pxa_machdep.c	Sat Dec 14 01:01:32 2013	(r259376)
+++ stable/10/sys/arm/xscale/pxa/pxa_machdep.c	Sat Dec 14 01:12:13 2013	(r259377)
@@ -317,6 +317,7 @@ initarm(struct arm_boot_params *abp)
 	 * this problem will not occur after initarm().
 	 */
 	cpu_idcache_wbinv_all();
+	cpu_setup("");
 
 	/*
 	 * Sort out bus_space for on-board devices.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312140112.rBE1CDIF017564>