From owner-svn-src-head@freebsd.org Sat Dec 30 00:20:53 2017 Return-Path: Delivered-To: svn-src-head@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 3415CE85523; Sat, 30 Dec 2017 00:20:53 +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 mx1.freebsd.org (Postfix) with ESMTPS id D98F06347F; Sat, 30 Dec 2017 00:20:52 +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 vBU0KpMW008435; Sat, 30 Dec 2017 00:20:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBU0KnGF008410; Sat, 30 Dec 2017 00:20:49 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201712300020.vBU0KnGF008410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 30 Dec 2017 00:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327367 - in head/sys: arm/allwinner arm/altera/socfpga arm/arm arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/freescale/vybrid arm/include arm/mv/armada38x arm/mv/armadaxp arm/nvi... X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/altera/socfpga arm/arm arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/freescale/vybrid arm/include arm/mv/armada38x arm/mv/armadaxp arm/nvidia/tegra124 arm/rockchip... X-SVN-Commit-Revision: 327367 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2017 00:20:53 -0000 Author: ian Date: Sat Dec 30 00:20:49 2017 New Revision: 327367 URL: https://svnweb.freebsd.org/changeset/base/327367 Log: Make kernel option KERNVIRTADDR optional, remove it from std. files that can use the default value. It used to be required that the low-order bits of KERNVIRTADDR matched the low-order bits of the physical load address for all arm platforms. That hasn't been a requirement for armv6 platforms since FreeBSD 10. There is no longer any relationship between load addr and KERNVIRTADDR except that both must be aligned to a 2 MiB boundary. This change makes the default KERNVIRTADDR value 0xc0000000, and removes the options from all the platforms that can use the default value. The default is now defined in vmparam.h, and that file is now included in a few new places that reference KERNVIRTADDR, since it may not come in via the forced-include of opt_global.h on the compile command line. Modified: head/sys/arm/allwinner/std.allwinner head/sys/arm/allwinner/std.allwinner_up head/sys/arm/altera/socfpga/std.socfpga head/sys/arm/arm/dump_machdep.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/genassym.c head/sys/arm/arm/machdep_boot.c head/sys/arm/broadcom/bcm2835/std.rpi head/sys/arm/conf/GENERIC head/sys/arm/conf/NOTES head/sys/arm/freescale/imx/std.imx51 head/sys/arm/freescale/imx/std.imx53 head/sys/arm/freescale/imx/std.imx6 head/sys/arm/freescale/vybrid/std.vybrid head/sys/arm/include/vmparam.h head/sys/arm/mv/armada38x/std.armada38x head/sys/arm/mv/armadaxp/std.armadaxp head/sys/arm/nvidia/tegra124/std.tegra124 head/sys/arm/rockchip/std.rk30xx head/sys/arm/samsung/exynos/std.exynos5250 head/sys/arm/samsung/exynos/std.exynos5420 head/sys/arm/ti/am335x/std.am335x head/sys/arm/ti/omap4/std.omap4 head/sys/arm/xilinx/std.zynq7 head/sys/conf/Makefile.arm Modified: head/sys/arm/allwinner/std.allwinner ============================================================================== --- head/sys/arm/allwinner/std.allwinner Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/allwinner/std.allwinner Sat Dec 30 00:20:49 2017 (r327367) @@ -5,9 +5,6 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -makeoptions KERNVIRTADDR=0xc0200000 -options KERNVIRTADDR=0xc0200000 - options IPI_IRQ_START=0 options IPI_IRQ_END=15 Modified: head/sys/arm/allwinner/std.allwinner_up ============================================================================== --- head/sys/arm/allwinner/std.allwinner_up Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/allwinner/std.allwinner_up Sat Dec 30 00:20:49 2017 (r327367) @@ -5,9 +5,6 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -makeoptions KERNVIRTADDR=0xc0200000 -options KERNVIRTADDR=0xc0200000 - files "../allwinner/files.allwinner_up" files "../allwinner/files.allwinner" files "../allwinner/a10/files.a10" Modified: head/sys/arm/altera/socfpga/std.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/std.socfpga Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/altera/socfpga/std.socfpga Sat Dec 30 00:20:49 2017 (r327367) @@ -4,9 +4,6 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -makeoptions KERNVIRTADDR=0xc0f00000 -options KERNVIRTADDR=0xc0f00000 - options IPI_IRQ_START=0 options IPI_IRQ_END=15 Modified: head/sys/arm/arm/dump_machdep.c ============================================================================== --- head/sys/arm/arm/dump_machdep.c Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/arm/dump_machdep.c Sat Dec 30 00:20:49 2017 (r327367) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* For KERNVIRTADDR */ int do_minidump = 1; SYSCTL_INT(_debug, OID_AUTO, minidump, CTLFLAG_RWTUN, &do_minidump, 0, Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/arm/elf_trampoline.c Sat Dec 30 00:20:49 2017 (r327367) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* For KERNVIRTADDR */ #if __ARM_ARCH >= 6 #error "elf_trampline is not supported on ARMv6/v7 platforms" Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/arm/genassym.c Sat Dec 30 00:20:49 2017 (r327367) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* For KERNVIRTADDR */ #include #include @@ -59,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include ASSYM(KERNBASE, KERNBASE); +ASSYM(KERNVIRTADDR, KERNVIRTADDR); #if __ARM_ARCH >= 6 ASSYM(CPU_ASID_KERNEL,CPU_ASID_KERNEL); #endif Modified: head/sys/arm/arm/machdep_boot.c ============================================================================== --- head/sys/arm/arm/machdep_boot.c Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/arm/machdep_boot.c Sat Dec 30 00:20:49 2017 (r327367) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* For KERNVIRTADDR */ #ifdef FDT #include Modified: head/sys/arm/broadcom/bcm2835/std.rpi ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.rpi Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/broadcom/bcm2835/std.rpi Sat Dec 30 00:20:49 2017 (r327367) @@ -1,5 +1,3 @@ # $FreeBSD$ -options KERNVIRTADDR=0xc0100000 -makeoptions KERNVIRTADDR=0xc0100000 options LINUX_BOOT_ABI Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/conf/GENERIC Sat Dec 30 00:20:49 2017 (r327367) @@ -25,9 +25,6 @@ options SMP_ON_UP machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -makeoptions KERNVIRTADDR=0xc0000000 -options KERNVIRTADDR=0xc0000000 - include "std.armv7" files "../allwinner/files.allwinner" files "../allwinner/files.allwinner_up" Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/conf/NOTES Sat Dec 30 00:20:49 2017 (r327367) @@ -24,11 +24,9 @@ files "../xscale/ixp425/files.ixp425" files "../xscale/pxa/files.pxa" options PHYSADDR=0x00000000 -options KERNVIRTADDR=0xc0000000 makeoptions LDFLAGS="-zmuldefs" makeoptions KERNPHYSADDR=0x00000000 -makeoptions KERNVIRTADDR=0xc0000000 options FDT Modified: head/sys/arm/freescale/imx/std.imx51 ============================================================================== --- head/sys/arm/freescale/imx/std.imx51 Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/freescale/imx/std.imx51 Sat Dec 30 00:20:49 2017 (r327367) @@ -3,9 +3,6 @@ machine arm armv7 cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" -options KERNVIRTADDR=0xc0100000 -makeoptions KERNVIRTADDR=0xc0100000 - device fdt_pinctrl files "../freescale/imx/files.imx5" Modified: head/sys/arm/freescale/imx/std.imx53 ============================================================================== --- head/sys/arm/freescale/imx/std.imx53 Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/freescale/imx/std.imx53 Sat Dec 30 00:20:49 2017 (r327367) @@ -3,9 +3,6 @@ machine arm armv7 cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" -options KERNVIRTADDR=0xc0100000 -makeoptions KERNVIRTADDR=0xc0100000 - device fdt_pinctrl files "../freescale/imx/files.imx5" Modified: head/sys/arm/freescale/imx/std.imx6 ============================================================================== --- head/sys/arm/freescale/imx/std.imx6 Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/freescale/imx/std.imx6 Sat Dec 30 00:20:49 2017 (r327367) @@ -3,9 +3,6 @@ machine arm armv7 cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" -options KERNVIRTADDR = 0xc2000000 -makeoptions KERNVIRTADDR = 0xc2000000 - options IPI_IRQ_START=0 options IPI_IRQ_END=15 Modified: head/sys/arm/freescale/vybrid/std.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/std.vybrid Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/freescale/vybrid/std.vybrid Sat Dec 30 00:20:49 2017 (r327367) @@ -4,7 +4,4 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -makeoptions KERNVIRTADDR=0xc0100000 -options KERNVIRTADDR=0xc0100000 - files "../freescale/vybrid/files.vybrid" Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/include/vmparam.h Sat Dec 30 00:20:49 2017 (r327367) @@ -75,6 +75,19 @@ #endif /* + * The virtual address the kernel is linked to run at. For armv4/5 platforms + * the low-order 30 bits of this must match the low-order bits of the physical + * address the kernel is loaded at, so the value is most often provided as a + * kernel config option in the std.platform file. For armv6/7 the kernel can + * be loaded at any 2MB boundary, and KERNVIRTADDR can also be set to any 2MB + * boundary. It is typically overridden in the std.platform file only when + * KERNBASE is also set to a lower address to provide more KVA. + */ +#ifndef KERNVIRTADDR +#define KERNVIRTADDR 0xc0000000 +#endif + +/* * max number of non-contig chunks of physical RAM you can have */ Modified: head/sys/arm/mv/armada38x/std.armada38x ============================================================================== --- head/sys/arm/mv/armada38x/std.armada38x Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/mv/armada38x/std.armada38x Sat Dec 30 00:20:49 2017 (r327367) @@ -5,8 +5,6 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -makeoptions KERNVIRTADDR=0xc0000000 -options KERNVIRTADDR=0xc0000000 options IPI_IRQ_START=0 options IPI_IRQ_END=15 Modified: head/sys/arm/mv/armadaxp/std.armadaxp ============================================================================== --- head/sys/arm/mv/armadaxp/std.armadaxp Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/mv/armadaxp/std.armadaxp Sat Dec 30 00:20:49 2017 (r327367) @@ -1,4 +1,2 @@ # $FreeBSD$ -makeoptions KERNVIRTADDR=0xc0200000 -options KERNVIRTADDR=0xc0200000 Modified: head/sys/arm/nvidia/tegra124/std.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/std.tegra124 Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/nvidia/tegra124/std.tegra124 Sat Dec 30 00:20:49 2017 (r327367) @@ -3,9 +3,6 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -options KERNVIRTADDR = 0xc0200000 -makeoptions KERNVIRTADDR = 0xc0200000 - options INTRNG options IPI_IRQ_START=0 Modified: head/sys/arm/rockchip/std.rk30xx ============================================================================== --- head/sys/arm/rockchip/std.rk30xx Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/rockchip/std.rk30xx Sat Dec 30 00:20:49 2017 (r327367) @@ -5,9 +5,6 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -makeoptions KERNVIRTADDR=0xc0400000 -options KERNVIRTADDR=0xc0400000 - options IPI_IRQ_START=0 options IPI_IRQ_END=15 Modified: head/sys/arm/samsung/exynos/std.exynos5250 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5250 Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/samsung/exynos/std.exynos5250 Sat Dec 30 00:20:49 2017 (r327367) @@ -4,9 +4,6 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -makeoptions KERNVIRTADDR=0xc0f00000 -options KERNVIRTADDR=0xc0f00000 - options IPI_IRQ_START=0 options IPI_IRQ_END=15 Modified: head/sys/arm/samsung/exynos/std.exynos5420 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5420 Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/samsung/exynos/std.exynos5420 Sat Dec 30 00:20:49 2017 (r327367) @@ -4,9 +4,6 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -makeoptions KERNVIRTADDR=0xc0f00000 -options KERNVIRTADDR=0xc0f00000 - options IPI_IRQ_START=0 options IPI_IRQ_END=15 Modified: head/sys/arm/ti/am335x/std.am335x ============================================================================== --- head/sys/arm/ti/am335x/std.am335x Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/ti/am335x/std.am335x Sat Dec 30 00:20:49 2017 (r327367) @@ -5,7 +5,4 @@ include "../ti/std.ti" cpu CPU_CORTEXA -options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm -makeoptions KERNVIRTADDR=0xc0200000 - options SOC_TI_AM335X Modified: head/sys/arm/ti/omap4/std.omap4 ============================================================================== --- head/sys/arm/ti/omap4/std.omap4 Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/ti/omap4/std.omap4 Sat Dec 30 00:20:49 2017 (r327367) @@ -5,7 +5,4 @@ include "../ti/std.ti" cpu CPU_CORTEXA -options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm -makeoptions KERNVIRTADDR=0xc0200000 - options SOC_OMAP4 Modified: head/sys/arm/xilinx/std.zynq7 ============================================================================== --- head/sys/arm/xilinx/std.zynq7 Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/arm/xilinx/std.zynq7 Sat Dec 30 00:20:49 2017 (r327367) @@ -9,8 +9,5 @@ makeoptions CONF_CFLAGS="-march=armv7a" files "../xilinx/files.zynq7" -options KERNVIRTADDR=0xc0100000 # Used in ldscript.arm -makeoptions KERNVIRTADDR=0xc0100000 - options IPI_IRQ_START=0 options IPI_IRQ_END=15 Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Fri Dec 29 23:58:05 2017 (r327366) +++ head/sys/conf/Makefile.arm Sat Dec 30 00:20:49 2017 (r327367) @@ -53,6 +53,11 @@ CFLAGS += -mllvm -arm-enable-ehabi .endif .endif +# "makeoptions KERNVIRTADDR=" is now optional, supply the default value. +.if empty(KERNVIRTADDR) +KERNVIRTADDR= 0xc0000000 +.endif + # hack because genassym.c includes sys/bus.h which includes these. genassym.o: bus_if.h device_if.h