Date: Sat, 17 May 2014 18:53:37 +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: r266337 - in stable/10: contrib/llvm/patches lib/libc/arm/gen sys/arm/allwinner sys/arm/allwinner/a20 sys/arm/conf sys/arm/include sys/arm/rockchip sys/boot/fdt/dts/arm Message-ID: <201405171853.s4HIrbG7014102@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Sat May 17 18:53:36 2014 New Revision: 266337 URL: http://svnweb.freebsd.org/changeset/base/266337 Log: MFC 263631, 263637, 263664, 263676, 263679, 263698, 263711, Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores the current rounding mode used by the VFP unit. Simplify how we build MACHINE_ARCH. There are 3 options that may be set however only arm, armeb, armv6, and soon armv6hf will be used. Add the llvm/clang patch for r263619. Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are identical this allows us to build for both v6 and v7 together. Add code for enabling second CPU core for A20 SoC. Enable SMP on Cubieboard2. Switch to freebsd.org emal address in copyright. Added: stable/10/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff - copied unchanged from r263664, head/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff stable/10/sys/arm/allwinner/a20/a20_mp.c - copied unchanged from r263698, head/sys/arm/allwinner/a20/a20_mp.c Modified: stable/10/lib/libc/arm/gen/flt_rounds.c stable/10/sys/arm/allwinner/a10_clk.c stable/10/sys/arm/allwinner/a10_clk.h stable/10/sys/arm/allwinner/a10_common.c stable/10/sys/arm/allwinner/a10_ehci.c stable/10/sys/arm/allwinner/a10_gpio.c stable/10/sys/arm/allwinner/a10_gpio.h stable/10/sys/arm/allwinner/a10_machdep.c stable/10/sys/arm/allwinner/a10_sramc.c stable/10/sys/arm/allwinner/a10_sramc.h stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.h stable/10/sys/arm/allwinner/a20/files.a20 stable/10/sys/arm/allwinner/aintc.c stable/10/sys/arm/allwinner/console.c stable/10/sys/arm/allwinner/if_emac.c stable/10/sys/arm/allwinner/if_emacreg.h stable/10/sys/arm/allwinner/timer.c stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/include/param.h stable/10/sys/arm/include/pmap.h stable/10/sys/arm/rockchip/rk30xx_common.c stable/10/sys/arm/rockchip/rk30xx_gpio.c stable/10/sys/arm/rockchip/rk30xx_grf.c stable/10/sys/arm/rockchip/rk30xx_grf.h stable/10/sys/arm/rockchip/rk30xx_machdep.c stable/10/sys/arm/rockchip/rk30xx_pmu.c stable/10/sys/arm/rockchip/rk30xx_pmu.h stable/10/sys/arm/rockchip/rk30xx_wdog.c stable/10/sys/arm/rockchip/rk30xx_wdog.h stable/10/sys/boot/fdt/dts/arm/cubieboard.dts stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts stable/10/sys/boot/fdt/dts/arm/rk3188-radxa.dts stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Directory Properties: stable/10/ (props changed) Copied: stable/10/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff (from r263664, head/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff Sat May 17 18:53:36 2014 (r266337, copy of r263664, head/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff) @@ -0,0 +1,81 @@ +Index: tools/clang/lib/Driver/ToolChains.cpp +=================================================================== +--- tools/clang/lib/Driver/ToolChains.cpp ++++ tools/clang/lib/Driver/ToolChains.cpp +@@ -2034,6 +2034,7 @@ + bool FreeBSD::UseSjLjExceptions() const { + // FreeBSD uses SjLj exceptions on ARM oabi. + switch (getTriple().getEnvironment()) { ++ case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABI: + case llvm::Triple::EABI: + return false; +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp ++++ tools/clang/lib/Driver/Tools.cpp +@@ -737,8 +737,15 @@ + } + + case llvm::Triple::FreeBSD: +- // FreeBSD defaults to soft float +- FloatABI = "soft"; ++ switch(Triple.getEnvironment()) { ++ case llvm::Triple::GNUEABIHF: ++ FloatABI = "hard"; ++ break; ++ default: ++ // FreeBSD defaults to soft float ++ FloatABI = "soft"; ++ break; ++ } + break; + + default: +@@ -5776,8 +5783,18 @@ + } + } else if (getToolChain().getArch() == llvm::Triple::arm || + getToolChain().getArch() == llvm::Triple::thumb) { +- CmdArgs.push_back("-mfpu=softvfp"); ++ const Driver &D = getToolChain().getDriver(); ++ llvm::Triple Triple = getToolChain().getTriple(); ++ StringRef FloatABI = getARMFloatABI(D, Args, Triple); ++ ++ if (FloatABI == "hard") { ++ CmdArgs.push_back("-mfpu=vfp"); ++ } else { ++ CmdArgs.push_back("-mfpu=softvfp"); ++ } ++ + switch(getToolChain().getTriple().getEnvironment()) { ++ case llvm::Triple::GNUEABIHF: + case llvm::Triple::GNUEABI: + case llvm::Triple::EABI: + CmdArgs.push_back("-meabi=5"); +Index: tools/clang/test/Driver/freebsd.c +=================================================================== +--- tools/clang/test/Driver/freebsd.c ++++ tools/clang/test/Driver/freebsd.c +@@ -101,13 +101,22 @@ + // RUN: | FileCheck --check-prefix=CHECK-ARM %s + // CHECK-ARM: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions" + // CHECK-ARM: as{{.*}}" "-mfpu=softvfp"{{.*}}"-matpcs" ++// CHECK-ARM-EABI-NOT: as{{.*}}" "-mfpu=vfp" + + // RUN: %clang %s -### -target arm-gnueabi-freebsd10.0 2>&1 \ + // RUN: | FileCheck --check-prefix=CHECK-ARM-EABI %s + // CHECK-ARM-EABI-NOT: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions" + // CHECK-ARM-EABI: as{{.*}}" "-mfpu=softvfp" "-meabi=5" ++// CHECK-ARM-EABI-NOT: as{{.*}}" "-mfpu=vfp" + // CHECK-ARM-EABI-NOT: as{{.*}}" "-matpcs" + ++// RUN: %clang %s -### -o %t.o -target arm-gnueabihf-freebsd10.0 -no-integrated-as 2>&1 \ ++// RUN: | FileCheck --check-prefix=CHECK-ARM-EABIHF %s ++// CHECK-ARM-EABIHF-NOT: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions" ++// CHECK-ARM-EABIHF: as{{.*}}" "-mfpu=vfp" "-meabi=5" ++// CHECK-ARM-EABIHF-NOT: as{{.*}}" "-mfpu=softvfp" ++// CHECK-ARM-EABIHF-NOT: as{{.*}}" "-matpcs" ++ + // RUN: %clang -target x86_64-pc-freebsd8 %s -### -flto -o %t.o 2>&1 \ + // RUN: | FileCheck --check-prefix=CHECK-LTO %s + // CHECK-LTO: ld{{.*}}" "-plugin{{.*}}LLVMgold.so Modified: stable/10/lib/libc/arm/gen/flt_rounds.c ============================================================================== --- stable/10/lib/libc/arm/gen/flt_rounds.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/lib/libc/arm/gen/flt_rounds.c Sat May 17 18:53:36 2014 (r266337) @@ -30,20 +30,32 @@ __FBSDID("$FreeBSD$"); #include <fenv.h> #include <float.h> +#ifndef __ARM_PCS_VFP #include "softfloat-for-gcc.h" #include "milieu.h" #include "softfloat.h" +#endif int __flt_rounds(void) { + int mode; -#ifndef ARM_HARD_FLOAT +#ifndef __ARM_PCS_VFP /* * Translate our rounding modes to the unnamed * manifest constants required by C99 et. al. */ - switch (__softfloat_float_rounding_mode) { + mode = __softfloat_float_rounding_mode; +#else /* __ARM_PCS_VFP */ + /* + * Read the floating-point status and control register + */ + __asm __volatile("vmrs %0, fpscr" : "=&r"(mode)); + mode &= _ROUND_MASK; +#endif /* __ARM_PCS_VFP */ + + switch (mode) { case FE_TOWARDZERO: return (0); case FE_TONEAREST: @@ -54,12 +66,4 @@ __flt_rounds(void) return (3); } return (-1); -#else /* ARM_HARD_FLOAT */ - /* - * Apparently, the rounding mode is specified as part of the - * instruction format on ARM, so the dynamic rounding mode is - * indeterminate. Some FPUs may differ. - */ - return (-1); -#endif /* ARM_HARD_FLOAT */ } Modified: stable/10/sys/arm/allwinner/a10_clk.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_clk.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_clk.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_clk.h ============================================================================== --- stable/10/sys/arm/allwinner/a10_clk.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_clk.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_common.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_common.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_common.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_ehci.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_ehci.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_ehci.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_gpio.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_gpio.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> * Copyright (c) 2012 Luiz Otavio O Souza. * All rights reserved. Modified: stable/10/sys/arm/allwinner/a10_gpio.h ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_gpio.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_machdep.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_machdep.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_machdep.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * This code is derived from software written for Brini by Mark Brinicombe Modified: stable/10/sys/arm/allwinner/a10_sramc.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_sramc.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_sramc.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a10_sramc.h ============================================================================== --- stable/10/sys/arm/allwinner/a10_sramc.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a10_sramc.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c ============================================================================== --- stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.h ============================================================================== --- stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Copied: stable/10/sys/arm/allwinner/a20/a20_mp.c (from r263698, head/sys/arm/allwinner/a20/a20_mp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/allwinner/a20/a20_mp.c Sat May 17 18:53:36 2014 (r266337, copy of r263698, head/sys/arm/allwinner/a20/a20_mp.c) @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2014 Ganbold Tsagaankhuu <ganbold@freebsd.org> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/bus.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> +#include <sys/smp.h> + +#include <machine/smp.h> +#include <machine/fdt.h> +#include <machine/intr.h> + +#define CPUCFG_BASE 0x01c25c00 +#define CPUCFG_SIZE 0x400 + +#define CPU0_RST_CTL 0x40 +#define CPU0_CTL 0x44 +#define CPU0_STATUS 0x48 +#define CPU1_RST_CTL 0x80 +#define CPU1_CTL 0x84 +#define CPU1_STATUS 0x88 +#define CPUCFG_GENCTL 0x184 +#define CPUCFG_P_REG0 0x1a4 +#define CPU1_PWR_CLAMP 0x1b0 +#define CPU1_PWROFF_REG 0x1b4 +#define CPUCFG_DBGCTL0 0x1e0 +#define CPUCFG_DBGCTL1 0x1e4 + +void +platform_mp_init_secondary(void) +{ + + gic_init_secondary(); +} + +void +platform_mp_setmaxid(void) +{ + int ncpu; + + if (mp_ncpus != 0) + return; + + /* Read current CP15 Cache Size ID Register */ + __asm __volatile("mrc p15, 1, %0, c9, c0, 2" : "=r" (ncpu)); + ncpu = ((ncpu >> 24) & 0x3) + 1; + + mp_ncpus = ncpu; + mp_maxid = ncpu - 1; +} + +int +platform_mp_probe(void) +{ + + if (mp_ncpus == 0) + platform_mp_setmaxid(); + + return (mp_ncpus > 1); +} + +void +platform_mp_start_ap(void) +{ + bus_space_handle_t cpucfg; + + uint32_t val; + + if (bus_space_map(fdtbus_bs_tag, CPUCFG_BASE, CPUCFG_SIZE, 0, + &cpucfg) != 0) + panic("Couldn't map the CPUCFG\n"); + + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); + + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_P_REG0, + pmap_kextract((vm_offset_t)mpentry)); + + /* + * Assert nCOREPORESET low and set L1RSTDISABLE low. + * Ensure DBGPWRDUP is set to LOW to prevent any external + * debug access to the processor. + */ + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_RST_CTL, 0); + + /* Set L1RSTDISABLE low */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_GENCTL); + val &= ~(1 << 1); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_GENCTL, val); + + /* Set DBGPWRDUP low */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1); + val &= ~(1 << 1); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1, val); + + /* Release power clamp */ + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0xff); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x7f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x3f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x1f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x0f); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x07); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x03); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x01); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWR_CLAMP, 0x00); + DELAY(10000); + + /* Clear power-off gating */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPU1_PWROFF_REG); + val &= ~(1 << 0); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_PWROFF_REG, val); + DELAY(1000); + + /* De-assert cpu core reset */ + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPU1_RST_CTL, 3); + + /* Assert DBGPWRDUP signal */ + val = bus_space_read_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1); + val |= (1 << 1); + bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_DBGCTL1, val); + + armv7_sev(); + bus_space_unmap(fdtbus_bs_tag, cpucfg, CPUCFG_SIZE); +} + +void +platform_ipi_send(cpuset_t cpus, u_int ipi) +{ + + pic_ipi_send(cpus, ipi); +} Modified: stable/10/sys/arm/allwinner/a20/files.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/files.a20 Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/a20/files.a20 Sat May 17 18:53:36 2014 (r266337) @@ -20,3 +20,4 @@ arm/allwinner/timer.c standard arm/allwinner/bus_space.c standard arm/allwinner/a10_common.c standard arm/allwinner/a10_machdep.c standard +arm/allwinner/a20/a20_mp.c optional smp Modified: stable/10/sys/arm/allwinner/aintc.c ============================================================================== --- stable/10/sys/arm/allwinner/aintc.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/aintc.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/console.c ============================================================================== --- stable/10/sys/arm/allwinner/console.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/console.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/if_emac.c ============================================================================== --- stable/10/sys/arm/allwinner/if_emac.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/if_emac.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/if_emacreg.h ============================================================================== --- stable/10/sys/arm/allwinner/if_emacreg.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/if_emacreg.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (C) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/allwinner/timer.c ============================================================================== --- stable/10/sys/arm/allwinner/timer.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/allwinner/timer.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Sat May 17 18:53:36 2014 (r266337) @@ -138,3 +138,4 @@ options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard2.dts +options SMP # Enable multiple cores Modified: stable/10/sys/arm/include/param.h ============================================================================== --- stable/10/sys/arm/include/param.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/include/param.h Sat May 17 18:53:36 2014 (r266337) @@ -52,23 +52,29 @@ #define __PCI_REROUTE_INTERRUPT -#ifndef MACHINE -#define MACHINE "arm" -#endif -#ifndef MACHINE_ARCH #if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) -#ifdef __ARMEB__ -#define MACHINE_ARCH "armv6eb" +#define _V6_SUFFIX "v6" #else -#define MACHINE_ARCH "armv6" +#define _V6_SUFFIX "" #endif + +#ifdef __ARM_PCS_VFP +#define _HF_SUFFIX "hf" #else +#define _HF_SUFFIX "" +#endif + #ifdef __ARMEB__ -#define MACHINE_ARCH "armeb" +#define _EB_SUFFIX "eb" #else -#define MACHINE_ARCH "arm" +#define _EB_SUFFIX "" #endif + +#ifndef MACHINE +#define MACHINE "arm" #endif +#ifndef MACHINE_ARCH +#define MACHINE_ARCH "arm" _V6_SUFFIX _HF_SUFFIX _EB_SUFFIX #endif #if defined(SMP) || defined(KLD_MODULE) Modified: stable/10/sys/arm/include/pmap.h ============================================================================== --- stable/10/sys/arm/include/pmap.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/include/pmap.h Sat May 17 18:53:36 2014 (r266337) @@ -341,47 +341,7 @@ extern int pmap_needs_pte_sync; #define L2_AP(x) (L2_AP0(x) | L2_AP1(x) | L2_AP2(x) | L2_AP3(x)) #endif -#if ARM_NMMUS > 1 -/* More than one MMU class configured; use variables. */ -#define L2_S_PROT_U pte_l2_s_prot_u -#define L2_S_PROT_W pte_l2_s_prot_w -#define L2_S_PROT_MASK pte_l2_s_prot_mask - -#define L1_S_CACHE_MASK pte_l1_s_cache_mask -#define L2_L_CACHE_MASK pte_l2_l_cache_mask -#define L2_S_CACHE_MASK pte_l2_s_cache_mask - -#define L1_S_PROTO pte_l1_s_proto -#define L1_C_PROTO pte_l1_c_proto -#define L2_S_PROTO pte_l2_s_proto - -#elif ARM_MMU_GENERIC != 0 -#define L2_S_PROT_U L2_S_PROT_U_generic -#define L2_S_PROT_W L2_S_PROT_W_generic -#define L2_S_PROT_MASK L2_S_PROT_MASK_generic - -#define L1_S_CACHE_MASK L1_S_CACHE_MASK_generic -#define L2_L_CACHE_MASK L2_L_CACHE_MASK_generic -#define L2_S_CACHE_MASK L2_S_CACHE_MASK_generic - -#define L1_S_PROTO L1_S_PROTO_generic -#define L1_C_PROTO L1_C_PROTO_generic -#define L2_S_PROTO L2_S_PROTO_generic - -#elif ARM_MMU_XSCALE == 1 -#define L2_S_PROT_U L2_S_PROT_U_xscale -#define L2_S_PROT_W L2_S_PROT_W_xscale -#define L2_S_PROT_MASK L2_S_PROT_MASK_xscale - -#define L1_S_CACHE_MASK L1_S_CACHE_MASK_xscale -#define L2_L_CACHE_MASK L2_L_CACHE_MASK_xscale -#define L2_S_CACHE_MASK L2_S_CACHE_MASK_xscale - -#define L1_S_PROTO L1_S_PROTO_xscale -#define L1_C_PROTO L1_C_PROTO_xscale -#define L2_S_PROTO L2_S_PROTO_xscale - -#elif (ARM_MMU_V6 + ARM_MMU_V7) != 0 +#if (ARM_MMU_V6 + ARM_MMU_V7) != 0 /* * AP[2:1] access permissions model: * @@ -486,6 +446,47 @@ extern int pmap_needs_pte_sync; #define ARM_L2S_NRML_IWB_OWB (L2_C|L2_B|L2_SHARED) #define ARM_L2S_NRML_IWBA_OWBA (L2_S_TEX(1)|L2_C|L2_B|L2_SHARED) #endif /* SMP */ + +#elif ARM_NMMUS > 1 +/* More than one MMU class configured; use variables. */ +#define L2_S_PROT_U pte_l2_s_prot_u +#define L2_S_PROT_W pte_l2_s_prot_w +#define L2_S_PROT_MASK pte_l2_s_prot_mask + +#define L1_S_CACHE_MASK pte_l1_s_cache_mask +#define L2_L_CACHE_MASK pte_l2_l_cache_mask +#define L2_S_CACHE_MASK pte_l2_s_cache_mask + +#define L1_S_PROTO pte_l1_s_proto +#define L1_C_PROTO pte_l1_c_proto +#define L2_S_PROTO pte_l2_s_proto + +#elif ARM_MMU_GENERIC != 0 +#define L2_S_PROT_U L2_S_PROT_U_generic +#define L2_S_PROT_W L2_S_PROT_W_generic +#define L2_S_PROT_MASK L2_S_PROT_MASK_generic + +#define L1_S_CACHE_MASK L1_S_CACHE_MASK_generic +#define L2_L_CACHE_MASK L2_L_CACHE_MASK_generic +#define L2_S_CACHE_MASK L2_S_CACHE_MASK_generic + +#define L1_S_PROTO L1_S_PROTO_generic +#define L1_C_PROTO L1_C_PROTO_generic +#define L2_S_PROTO L2_S_PROTO_generic + +#elif ARM_MMU_XSCALE == 1 +#define L2_S_PROT_U L2_S_PROT_U_xscale +#define L2_S_PROT_W L2_S_PROT_W_xscale +#define L2_S_PROT_MASK L2_S_PROT_MASK_xscale + +#define L1_S_CACHE_MASK L1_S_CACHE_MASK_xscale +#define L2_L_CACHE_MASK L2_L_CACHE_MASK_xscale +#define L2_S_CACHE_MASK L2_S_CACHE_MASK_xscale + +#define L1_S_PROTO L1_S_PROTO_xscale +#define L1_C_PROTO L1_C_PROTO_xscale +#define L2_S_PROTO L2_S_PROTO_xscale + #endif /* ARM_NMMUS > 1 */ #if defined(CPU_XSCALE_81342) || ARM_ARCH_6 || ARM_ARCH_7A Modified: stable/10/sys/arm/rockchip/rk30xx_common.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_common.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_common.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> * Copyright (c) 2012 Luiz Otavio O Souza. * All rights reserved. Modified: stable/10/sys/arm/rockchip/rk30xx_grf.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_grf.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_grf.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_grf.h ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_grf.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_grf.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_machdep.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_machdep.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_machdep.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * This code is derived from software written for Brini by Mark Brinicombe Modified: stable/10/sys/arm/rockchip/rk30xx_pmu.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_pmu.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_pmu.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_pmu.h ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_pmu.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_pmu.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_wdog.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_wdog.c Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_wdog.c Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/arm/rockchip/rk30xx_wdog.h ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_wdog.h Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/arm/rockchip/rk30xx_wdog.h Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/boot/fdt/dts/arm/cubieboard.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/cubieboard.dts Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/boot/fdt/dts/arm/cubieboard.dts Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2012 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/boot/fdt/dts/arm/cubieboard2.dts Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/boot/fdt/dts/arm/rk3188-radxa.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/rk3188-radxa.dts Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/boot/fdt/dts/arm/rk3188-radxa.dts Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Sat May 17 18:52:20 2014 (r266336) +++ stable/10/sys/boot/fdt/dts/arm/rk3188.dtsi Sat May 17 18:53:36 2014 (r266337) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@gmail.com> + * Copyright (c) 2013 Ganbold Tsagaankhuu <ganbold@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405171853.s4HIrbG7014102>