From owner-svn-src-all@freebsd.org Sun Jan 7 02:57:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76ED6E5FCA5; Sun, 7 Jan 2018 02:57:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52AD070512; Sun, 7 Jan 2018 02:57:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 80C4B1B5B8; Sun, 7 Jan 2018 02:57:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w072vaDT001922; Sun, 7 Jan 2018 02:57:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w072vaBA001919; Sun, 7 Jan 2018 02:57:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801070257.w072vaBA001919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 7 Jan 2018 02:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327667 - in stable/11/sys: arm/arm conf X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11/sys: arm/arm conf X-SVN-Commit-Revision: 327667 X-SVN-Commit-Repository: base 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.25 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: Sun, 07 Jan 2018 02:57:37 -0000 Author: ian Date: Sun Jan 7 02:57:35 2018 New Revision: 327667 URL: https://svnweb.freebsd.org/changeset/base/327667 Log: MFC r327222: Add a new ARM kernel option, LOCORE_MAP_MB, to control the size of the kernel VA mapping in the temporary page tables set up by locore-v6.S. The number used to be hard-coded to 64MB, which is still the default if the kernel option is not specified. However, 64MB is insufficient for using a large mdroot filesystem. The hard-coded number can't be safely increased because too large a number may run into memory-mapped IO space on some SoCs that must not be mapped as ordinary memory. Modified: stable/11/sys/arm/arm/genassym.c stable/11/sys/arm/arm/locore-v6.S stable/11/sys/conf/options.arm Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/genassym.c ============================================================================== --- stable/11/sys/arm/arm/genassym.c Sun Jan 7 02:30:08 2018 (r327666) +++ stable/11/sys/arm/arm/genassym.c Sun Jan 7 02:57:35 2018 (r327667) @@ -161,3 +161,12 @@ ASSYM(DCACHE_LINE_SIZE, offsetof(struct cpuinfo, dcach ASSYM(DCACHE_LINE_MASK, offsetof(struct cpuinfo, dcache_line_mask)); ASSYM(ICACHE_LINE_SIZE, offsetof(struct cpuinfo, icache_line_size)); ASSYM(ICACHE_LINE_MASK, offsetof(struct cpuinfo, icache_line_mask)); + +/* + * Emit the LOCORE_MAP_MB option as a #define only if the option was set. + */ +#include "opt_locore.h" + +#ifdef LOCORE_MAP_MB +ASSYM(LOCORE_MAP_MB, LOCORE_MAP_MB); +#endif Modified: stable/11/sys/arm/arm/locore-v6.S ============================================================================== --- stable/11/sys/arm/arm/locore-v6.S Sun Jan 7 02:30:08 2018 (r327666) +++ stable/11/sys/arm/arm/locore-v6.S Sun Jan 7 02:57:35 2018 (r327667) @@ -38,6 +38,10 @@ __FBSDID("$FreeBSD$"); +/* We map 64MB of kernel unless overridden in assym.s by the kernel option. */ +#ifndef LOCORE_MAP_MB +#define LOCORE_MAP_MB 64 +#endif #if __ARM_ARCH >= 7 #if defined(__ARM_ARCH_7VE__) || defined(__clang__) @@ -172,12 +176,13 @@ ASENTRY_NP(_start) bl build_pagetables /* - * Next we do 64MiB starting at the physical load address, mapped to - * the VA the kernel is linked for. + * Next we map the kernel starting at the physical load address, mapped + * to the VA the kernel is linked for. The default size we map is 64MiB + * but it can be overridden with a kernel option. */ mov r1, r5 ldr r2, =(KERNVIRTADDR) - mov r3, #64 + ldr r3, =(LOCORE_MAP_MB) bl build_pagetables /* Create a device mapping for early_printf if specified. */ Modified: stable/11/sys/conf/options.arm ============================================================================== --- stable/11/sys/conf/options.arm Sun Jan 7 02:30:08 2018 (r327666) +++ stable/11/sys/conf/options.arm Sun Jan 7 02:57:35 2018 (r327667) @@ -34,6 +34,7 @@ KERNVIRTADDR opt_global.h LINUX_BOOT_ABI opt_global.h LOADERRAMADDR opt_global.h MULTIDELAY opt_global.h +LOCORE_MAP_MB opt_locore.h PHYSADDR opt_global.h PLATFORM opt_global.h PLATFORM_SMP opt_global.h