Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2014 16:01:28 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r263639 - in projects/arm_eabi_vfp: lib/libc/arm/gen sys/arm/include sys/boot/fdt/dts/mips sys/mips/conf sys/ufs/ffs usr.sbin/bsdinstall/scripts
Message-ID:  <201403221601.s2MG1SmA084393@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sat Mar 22 16:01:28 2014
New Revision: 263639
URL: http://svnweb.freebsd.org/changeset/base/263639

Log:
  MFC

Modified:
  projects/arm_eabi_vfp/lib/libc/arm/gen/flt_rounds.c
  projects/arm_eabi_vfp/sys/arm/include/param.h
  projects/arm_eabi_vfp/sys/boot/fdt/dts/mips/beri-netfpga.dts
  projects/arm_eabi_vfp/sys/mips/conf/BERI_NETFPGA_MDROOT
  projects/arm_eabi_vfp/sys/ufs/ffs/ffs_alloc.c
  projects/arm_eabi_vfp/usr.sbin/bsdinstall/scripts/zfsboot
Directory Properties:
  projects/arm_eabi_vfp/   (props changed)
  projects/arm_eabi_vfp/lib/libc/   (props changed)
  projects/arm_eabi_vfp/sys/   (props changed)
  projects/arm_eabi_vfp/sys/boot/   (props changed)

Modified: projects/arm_eabi_vfp/lib/libc/arm/gen/flt_rounds.c
==============================================================================
--- projects/arm_eabi_vfp/lib/libc/arm/gen/flt_rounds.c	Sat Mar 22 15:59:26 2014	(r263638)
+++ projects/arm_eabi_vfp/lib/libc/arm/gen/flt_rounds.c	Sat Mar 22 16:01:28 2014	(r263639)
@@ -39,13 +39,23 @@ __FBSDID("$FreeBSD$");
 int
 __flt_rounds(void)
 {
+	int mode;
 
 #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:
@@ -56,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: projects/arm_eabi_vfp/sys/arm/include/param.h
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/include/param.h	Sat Mar 22 15:59:26 2014	(r263638)
+++ projects/arm_eabi_vfp/sys/arm/include/param.h	Sat Mar 22 16:01:28 2014	(r263639)
@@ -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: projects/arm_eabi_vfp/sys/boot/fdt/dts/mips/beri-netfpga.dts
==============================================================================
--- projects/arm_eabi_vfp/sys/boot/fdt/dts/mips/beri-netfpga.dts	Sat Mar 22 15:59:26 2014	(r263638)
+++ projects/arm_eabi_vfp/sys/boot/fdt/dts/mips/beri-netfpga.dts	Sat Mar 22 16:01:28 2014	(r263639)
@@ -113,6 +113,14 @@
 			soft-interrupt-sources = <64>;
 		};
 
+		serial0: serial@7f000000 {
+			compatible = "altera,jtag_uart-11_0";
+			reg = <0x7f000000 0x40>;
+			interrupts = <0>;
+			interrupt-parent = <&beripic>;
+		};
+
+/*
 		serial0: serial@7f002100 {
 			compatible = "ns16550";
 			reg = <0x7f002100 0x20>;
@@ -121,6 +129,7 @@
 			interrupts = <8>;
 			interrupt-parent = <&beripic>;
 		};
+*/
 	};
 
 	aliases { 

Modified: projects/arm_eabi_vfp/sys/mips/conf/BERI_NETFPGA_MDROOT
==============================================================================
--- projects/arm_eabi_vfp/sys/mips/conf/BERI_NETFPGA_MDROOT	Sat Mar 22 15:59:26 2014	(r263638)
+++ projects/arm_eabi_vfp/sys/mips/conf/BERI_NETFPGA_MDROOT	Sat Mar 22 16:01:28 2014	(r263639)
@@ -10,11 +10,14 @@ include "BERI_TEMPLATE"
 
 ident		BERI_NETFPGA_MDROOT
 
+options 	HZ=100
+
 options 	FDT
 options 	FDT_DTB_STATIC
 makeoptions	FDT_DTS_FILE=beri-netfpga.dts
 
-device		uart
+#device		uart
+device		altera_jtag_uart
 
 #
 # This kernel configuration uses an embedded memory root file system.

Modified: projects/arm_eabi_vfp/sys/ufs/ffs/ffs_alloc.c
==============================================================================
--- projects/arm_eabi_vfp/sys/ufs/ffs/ffs_alloc.c	Sat Mar 22 15:59:26 2014	(r263638)
+++ projects/arm_eabi_vfp/sys/ufs/ffs/ffs_alloc.c	Sat Mar 22 16:01:28 2014	(r263639)
@@ -1167,16 +1167,17 @@ ffs_dirpref(pip)
 	 * We scan from our preferred cylinder group forward looking
 	 * for a cylinder group that meets our criterion. If we get
 	 * to the final cylinder group and do not find anything,
-	 * we start scanning backwards from our preferred cylinder
-	 * group. The ideal would be to alternate looking forward
-	 * and backward, but that is just too complex to code for
-	 * the gain it would get. The most likely place where the
-	 * backward scan would take effect is when we start near
-	 * the end of the filesystem and do not find anything from
-	 * where we are to the end. In that case, scanning backward
-	 * will likely find us a suitable cylinder group much closer
-	 * to our desired location than if we were to start scanning
-	 * forward from the beginning of the filesystem.
+	 * we start scanning forwards from the beginning of the
+	 * filesystem. While it might seem sensible to start scanning
+	 * backwards or even to alternate looking forward and backward,
+	 * this approach fails badly when the filesystem is nearly full.
+	 * Specifically, we first search all the areas that have no space
+	 * and finally try the one preceeding that. We repeat this on
+	 * every request and in the case of the final block end up
+	 * searching the entire filesystem. By jumping to the front
+	 * of the filesystem, our future forward searches always look
+	 * in new cylinder groups so finds every possible block after
+	 * one pass over the filesystem.
 	 */
 	prefcg = ino_to_cg(fs, pip->i_number);
 	for (cg = prefcg; cg < fs->fs_ncg; cg++)

Modified: projects/arm_eabi_vfp/usr.sbin/bsdinstall/scripts/zfsboot
==============================================================================
--- projects/arm_eabi_vfp/usr.sbin/bsdinstall/scripts/zfsboot	Sat Mar 22 15:59:26 2014	(r263638)
+++ projects/arm_eabi_vfp/usr.sbin/bsdinstall/scripts/zfsboot	Sat Mar 22 16:01:28 2014	(r263639)
@@ -129,6 +129,8 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA
 	# Home directories separated so they are common to all BEs
 	/usr/home	# NB: /home is a symlink to /usr/home
 
+	/root		mountpoint=/root
+
 	# Ports tree
 	/usr/ports		compression=lz4,setuid=off
 



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