svn commit: r333569 - head/usr.sbin/cpucontrol

2018-05-12 Thread Ed Maste
Author: emaste
Date: Sat May 12 15:34:35 2018
New Revision: 333569
URL: https://svnweb.freebsd.org/changeset/base/333569

Log:
  cpucontrol: improve Intel microcode revision check
  
  According to the Intel SDM (Volme 3, 9.11.7) the BIOS signature MSR
  should be zeroed before executing cpuid (although in practice it does
  not seem to matter).
  
  PR:   192487
  Submitted by: Dan Lukes
  Reported by:  Henrique de Moraes Holschuh
  MFC after:3 days

Modified:
  head/usr.sbin/cpucontrol/intel.c

Modified: head/usr.sbin/cpucontrol/intel.c
==
--- head/usr.sbin/cpucontrol/intel.cSat May 12 15:20:39 2018
(r333568)
+++ head/usr.sbin/cpucontrol/intel.cSat May 12 15:34:35 2018
(r333569)
@@ -95,7 +95,8 @@ intel_update(const char *dev, const char *path)
void *fw_data;
size_t data_size, total_size;
cpuctl_msr_args_t msrargs = {
-   .msr = MSR_IA32_PLATFORM_ID,
+   .msr = MSR_BIOS_SIGN,
+   .data = 0,
};
cpuctl_cpuid_args_t idargs = {
.level  = 1,/* Signature. */
@@ -115,12 +116,18 @@ intel_update(const char *dev, const char *path)
WARN(0, "could not open %s for writing", dev);
return;
}
+   error = ioctl(devfd, CPUCTL_WRMSR, &msrargs);
+   if (error < 0) {
+   WARN(0, "ioctl(%s)", dev);
+   goto fail;
+   }
error = ioctl(devfd, CPUCTL_CPUID, &idargs);
if (error < 0) {
WARN(0, "ioctl(%s)", dev);
goto fail;
}
signature = idargs.data[0];
+   msrargs.msr = MSR_IA32_PLATFORM_ID;
error = ioctl(devfd, CPUCTL_RDMSR, &msrargs);
if (error < 0) {
WARN(0, "ioctl(%s)", dev);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333618 - head/sys/kern

2018-05-14 Thread Ed Maste
Author: emaste
Date: Tue May 15 00:50:09 2018
New Revision: 333618
URL: https://svnweb.freebsd.org/changeset/base/333618

Log:
  subr_pidctrl: use standard 2-Clause FreeBSD license and disclaimer
  
  Approved by:  jeff

Modified:
  head/sys/kern/subr_pidctrl.c

Modified: head/sys/kern/subr_pidctrl.c
==
--- head/sys/kern/subr_pidctrl.cTue May 15 00:00:44 2018
(r333617)
+++ head/sys/kern/subr_pidctrl.cTue May 15 00:50:09 2018
(r333618)
@@ -8,22 +8,22 @@
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
- *notice unmodified, this list of conditions, and the following
- *disclaimer.
+ *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.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333649 - head/tools/tools/intel-ucode-split

2018-05-15 Thread Ed Maste
Author: emaste
Date: Tue May 15 21:51:29 2018
New Revision: 333649
URL: https://svnweb.freebsd.org/changeset/base/333649

Log:
  Add a tool to split Intel microcode into one file per Platform Id
  
  Intel now releases microcode updates in files named after
  --.  In some cases a single file may include
  microcode for multiple Platform Ids for the same family, model, and
  stepping.  Our current microcode update tooling (/usr/sbin/cpucontrol)
  only processes the first microcode update in the file.
  
  This tool splits combined files into individual files with one microcode
  update each, named as
  --..
  
  Adding this to tools/ for experimentation and testing.  In the future
  we'll want to have cpucontrol or other tooling work directly with the
  Intel-provided microcode files.
  
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D15433

Added:
  head/tools/tools/intel-ucode-split/
  head/tools/tools/intel-ucode-split/Makefile   (contents, props changed)
  head/tools/tools/intel-ucode-split/intel-ucode-split.c   (contents, props 
changed)

Added: head/tools/tools/intel-ucode-split/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/tools/intel-ucode-split/Makefile Tue May 15 21:51:29 2018
(r333649)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+PROG=  intel-ucode-split
+MAN=
+
+.include 

Added: head/tools/tools/intel-ucode-split/intel-ucode-split.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/tools/intel-ucode-split/intel-ucode-split.c  Tue May 15 
21:51:29 2018(r333649)
@@ -0,0 +1,169 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (C) 2018 The FreeBSD Foundation.
+ *
+ * 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
+ *
+ * $FreeBSD$
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static const size_t bufsize = 65536;
+
+/* SDM vol 3 9.11.1 Intel microcode header. */
+struct microcode_update_header {
+   uint32_t header_version;
+   uint32_t update_revision;
+   uint32_t date;  /* BCD mmdd */
+   uint32_t processor_signature;
+   uint32_t checksum;  /* Over update data and header */
+   uint32_t loader_revision;
+   uint32_t processor_flags;
+   uint32_t data_size;
+   uint32_t total_size;
+   uint32_t reserved[3];
+};
+
+/*
+ * SDM vol 2A CPUID EAX = 01h Returns Model, Family, Stepping Information.
+ * 9 chars including the NUL terminator will be written to buf.
+ */
+
+static char *
+format_signature(char *buf, uint32_t signature)
+{
+   unsigned family, model, stepping;
+
+   family = (signature & 0xf00) >> 8;
+   model = (signature & 0xf0) >> 4;
+   stepping = signature & 0xf;
+   if (family == 0x06 || family == 0x0f)
+   model += (signature & 0xf) >> 12;
+   if (family == 0x0f)
+   family += (signature & 0xff0) >> 20;
+   sprintf(buf, "%02x-%02x-%02x", family, model, stepping);
+   return (buf);
+}
+
+static void
+dump_header(const struct microcode_update_header *hdr)
+{
+   char buf[16];
+
+   printf("version\t\t0x%x\n", hdr->header_version);
+   printf("revision\t0x%x\n", hdr->update_revision);
+   printf("date\t\t0x%x\t%04x-%02x-%02x\n", hdr->date,
+   hdr->date & 0x, (hdr->date & 0xff00) >> 24,
+   (hdr->date & 0xff) >> 16);
+   printf("signature\t0x%x\t\t%s\n", hdr->processor_signature,
+   format_signature(buf, hdr->p

svn commit: r333657 - head/tools/tools/intel-ucode-split

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 01:08:11 2018
New Revision: 333657
URL: https://svnweb.freebsd.org/changeset/base/333657

Log:
  intel-ucode-split: add a -v verbose flag
  
  And be quiet by default.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tools/tools/intel-ucode-split/intel-ucode-split.c

Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c
==
--- head/tools/tools/intel-ucode-split/intel-ucode-split.c  Wed May 16 
00:57:42 2018(r333656)
+++ head/tools/tools/intel-ucode-split/intel-ucode-split.c  Wed May 16 
01:08:11 2018(r333657)
@@ -29,6 +29,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -97,7 +98,7 @@ static void
 usage(void)
 {
 
-   printf("ucode-split microcode_file\n");
+   printf("ucode-split [-v] microcode_file\n");
exit(1);
 }
 
@@ -109,12 +110,26 @@ main(int argc, char *argv[])
char *buf;
size_t len, resid;
ssize_t rv;
-   int ifd, ofd;
+   int c, ifd, ofd;
+   bool vflag;
 
-   if (argc != 2)
+   vflag = false;
+   while ((c = getopt(argc, argv, "v")) != -1) {
+   switch (c) {
+   case 'v':
+   vflag = true;
+   break;
+   default:
+   usage();
+   }
+   }
+   argc -= optind;
+   argv += optind;
+
+   if (argc != 1)
usage();
 
-   ifd = open(argv[1], O_RDONLY);
+   ifd = open(argv[0], O_RDONLY);
if (ifd < 0)
err(1, "open");
 
@@ -133,7 +148,8 @@ main(int argc, char *argv[])
errx(1, "invalid microcode header");
}
 
-   dump_header(&hdr);
+   if (vflag)
+   dump_header(&hdr);
 
format_signature(output_file, hdr.processor_signature);
sprintf(output_file + strlen(output_file), ".%02x",
@@ -163,7 +179,8 @@ main(int argc, char *argv[])
err(1, "write");
resid -= len;
}
-   printf("written to %s\n\n", output_file);
+   if (vflag)
+   printf("written to %s\n\n", output_file);
close(ofd);
}
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333658 - head/share/mk

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 01:33:48 2018
New Revision: 333658
URL: https://svnweb.freebsd.org/changeset/base/333658

Log:
  Force WITHOUT_FREEBSD_UPDATE when WITHOUT_PORTSNAP is set
  
  freebsd-update depends on phttpget from portsnap. We could move phttpget
  out of portsnap and build it as long as WITHOUT_FREEBSD_UPDATE and
  WITHOUT_PORTSNAP are not both set, but for now just make the dependency
  explicit.
  
  PR:   228220
  Reported by:  Dries Michiels
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed May 16 01:08:11 2018(r333657)
+++ head/share/mk/src.opts.mk   Wed May 16 01:33:48 2018(r333658)
@@ -424,6 +424,11 @@ MK_KERBEROS:=  no
 MK_AUTHPF:=no
 .endif
 
+.if ${MK_PORTSNAP} == "no"
+# freebsd-update depends on phttpget from portsnap
+MK_FREEBSD_UPDATE:=no
+.endif
+
 .if ${MK_TESTS} == "no"
 MK_DTRACE_TESTS:= no
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333659 - head/share/man/man5

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 01:34:36 2018
New Revision: 333659
URL: https://svnweb.freebsd.org/changeset/base/333659

Log:
  Regen src.conf.5 after r333658

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Wed May 16 01:33:48 2018
(r333658)
+++ head/share/man/man5/src.conf.5  Wed May 16 01:34:36 2018
(r333659)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd May 14, 2018
+.Dd May 15, 2018
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -1309,6 +1309,12 @@ and related programs.
 Set to not build or install
 .Xr portsnap 8
 and related files.
+When set, it enforces these options:
+.Pp
+.Bl -item -compact
+.It
+.Va WITHOUT_FREEBSD_UPDATE
+.El
 .It Va WITHOUT_PPP
 Set to not build
 .Xr ppp 8
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333660 - head/tools/tools/intel-ucode-split

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 01:41:36 2018
New Revision: 333660
URL: https://svnweb.freebsd.org/changeset/base/333660

Log:
  intel-ucode-split: exit on unknown ucode header version

Modified:
  head/tools/tools/intel-ucode-split/intel-ucode-split.c

Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c
==
--- head/tools/tools/intel-ucode-split/intel-ucode-split.c  Wed May 16 
01:34:36 2018(r333659)
+++ head/tools/tools/intel-ucode-split/intel-ucode-split.c  Wed May 16 
01:41:36 2018(r333660)
@@ -78,7 +78,7 @@ dump_header(const struct microcode_update_header *hdr)
 {
char buf[16];
 
-   printf("version\t\t0x%x\n", hdr->header_version);
+   printf("header version\t0x%x\n", hdr->header_version);
printf("revision\t0x%x\n", hdr->update_revision);
printf("date\t\t0x%x\t%04x-%02x-%02x\n", hdr->date,
hdr->date & 0x, (hdr->date & 0xff00) >> 24,
@@ -147,6 +147,8 @@ main(int argc, char *argv[])
} else if (rv < (ssize_t)sizeof(hdr)) {
errx(1, "invalid microcode header");
}
+   if (hdr.header_version != 1)
+   errx(1, "invalid header version");
 
if (vflag)
dump_header(&hdr);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333661 - head/tools/tools/intel-ucode-split

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 01:55:52 2018
New Revision: 333661
URL: https://svnweb.freebsd.org/changeset/base/333661

Log:
  intel-ucode-split: list platform ids based on processor_flags
  
  The Intel CPU "Platform Id" is a 3-bit integer reported by a given MSR.
  Intel microcode updates have an 8-bit field to indicate Platform Id
  compatibility - one bit in the mask for each of the possible Platform Id
  values.  To simplify interpretation, report the Platform Id mask also as
  a list.

Modified:
  head/tools/tools/intel-ucode-split/intel-ucode-split.c

Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c
==
--- head/tools/tools/intel-ucode-split/intel-ucode-split.c  Wed May 16 
01:41:36 2018(r333660)
+++ head/tools/tools/intel-ucode-split/intel-ucode-split.c  Wed May 16 
01:55:52 2018(r333661)
@@ -77,6 +77,8 @@ static void
 dump_header(const struct microcode_update_header *hdr)
 {
char buf[16];
+   int i;
+   bool platformid_printed;
 
printf("header version\t0x%x\n", hdr->header_version);
printf("revision\t0x%x\n", hdr->update_revision);
@@ -87,7 +89,15 @@ dump_header(const struct microcode_update_header *hdr)
format_signature(buf, hdr->processor_signature));
printf("checksum\t0x%x\n", hdr->checksum);
printf("loader revision\t0x%x\n", hdr->loader_revision);
-   printf("processor flags\t0x%x\n", hdr->processor_flags);
+   printf("processor flags\t0x%x", hdr->processor_flags);
+   platformid_printed = false;
+   for (i = 0; i < 8; i++) {
+   if (hdr->processor_flags & 1 << i) {
+   printf("%s%d", platformid_printed ? ", " : "\t\t", i);
+   platformid_printed = true;
+   }
+   }
+   printf("\n");
printf("datasize\t0x%x\t\t0x%x\n", hdr->data_size,
hdr->data_size != 0 ? hdr->data_size : 2000);
printf("size\t\t0x%x\t\t0x%x\n", hdr->total_size,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333662 - in head: sbin/reboot stand/man

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 02:15:18 2018
New Revision: 333662
URL: https://svnweb.freebsd.org/changeset/base/333662

Log:
  Clarify that boot_mute / boot -m mutes kernel console only
  
  Perhaps RB_MUTE could mute user startup (rc) output as well, but right
  now it mutes only kernel console output, so make the documentation match
  reality.
  
  PR:   228193
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sbin/reboot/boot_i386.8
  head/stand/man/loader.8

Modified: head/sbin/reboot/boot_i386.8
==
--- head/sbin/reboot/boot_i386.8Wed May 16 01:55:52 2018
(r333661)
+++ head/sbin/reboot/boot_i386.8Wed May 16 02:15:18 2018
(r333662)
@@ -36,7 +36,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 14, 2014
+.Dd May 15, 2018
 .Dt BOOT 8 i386
 .Os
 .Sh NAME
@@ -233,7 +233,7 @@ regardless of the
 .Fl h
 option described here.
 .It Fl m
-mute the console to suppress all console input and output during the
+mute the console to suppress all kernel console input and output during the
 boot.
 .It Fl n
 ignore key press to interrupt boot before

Modified: head/stand/man/loader.8
==
--- head/stand/man/loader.8 Wed May 16 01:55:52 2018(r333661)
+++ head/stand/man/loader.8 Wed May 16 02:15:18 2018(r333662)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 18, 2015
+.Dd May 15, 2018
 .Dt LOADER 8
 .Os
 .Sh NAME
@@ -390,7 +390,7 @@ by the
 .Xr conscontrol 8
 utility.
 .It Va boot_mute
-All console output is suppressed when console is muted.
+All kernel console output is suppressed when console is muted.
 In a running system, the state of console muting can be manipulated by the
 .Xr conscontrol 8
 utility.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333663 - head/usr.sbin

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 02:51:30 2018
New Revision: 333663
URL: https://svnweb.freebsd.org/changeset/base/333663

Log:
  Sort mlx5tool correctly in usr.sbin/Makefile

Modified:
  head/usr.sbin/Makefile

Modified: head/usr.sbin/Makefile
==
--- head/usr.sbin/Makefile  Wed May 16 02:15:18 2018(r333662)
+++ head/usr.sbin/Makefile  Wed May 16 02:51:30 2018(r333663)
@@ -121,7 +121,6 @@ SUBDIR.${MK_BSDINSTALL}+=   bsdinstall
 SUBDIR.${MK_BSNMP}+=   bsnmpd
 SUBDIR.${MK_CTM}+= ctm
 SUBDIR.${MK_CXGBETOOL}+=   cxgbetool
-SUBDIR.${MK_MLX5TOOL}+=mlx5tool
 SUBDIR.${MK_DIALOG}+=  bsdconfig
 SUBDIR.${MK_EFI}+= efivar efidp efibootmgr
 SUBDIR.${MK_FLOPPY}+=  fdcontrol
@@ -159,6 +158,7 @@ SUBDIR.${MK_NS_CACHING}+=   nscd
 .endif
 SUBDIR.${MK_LPR}+= lpr
 SUBDIR.${MK_MAN_UTILS}+=   manctl
+SUBDIR.${MK_MLX5TOOL}+=mlx5tool
 SUBDIR.${MK_NAND}+=nandsim
 SUBDIR.${MK_NAND}+=nandtool
 SUBDIR.${MK_NETGRAPH}+=flowctl
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333664 - in head/usr.sbin/makefs: cd9660 ffs

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 02:58:05 2018
New Revision: 333664
URL: https://svnweb.freebsd.org/changeset/base/333664

Log:
  makefs: ANSIfy

Modified:
  head/usr.sbin/makefs/cd9660/cd9660_debug.c
  head/usr.sbin/makefs/ffs/ffs_subr.c

Modified: head/usr.sbin/makefs/cd9660/cd9660_debug.c
==
--- head/usr.sbin/makefs/cd9660/cd9660_debug.c  Wed May 16 02:51:30 2018
(r333663)
+++ head/usr.sbin/makefs/cd9660/cd9660_debug.c  Wed May 16 02:58:05 2018
(r333664)
@@ -59,8 +59,7 @@ print_n_tabs(int n)
 
 #if 0
 void
-debug_print_rrip_info(n)
-cd9660node *n;
+debug_print_rrip_info(cd9660node *n)
 {
struct ISO_SUSP_ATTRIBUTES *t;
TAILQ_FOREACH(t, &node->head, rr_ll) {

Modified: head/usr.sbin/makefs/ffs/ffs_subr.c
==
--- head/usr.sbin/makefs/ffs/ffs_subr.c Wed May 16 02:51:30 2018
(r333663)
+++ head/usr.sbin/makefs/ffs/ffs_subr.c Wed May 16 02:58:05 2018
(r333664)
@@ -85,10 +85,7 @@ ffs_fragacct_swap(struct fs *fs, int fragmap, int32_t 
  *  returns false if any corresponding bit in the free map is 0
  */
 int
-ffs_isblock(fs, cp, h)
-   struct fs *fs;
-   u_char *cp;
-   int32_t h;
+ffs_isblock(struct fs *fs, u_char *cp, int32_t h)
 {
u_char mask;
 
@@ -116,10 +113,7 @@ ffs_isblock(fs, cp, h)
  *  returns false if any corresponding bit in the free map is 1
  */
 int
-ffs_isfreeblock(fs, cp, h)
-   struct fs *fs;
-   u_char *cp;
-   int32_t h;
+ffs_isfreeblock(struct fs *fs, u_char *cp, int32_t h)
 {
 
switch ((int)fs->fs_fragshift) {
@@ -141,10 +135,7 @@ ffs_isfreeblock(fs, cp, h)
  * take a block out of the map
  */
 void
-ffs_clrblock(fs, cp, h)
-   struct fs *fs;
-   u_char *cp;
-   int32_t h;
+ffs_clrblock(struct fs *fs, u_char *cp, int32_t h)
 {
 
switch ((int)fs->fs_fragshift) {
@@ -170,10 +161,7 @@ ffs_clrblock(fs, cp, h)
  * put a block into the map
  */
 void
-ffs_setblock(fs, cp, h)
-   struct fs *fs;
-   u_char *cp;
-   int32_t h;
+ffs_setblock(struct fs *fs, u_char *cp, int32_t h)
 {
 
switch ((int)fs->fs_fragshift) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333665 - head/tools/tools

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 03:08:06 2018
New Revision: 333665
URL: https://svnweb.freebsd.org/changeset/base/333665

Log:
  Add intel-ucode-split to tools README

Modified:
  head/tools/tools/README

Modified: head/tools/tools/README
==
--- head/tools/tools/README Wed May 16 02:58:05 2018(r333664)
+++ head/tools/tools/README Wed May 16 03:08:06 2018(r333665)
@@ -33,6 +33,7 @@ html-mv Rename HTML generated filenames to hum
 ifinfo Uses the interface MIB to print out all the information
an interface exports in an ugly form.
 indent_wrapper Tool for style(9) checking SVN/GIT patches.
+intel-ucode-split Tool to split Intel microcode into individual files.
 iso Tool to compare the iso3166 and iso639 files in
/usr/share/misc with the data from the master sites.
 iwiTools specific to the Intel PRO/Wireless 2200BG/2225BG/2915ABG
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333666 - head/sys/dev/usb/input

2018-05-15 Thread Ed Maste
Author: emaste
Date: Wed May 16 03:17:37 2018
New Revision: 333666
URL: https://svnweb.freebsd.org/changeset/base/333666

Log:
  Attempt to fix build by removing EOF backslash-newline
  
  GCC complains:
  In file included from .../sys/dev/usb/input/uhid.c:77:
  .../usb_rdesc.h:280:37: error: backslash-newline at end of file

Modified:
  head/sys/dev/usb/input/usb_rdesc.h

Modified: head/sys/dev/usb/input/usb_rdesc.h
==
--- head/sys/dev/usb/input/usb_rdesc.h  Wed May 16 03:08:06 2018
(r333665)
+++ head/sys/dev/usb/input/usb_rdesc.h  Wed May 16 03:17:37 2018
(r333666)
@@ -303,4 +303,4 @@
 0x95, 0x0A, /*  Report Count (10),  */\
 0x81, 0x01, /*  Input (Constant),   */\
 0xC0,   /*  End Collection, */\
-0xC0/*  End Collection  */\
+0xC0/*  End Collection  */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333672 - in head/sys/dev/vt: . hw/fb hw/ofwfb

2018-05-16 Thread Ed Maste
Author: emaste
Date: Wed May 16 11:19:03 2018
New Revision: 333672
URL: https://svnweb.freebsd.org/changeset/base/333672

Log:
  Clean up vt source whitespace issues

Modified:
  head/sys/dev/vt/hw/fb/vt_early_fb.c
  head/sys/dev/vt/hw/ofwfb/ofwfb.c
  head/sys/dev/vt/vt.h
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/hw/fb/vt_early_fb.c
==
--- head/sys/dev/vt/hw/fb/vt_early_fb.c Wed May 16 11:06:39 2018
(r333671)
+++ head/sys/dev/vt/hw/fb/vt_early_fb.c Wed May 16 11:19:03 2018
(r333672)
@@ -224,7 +224,7 @@ vt_efb_init(struct vt_device *vd)
 * remapped for us when relocation turns on.
 */
if (OF_getproplen(node, "address") == sizeof(info->fb_pbase)) {
-   /* XXX We assume #address-cells is 1 at this point. */
+   /* XXX We assume #address-cells is 1 at this point. */
OF_getencprop(node, "address", &info->fb_pbase,
sizeof(info->fb_pbase));
 

Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c
==
--- head/sys/dev/vt/hw/ofwfb/ofwfb.cWed May 16 11:06:39 2018
(r333671)
+++ head/sys/dev/vt/hw/ofwfb/ofwfb.cWed May 16 11:19:03 2018
(r333672)
@@ -317,7 +317,7 @@ ofwfb_initialize(struct vt_device *vd)
}
if (i != 16)
sc->iso_palette = 1;
-   
+
break;
 
case 32:
@@ -417,7 +417,7 @@ ofwfb_init(struct vt_device *vd)
 * remapped for us when relocation turns on.
 */
if (OF_getproplen(node, "address") == sizeof(fb_phys)) {
-   /* XXX We assume #address-cells is 1 at this point. */
+   /* XXX We assume #address-cells is 1 at this point. */
OF_getprop(node, "address", &fb_phys, sizeof(fb_phys));
 
#if defined(__powerpc__)

Modified: head/sys/dev/vt/vt.h
==
--- head/sys/dev/vt/vt.hWed May 16 11:06:39 2018(r333671)
+++ head/sys/dev/vt/vt.hWed May 16 11:19:03 2018(r333672)
@@ -93,7 +93,7 @@ struct vt_driver;
 void vt_allocate(const struct vt_driver *, void *);
 void vt_deallocate(const struct vt_driver *, void *);
 
-typedef unsigned int   vt_axis_t;
+typedef unsigned int   vt_axis_t;
 
 /*
  * List of locks

Modified: head/sys/dev/vt/vt_core.c
==
--- head/sys/dev/vt/vt_core.c   Wed May 16 11:06:39 2018(r333671)
+++ head/sys/dev/vt/vt_core.c   Wed May 16 11:19:03 2018(r333672)
@@ -539,14 +539,14 @@ vt_window_switch(struct vt_window *vw)
return (0);
if (!(vw->vw_flags & (VWF_OPENED|VWF_CONSOLE)))
return (EINVAL);
-   
+
vd->vd_curwindow = vw;
vd->vd_flags |= VDF_INVALID;
if (vd->vd_driver->vd_postswitch)
vd->vd_driver->vd_postswitch(vd);
return (0);
}
-   
+
VT_LOCK(vd);
if (curvw == vw) {
/* Nothing to do. */
@@ -2279,7 +2279,7 @@ skip_thunk:
/* XXX */
*(int *)data = M_CG640x480;
return (0);
-   case CONS_BELLTYPE: /* set bell type sound */
+   case CONS_BELLTYPE: /* set bell type sound */
if ((*(int *)data) & CONS_QUIET_BELL)
vd->vd_flags |= VDF_QUIET_BELL;
else
@@ -2383,7 +2383,7 @@ skip_thunk:
break;
}
return (0);
-   case KDENABIO:  /* allow io operations */
+   case KDENABIO:  /* allow io operations */
error = priv_check(td, PRIV_IO);
if (error != 0)
return (error);
@@ -2396,20 +2396,20 @@ skip_thunk:
td->td_frame->tf_rflags |= PSL_IOPL;
 #endif
return (0);
-   case KDDISABIO: /* disallow io operations (default) */
+   case KDDISABIO: /* disallow io operations (default) */
 #if defined(__i386__)
td->td_frame->tf_eflags &= ~PSL_IOPL;
 #elif defined(__amd64__)
td->td_frame->tf_rflags &= ~PSL_IOPL;
 #endif
return (0);
-   case KDMKTONE:  /* sound the bell */
+   case KDMKTONE:  /* sound the bell */
vtterm_beep(tm, *(u_int *)data);
return (0);
-   case KIOCSOUND: /* make tone (*data) hz */
+   case KIOCSOUND: /* make tone (*data) hz */
/* TODO */
return (0);
-   case CONS_SETKBD:   /* set the new keyboard */
+   case CONS_SETKBD:   /* set the new keyboard */
mtx_lock(&

svn commit: r333713 - in head/sys: dev/usb/net modules/usb/muge

2018-05-17 Thread Ed Maste
Author: emaste
Date: Thu May 17 14:04:59 2018
New Revision: 333713
URL: https://svnweb.freebsd.org/changeset/base/333713

Log:
  Add driver for Microchip LAN78xx USB3-GigE controller
  
  This driver supports two Microchip USB-Ethernet controllers:
  
  LAN7800 USB 3.1 to 10/100/1000 Mbps Ethernet
  LAN7515 USB 2 to 10/100/1000 Mbps Ethernet with built-in USB hub
  
  The LAN7515 is the Ethernet controller on the Raspberry Pi 3B+.
  At present there is no datasheet for the LAN7515, but it is effectively
  a USB 2 hub combined with a LAN7800 controller.  A comprehensive LAN7800
  datasheet is at http://www.microchip.com/wwwproducts/en/LAN7800.
  
  This driver is based on the structure of the smsc(4) driver which
  supports Microchip/SMSC's LAN95xx family.  (Microchip acquired SMSC
  in May 2012.)  The Linux lan78xx driver served as a reference for some
  functionality and registers.
  
  The 'muge' driver name comes from "Microchip USB Gigabit Ethernet".
  I made some style adjustments and minor edits to Arshan's submission.
  It will be connected to the build after additional review and testing.
  
  Thanks to Microchip for providing a number of Evaluation Boards (EVBs)
  for development and testing.
  
  Submitted by: Arshan Khanifar
  Reviewed by:  hselasky (earlier)
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D15168

Added:
  head/sys/dev/usb/net/if_muge.c   (contents, props changed)
  head/sys/dev/usb/net/if_mugereg.h   (contents, props changed)
  head/sys/modules/usb/muge/
  head/sys/modules/usb/muge/Makefile   (contents, props changed)

Added: head/sys/dev/usb/net/if_muge.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/usb/net/if_muge.c  Thu May 17 14:04:59 2018
(r333713)
@@ -0,0 +1,2199 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (C) 2012 Ben Gray .
+ * Copyright (C) 2018 The FreeBSD Foundation.
+ *
+ * This software was developed by Arshan Khanifar 
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
+ *
+ * $FreeBSD$
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+/*
+ * USB-To-Ethernet adapter driver for Microchip's LAN78XX and related families.
+ *
+ * USB 3.1 to 10/100/1000 Mbps Ethernet
+ * LAN7800 http://www.microchip.com/wwwproducts/en/LAN7800
+ *
+ * USB 2 to 10/100/1000 Mbps Ethernet with built-in USB hub
+ * LAN7515 (no datasheet available, but probes and functions as LAN7800)
+ *
+ * This driver is based on the if_smsc driver, with lan78xx-specific
+ * functionality modelled on Microchip's Linux lan78xx driver.
+ *
+ * UNIMPLEMENTED FEATURES
+ * --
+ * A number of features supported by the lan78xx are not yet implemented in
+ * this driver:
+ *
+ * 1. RX/TX checksum offloading: Nothing has been implemented yet for
+ *TX checksumming. RX checksumming works with ICMP messages, but is broken
+ *for TCP/UDP packets.
+ * 2. Direct address translation filtering: Implemented but untested.
+ * 3. VLAN tag removal.
+ * 4. Reading MAC address from the device tree: Specific to the RPi 3B+.
+ *Currently, the driver assigns a random MAC address itself.
+ * 5. Support for USB interrupt endpoints.
+ * 6. Latency Tolerance Messaging (LTM) support.
+ * 7. TCP LSO support.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include "opt_platform.h"
+
+#include 
+#inclu

svn commit: r333714 - head/share/man/man4

2018-05-17 Thread Ed Maste
Author: emaste
Date: Thu May 17 14:26:12 2018
New Revision: 333714
URL: https://svnweb.freebsd.org/changeset/base/333714

Log:
  Add initial man page for Microchip USB 3 Gigabit Ethernet controller
  
  Sponsored by: The FreeBSD Foundation

Added:
  head/share/man/man4/muge.4   (contents, props changed)

Added: head/share/man/man4/muge.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/muge.4  Thu May 17 14:26:12 2018(r333714)
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2018 The FreeBSD Foundation.
+.\"
+.\" 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 17, 2018
+.Dt MUGE 4
+.Os
+.Sh NAME
+.Nm muge
+.Nd "Microchip LAN78xx USB Gigabit Ethernet driver"
+.Sh SYNOPSIS
+To load the driver as a module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_muge_load="YES"
+.Ed
+.Pp
+.\" Alternatively, to compile this driver into the kernel, place the
+.\" following lines in your kernel configuration file:
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for USB Gigabit Ethernet adapters based on
+Microchip's LAN78xx and LAN7515 chipsets.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports:
+.Pp
+.Bl -bullet -compact
+.It
+Microchip LAN7800 USB 3.1 Gigabit Ethernet controller with PHY
+.It
+Microchip LAN7515 USB 2 hub and Gigabit Ethernet controller with PHY
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr usb 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 12.0 .
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333742 - head/tools/tools/intel-ucode-split

2018-05-17 Thread Ed Maste
Author: emaste
Date: Thu May 17 17:45:47 2018
New Revision: 333742
URL: https://svnweb.freebsd.org/changeset/base/333742

Log:
  intel-ucode-split: incorporate review feedback, using asprintf
  
  As reported by delphij in review D15443 asprintf cleans this up a little
  by avoiding hardcoded buffer sizes.
  
  Reported by:  delphij

Modified:
  head/tools/tools/intel-ucode-split/intel-ucode-split.c

Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c
==
--- head/tools/tools/intel-ucode-split/intel-ucode-split.c  Thu May 17 
17:40:06 2018(r333741)
+++ head/tools/tools/intel-ucode-split/intel-ucode-split.c  Thu May 17 
17:45:47 2018(r333742)
@@ -54,12 +54,13 @@ struct microcode_update_header {
 
 /*
  * SDM vol 2A CPUID EAX = 01h Returns Model, Family, Stepping Information.
- * 9 chars including the NUL terminator will be written to buf.
+ * Caller must free the returned string.
  */
 
 static char *
-format_signature(char *buf, uint32_t signature)
+format_signature(uint32_t signature)
 {
+   char *buf;
unsigned family, model, stepping;
 
family = (signature & 0xf00) >> 8;
@@ -69,24 +70,26 @@ format_signature(char *buf, uint32_t signature)
model += (signature & 0xf) >> 12;
if (family == 0x0f)
family += (signature & 0xff0) >> 20;
-   sprintf(buf, "%02x-%02x-%02x", family, model, stepping);
+   asprintf(&buf, "%02x-%02x-%02x", family, model, stepping);
+   if (buf == NULL)
+   err(1, "asprintf");
return (buf);
 }
 
 static void
 dump_header(const struct microcode_update_header *hdr)
 {
-   char buf[16];
+   char *sig_str;
int i;
bool platformid_printed;
 
+   sig_str = format_signature(hdr->processor_signature);
printf("header version\t0x%x\n", hdr->header_version);
printf("revision\t0x%x\n", hdr->update_revision);
printf("date\t\t0x%x\t%04x-%02x-%02x\n", hdr->date,
hdr->date & 0x, (hdr->date & 0xff00) >> 24,
(hdr->date & 0xff) >> 16);
-   printf("signature\t0x%x\t\t%s\n", hdr->processor_signature,
-   format_signature(buf, hdr->processor_signature));
+   printf("signature\t0x%x\t\t%s\n", hdr->processor_signature, sig_str);
printf("checksum\t0x%x\n", hdr->checksum);
printf("loader revision\t0x%x\n", hdr->loader_revision);
printf("processor flags\t0x%x", hdr->processor_flags);
@@ -102,6 +105,7 @@ dump_header(const struct microcode_update_header *hdr)
hdr->data_size != 0 ? hdr->data_size : 2000);
printf("size\t\t0x%x\t\t0x%x\n", hdr->total_size,
hdr->total_size != 0 ? hdr->total_size : 2048);
+   free(sig_str);
 }
 
 static void
@@ -116,8 +120,7 @@ int
 main(int argc, char *argv[])
 {
struct microcode_update_header hdr;
-   char output_file[128];
-   char *buf;
+   char *buf, *output_file, *sig_str;
size_t len, resid;
ssize_t rv;
int c, ifd, ofd;
@@ -163,9 +166,12 @@ main(int argc, char *argv[])
if (vflag)
dump_header(&hdr);
 
-   format_signature(output_file, hdr.processor_signature);
-   sprintf(output_file + strlen(output_file), ".%02x",
+   sig_str = format_signature(hdr.processor_signature);
+   asprintf(&output_file, "%s.%02x", sig_str,
hdr.processor_flags & 0xff);
+   free(sig_str);
+   if (output_file == NULL)
+   err(1, "asprintf");
ofd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (ofd < 0)
err(1, "open");
@@ -194,5 +200,6 @@ main(int argc, char *argv[])
if (vflag)
printf("written to %s\n\n", output_file);
close(ofd);
+   free(output_file);
}
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333777 - head/sys/dev/vt/hw/vga

2018-05-17 Thread Ed Maste
Author: emaste
Date: Fri May 18 02:58:26 2018
New Revision: 333777
URL: https://svnweb.freebsd.org/changeset/base/333777

Log:
  vt: add more cp437 mappings for vga textmode
  
  In UTF-8 locales mandoc uses a number of characters outside of the Basic
  Latin group, e.g. from general punctuation or miscellaneous mathematical
  symbols, and these rendered as ? in text mode.
  
  This change adds (char, replacement, code point, description):
  
  ¦ | U+00A6 Broken bar
  ✓ √ U+2713 Checkmark
  
  Sponsored by:   The FreeBSD Foundation

Modified:
  head/sys/dev/vt/hw/vga/vt_vga.c

Modified: head/sys/dev/vt/hw/vga/vt_vga.c
==
--- head/sys/dev/vt/hw/vga/vt_vga.c Fri May 18 02:57:39 2018
(r333776)
+++ head/sys/dev/vt/hw/vga/vt_vga.c Fri May 18 02:58:26 2018
(r333777)
@@ -205,6 +205,7 @@ static const struct unicp437 cp437table[] = {
{ 0x0020, 0x20, 0x5e }, { 0x00a0, 0x20, 0x00 },
{ 0x00a1, 0xad, 0x00 }, { 0x00a2, 0x9b, 0x00 },
{ 0x00a3, 0x9c, 0x00 }, { 0x00a5, 0x9d, 0x00 },
+   { 0x00a6, 0x7c, 0x00 },
{ 0x00a7, 0x15, 0x00 }, { 0x00aa, 0xa6, 0x00 },
{ 0x00ab, 0xae, 0x00 }, { 0x00ac, 0xaa, 0x00 },
{ 0x00b0, 0xf8, 0x00 }, { 0x00b1, 0xf1, 0x00 },
@@ -287,8 +288,8 @@ static const struct unicp437 cp437table[] = {
{ 0x2640, 0x0c, 0x00 }, { 0x2642, 0x0b, 0x00 },
{ 0x2660, 0x06, 0x00 }, { 0x2663, 0x05, 0x00 },
{ 0x2665, 0x03, 0x01 }, { 0x266a, 0x0d, 0x00 },
-   { 0x266c, 0x0e, 0x00 }, { 0x27e8, 0x3c, 0x00 },
-   { 0x27e9, 0x3e, 0x00 },
+   { 0x266c, 0x0e, 0x00 }, { 0x2713, 0xfb, 0x00 },
+   { 0x27e8, 0x3c, 0x00 }, { 0x27e9, 0x3e, 0x00 },
 };
 
 static uint8_t
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333794 - head/sys/dev/usb/net

2018-05-18 Thread Ed Maste
Author: emaste
Date: Fri May 18 14:30:45 2018
New Revision: 333794
URL: https://svnweb.freebsd.org/changeset/base/333794

Log:
  muge(4): sync register names with Microchip's lan7800.h
  
  Microchip provided a permissively-licensed lan78xx header, which has
  an 'ETH_' prefix on most definitions.  Follow suit in our driver.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/usb/net/if_muge.c
  head/sys/dev/usb/net/if_mugereg.h

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Fri May 18 14:14:04 2018
(r333793)
+++ head/sys/dev/usb/net/if_muge.c  Fri May 18 14:30:45 2018
(r333794)
@@ -171,7 +171,7 @@ struct muge_softc {
uint32_tsc_rfe_ctl;
uint32_tsc_mdix_ctl;
uint32_tsc_rev_id;
-   uint32_tsc_mchash_table[DP_SEL_VHF_HASH_LEN];
+   uint32_tsc_mchash_table[ETH_DP_SEL_VHF_HASH_LEN];
uint32_tsc_pfilter_table[MUGE_NUM_PFILTER_ADDRS_][2];
 
uint32_tsc_flags;
@@ -385,13 +385,13 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_
if (!locked)
MUGE_LOCK(sc);
 
-   err = lan78xx_read_reg(sc, HW_CFG, &val);
+   err = lan78xx_read_reg(sc, ETH_HW_CFG, &val);
saved = val;
 
-   val &= ~(HW_CFG_LEDO_EN_ | HW_CFG_LED1_EN_);
-   err = lan78xx_write_reg(sc, HW_CFG, val);
+   val &= ~(ETH_HW_CFG_LEDO_EN_ | ETH_HW_CFG_LED1_EN_);
+   err = lan78xx_write_reg(sc, ETH_HW_CFG, val);
 
-   err = lan78xx_wait_for_bits(sc, E2P_CMD, E2P_CMD_BUSY_);
+   err = lan78xx_wait_for_bits(sc, ETH_E2P_CMD, ETH_E2P_CMD_BUSY_);
if (err != 0) {
muge_warn_printf(sc, "eeprom busy, failed to read data\n");
goto done;
@@ -399,28 +399,30 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_
 
/* Start reading the bytes, one at a time. */
for (i = 0; i < buflen; i++) {
-   val = E2P_CMD_BUSY_ | E2P_CMD_READ_;
-   val |= (E2P_CMD_ADDR_MASK_ & (off + i));
-   if ((err = lan78xx_write_reg(sc, E2P_CMD, val)) != 0)
+   val = ETH_E2P_CMD_BUSY_ | ETH_E2P_CMD_READ_;
+   val |= (ETH_E2P_CMD_ADDR_MASK_ & (off + i));
+   if ((err = lan78xx_write_reg(sc, ETH_E2P_CMD, val)) != 0)
goto done;
 
start_ticks = (usb_ticks_t)ticks;
do {
-   if ((err = lan78xx_read_reg(sc, E2P_CMD, &val)) != 0)
+   if ((err = lan78xx_read_reg(sc, ETH_E2P_CMD, &val)) !=
+   0)
goto done;
-   if (!(val & E2P_CMD_BUSY_) || (val & E2P_CMD_TIMEOUT_))
+   if (!(val & ETH_E2P_CMD_BUSY_) ||
+   (val & ETH_E2P_CMD_TIMEOUT_))
break;
 
uether_pause(&sc->sc_ue, hz / 100);
} while (((usb_ticks_t)(ticks - start_ticks)) < max_ticks);
 
-   if (val & (E2P_CMD_BUSY_ | E2P_CMD_TIMEOUT_)) {
+   if (val & (ETH_E2P_CMD_BUSY_ | ETH_E2P_CMD_TIMEOUT_)) {
muge_warn_printf(sc, "eeprom command failed\n");
err = USB_ERR_IOERROR;
break;
}
 
-   if ((err = lan78xx_read_reg(sc, E2P_DATA, &val)) != 0)
+   if ((err = lan78xx_read_reg(sc, ETH_E2P_DATA, &val)) != 0)
goto done;
 
buf[i] = (val & 0xff);
@@ -429,7 +431,7 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_
 done:
if (!locked)
MUGE_UNLOCK(sc);
-   lan78xx_write_reg(sc, HW_CFG, saved);
+   lan78xx_write_reg(sc, ETH_HW_CFG, saved);
return (err);
 }
 
@@ -450,8 +452,8 @@ lan78xx_eeprom_read(struct muge_softc *sc, uint16_t of
uint8_t sig;
int ret;
 
-   ret = lan78xx_eeprom_read_raw(sc, E2P_INDICATOR_OFFSET, &sig, 1);
-   if ((ret == 0) && (sig == E2P_INDICATOR)) {
+   ret = lan78xx_eeprom_read_raw(sc, ETH_E2P_INDICATOR_OFFSET, &sig, 1);
+   if ((ret == 0) && (sig == ETH_E2P_INDICATOR)) {
ret = lan78xx_eeprom_read_raw(sc, off, buf, buflen);
muge_dbg_printf(sc, "EEPROM present\n");
} else {
@@ -587,11 +589,11 @@ lan78xx_setmacaddress(struct muge_softc *sc, const uin
MUGE_LOCK_ASSERT(sc, MA_OWNED);
 
val = (addr[3] << 24) | (addr[2] << 16) | (addr[1] << 8) | addr[0];
-   if ((err = lan78xx_write_reg(sc, RX_ADDRL, val)) != 0)
+   if ((err = lan78xx_write_reg(sc, ETH_RX_ADDRL, val)) != 0)
goto done;
 
val = (addr[5] << 8) | addr[4];
-   err = lan78xx_write_reg(sc, RX_ADDRH, val);
+   err = lan78xx_write_reg(sc, ETH_RX_ADDRH, val);
 
 done:
   

svn commit: r333800 - head/sys/dev/usb/net

2018-05-18 Thread Ed Maste
Author: emaste
Date: Fri May 18 17:07:59 2018
New Revision: 333800
URL: https://svnweb.freebsd.org/changeset/base/333800

Log:
  muge(4): style and comment cleanup
  
  And tag some spots to revisit with XXX.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/usb/net/if_muge.c

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Fri May 18 16:59:58 2018
(r333799)
+++ head/sys/dev/usb/net/if_muge.c  Fri May 18 17:07:59 2018
(r333800)
@@ -152,19 +152,17 @@ do { \
 enum {
MUGE_BULK_DT_RD,
MUGE_BULK_DT_WR,
-   /*
-* the device does support interrupt endpoints,
-* but they're not needed as we poll on MII status.
-* MUGE_INTR_DT_WR,
-* MUGE_INTR_DT_RD,
-*/
+#if 0 /* Ignore interrupt endpoints for now as we poll on MII status. */
+   MUGE_INTR_DT_WR,
+   MUGE_INTR_DT_RD,
+#endif
MUGE_N_TRANSFER,
 };
 
 struct muge_softc {
struct usb_ethersc_ue;
struct mtx  sc_mtx;
-   struct usb_xfer  *sc_xfer[MUGE_N_TRANSFER];
+   struct usb_xfer *sc_xfer[MUGE_N_TRANSFER];
int sc_phyno;
 
/* Settings for the mac control (MAC_CSR) register. */
@@ -184,7 +182,6 @@ struct muge_softc {
 #define MUGE_UNLOCK(_sc)   mtx_unlock(&(_sc)->sc_mtx)
 #define MUGE_LOCK_ASSERT(_sc, t)   mtx_assert(&(_sc)->sc_mtx, t)
 
-
 static device_probe_t muge_probe;
 static device_attach_t muge_attach;
 static device_detach_t muge_detach;
@@ -460,7 +457,7 @@ lan78xx_eeprom_read(struct muge_softc *sc, uint16_t of
ret = -EINVAL;
muge_dbg_printf(sc, "EEPROM not present\n");
}
-   return ret;
+   return (ret);
 }
 
 /**
@@ -492,9 +489,9 @@ lan78xx_otp_read_raw(struct muge_softc *sc, uint16_t o
 
err = lan78xx_read_reg(sc, OTP_PWR_DN, &val);
 
-   /* checking if bit is set */
+   /* Checking if bit is set. */
if (val & OTP_PWR_DN_PWRDN_N) {
-   /* clearing it, then waiting for it to be cleared */
+   /* Clear it, then wait for it to be cleared. */
lan78xx_write_reg(sc, OTP_PWR_DN, 0);
err = lan78xx_wait_for_bits(sc, OTP_PWR_DN, OTP_PWR_DN_PWRDN_N);
if (err != 0) {
@@ -502,7 +499,7 @@ lan78xx_otp_read_raw(struct muge_softc *sc, uint16_t o
goto done;
}
}
-   /* start reading the bytes, one at a time */
+   /* Start reading the bytes, one at a time. */
for (i = 0; i < buflen; i++) {
err = lan78xx_write_reg(sc, OTP_ADDR1,
((off + i) >> 8) & OTP_ADDR1_15_11);
@@ -555,14 +552,14 @@ lan78xx_otp_read(struct muge_softc *sc, uint16_t off, 
if (err == 0) {
if (sig == OTP_INDICATOR_1) {
} else if (sig == OTP_INDICATOR_2) {
-   off += 0x100;
+   off += 0x100; /* XXX */
} else {
err = -EINVAL;
}
-   if(!err)
+   if (!err)
err = lan78xx_otp_read_raw(sc, off, buf, buflen);
}
-   return err;
+   return (err);
 }
 
 /**
@@ -617,8 +614,7 @@ lan78xx_set_rx_max_frame_length(struct muge_softc *sc,
uint32_t buf;
bool rxenabled;
 
-   /* first we have to disable rx before changing the length */
-
+   /* First we have to disable rx before changing the length. */
err = lan78xx_read_reg(sc, ETH_MAC_RX, &buf);
rxenabled = ((buf & ETH_MAC_RX_EN_) != 0);
 
@@ -627,8 +623,7 @@ lan78xx_set_rx_max_frame_length(struct muge_softc *sc,
err = lan78xx_write_reg(sc, ETH_MAC_RX, buf);
}
 
-   /* setting max frame length */
-
+   /* Setting max frame length. */
buf &= ~ETH_MAC_RX_MAX_FR_SIZE_MASK_;
buf |= (((size + 4) << ETH_MAC_RX_MAX_FR_SIZE_SHIFT_) &
ETH_MAC_RX_MAX_FR_SIZE_MASK_);
@@ -641,7 +636,7 @@ lan78xx_set_rx_max_frame_length(struct muge_softc *sc,
err = lan78xx_write_reg(sc, ETH_MAC_RX, buf);
}
 
-   return 0;
+   return (0);
 }
 
 /**
@@ -733,7 +728,8 @@ lan78xx_miibus_writereg(device_t dev, int phy, int reg
val = htole32(val);
lan78xx_write_reg(sc, ETH_MII_DATA, val);
 
-   addr = (phy << 11) | (reg << 6) | ETH_MII_ACC_MII_WRITE_ | 
ETH_MII_ACC_MII_BUSY_;
+   addr = (phy << 11) | (reg << 6) |
+   ETH_MII_ACC_MII_WRITE_ | ETH_MII_ACC_MII_BUSY_;
lan78xx_write_reg(sc, ETH_MII_ACC, addr);
 
if (lan78xx_wait_for_bits(sc, ETH_MII_ACC, ETH_MII_ACC_MII_BUSY_) != 0)
@@ -808,11 +804,11 @@ lan78xx_miibus_statchg(device_t dev)
goto done;
}
 
-   /* Enable/disable full duplex operation and TX/RX pause */
+   /* Enable/disable full duplex op

svn commit: r333805 - head/sys/amd64/conf

2018-05-18 Thread Ed Maste
Author: emaste
Date: Fri May 18 17:51:42 2018
New Revision: 333805
URL: https://svnweb.freebsd.org/changeset/base/333805

Log:
  amd64 GENERIC: correct whitespace on smartpqi entry

Modified:
  head/sys/amd64/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Fri May 18 17:46:40 2018(r333804)
+++ head/sys/amd64/conf/GENERIC Fri May 18 17:51:42 2018(r333805)
@@ -166,7 +166,7 @@ device  iir # Intel 
Integrated RAID
 device ips # IBM (Adaptec) ServeRAID
 device mly # Mylex AcceleRAID/eXtremeRAID
 device twa # 3ware 9000 series PATA/SATA RAID
-device  smartpqi# Microsemi smartpqi driver
+device smartpqi# Microsemi smartpqi driver
 device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID 
controller
 
 # RAID controllers
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333806 - in head/sys: dev/acpica dev/ofw fs/cuse i386/bios kern net

2018-05-18 Thread Ed Maste
Author: emaste
Date: Fri May 18 17:58:09 2018
New Revision: 333806
URL: https://svnweb.freebsd.org/changeset/base/333806

Log:
  Use NULL for SYSINIT's last arg, which is a pointer type
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/acpica/acpi.c
  head/sys/dev/ofw/ofw_fdt.c
  head/sys/fs/cuse/cuse.c
  head/sys/i386/bios/apm.c
  head/sys/kern/imgact_binmisc.c
  head/sys/kern/kern_linker.c
  head/sys/kern/kern_module.c
  head/sys/kern/kern_synch.c
  head/sys/kern/kern_sysctl.c
  head/sys/kern/link_elf.c
  head/sys/kern/link_elf_obj.c
  head/sys/kern/posix4_mib.c
  head/sys/kern/subr_pcpu.c
  head/sys/net/route.c
  head/sys/net/vnet.c

Modified: head/sys/dev/acpica/acpi.c
==
--- head/sys/dev/acpica/acpi.c  Fri May 18 17:51:42 2018(r333805)
+++ head/sys/dev/acpica/acpi.c  Fri May 18 17:58:09 2018(r333806)
@@ -4179,4 +4179,4 @@ acpi_pm_register(void *arg)
 power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL);
 }
 
-SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, 0);
+SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, NULL);

Modified: head/sys/dev/ofw/ofw_fdt.c
==
--- head/sys/dev/ofw/ofw_fdt.c  Fri May 18 17:51:42 2018(r333805)
+++ head/sys/dev/ofw/ofw_fdt.c  Fri May 18 17:58:09 2018(r333806)
@@ -126,7 +126,7 @@ sysctl_register_fdt_oid(void *arg)
CTLTYPE_OPAQUE | CTLFLAG_RD, NULL, 0, sysctl_handle_dtb, "",
"Device Tree Blob");
 }
-SYSINIT(dtb_oid, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_fdt_oid, 0);
+SYSINIT(dtb_oid, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_fdt_oid, NULL);
 
 static int
 ofw_fdt_init(ofw_t ofw, void *data)

Modified: head/sys/fs/cuse/cuse.c
==
--- head/sys/fs/cuse/cuse.c Fri May 18 17:51:42 2018(r333805)
+++ head/sys/fs/cuse/cuse.c Fri May 18 17:58:09 2018(r333806)
@@ -252,7 +252,7 @@ cuse_kern_init(void *arg)
(CUSE_VERSION >> 16) & 0xFF, (CUSE_VERSION >> 8) & 0xFF,
(CUSE_VERSION >> 0) & 0xFF);
 }
-SYSINIT(cuse_kern_init, SI_SUB_DEVFS, SI_ORDER_ANY, cuse_kern_init, 0);
+SYSINIT(cuse_kern_init, SI_SUB_DEVFS, SI_ORDER_ANY, cuse_kern_init, NULL);
 
 static void
 cuse_kern_uninit(void *arg)

Modified: head/sys/i386/bios/apm.c
==
--- head/sys/i386/bios/apm.cFri May 18 17:51:42 2018(r333805)
+++ head/sys/i386/bios/apm.cFri May 18 17:58:09 2018(r333806)
@@ -1532,4 +1532,4 @@ apm_pm_register(void *arg)
power_pm_register(POWER_PM_TYPE_APM, apm_pm_func, NULL);
 }
 
-SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, apm_pm_register, 0);
+SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, apm_pm_register, NULL);

Modified: head/sys/kern/imgact_binmisc.c
==
--- head/sys/kern/imgact_binmisc.c  Fri May 18 17:51:42 2018
(r333805)
+++ head/sys/kern/imgact_binmisc.c  Fri May 18 17:58:09 2018
(r333806)
@@ -747,8 +747,10 @@ imgact_binmisc_fini(void *arg)
sx_destroy(&interp_list_sx);
 }
 
-SYSINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_init, 0);
-SYSUNINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_fini, 
0);
+SYSINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_init,
+NULL);
+SYSUNINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_fini,
+NULL);
 
 /*
  * Tell kern_execve.c about it, with a little help from the linker.

Modified: head/sys/kern/kern_linker.c
==
--- head/sys/kern/kern_linker.c Fri May 18 17:51:42 2018(r333805)
+++ head/sys/kern/kern_linker.c Fri May 18 17:58:09 2018(r333806)
@@ -163,7 +163,7 @@ linker_init(void *arg)
TAILQ_INIT(&linker_files);
 }
 
-SYSINIT(linker, SI_SUB_KLD, SI_ORDER_FIRST, linker_init, 0);
+SYSINIT(linker, SI_SUB_KLD, SI_ORDER_FIRST, linker_init, NULL);
 
 static void
 linker_stop_class_add(void *arg)
@@ -411,7 +411,7 @@ linker_init_kernel_modules(void)
 }
 
 SYSINIT(linker_kernel, SI_SUB_KLD, SI_ORDER_ANY, linker_init_kernel_modules,
-0);
+NULL);
 
 static int
 linker_load_file(const char *filename, linker_file_t *result)
@@ -1684,7 +1684,7 @@ fail:
/* woohoo! we made it! */
 }
 
-SYSINIT(preload, SI_SUB_KLD, SI_ORDER_MIDDLE, linker_preload, 0);
+SYSINIT(preload, SI_SUB_KLD, SI_ORDER_MIDDLE, linker_preload, NULL);
 
 /*
  * Handle preload files that failed to load any modules.
@@ -1719,7 +1719,7 @@ linker_preload_finish(void *arg)
  * becomes runnable in SI_SUB_KTHREAD_INIT, so go slightly before that.
  */
 SYSINIT(preload_finish, SI_SUB_KTHREAD_INIT - 100, SI_ORDER_MIDDLE,
-linker_preload_finish, 0);

Re: svn commit: r333819 - in head/sys: conf modules/blake2 modules/crypto modules/drm2/i915kms modules/ipfilter

2018-05-19 Thread Ed Maste
On 18 May 2018 at 20:04, Matt Macy  wrote:
> Author: mmacy
> Date: Sat May 19 00:04:01 2018
> New Revision: 333819
> URL: https://svnweb.freebsd.org/changeset/base/333819
>
> Log:
>   Silence non-actionable warnings in vendor code
...
> Modified: head/sys/conf/kern.mk
> ==
> --- head/sys/conf/kern.mk   Fri May 18 23:42:08 2018(r333818)
> +++ head/sys/conf/kern.mk   Sat May 19 00:04:01 2018(r333819)
> @@ -18,12 +18,13 @@ CWARNFLAGS?=-Wall -Wredundant-decls 
> -Wnested-externs
>  # a false positive.
>  .if ${COMPILER_TYPE} == "clang"
>  NO_WCONSTANT_CONVERSION=   -Wno-error-constant-conversion
> -NO_WSHIFT_COUNT_NEGATIVE=  -Wno-error-shift-count-negative
> -NO_WSHIFT_COUNT_OVERFLOW=  -Wno-error-shift-count-overflow
> -NO_WSELF_ASSIGN=   -Wno-error-self-assign
> +NO_WSHIFT_COUNT_NEGATIVE=  -Wno-shift-count-negative
> +NO_WSHIFT_COUNT_OVERFLOW=  -Wno-shift-count-overflow
> +NO_WSELF_ASSIGN=   -Wno-self-assign

This silences the warning across the tree, not just vendor code.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333876 - head/sys/kern

2018-05-19 Thread Ed Maste
Author: emaste
Date: Sat May 19 11:37:02 2018
New Revision: 333876
URL: https://svnweb.freebsd.org/changeset/base/333876

Log:
  Remove duplicate cap_no_rights from r333874
  
  Archs using in-tree gcc were broken with `warning: redundant
  redeclaration of 'cap_no_rights' [-Wredundant-decls]`.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/kern/subr_capability.c

Modified: head/sys/kern/subr_capability.c
==
--- head/sys/kern/subr_capability.c Sat May 19 10:49:51 2018
(r333875)
+++ head/sys/kern/subr_capability.c Sat May 19 11:37:02 2018
(r333876)
@@ -70,7 +70,6 @@ __read_mostly cap_rights_t cap_getsockname_rights;
 __read_mostly cap_rights_t cap_ioctl_rights;
 __read_mostly cap_rights_t cap_listen_rights;
 __read_mostly cap_rights_t cap_mmap_rights;
-__read_mostly cap_rights_t cap_no_rights;
 __read_mostly cap_rights_t cap_fsync_rights;
 __read_mostly cap_rights_t cap_pdgetpid_rights;
 __read_mostly cap_rights_t cap_pdkill_rights;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333872 - head/cddl/contrib/opensolaris/tools/ctf/cvt

2018-05-19 Thread Ed Maste
On 19 May 2018 at 02:31, Matt Macy  wrote:
> Author: mmacy
> Date: Sat May 19 06:31:17 2018
> New Revision: 333872
> URL: https://svnweb.freebsd.org/changeset/base/333872
>
> Log:
>   ctfconvert: silence useless enum has too many values warning

I agree it's reasonable to silence this warning as it is not
actionable for almost everyone who encounters it. It does indicate a
real problem in our tool chain though and I added an entry to
https://wiki.freebsd.org/DTraceTODO.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333884 - head/sys/dev/usb/net

2018-05-19 Thread Ed Maste
Author: emaste
Date: Sat May 19 18:44:29 2018
New Revision: 333884
URL: https://svnweb.freebsd.org/changeset/base/333884

Log:
  muge(4): chase r333813 if_addr_lock rwlock to epoch + mutex
  
  muge was committed to the tree in r333713 but not yet connected to the
  tree, and it crossed paths with the migration to using ck.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/usb/net/if_muge.c

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Sat May 19 18:27:14 2018
(r333883)
+++ head/sys/dev/usb/net/if_muge.c  Sat May 19 18:44:29 2018
(r333884)
@@ -1816,9 +1816,10 @@ muge_setmulti(struct usb_ether *ue)
} else {
/* Lock the mac address list before hashing each of them. */
if_maddr_rlock(ifp);
-   if (!TAILQ_EMPTY(&ifp->if_multiaddrs)) {
+   if (!CK_STAILQ_EMPTY(&ifp->if_multiaddrs)) {
i = 1;
-   TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
+   CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs,
+   ifma_link) {
/* First fill up the perfect address table. */
addr = LLADDR((struct sockaddr_dl *)
ifma->ifma_addr);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r333968 - in head/sys: netinet netinet6

2018-05-21 Thread Ed Maste
On 21 May 2018 at 04:55, Marko Zec  wrote:
> On Mon, 21 May 2018 08:34:10 +
> Matt Macy  wrote:
>
>> Author: mmacy
>> Date: Mon May 21 08:34:10 2018
>> New Revision: 333968
>> URL: https://svnweb.freebsd.org/changeset/base/333968
>>
>> Log:
>>   in(6)_mcast: Expand out vnet set / restore macro so that they work
>> in a conditional block
>>   Reported by:zec at fer.hr
>>
>
> Uhmm...  please don't do this, for at least two reasons:

After r333968 the build is also broken on all archs but amd64 and i386.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333975 - in head/sys: netinet netinet6

2018-05-21 Thread Ed Maste
Author: emaste
Date: Mon May 21 11:56:07 2018
New Revision: 333975
URL: https://svnweb.freebsd.org/changeset/base/333975

Log:
  Revert r333968, it broke all archs but i386 and amd64

Modified:
  head/sys/netinet/in_mcast.c
  head/sys/netinet6/in6_mcast.c

Modified: head/sys/netinet/in_mcast.c
==
--- head/sys/netinet/in_mcast.c Mon May 21 09:43:50 2018(r333974)
+++ head/sys/netinet/in_mcast.c Mon May 21 11:56:07 2018(r333975)
@@ -653,7 +653,6 @@ inm_release(struct in_multi *inm)
 {
struct ifmultiaddr *ifma;
struct ifnet *ifp;
-   struct vnet *saved_vnet;
 
CTR2(KTR_IGMPV3, "%s: refcount is %d", __func__, inm->inm_refcount);
MPASS(inm->inm_refcount == 0);
@@ -664,16 +663,14 @@ inm_release(struct in_multi *inm)
 
/* XXX this access is not covered by IF_ADDR_LOCK */
CTR2(KTR_IGMPV3, "%s: purging ifma %p", __func__, ifma);
-   if (ifp) {
-   saved_vnet = curvnet;
-   curvnet = ifp->if_vnet;
-   }
+   if (ifp)
+   CURVNET_SET(ifp->if_vnet);
inm_purge(inm);
free(inm, M_IPMADDR);
 
if_delmulti_ifma_flags(ifma, 1);
if (ifp) {
-   curvnet = saved_vnet;
+   CURVNET_RESTORE();
if_rele(ifp);
}
 }
@@ -1669,7 +1666,6 @@ inp_gcmoptions(epoch_context_t ctx)
struct in_mfilter   *imf;
struct in_multi *inm;
struct ifnet *ifp;
-   struct vnet *saved_vnet;
size_t   idx, nmships;
 
imo =  __containerof(ctx, struct ip_moptions, imo_epoch_ctx);
@@ -1681,13 +1677,11 @@ inp_gcmoptions(epoch_context_t ctx)
imf_leave(imf);
inm = imo->imo_membership[idx];
ifp = inm->inm_ifp;
-   if (ifp) {
-   saved_vnet = curvnet;
-   curvnet = ifp->if_vnet;
-   }
+   if (ifp)
+   CURVNET_SET(ifp->if_vnet);
(void)in_leavegroup(inm, imf);
if (ifp)
-   curvnet = saved_vnet;
+   CURVNET_RESTORE();
if (imf)
imf_purge(imf);
}

Modified: head/sys/netinet6/in6_mcast.c
==
--- head/sys/netinet6/in6_mcast.c   Mon May 21 09:43:50 2018
(r333974)
+++ head/sys/netinet6/in6_mcast.c   Mon May 21 11:56:07 2018
(r333975)
@@ -524,7 +524,6 @@ in6m_release(struct in6_multi *inm)
 {
struct ifmultiaddr *ifma;
struct ifnet *ifp;
-   struct vnet *saved_vnet;
 
CTR2(KTR_MLD, "%s: refcount is %d", __func__, inm->in6m_refcount);
 
@@ -540,16 +539,14 @@ in6m_release(struct in6_multi *inm)
KASSERT(ifma->ifma_protospec == NULL,
("%s: ifma_protospec != NULL", __func__));
 
-   if (ifp) {
-   saved_vnet = curvnet;
-   curvnet = ifp->if_vnet;
-   }
+   if (ifp)
+   CURVNET_SET(ifp->if_vnet);
in6m_purge(inm);
free(inm, M_IP6MADDR);
 
if_delmulti_ifma_flags(ifma, 1);
if (ifp) {
-   curvnet = saved_vnet;
+   CURVNET_RESTORE();
if_rele(ifp);
}
 }
@@ -1631,7 +1628,6 @@ inp_gcmoptions(epoch_context_t ctx)
struct in6_mfilter  *imf;
struct in6_multi *inm;
struct ifnet *ifp;
-   struct vnet *saved_vnet;
size_t   idx, nmships;
 
imo =  __containerof(ctx, struct ip6_moptions, imo6_epoch_ctx);
@@ -1643,13 +1639,11 @@ inp_gcmoptions(epoch_context_t ctx)
im6f_leave(imf);
inm = imo->im6o_membership[idx];
ifp = inm->in6m_ifp;
-   if (ifp) {
-   saved_vnet = curvnet;
-   curvnet = ifp->if_vnet;
-   }   
+   if (ifp)
+   CURVNET_SET(ifp->if_vnet);
(void)in6_leavegroup(inm, imf);
if (ifp)
-   curvnet = saved_vnet;
+   CURVNET_RESTORE();
if (imf)
im6f_purge(imf);
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r333978 - in head/sys: netinet netinet6

2018-05-21 Thread Ed Maste
Author: emaste
Date: Mon May 21 13:08:44 2018
New Revision: 333978
URL: https://svnweb.freebsd.org/changeset/base/333978

Log:
  Pair CURVNET_SET and CURVNET_RESTORE in a block
  
  Per vnet(9), CURVNET_SET and CURVNET_RESTORE cannot be used as a single
  statement for a conditional and CURVNET_RESTORE must be in the same
  block as CURVNET_SET (or a subblock).
  
  Reviewed by:  andrew
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/netinet/in_mcast.c
  head/sys/netinet6/in6_mcast.c

Modified: head/sys/netinet/in_mcast.c
==
--- head/sys/netinet/in_mcast.c Mon May 21 13:08:18 2018(r333977)
+++ head/sys/netinet/in_mcast.c Mon May 21 13:08:44 2018(r333978)
@@ -663,15 +663,17 @@ inm_release(struct in_multi *inm)
 
/* XXX this access is not covered by IF_ADDR_LOCK */
CTR2(KTR_IGMPV3, "%s: purging ifma %p", __func__, ifma);
-   if (ifp)
+   if (ifp != NULL) {
CURVNET_SET(ifp->if_vnet);
-   inm_purge(inm);
-   free(inm, M_IPMADDR);
-
-   if_delmulti_ifma_flags(ifma, 1);
-   if (ifp) {
+   inm_purge(inm);
+   free(inm, M_IPMADDR);
+   if_delmulti_ifma_flags(ifma, 1);
CURVNET_RESTORE();
if_rele(ifp);
+   } else {
+   inm_purge(inm);
+   free(inm, M_IPMADDR);
+   if_delmulti_ifma_flags(ifma, 1);
}
 }
 
@@ -1677,11 +1679,13 @@ inp_gcmoptions(epoch_context_t ctx)
imf_leave(imf);
inm = imo->imo_membership[idx];
ifp = inm->inm_ifp;
-   if (ifp)
+   if (ifp != NULL) {
CURVNET_SET(ifp->if_vnet);
-   (void)in_leavegroup(inm, imf);
-   if (ifp)
+   (void)in_leavegroup(inm, imf);
CURVNET_RESTORE();
+   } else {
+   (void)in_leavegroup(inm, imf);
+   }
if (imf)
imf_purge(imf);
}

Modified: head/sys/netinet6/in6_mcast.c
==
--- head/sys/netinet6/in6_mcast.c   Mon May 21 13:08:18 2018
(r333977)
+++ head/sys/netinet6/in6_mcast.c   Mon May 21 13:08:44 2018
(r333978)
@@ -539,15 +539,17 @@ in6m_release(struct in6_multi *inm)
KASSERT(ifma->ifma_protospec == NULL,
("%s: ifma_protospec != NULL", __func__));
 
-   if (ifp)
+   if (ifp != NULL) {
CURVNET_SET(ifp->if_vnet);
-   in6m_purge(inm);
-   free(inm, M_IP6MADDR);
-
-   if_delmulti_ifma_flags(ifma, 1);
-   if (ifp) {
+   in6m_purge(inm);
+   free(inm, M_IP6MADDR);
+   if_delmulti_ifma_flags(ifma, 1);
CURVNET_RESTORE();
if_rele(ifp);
+   } else {
+   in6m_purge(inm);
+   free(inm, M_IP6MADDR);
+   if_delmulti_ifma_flags(ifma, 1);
}
 }
 
@@ -1639,11 +1641,13 @@ inp_gcmoptions(epoch_context_t ctx)
im6f_leave(imf);
inm = imo->im6o_membership[idx];
ifp = inm->in6m_ifp;
-   if (ifp)
+   if (ifp != NULL) {
CURVNET_SET(ifp->if_vnet);
-   (void)in6_leavegroup(inm, imf);
-   if (ifp)
+   (void)in6_leavegroup(inm, imf);
CURVNET_RESTORE();
+   } else {
+   (void)in6_leavegroup(inm, imf);
+   }
if (imf)
im6f_purge(imf);
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334046 - head/tools/tools/intel-ucode-split

2018-05-22 Thread Ed Maste
Author: emaste
Date: Tue May 22 14:35:33 2018
New Revision: 334046
URL: https://svnweb.freebsd.org/changeset/base/334046

Log:
  intel-ucode-split: add -n flag to skip creating output files
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tools/tools/intel-ucode-split/intel-ucode-split.c

Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c
==
--- head/tools/tools/intel-ucode-split/intel-ucode-split.c  Tue May 22 
14:26:58 2018(r334045)
+++ head/tools/tools/intel-ucode-split/intel-ucode-split.c  Tue May 22 
14:35:33 2018(r334046)
@@ -112,7 +112,7 @@ static void
 usage(void)
 {
 
-   printf("ucode-split [-v] microcode_file\n");
+   printf("ucode-split [-nv] microcode_file\n");
exit(1);
 }
 
@@ -124,11 +124,14 @@ main(int argc, char *argv[])
size_t len, resid;
ssize_t rv;
int c, ifd, ofd;
-   bool vflag;
+   bool nflag, vflag;
 
-   vflag = false;
-   while ((c = getopt(argc, argv, "v")) != -1) {
+   nflag = vflag = false;
+   while ((c = getopt(argc, argv, "nv")) != -1) {
switch (c) {
+   case 'n':
+   nflag = true;
+   break;
case 'v':
vflag = true;
break;
@@ -166,40 +169,48 @@ main(int argc, char *argv[])
if (vflag)
dump_header(&hdr);
 
-   sig_str = format_signature(hdr.processor_signature);
-   asprintf(&output_file, "%s.%02x", sig_str,
-   hdr.processor_flags & 0xff);
-   free(sig_str);
-   if (output_file == NULL)
-   err(1, "asprintf");
-   ofd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, 0600);
-   if (ofd < 0)
-   err(1, "open");
-
-   /* Write header. */
-   rv = write(ofd, &hdr, sizeof(hdr));
-   if (rv < (ssize_t)sizeof(hdr))
-   err(1, "write");
-
-   /* Copy data. */
resid = (hdr.total_size != 0 ? hdr.total_size : 2048) -
sizeof(hdr);
if (resid > 1 << 24) /* Arbitrary chosen maximum size. */
errx(1, "header total_size too large");
-   while (resid > 0) {
-   len = resid < bufsize ? resid : bufsize;
-   rv = read(ifd, buf, len);
-   if (rv < 0)
-   err(1, "read");
-   else if (rv < (ssize_t)len)
-   errx(1, "truncated microcode data");
-   if (write(ofd, buf, len) < (ssize_t)len)
+
+   if (nflag) {
+   if (lseek(ifd, resid, SEEK_CUR) == -1)
+   err(1, "lseek");
+   printf("\n");
+   } else {
+   sig_str = format_signature(hdr.processor_signature);
+   asprintf(&output_file, "%s.%02x", sig_str,
+   hdr.processor_flags & 0xff);
+   free(sig_str);
+   if (output_file == NULL)
+   err(1, "asprintf");
+   ofd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC,
+   0600);
+   if (ofd < 0)
+   err(1, "open");
+   
+   /* Write header. */
+   rv = write(ofd, &hdr, sizeof(hdr));
+   if (rv < (ssize_t)sizeof(hdr))
err(1, "write");
-   resid -= len;
+   
+   /* Copy data. */
+   while (resid > 0) {
+   len = resid < bufsize ? resid : bufsize;
+   rv = read(ifd, buf, len);
+   if (rv < 0)
+   err(1, "read");
+   else if (rv < (ssize_t)len)
+   errx(1, "truncated microcode data");
+   if (write(ofd, buf, len) < (ssize_t)len)
+   err(1, "write");
+   resid -= len;
+   }
+   if (vflag)
+   printf("written to %s\n\n", output_file);
+   close(ofd);
+   free(output_file);
}
-   if (vflag)
-   printf("written to %s\n\n", output_file);
-   close(ofd);
-   free(output_file);
}
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/

svn commit: r334063 - in head/sys/dev/usb: . net

2018-05-22 Thread Ed Maste
Author: emaste
Date: Tue May 22 20:00:56 2018
New Revision: 334063
URL: https://svnweb.freebsd.org/changeset/base/334063

Log:
  if_muge: only attach to LAN7800 Chip ID
  
  This driver was developed for the LAN7800 and the register-compatible
  LAN7515 (found on Raspberry Pi 3B+) and has only been tested on those
  devices.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/usb/net/if_muge.c
  head/sys/dev/usb/net/if_mugereg.h
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Tue May 22 19:24:57 2018
(r334062)
+++ head/sys/dev/usb/net/if_muge.c  Tue May 22 20:00:56 2018
(r334063)
@@ -168,7 +168,8 @@ struct muge_softc {
/* Settings for the mac control (MAC_CSR) register. */
uint32_tsc_rfe_ctl;
uint32_tsc_mdix_ctl;
-   uint32_tsc_rev_id;
+   uint16_tchipid;
+   uint16_tchiprev;
uint32_tsc_mchash_table[ETH_DP_SEL_VHF_HASH_LEN];
uint32_tsc_pfilter_table[MUGE_NUM_PFILTER_ADDRS_][2];
 
@@ -974,15 +975,20 @@ lan78xx_chip_init(struct muge_softc *sc)
}
 
/* Read and display the revision register. */
-   if ((err = lan78xx_read_reg(sc, ETH_ID_REV, &sc->sc_rev_id)) < 0) {
+   if ((err = lan78xx_read_reg(sc, ETH_ID_REV, &buf)) < 0) {
muge_warn_printf(sc, "failed to read ETH_ID_REV (err = %d)\n",
err);
goto init_failed;
}
-
-   device_printf(sc->sc_ue.ue_dev, "chip 0x%04lx, rev. %04lx\n",
-   (sc->sc_rev_id & ETH_ID_REV_CHIP_ID_MASK_) >> 16,
-   (sc->sc_rev_id & ETH_ID_REV_CHIP_REV_MASK_));
+   sc->chipid = (buf & ETH_ID_REV_CHIP_ID_MASK_) >> 16;
+   sc->chiprev = buf & ETH_ID_REV_CHIP_REV_MASK_;
+   if (sc->chipid != ETH_ID_REV_CHIP_ID_7800_) {
+   muge_warn_printf(sc, "Chip ID 0x%04x not yet supported\n",
+   sc->chipid);
+   goto init_failed;
+   }
+   device_printf(sc->sc_ue.ue_dev, "Chip ID 0x%04x rev %04x\n", sc->chipid,
+   sc->chiprev);
 
/* Respond to BULK-IN tokens with a NAK when RX FIFO is empty. */
if ((err = lan78xx_read_reg(sc, ETH_USB_CFG0, &buf)) != 0) {

Modified: head/sys/dev/usb/net/if_mugereg.h
==
--- head/sys/dev/usb/net/if_mugereg.h   Tue May 22 19:24:57 2018
(r334062)
+++ head/sys/dev/usb/net/if_mugereg.h   Tue May 22 20:00:56 2018
(r334063)
@@ -47,6 +47,9 @@
 #define ETH_ID_REV 0x000
 #define ETH_ID_REV_CHIP_ID_MASK_   0xUL
 #define ETH_ID_REV_CHIP_REV_MASK_  0xUL
+#define ETH_ID_REV_CHIP_ID_7800_   0x7800
+#define ETH_ID_REV_CHIP_ID_7801_   0x7801
+#define ETH_ID_REV_CHIP_ID_7850_   0x7850
 
 /* Device interrupt status register. */
 #define ETH_INT_STS0x00C

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsTue May 22 19:24:57 2018(r334062)
+++ head/sys/dev/usb/usbdevsTue May 22 20:00:56 2018(r334063)
@@ -4322,6 +4322,7 @@ product SMC2 2514HUB  0x2514  USB Hub
 product SMC3 2662WUSB  0xa002  2662W-AR Wireless
 product SMC2 LAN7800_ETH   0x7800  USB/Ethernet
 product SMC2 LAN7801_ETH   0x7801  USB/Ethernet
+product SMC2 LAN7850_ETH   0x7850  USB/Ethernet
 product SMC2 LAN9500_ETH   0x9500  USB/Ethernet
 product SMC2 LAN9505_ETH   0x9505  USB/Ethernet
 product SMC2 LAN9530_ETH   0x9530  USB/Ethernet
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334089 - head/sbin/dumpon

2018-05-23 Thread Ed Maste
On 23 May 2018 at 06:45, Eitan Adler  wrote:
> Author: eadler
> Date: Wed May 23 10:45:32 2018
> New Revision: 334089
> URL: https://svnweb.freebsd.org/changeset/base/334089
>
> Log:
>   dumpon: point to better kernel debug symbols.
>...
> -.Dl # kgdb /usr/obj/sys/GENERIC/kernel.debug vmcore.#
> +.Dl # kgdb /usr/lib/debug/boot/kernel/kernel.debug vmcore.#

This should be /boot/kernel/kernel, or perhaps $(sysctl -n
kern.bootfile). The kernel ELF object contains a .gnu_debuglink
section that points to the debug data contained in kernel.debug.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334089 - head/sbin/dumpon

2018-05-23 Thread Ed Maste
On 23 May 2018 at 10:15, Rodney W. Grimes
 wrote:
>> Author: eadler
>> Date: Wed May 23 10:45:32 2018
>> New Revision: 334089
>> URL: https://svnweb.freebsd.org/changeset/base/334089
>>
>> Log:
>>   dumpon: point to better kernel debug symbols.
>> ...
>
> You should of probably also included that fact that kgdb now must be invoked
> /usr/libexec/kgdb, as it has been moved.

Rather, dumon should document installing the gdb port or package.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334120 - head/share/mk

2018-05-23 Thread Ed Maste
Author: emaste
Date: Wed May 23 21:26:33 2018
New Revision: 334120
URL: https://svnweb.freebsd.org/changeset/base/334120

Log:
  Revert r334081 (-Wmain) as it broke the build on gcc architectures

Modified:
  head/share/mk/bsd.sys.mk

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkWed May 23 21:25:49 2018(r334119)
+++ head/share/mk/bsd.sys.mkWed May 23 21:26:33 2018(r334120)
@@ -28,7 +28,7 @@ CFLAGS+=  -std=${CSTD}
 #CFLAGS+=  -pedantic
 .if defined(WARNS)
 .if ${WARNS} >= 1
-CWARNFLAGS+=   -Wsystem-headers -Wmain
+CWARNFLAGS+=   -Wsystem-headers
 .if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE})
 CWARNFLAGS+=   -Werror
 .endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334120 - head/share/mk

2018-05-23 Thread Ed Maste
On 23 May 2018 at 21:28, Eitan Adler  wrote:
> On 23 May 2018 at 14:26, Ed Maste  wrote:
>> Author: emaste
>> Date: Wed May 23 21:26:33 2018
>> New Revision: 334120
>> URL: https://svnweb.freebsd.org/changeset/base/334120
>>
>> Log:
>>   Revert r334081 (-Wmain) as it broke the build on gcc architectures
>
> I tested this with "make universe". Can you give me an example build
> log that failed?

I saw it via https://ci.freebsd.org/tinderbox - an example log is here:
https://ci.freebsd.org/job/FreeBSD-head-mips-build/2330/console

cc1plus: warning: command line option "-Wmain" is valid for C/ObjC but
not for C++

> Would CFLAGS.clang += -Wmain be okay?

I suspect so.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334153 - head

2018-05-24 Thread Ed Maste
Author: emaste
Date: Thu May 24 14:01:22 2018
New Revision: 334153
URL: https://svnweb.freebsd.org/changeset/base/334153

Log:
  Restore arm, riscv, sparc64, and mips to UNIVERSE after r334128

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Thu May 24 13:17:24 2018(r334152)
+++ head/Makefile   Thu May 24 14:01:22 2018(r334153)
@@ -481,8 +481,7 @@ worlds: .PHONY
 # existing system is.
 #
 .if make(universe) || make(universe_kernels) || make(tinderbox) || 
make(targets)
-TARGETS?=amd64 i386 powerpc arm64 
-#riscv arm  sparc64 mips 
+TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64
 _UNIVERSE_TARGETS= ${TARGETS}
 TARGET_ARCHES_arm?=arm armeb armv6 armv7
 TARGET_ARCHES_arm64?=  aarch64
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334129 - head/sys/amd64/conf

2018-05-24 Thread Ed Maste
On 24 May 2018 at 01:36, Matthew Macy  wrote:
> On Wed, May 23, 2018 at 10:32 PM, Ravi Pokala  wrote:
>>>
>>> Author: mmacy
>>> Date: Thu May 24 04:31:53 2018
>>> New Revision: 334129
>>> URL: https://svnweb.freebsd.org/changeset/base/334129
>>>
>>> Log:
>>>   take NUMA out
>>> ...
>> Why?
>
>
> I ^C'd the prior commit too late.

For cases like this the commit message should include something like
"It was accidentally committed in r334128."
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334167 - head/sys/dev/usb/net

2018-05-24 Thread Ed Maste
Author: emaste
Date: Thu May 24 16:34:06 2018
New Revision: 334167
URL: https://svnweb.freebsd.org/changeset/base/334167

Log:
  if_muge: Add LAN78xx family USB ids but attach only to LAN7800
  
  This driver was developed for the LAN7800 and the register-compatible
  LAN7515 and has only been tested on those devices.  Adding support for
  other members of the family should be straightforward, once we have
  devices to test.
  
  With this change the driver will probe but fail to attach due to the
  Chip ID check, but will leave a hint leading to the driver that needs
  work.
  
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D15537

Modified:
  head/sys/dev/usb/net/if_muge.c

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Thu May 24 16:31:18 2018
(r334166)
+++ head/sys/dev/usb/net/if_muge.c  Thu May 24 16:34:06 2018
(r334167)
@@ -122,6 +122,8 @@ SYSCTL_INT(_hw_usb_muge, OID_AUTO, debug, CTLFLAG_RWTU
 static const struct usb_device_id lan78xx_devs[] = {
 #define MUGE_DEV(p,i) { USB_VPI(USB_VENDOR_SMC2, USB_PRODUCT_SMC2_##p, i) }
MUGE_DEV(LAN7800_ETH, 0),
+   MUGE_DEV(LAN7801_ETH, 0),
+   MUGE_DEV(LAN7850_ETH, 0),
 #undef MUGE_DEV
 };
 
@@ -174,7 +176,8 @@ struct muge_softc {
uint32_tsc_pfilter_table[MUGE_NUM_PFILTER_ADDRS_][2];
 
uint32_tsc_flags;
-#define MUGE_FLAG_LINK 0x0001
+#defineMUGE_FLAG_LINK  0x0001
+#defineMUGE_FLAG_INIT_DONE 0x0002
 };
 
 #define MUGE_IFACE_IDX 0
@@ -1125,6 +1128,7 @@ lan78xx_chip_init(struct muge_softc *sc)
buf |= ETH_FCT_TX_CTL_EN_;
err = lan78xx_write_reg(sc, ETH_FCT_RX_CTL, buf);
 
+   sc->sc_flags |= MUGE_FLAG_INIT_DONE;
return (0);
 
 init_failed:
@@ -2116,7 +2120,7 @@ muge_attach(device_t dev)
muge_config, MUGE_N_TRANSFER, sc, &sc->sc_mtx);
if (err) {
device_printf(dev, "error: allocating USB transfers failed\n");
-   goto detach;
+   goto err;
}
 
ue->ue_sc = sc;
@@ -2128,12 +2132,22 @@ muge_attach(device_t dev)
err = uether_ifattach(ue);
if (err) {
device_printf(dev, "error: could not attach interface\n");
-   goto detach;
+   goto err_usbd;
}
+
+   /* Wait for lan78xx_chip_init from post-attach callback to complete. */
+   uether_ifattach_wait(ue);
+   if (!(sc->sc_flags & MUGE_FLAG_INIT_DONE))
+   goto err_attached;
+
return (0);
 
-detach:
-   muge_detach(dev);
+err_attached:
+   uether_ifdetach(ue);
+err_usbd:
+   usbd_transfer_unsetup(sc->sc_xfer, MUGE_N_TRANSFER);
+err:
+   mtx_destroy(&sc->sc_mtx);
return (ENXIO);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334171 - head

2018-05-24 Thread Ed Maste
Author: emaste
Date: Thu May 24 17:08:55 2018
New Revision: 334171
URL: https://svnweb.freebsd.org/changeset/base/334171

Log:
  UPDATING: remove EOL whitespace in 20180523 entry

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Thu May 24 17:06:00 2018(r334170)
+++ head/UPDATING   Thu May 24 17:08:55 2018(r334171)
@@ -53,7 +53,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
 
 20180523:
The on-disk format for hwpmc callchain records has changed to include
-   threadid corresponding to a given record. This changes the field 
offsets
+   threadid corresponding to a given record. This changes the field offsets
and thus requires that libpmcstat be rebuilt before using a kernel
later than r334108.
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334212 - head/sys/modules/usb

2018-05-25 Thread Ed Maste
Author: emaste
Date: Fri May 25 17:29:29 2018
New Revision: 334212
URL: https://svnweb.freebsd.org/changeset/base/334212

Log:
  if_muge: connect module to the build
  
  Supported Microchip devices:
  - LAN7515 USB 2 hub and gigabit Ethernet controller w/ PHY
  - LAN7800 USB 3.0 gigabit Ethernet controller w/ PHY
  
  The LAN7515 is the Ethernet controller on the Raspberry Pi 3 B+.
  
  This driver has some TODO items outstanding, but basic functionality
  works.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/modules/usb/Makefile

Modified: head/sys/modules/usb/Makefile
==
--- head/sys/modules/usb/Makefile   Fri May 25 16:29:22 2018
(r334211)
+++ head/sys/modules/usb/Makefile   Fri May 25 17:29:29 2018
(r334212)
@@ -52,6 +52,7 @@ SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma
  umct umcs umodem umoscom uplcom uslcom uvisor uvscom
 SUBDIR += udl
 SUBDIR += uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso ipheth
+SUBDIR += muge
 SUBDIR += ure urndis
 SUBDIR += usfs umass urio
 SUBDIR += quirk template
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334213 - head/sys/dev/usb/net

2018-05-25 Thread Ed Maste
Author: emaste
Date: Fri May 25 17:31:43 2018
New Revision: 334213
URL: https://svnweb.freebsd.org/changeset/base/334213

Log:
  if_muge: Use lock assertion instead of broken locking in lan78xx_chip_init
  
  Previously lan78xx_chip_init locked the driver's mutex if not already
  locked, but unlocked it only in the case of error.  This provided a
  fairly clear indication that the function is already called with the
  lock held, so just replace it with a lock assertion.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/usb/net/if_muge.c

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Fri May 25 17:29:29 2018
(r334212)
+++ head/sys/dev/usb/net/if_muge.c  Fri May 25 17:31:43 2018
(r334213)
@@ -953,13 +953,10 @@ static int
 lan78xx_chip_init(struct muge_softc *sc)
 {
int err;
-   int locked;
uint32_t buf;
uint32_t burst_cap;
 
-   locked = mtx_owned(&sc->sc_mtx);
-   if (!locked)
-   MUGE_LOCK(sc);
+   MUGE_LOCK_ASSERT(sc, MA_OWNED);
 
/* Enter H/W config mode. */
lan78xx_write_reg(sc, ETH_HW_CFG, ETH_HW_CFG_LRST_);
@@ -1132,9 +1129,6 @@ lan78xx_chip_init(struct muge_softc *sc)
return (0);
 
 init_failed:
-   if (!locked)
-   MUGE_UNLOCK(sc);
-
muge_err_printf(sc, "lan78xx_chip_init failed (err=%d)\n", err);
return (err);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334216 - head/usr.sbin/bhyve

2018-05-25 Thread Ed Maste
On 25 May 2018 at 14:54, Marcelo Araujo  wrote:
> Author: araujo
> Date: Fri May 25 18:54:40 2018
> New Revision: 334216
> URL: https://svnweb.freebsd.org/changeset/base/334216
>
> Log:
>   After a long discussion about assert(3), we gonna use a HardenedBSD
>   approach to chek strdup(3) memory allocation.

I'm not sure what you mean by "a HardenedBSD approach" here --
checking return values is just proper practice.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334199 - head/usr.sbin/bhyve

2018-05-25 Thread Ed Maste
On 25 May 2018 at 14:29, Marcelo Araujo  wrote:
>
> One more thing, exit with err(1) is wrong, 1 is EPERM and should be 12
> ENOMEN! :D

No, please see the err(3) manpage - err's first argument is the exit
code for the program, not an errno.

(err suggests using exit codes from sysexits(3), but there is much
disagreement about that. Either way it's not an errno.)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334199 - head/usr.sbin/bhyve

2018-05-25 Thread Ed Maste
On 25 May 2018 at 14:26, Marcelo Araujo  wrote:
>
>> The fact that we don't do NDEBUG builds normally does not allow us to
>> ignore that it exists.  It's perfectly reasonable for a user to build
>> with CFLAGS+=NDEBUG.  That need to work.  If code is going to fail to
>> handle resource errors with NDEBUG set then it needs something like this
>> at the top of the file:
>
> Please document it in some place!

NDEBUG is documented in assert(3). The man page should have more of an
explanation (and examples) of the possible pitfalls of assert()
though.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334291 - head/lib/libc/string

2018-05-28 Thread Ed Maste
Author: emaste
Date: Mon May 28 18:29:15 2018
New Revision: 334291
URL: https://svnweb.freebsd.org/changeset/base/334291

Log:
  strsep.3: don't silently ignore errors
  
  Reported by:  bde
  MFC with: r334275

Modified:
  head/lib/libc/string/strsep.3

Modified: head/lib/libc/string/strsep.3
==
--- head/lib/libc/string/strsep.3   Mon May 28 17:47:32 2018
(r334290)
+++ head/lib/libc/string/strsep.3   Mon May 28 18:29:15 2018
(r334291)
@@ -86,9 +86,10 @@ to parse a string, and prints each token in separate l
 char *token, *string, *tofree;
 
 tofree = string = strdup("abc,def,ghi");
-if (string != NULL)
-   while ((token = strsep(&string, ",")) != NULL)
-   printf("%s\en", token);
+if (string == NULL)
+   err(1, "strdup");
+while ((token = strsep(&string, ",")) != NULL)
+   printf("%s\en", token);
 
 free(tofree);
 .Ed
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334294 - head/sys/dev/usb/net

2018-05-28 Thread Ed Maste
Author: emaste
Date: Mon May 28 20:06:40 2018
New Revision: 334294
URL: https://svnweb.freebsd.org/changeset/base/334294

Log:
  if_muge: Add GMII enable (vs RGMII) bit
  
  The GMII control bit ETH_MAC_CR_GMII_EN_ is not documented in
  LAN78xx datasheets, but from the permissively licensed header provided
  by Microchip it is:
  
   #define ETH_MAC_CR_GMII_EN (0x0008UL ) // GMII/RGMII Selection

Modified:
  head/sys/dev/usb/net/if_mugereg.h

Modified: head/sys/dev/usb/net/if_mugereg.h
==
--- head/sys/dev/usb/net/if_mugereg.h   Mon May 28 19:55:51 2018
(r334293)
+++ head/sys/dev/usb/net/if_mugereg.h   Mon May 28 20:06:40 2018
(r334294)
@@ -207,6 +207,7 @@
 
 /* MAC Control Register */
 #define ETH_MAC_CR 0x100
+#define ETH_MAC_CR_GMII_EN_(0x1U << 19)/* GMII Enable */
 #define ETH_MAC_CR_AUTO_DUPLEX_(0x1U << 12)
 #define ETH_MAC_CR_AUTO_SPEED_ (0x1U << 11)
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334320 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys i386/include

2018-05-29 Thread Ed Maste
On 29 May 2018 at 09:10, Hans Petter Selasky  wrote:
>
> I only tested buildkernel i386 LINT + GENERIC with this change. I will have
> a look ASAP.

On IRC the suggestion was made to run buildworld for any header
change, and I think this seems like a reasonable standard.

Our full buildworld times are admittedly quite long, so if you have a
suitably up-to-date toolchain on the build host you can skip building
toolchain components with something like:

make -DWITHOUT_TOOLCHAIN -DWITHOUT_CLANG_BOOTSTRAP
-DWITHOUT_LLD_BOOTSTRAP buildworld

That should give much of the build coverage benefit without taking so
long. On my little NUC desktop (with -j8) this took about 30 minutes.

In addition many folks have put a lot of effort into making non-clean
builds work - both meta-mode and conventional. I've generally been
building with -DNO_CLEAN for a few years now. The same build with
-DNO_CLEAN added and after `touch atomic.h` (again on the NUC) took
about 3 minutes.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334337 - head/release/amd64

2018-05-29 Thread Ed Maste
Author: emaste
Date: Tue May 29 15:06:13 2018
New Revision: 334337
URL: https://svnweb.freebsd.org/changeset/base/334337

Log:
  switch amd64 memstick installer images to MBR
  
  A good number of BIOSes have trouble booting from GPT in non-UEFI mode.
  This is commonly reported with Lenovo desktops and laptops (including
  X220, X230, T430, and E31) and Dell systems.  Although UEFI is the
  preferred amd64 boot method on recent hardware, older hardware does not
  support UEFI, a user may wish to boot via BIOS/CSM, and some systems
  that support UEFI fail to boot FreeBSD via UEFI (such as an old
  AMD FX-6100 that I have).
  
  With this change amd64 memsticks remain dual-mode (booting from either
  UEFI or CSM); the partitioning type is just switched from GPT to MBR.
  
  The "vestigial swap partition" in the GPT scheme was added in r265017 to
  work around some issue with loader's GPT support, so we should not need
  it when using MBR.
  
  There is some concern that future UEFI systems may not boot from MBR,
  but I am not aware of any today.  In any case the likely path forward
  for our installers is to migrate to CD/USB combo images, and if it
  becomes necessary introduce a separate memstick specifically for the
  MBR BIOS/CSM case.
  
  PR:   227954
  Reviewed by:  gjb, imp, tsoome
  MFC after:3 days
  Relnotes: Yes
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D15599

Modified:
  head/release/amd64/make-memstick.sh

Modified: head/release/amd64/make-memstick.sh
==
--- head/release/amd64/make-memstick.sh Tue May 29 14:40:50 2018
(r334336)
+++ head/release/amd64/make-memstick.sh Tue May 29 15:06:13 2018
(r334337)
@@ -36,12 +36,11 @@ makefs -B little -o label=FreeBSD_Install -o version=2
 rm ${1}/etc/fstab
 rm ${1}/etc/rc.conf.local
 
-mkimg -s gpt \
--b ${1}/boot/pmbr \
+mkimg -s mbr \
+-b ${1}/boot/mbr \
 -p efi:=${1}/boot/boot1.efifat \
--p freebsd-boot:=${1}/boot/gptboot \
--p freebsd-ufs:=${2}.part \
--p freebsd-swap::1M \
+-p freebsd:-"mkimg -s bsd -b ${1}/boot/boot -p freebsd-ufs:=${2}.part" \
+-a 2 \
 -o ${2}
 rm ${2}.part
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334360 - in head: etc/mtree tests/sys tests/sys/audit

2018-05-29 Thread Ed Maste
On 29 May 2018 at 19:08, Alan Somers  wrote:
> Author: asomers
> Date: Tue May 29 23:08:33 2018
> New Revision: 334360
> URL: https://svnweb.freebsd.org/changeset/base/334360
>
> Log:
>   Add initial set of tests for audit(4)

This has broken the build on many architectures, e.g. mips:
https://ci.freebsd.org/job/FreeBSD-head-mips-build/2467/console

23:15:17 In file included from /usr/src/tests/sys/audit/utils.c:38:
23:15:17 /usr/obj/usr/src/mips.mips/tmp/usr/include/bsm/libbsm.h:880:
warning: redundant redeclaration of 'au_bsm_to_domain'
23:15:17 /usr/obj/usr/src/mips.mips/tmp/usr/include/bsm/audit_record.h:301:
warning: previous declaration of 'au_bsm_to_domain' was here
...
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334362 - head/tests/sys

2018-05-29 Thread Ed Maste
Author: emaste
Date: Wed May 30 00:36:58 2018
New Revision: 334362
URL: https://svnweb.freebsd.org/changeset/base/334362

Log:
  Temporarily disconnect audit tests
  
  Audit tests added in r334360 broke the build on a number of archs.
  Remove the subdir from the top level tests/sys/Makefile until they're
  fixed.

Modified:
  head/tests/sys/Makefile

Modified: head/tests/sys/Makefile
==
--- head/tests/sys/Makefile Wed May 30 00:06:17 2018(r334361)
+++ head/tests/sys/Makefile Wed May 30 00:36:58 2018(r334362)
@@ -6,7 +6,6 @@ TESTSDIR=   ${TESTSBASE}/sys
 
 TESTS_SUBDIRS+=acl
 TESTS_SUBDIRS+=aio
-TESTS_SUBDIRS+=audit
 TESTS_SUBDIRS+=capsicum
 TESTS_SUBDIRS+=${_cddl}
 TESTS_SUBDIRS+=fifo
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334363 - head/usr.bin/elfdump

2018-05-29 Thread Ed Maste
Author: emaste
Date: Wed May 30 01:16:50 2018
New Revision: 334363
URL: https://svnweb.freebsd.org/changeset/base/334363

Log:
  elfdump: chase ABI tag note name change from r232832
  
  r232832 changed the ABI tag note name from .note.ABI-tag to .note.tag.
  Follow suit in elfdump.
  
  Elfdump's note parsing is very basic and should be significantly
  reworked, but for now just restore the broken functionality.
  
  PR:   228290
  Submitted by: martin at lispworks.com
  MFC after:1 week

Modified:
  head/usr.bin/elfdump/elfdump.c

Modified: head/usr.bin/elfdump/elfdump.c
==
--- head/usr.bin/elfdump/elfdump.c  Wed May 30 00:36:58 2018
(r334362)
+++ head/usr.bin/elfdump/elfdump.c  Wed May 30 01:16:50 2018
(r334363)
@@ -659,7 +659,7 @@ main(int ac, char **av)
case SHT_NOTE:
name = elf_get_word(e, v, SH_NAME);
if (flags & ED_NOTE &&
-   strcmp(shstrtab + name, ".note.ABI-tag") == 0)
+   strcmp(shstrtab + name, ".note.tag") == 0)
elf_print_note(e, v);
break;
case SHT_DYNSYM:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334363 - head/usr.bin/elfdump

2018-05-30 Thread Ed Maste
On 30 May 2018 at 08:10, Shawn Webb  wrote:
>
> I wonder if it would be a good idea to handle .note.ABI-tag and
> .note.tag so that it can handle binaries compiled both before and
> after r232832.

As I said in the commit message, elfdump's note parsing needs a bunch
of rework. r232832 was years ago and today I think it's much more
likely that if elfdump encounters a .note.ABI-tag section that's going
to be a GNU note (that will be misinterpreted) than one from a
years-old FreeBSD binary.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334380 - head/sys/kern

2018-05-30 Thread Ed Maste
Author: emaste
Date: Wed May 30 12:55:27 2018
New Revision: 334380
URL: https://svnweb.freebsd.org/changeset/base/334380

Log:
  link_elf_obj: correct an error message
  
  Previously we'd report that a file has "no valid symbol table" if it in
  fact had two or more.  Change the message to report that there must be
  exactly one.

Modified:
  head/sys/kern/link_elf_obj.c

Modified: head/sys/kern/link_elf_obj.c
==
--- head/sys/kern/link_elf_obj.cWed May 30 12:40:37 2018
(r334379)
+++ head/sys/kern/link_elf_obj.cWed May 30 12:55:27 2018
(r334380)
@@ -656,7 +656,8 @@ link_elf_load_file(linker_class_t cls, const char *fil
}
if (nsym != 1) {
/* Only allow one symbol table for now */
-   link_elf_error(filename, "file has no valid symbol table");
+   link_elf_error(filename,
+   "file must have exactly one symbol table");
error = ENOEXEC;
goto out;
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334381 - head/tools/tools/makeroot

2018-05-30 Thread Ed Maste
Author: emaste
Date: Wed May 30 13:51:00 2018
New Revision: 334381
URL: https://svnweb.freebsd.org/changeset/base/334381

Log:
  makeroot.sh: allow duplicate entries even with -f 
  
  makefs disallows duplicate entries unless the -D option is specified.
  
  Previously makeroot.sh enabled -D unless a filelist was provided via
  the -f options.  The filelist logic creates an mtree manifest from the
  METALOG and the provided filelist by passing them through `sort -u`,
  so duplicates were not expected.  However, duplicates can still occur
  when a directory appears in multiple packages -- for example,
  
  ./etc/pam.d type=dir uname=root gname=wheel mode=0755
  ./etc/pam.d type=dir mode=0755 tags=package=runtime
  ./etc/pam.d type=dir mode=0755 tags=package=at
  ./etc/pam.d type=dir mode=0755 tags=package=ftp
  ./etc/pam.d type=dir mode=0755 tags=package=telnet
  
  For the purposes of makefs these directory entries are identical, but
  are of course not identical for sort -u.
  
  For now just leave the allow duplicates -D flag enabled.
  
  PR:   228606
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tools/tools/makeroot/makeroot.sh

Modified: head/tools/tools/makeroot/makeroot.sh
==
--- head/tools/tools/makeroot/makeroot.sh   Wed May 30 12:55:27 2018
(r334380)
+++ head/tools/tools/makeroot/makeroot.sh   Wed May 30 13:51:00 2018
(r334381)
@@ -80,7 +80,7 @@ while getopts "B:de:f:g:K:k:l:p:s:" opt; do
B)  BFLAG="-B ${OPTARG}" ;;
d)  DEBUG=1 ;;
e)  EXTRAS="${EXTRAS} ${OPTARG}" ;;
-   f)  FILELIST="${OPTARG}"; DUPFLAG= ;;
+   f)  FILELIST="${OPTARG}";;
g)  GROUP="${OPTARG}" ;;
K)  KEYUSERS="${KEYUSERS} ${OPTARG}" ;;
k)  KEYDIR="${OPTARG}" ;;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334391 - head/share/mk

2018-05-30 Thread Ed Maste
Author: emaste
Date: Wed May 30 18:04:25 2018
New Revision: 334391
URL: https://svnweb.freebsd.org/changeset/base/334391

Log:
  Enable lld as the system linker by default on amd64
  
  The migration to LLVM's lld linker has been in progress for quite some
  time - about three years ago I opened an upstream LLVM meta-bug to track
  issues using lld as FreeBSD's linker, and about 1.5 years ago requested
  the first exp-run with lld as the system linker.
  
  As of r327783 we enabled LLD_BOOTSTRAP by default on amd64, using lld as
  the linker to link the kernel and world, but GNU ld was still installed
  as /usr/bin/ld.
  
  The vast majority of issues observed when building ports with lld as the
  system linker have now been solved, so set LLD_IS_LD by default on amd64
  and install lld as /usr/bin/ld.  A small number of port failures remain
  and these will be addressed in the near future.
  
  Thanks to antoine@ for handling the exp-runs, krion@ for investigating
  many port failures and adding LLD_UNSAFE or other fixes or workarounds,
  and everyone who helped investigate, fix or tag ports.
  
  PR:   214864 (exp-run)
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed May 30 17:05:48 2018(r334390)
+++ head/share/mk/src.opts.mk   Wed May 30 18:04:25 2018(r334391)
@@ -263,11 +263,8 @@ __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND
 .else
 __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND
 .endif
-.if ${__T} == "aarch64"
+.if ${__T} == "aarch64" || ${__T} == "amd64"
 __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD
-.elif ${__T} == "amd64"
-__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP
-__DEFAULT_NO_OPTIONS+=LLD_IS_LD
 .else
 __DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334393 - head/share/man/man5

2018-05-30 Thread Ed Maste
Author: emaste
Date: Wed May 30 18:34:45 2018
New Revision: 334393
URL: https://svnweb.freebsd.org/changeset/base/334393

Log:
  Regen src.conf.5 after r334391 - LLD_IS_LD default on amd64
  
  Relnotes: yes
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Wed May 30 18:27:48 2018
(r334392)
+++ head/share/man/man5/src.conf.5  Wed May 30 18:34:45 2018
(r334393)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd May 26, 2018
+.Dd May 30, 2018
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -989,12 +989,12 @@ amd64/amd64 and arm64/aarch64.
 Set to use GNU binutils ld as the system linker, instead of LLVM's LLD.
 .Pp
 This is a default setting on
-amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, 
mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, 
mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and 
sparc64/sparc64.
+arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, 
powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64.
 .It Va WITH_LLD_IS_LD
 Set to use LLVM's LLD as the system linker, instead of GNU binutils ld.
 .Pp
 This is a default setting on
-arm64/aarch64.
+amd64/amd64 and arm64/aarch64.
 .It Va WITHOUT_LLVM_COV
 Set to not build the
 .Xr llvm-cov 1
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334486 - head/sys/kern

2018-06-01 Thread Ed Maste
Author: emaste
Date: Fri Jun  1 13:26:45 2018
New Revision: 334486
URL: https://svnweb.freebsd.org/changeset/base/334486

Log:
  ANSIfy sys/kern

Modified:
  head/sys/kern/kern_descrip.c
  head/sys/kern/kern_exec.c
  head/sys/kern/subr_prof.c
  head/sys/kern/sys_pipe.c
  head/sys/kern/sysv_msg.c
  head/sys/kern/vfs_cluster.c
  head/sys/kern/vfs_vnops.c

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cFri Jun  1 12:43:13 2018
(r334485)
+++ head/sys/kern/kern_descrip.cFri Jun  1 13:26:45 2018
(r334486)
@@ -1148,8 +1148,7 @@ fail:
  * This is common code for FIOGETOWN ioctl called by fcntl(fd, F_GETOWN, arg).
  */
 pid_t
-fgetown(sigiop)
-   struct sigio **sigiop;
+fgetown(struct sigio **sigiop)
 {
pid_t pgid;
 

Modified: head/sys/kern/kern_exec.c
==
--- head/sys/kern/kern_exec.c   Fri Jun  1 12:43:13 2018(r334485)
+++ head/sys/kern/kern_exec.c   Fri Jun  1 13:26:45 2018(r334486)
@@ -978,8 +978,7 @@ exec_fail:
 }
 
 int
-exec_map_first_page(imgp)
-   struct image_params *imgp;
+exec_map_first_page(struct image_params *imgp)
 {
int rv, i, after, initial_pagein;
vm_page_t ma[VM_INITIAL_PAGEIN];

Modified: head/sys/kern/subr_prof.c
==
--- head/sys/kern/subr_prof.c   Fri Jun  1 12:43:13 2018(r334485)
+++ head/sys/kern/subr_prof.c   Fri Jun  1 13:26:45 2018(r334486)
@@ -139,8 +139,7 @@ kmupetext(uintfptr_t nhighpc)
 }
 
 static void
-kmstartup(dummy)
-   void *dummy;
+kmstartup(void *dummy)
 {
char *cp;
struct gmonparam *p = &_gmonparam;

Modified: head/sys/kern/sys_pipe.c
==
--- head/sys/kern/sys_pipe.cFri Jun  1 12:43:13 2018(r334485)
+++ head/sys/kern/sys_pipe.cFri Jun  1 13:26:45 2018(r334486)
@@ -491,9 +491,7 @@ sys_pipe2(struct thread *td, struct pipe2_args *uap)
  * If it fails it will return ENOMEM.
  */
 static int
-pipespace_new(cpipe, size)
-   struct pipe *cpipe;
-   int size;
+pipespace_new(struct pipe *cpipe, int size)
 {
caddr_t buffer;
int error, cnt, firstseg;
@@ -559,9 +557,7 @@ retry:
  * Wrapper for pipespace_new() that performs locking assertions.
  */
 static int
-pipespace(cpipe, size)
-   struct pipe *cpipe;
-   int size;
+pipespace(struct pipe *cpipe, int size)
 {
 
KASSERT(cpipe->pipe_state & PIPE_LOCKFL,
@@ -573,9 +569,7 @@ pipespace(cpipe, size)
  * lock a pipe for I/O, blocking other access
  */
 static __inline int
-pipelock(cpipe, catch)
-   struct pipe *cpipe;
-   int catch;
+pipelock(struct pipe *cpipe, int catch)
 {
int error;
 
@@ -596,8 +590,7 @@ pipelock(cpipe, catch)
  * unlock a pipe I/O lock
  */
 static __inline void
-pipeunlock(cpipe)
-   struct pipe *cpipe;
+pipeunlock(struct pipe *cpipe)
 {
 
PIPE_LOCK_ASSERT(cpipe, MA_OWNED);
@@ -611,8 +604,7 @@ pipeunlock(cpipe)
 }
 
 void
-pipeselwakeup(cpipe)
-   struct pipe *cpipe;
+pipeselwakeup(struct pipe *cpipe)
 {
 
PIPE_LOCK_ASSERT(cpipe, MA_OWNED);
@@ -631,9 +623,7 @@ pipeselwakeup(cpipe)
  * will start out zero'd from the ctor, so we just manage the kmem.
  */
 static void
-pipe_create(pipe, backing)
-   struct pipe *pipe;
-   int backing;
+pipe_create(struct pipe *pipe, int backing)
 {
 
if (backing) {
@@ -655,12 +645,8 @@ pipe_create(pipe, backing)
 
 /* ARGSUSED */
 static int
-pipe_read(fp, uio, active_cred, flags, td)
-   struct file *fp;
-   struct uio *uio;
-   struct ucred *active_cred;
-   struct thread *td;
-   int flags;
+pipe_read(struct file *fp, struct uio *uio, struct ucred *active_cred,
+int flags, struct thread *td)
 {
struct pipe *rpipe;
int error;
@@ -834,9 +820,7 @@ unlocked_error:
  * This is similar to a physical write operation.
  */
 static int
-pipe_build_write_buffer(wpipe, uio)
-   struct pipe *wpipe;
-   struct uio *uio;
+pipe_build_write_buffer(struct pipe *wpipe, struct uio *uio)
 {
u_int size;
int i;
@@ -880,8 +864,7 @@ pipe_build_write_buffer(wpipe, uio)
  * unmap and unwire the process buffer
  */
 static void
-pipe_destroy_write_buffer(wpipe)
-   struct pipe *wpipe;
+pipe_destroy_write_buffer(struct pipe *wpipe)
 {
 
PIPE_LOCK_ASSERT(wpipe, MA_OWNED);
@@ -895,8 +878,7 @@ pipe_destroy_write_buffer(wpipe)
  * pages can be freed without loss of data.
  */
 static void
-pipe_clone_write_buffer(wpipe)
-   struct pipe *wpipe;
+pipe_clone_write_buffer(struct pipe *wpipe)
 {
struct uio uio;
struct iovec iov;
@@ -935,9 +917,7 @@ pipe_clone_write_buffer(wpipe)
  * the pipe buffer.  Then the direct mapping write is set-up.
  */
 static int
-pipe_direct

svn commit: r334666 - head

2018-06-05 Thread Ed Maste
Author: emaste
Date: Tue Jun  5 18:27:09 2018
New Revision: 334666
URL: https://svnweb.freebsd.org/changeset/base/334666

Log:
  Handle -DNO_CLEAN builds across brk/sbrk rewrite in r334626
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Jun  5 17:18:10 2018(r334665)
+++ head/Makefile.inc1  Tue Jun  5 18:27:09 2018(r334666)
@@ -810,7 +810,8 @@ _cleanobj_fast_depend_hack: .PHONY
 # 20180406  r332119  setlogin
 # 20180411  r332443  exect
 # 20180525  r334224  vadvise
-.for f in exect fstat fstatat fstatfs getdirentries getfsstat setlogin shmat 
sigreturn statfs vadvise
+# 20180604  r334626  brk sbrk
+.for f in brk exect fstat fstatat fstatfs getdirentries getfsstat sbrk 
setlogin shmat sigreturn statfs vadvise
 .if exists(${OBJTOP}/lib/libc/.depend.${f}.o)
@if egrep -qw '${f}\.[sS]' \
${OBJTOP}/lib/libc/.depend.${f}.o; then \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334814 - head/sbin/dump

2018-06-08 Thread Ed Maste
On 7 June 2018 at 16:49, Kirk McKusick  wrote:
> Author: mckusick
> Date: Thu Jun  7 20:49:01 2018
> New Revision: 334814
> URL: https://svnweb.freebsd.org/changeset/base/334814
>
> Log:
>   Ensure proper initialization of superblock.
>
...
> --- head/sbin/dump/main.c   Thu Jun  7 19:57:55 2018(r334813)
> +++ head/sbin/dump/main.c   Thu Jun  7 20:49:01 2018(r334814)
> @@ -433,6 +433,7 @@ main(int argc, char *argv[])
> msgtail("to %s\n", tape);
>
> sync();
> +   sblock = NULL;
> if ((ret = sbget(diskfd, &sblock, -1)) != 0) {

sblock is initialized to NULL at the beginning of ffs_sbget, so I'm
not really sure what's happening here.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334964 - in head: share/man/man4 sys/dev/usb/net

2018-06-11 Thread Ed Maste
Author: emaste
Date: Mon Jun 11 18:44:56 2018
New Revision: 334964
URL: https://svnweb.freebsd.org/changeset/base/334964

Log:
  if_muge: add LAN7850 support
  
  Differences between LAN7800 and LAN7850 from the driver's perspective:
  
  * The LAN7800 muxes EEPROM signals with LEDs, so LED mode needs to be
disabled when reading/writing EEPROM.  The EEPROM is not muxed on the
LAN7850.
  
  * The Linux driver enables automatic duplex and speed detection when
there is no EEPROM, for the LAN7800 only.  With this FreeBSD driver
LAN7850-based adapters without a configuration EEPROM fail to link
(with or without the automatic duplex and speed detection code), so
I have just followed the example of the Linux driver for now.
  
  Sponsored by: The FreeBSD Foundation
  Sponsored by: Microchip (hardware)

Modified:
  head/share/man/man4/muge.4
  head/sys/dev/usb/net/if_muge.c

Modified: head/share/man/man4/muge.4
==
--- head/share/man/man4/muge.4  Mon Jun 11 17:22:27 2018(r334963)
+++ head/share/man/man4/muge.4  Mon Jun 11 18:44:56 2018(r334964)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 17, 2018
+.Dd June 11, 2018
 .Dt MUGE 4
 .Os
 .Sh NAME
@@ -56,6 +56,8 @@ driver supports:
 .It
 Microchip LAN7800 USB 3.1 Gigabit Ethernet controller with PHY
 .It
+Microchip LAN7850 USB 2.0 Gigabit Ethernet controller with PHY
+.It
 Microchip LAN7515 USB 2 hub and Gigabit Ethernet controller with PHY
 .El
 .Sh SEE ALSO
@@ -68,3 +70,6 @@ The
 .Nm
 device driver first appeared in
 .Fx 12.0 .
+.Sh BUGS
+USB-Ethernet adapters that use the LAN7850 without a configuration EEPROM
+will not work.

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Mon Jun 11 17:22:27 2018
(r334963)
+++ head/sys/dev/usb/net/if_muge.c  Mon Jun 11 18:44:56 2018
(r334964)
@@ -40,6 +40,9 @@ __FBSDID("$FreeBSD$");
  * USB 3.1 to 10/100/1000 Mbps Ethernet
  * LAN7800 http://www.microchip.com/wwwproducts/en/LAN7800
  *
+ * USB 2.0 to 10/100/1000 Mbps Ethernet
+ * LAN7850 http://www.microchip.com/wwwproducts/en/LAN7850
+ *
  * USB 2 to 10/100/1000 Mbps Ethernet with built-in USB hub
  * LAN7515 (no datasheet available, but probes and functions as LAN7800)
  *
@@ -386,11 +389,14 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_
if (!locked)
MUGE_LOCK(sc);
 
-   err = lan78xx_read_reg(sc, ETH_HW_CFG, &val);
-   saved = val;
+   if (sc->chipid == ETH_ID_REV_CHIP_ID_7800_) {
+   /* EEDO/EECLK muxed with LED0/LED1 on LAN7800. */
+   err = lan78xx_read_reg(sc, ETH_HW_CFG, &val);
+   saved = val;
 
-   val &= ~(ETH_HW_CFG_LEDO_EN_ | ETH_HW_CFG_LED1_EN_);
-   err = lan78xx_write_reg(sc, ETH_HW_CFG, val);
+   val &= ~(ETH_HW_CFG_LEDO_EN_ | ETH_HW_CFG_LED1_EN_);
+   err = lan78xx_write_reg(sc, ETH_HW_CFG, val);
+   }
 
err = lan78xx_wait_for_bits(sc, ETH_E2P_CMD, ETH_E2P_CMD_BUSY_);
if (err != 0) {
@@ -432,7 +438,10 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_
 done:
if (!locked)
MUGE_UNLOCK(sc);
-   lan78xx_write_reg(sc, ETH_HW_CFG, saved);
+   if (sc->chipid == ETH_ID_REV_CHIP_ID_7800_) {
+   /* Restore saved LED configuration. */
+   lan78xx_write_reg(sc, ETH_HW_CFG, saved);
+   }
return (err);
 }
 
@@ -982,7 +991,11 @@ lan78xx_chip_init(struct muge_softc *sc)
}
sc->chipid = (buf & ETH_ID_REV_CHIP_ID_MASK_) >> 16;
sc->chiprev = buf & ETH_ID_REV_CHIP_REV_MASK_;
-   if (sc->chipid != ETH_ID_REV_CHIP_ID_7800_) {
+   switch (sc->chipid) {
+   case ETH_ID_REV_CHIP_ID_7800_:
+   case ETH_ID_REV_CHIP_ID_7850_:
+   break;
+   default:
muge_warn_printf(sc, "Chip ID 0x%04x not yet supported\n",
sc->chipid);
goto init_failed;
@@ -1078,9 +1091,12 @@ lan78xx_chip_init(struct muge_softc *sc)
goto init_failed;
}
 
-   /* Enable automatic duplex detection and automatic speed detection. */
err = lan78xx_read_reg(sc, ETH_MAC_CR, &buf);
-   buf |= ETH_MAC_CR_AUTO_DUPLEX_ | ETH_MAC_CR_AUTO_SPEED_;
+   if (sc->chipid == ETH_ID_REV_CHIP_ID_7800_ &&
+   !lan78xx_eeprom_present(sc)) {
+   /* Set automatic duplex and speed on LAN7800 without EEPROM. */
+   buf |= ETH_MAC_CR_AUTO_DUPLEX_ | ETH_MAC_CR_AUTO_SPEED_;
+   }
err = lan78xx_write_reg(sc, ETH_MAC_CR, buf);
 
/*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334965 - head/sys/kern

2018-06-11 Thread Ed Maste
Author: emaste
Date: Mon Jun 11 18:57:40 2018
New Revision: 334965
URL: https://svnweb.freebsd.org/changeset/base/334965

Log:
  makesyscalls: simplify capenabled pipeline
  
  Replace cat + 2x grep with one grep.
  
  Sponsored by: Turing Robotic Industries

Modified:
  head/sys/kern/makesyscalls.sh

Modified: head/sys/kern/makesyscalls.sh
==
--- head/sys/kern/makesyscalls.sh   Mon Jun 11 18:44:56 2018
(r334964)
+++ head/sys/kern/makesyscalls.sh   Mon Jun 11 18:57:40 2018
(r334965)
@@ -47,7 +47,7 @@ systracetmp="systrace.$$"
 systraceret="systraceret.$$"
 
 if [ -r capabilities.conf ]; then
-   capenabled=`cat capabilities.conf | grep -v "^#" | grep -v "^$"`
+   capenabled=`egrep -v '^#|^$' capabilities.conf`
capenabled=`echo $capenabled | sed 's/ /,/g'`
 else
capenabled=""
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334973 - head/sys/dev/usb/net

2018-06-11 Thread Ed Maste
Author: emaste
Date: Mon Jun 11 19:34:47 2018
New Revision: 334973
URL: https://svnweb.freebsd.org/changeset/base/334973

Log:
  if_muge: retire lan78xx_eeprom_read
  
  lan78xx_eeprom_read just checked for EEPROM presence then called
  lan78xx_eeprom_read_raw if present, and had only one caller.  Introduce
  lan78xx_eeprom_present to check for EEPROM presence, and use it in the
  one place it is needed.
  
  This is used by r334964, which was accidentally committed out-of-order
  from my work tree.
  
  Reported by:  markj
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/usb/net/if_muge.c

Modified: head/sys/dev/usb/net/if_muge.c
==
--- head/sys/dev/usb/net/if_muge.c  Mon Jun 11 19:32:49 2018
(r334972)
+++ head/sys/dev/usb/net/if_muge.c  Mon Jun 11 19:34:47 2018
(r334973)
@@ -445,32 +445,14 @@ done:
return (err);
 }
 
-/**
- * lan78xx_eeprom_read - Read EEPROM and confirm it is programmed
- * @sc: soft context
- * @off: the eeprom address offset
- * @buf: stores the bytes
- * @buflen: the number of bytes to read
- *
- * RETURNS:
- * 0 on success, or a USB_ERR_?? error code on failure.
- */
-static int
-lan78xx_eeprom_read(struct muge_softc *sc, uint16_t off, uint8_t *buf,
-uint16_t buflen)
+static bool
+lan78xx_eeprom_present(struct muge_softc *sc)
 {
-   uint8_t sig;
int ret;
+   uint8_t sig;
 
ret = lan78xx_eeprom_read_raw(sc, ETH_E2P_INDICATOR_OFFSET, &sig, 1);
-   if ((ret == 0) && (sig == ETH_E2P_INDICATOR)) {
-   ret = lan78xx_eeprom_read_raw(sc, off, buf, buflen);
-   muge_dbg_printf(sc, "EEPROM present\n");
-   } else {
-   ret = -EINVAL;
-   muge_dbg_printf(sc, "EEPROM not present\n");
-   }
-   return (ret);
+   return (ret == 0 && sig == ETH_E2P_INDICATOR);
 }
 
 /**
@@ -1487,7 +1469,8 @@ muge_attach_post(struct usb_ether *ue)
 
/* If RX_ADDRx did not provide a valid MAC address, try EEPROM. */
if (!ETHER_IS_VALID(sc->sc_ue.ue_eaddr)) {
-   if ((lan78xx_eeprom_read(sc, ETH_E2P_MAC_OFFSET,
+   if ((lan78xx_eeprom_present(sc) &&
+   lan78xx_eeprom_read_raw(sc, ETH_E2P_MAC_OFFSET,
sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN) == 0) ||
(lan78xx_otp_read(sc, OTP_MAC_OFFSET,
sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN) == 0)) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334975 - head/share/man/man4

2018-06-11 Thread Ed Maste
Author: emaste
Date: Mon Jun 11 19:48:15 2018
New Revision: 334975
URL: https://svnweb.freebsd.org/changeset/base/334975

Log:
  muge.4: correct BUGS statement
  
  The EVB-LAN7850 I have does function with the EEPROM disabled - the
  link / activity LEDs just do not function.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man4/muge.4

Modified: head/share/man/man4/muge.4
==
--- head/share/man/man4/muge.4  Mon Jun 11 19:35:41 2018(r334974)
+++ head/share/man/man4/muge.4  Mon Jun 11 19:48:15 2018(r334975)
@@ -72,4 +72,4 @@ device driver first appeared in
 .Fx 12.0 .
 .Sh BUGS
 USB-Ethernet adapters that use the LAN7850 without a configuration EEPROM
-will not work.
+may not activate link or activity LEDs.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334977 - head/share/man/man4

2018-06-11 Thread Ed Maste
Author: emaste
Date: Mon Jun 11 20:19:20 2018
New Revision: 334977
URL: https://svnweb.freebsd.org/changeset/base/334977

Log:
  Connect muge.4 man page
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileMon Jun 11 19:51:48 2018
(r334976)
+++ head/share/man/man4/MakefileMon Jun 11 20:19:20 2018
(r334977)
@@ -309,6 +309,7 @@ MAN=aac.4 \
msk.4 \
mtio.4 \
multicast.4 \
+   muge.4 \
mvs.4 \
mwl.4 \
mwlfw.4 \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334981 - head/share/man/man4

2018-06-11 Thread Ed Maste
Author: emaste
Date: Mon Jun 11 20:46:20 2018
New Revision: 334981
URL: https://svnweb.freebsd.org/changeset/base/334981

Log:
  muge.4: remove BUGS section (about link/act LEDs)
  
  Lack of functioning link and activity LEDs on devices without an EEPROM
  is expected (not a bug).  Quoting the EVB-LAN7850 User's Guide:
  
  When configured with the default internal register settings, the
  Ethernet Link status LEDs are not enabled.  To enable Ethernet Link
  status LEDs, enable the EEPROM.
  
  This is an artifact of the different ways in which the evaluation board
  can be used.  End-user USB-Ethernet adapters using the Microchip LAN78XX
  or LAN7515 controllers should use an EEPROM or have OTP configuration,
  if their product configuration does not match the boot default register
  configuration.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man4/muge.4

Modified: head/share/man/man4/muge.4
==
--- head/share/man/man4/muge.4  Mon Jun 11 20:38:30 2018(r334980)
+++ head/share/man/man4/muge.4  Mon Jun 11 20:46:20 2018(r334981)
@@ -70,6 +70,3 @@ The
 .Nm
 device driver first appeared in
 .Fx 12.0 .
-.Sh BUGS
-USB-Ethernet adapters that use the LAN7850 without a configuration EEPROM
-may not activate link or activity LEDs.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r334998 - head/sys/modules/linux64

2018-06-12 Thread Ed Maste
Author: emaste
Date: Tue Jun 12 13:32:42 2018
New Revision: 334998
URL: https://svnweb.freebsd.org/changeset/base/334998

Log:
  linux64: use linux output target for linux_vdso.so
  
  linux_vdso.so provides the vdso for the linuxulator's amd64 target and
  is mapped into a Linux binary's address space.  Thus it should be a
  Linux-style .so, which has the ELF OS/ABI unset.
  
  It turns out that ELF Tool Chain elfcopy/objcopy also has a bug where
  the OS/ABI field is unset, regardless of the specified --output-target,
  so this change is a no-op with the default in-tree toolchain.  This is a
  real fix when using external binutils, and the ELF Tool Chain bug will
  be fixed in the future.
  
  PR:   228934
  Sponsored by: Turing Robotic Industries

Modified:
  head/sys/modules/linux64/Makefile

Modified: head/sys/modules/linux64/Makefile
==
--- head/sys/modules/linux64/Makefile   Tue Jun 12 13:26:31 2018
(r334997)
+++ head/sys/modules/linux64/Makefile   Tue Jun 12 13:32:42 2018
(r334998)
@@ -36,7 +36,7 @@ linux_locore.o: linux_locore.s linux_assym.h
${.IMPSRC} -o ${.TARGET}
 
 ${VDSO}.so: linux_locore.o
-   ${OBJCOPY} --input-target binary --output-target elf64-x86-64-freebsd   
\
+   ${OBJCOPY} --input-target binary --output-target elf64-x86-64 \
-S -g --binary-architecture i386:x86-64 linux_locore.o ${.TARGET}
strip -N _binary_linux_locore_o_size ${.TARGET}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r334046 - head/tools/tools/intel-ucode-split

2018-06-12 Thread Ed Maste
On Tue, 12 Jun 2018 at 18:17, Sean Bruno  wrote:
>
> On 06/12/18 16:05, Oliver Pinter wrote:
> > On 5/22/18, Ed Maste  wrote:
> >> Author: emaste
> >> Date: Tue May 22 14:35:33 2018
> >> New Revision: 334046
> >> URL: https://svnweb.freebsd.org/changeset/base/334046
> >>
> >> Log:
> >>   intel-ucode-split: add -n flag to skip creating output files
> >>
> >>   Sponsored by:  The FreeBSD Foundation
> >>
> >> Modified:
> >>   head/tools/tools/intel-ucode-split/intel-ucode-split.c
> >
> > Hi!
> >
> > Could you please MFC the intel-ucode-split related commits to 11-STABLE?
> >
> > Thanks,
> > op
>
> Do you need it in base for some reason?  This code is already in the
> devcpu-data port and is used when the port is built.  Its not needed for
> anything AFAIK.

Indeed, the real use in FreeBSD is via the devcpu-data port; I
committed it to src/tools/ for collaboration and testing. I'll merge
it to stable/11 if it will be useful for someone, but am curious about
the use case.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335198 - head/sys/compat/linprocfs

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 13:53:37 2018
New Revision: 335198
URL: https://svnweb.freebsd.org/changeset/base/335198

Log:
  Add stubbed arm64 linuxulator /proc/cpuinfo handler
  
  Sponsored by: Turing Robotic Industries

Modified:
  head/sys/compat/linprocfs/linprocfs.c

Modified: head/sys/compat/linprocfs/linprocfs.c
==
--- head/sys/compat/linprocfs/linprocfs.c   Fri Jun 15 13:49:11 2018
(r335197)
+++ head/sys/compat/linprocfs/linprocfs.c   Fri Jun 15 13:53:37 2018
(r335198)
@@ -317,6 +317,32 @@ linprocfs_docpuinfo(PFS_FILL_ARGS)
 
return (0);
 }
+#else
+/* ARM64TODO: implement non-stubbed linprocfs_docpuinfo */
+static int
+linprocfs_docpuinfo(PFS_FILL_ARGS)
+{
+   int i;
+
+   for (i = 0; i < mp_ncpus; ++i) {
+   sbuf_printf(sb,
+   "processor\t: %d\n"
+   "BogoMIPS\t: %d.%02d\n",
+   i, 0, 0);
+   sbuf_cat(sb, "Features\t: ");
+   sbuf_cat(sb, "\n");
+   sbuf_printf(sb,
+   "CPU implementer\t: \n"
+   "CPU architecture: \n"
+   "CPU variant\t: 0x%x\n"
+   "CPU part\t: 0x%x\n"
+   "CPU revision\t: %d\n",
+   0, 0, 0);
+   sbuf_cat(sb, "\n");
+   }
+
+   return (0);
+}
 #endif /* __i386__ || __amd64__ */
 
 /*
@@ -1653,7 +1679,7 @@ linprocfs_uninit(PFS_INIT_ARGS)
 }
 
 PSEUDOFS(linprocfs, 1, VFCF_JAIL);
-#if defined(__amd64__)
+#if defined(__aarch64__) || defined(__amd64__)
 MODULE_DEPEND(linprocfs, linux_common, 1, 1, 1);
 #else
 MODULE_DEPEND(linprocfs, linux, 1, 1, 1);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335200 - head/sys/compat/linux

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 14:29:41 2018
New Revision: 335200
URL: https://svnweb.freebsd.org/changeset/base/335200

Log:
  Correct debug control for linuxulator faccessat
  
  The Linuxulator provides per-syscall debug control via the
  compat.linux.debug sysctl.  There's generally a 1:1 mapping between
  sysctl setting and syscall, but faccessat was controlled by the access
  setting, perhaps due to copy-paste.
  
  Sponsored by: Turing Robotic Industries

Modified:
  head/sys/compat/linux/linux_file.c

Modified: head/sys/compat/linux/linux_file.c
==
--- head/sys/compat/linux/linux_file.c  Fri Jun 15 13:56:58 2018
(r335199)
+++ head/sys/compat/linux/linux_file.c  Fri Jun 15 14:29:41 2018
(r335200)
@@ -554,7 +554,7 @@ linux_faccessat(struct thread *td, struct linux_facces
LCONVPATHEXIST_AT(td, args->filename, &path, dfd);
 
 #ifdef DEBUG
-   if (ldebug(access))
+   if (ldebug(faccessat))
printf(ARGS(access, "%s, %d"), path, args->amode);
 #endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335201 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 14:41:51 2018
New Revision: 335201
URL: https://svnweb.freebsd.org/changeset/base/335201

Log:
  linuxulator: do not include legacy syscalls on arm64
  
  Existing linuxulator platforms (i386, amd64) support legacy syscalls,
  such as non-*at ones like open, but arm64 and other new platforms do
  not.
  
  Wrap these in #ifdef LINUX_LEGACY_SYSCALLS, #defined in the MD linux.h
  files.  We may need finer grained control in the future but this is
  sufficient for now.
  
  Reviewed by:  andrew
  Sponsored by: Turing Robotic Industries
  Differential Revision:https://reviews.freebsd.org/D15237

Modified:
  head/sys/amd64/linux/linux.h
  head/sys/amd64/linux32/linux.h
  head/sys/compat/linux/linux_event.c
  head/sys/compat/linux/linux_file.c
  head/sys/compat/linux/linux_fork.c
  head/sys/compat/linux/linux_misc.c
  head/sys/compat/linux/linux_stats.c
  head/sys/compat/linux/linux_sysctl.c
  head/sys/i386/linux/linux.h

Modified: head/sys/amd64/linux/linux.h
==
--- head/sys/amd64/linux/linux.hFri Jun 15 14:29:41 2018
(r335200)
+++ head/sys/amd64/linux/linux.hFri Jun 15 14:41:51 2018
(r335201)
@@ -35,6 +35,8 @@
 #include 
 #include 
 
+#defineLINUX_LEGACY_SYSCALLS
+
 /*
  * debugging support
  */

Modified: head/sys/amd64/linux32/linux.h
==
--- head/sys/amd64/linux32/linux.h  Fri Jun 15 14:29:41 2018
(r335200)
+++ head/sys/amd64/linux32/linux.h  Fri Jun 15 14:41:51 2018
(r335201)
@@ -38,6 +38,8 @@
 #include 
 #include 
 
+#defineLINUX_LEGACY_SYSCALLS
+
 /*
  * debugging support
  */

Modified: head/sys/compat/linux/linux_event.c
==
--- head/sys/compat/linux/linux_event.c Fri Jun 15 14:29:41 2018
(r335200)
+++ head/sys/compat/linux/linux_event.c Fri Jun 15 14:41:51 2018
(r335201)
@@ -263,6 +263,7 @@ epoll_create_common(struct thread *td, int flags)
return (0);
 }
 
+#ifdef LINUX_LEGACY_SYSCALLS
 int
 linux_epoll_create(struct thread *td, struct linux_epoll_create_args *args)
 {
@@ -276,6 +277,7 @@ linux_epoll_create(struct thread *td, struct linux_epo
 
return (epoll_create_common(td, 0));
 }
+#endif
 
 int
 linux_epoll_create1(struct thread *td, struct linux_epoll_create1_args *args)
@@ -616,6 +618,7 @@ leave1:
return (error);
 }
 
+#ifdef LINUX_LEGACY_SYSCALLS
 int
 linux_epoll_wait(struct thread *td, struct linux_epoll_wait_args *args)
 {
@@ -623,6 +626,7 @@ linux_epoll_wait(struct thread *td, struct linux_epoll
return (linux_epoll_wait_common(td, args->epfd, args->events,
args->maxevents, args->timeout, NULL));
 }
+#endif
 
 int
 linux_epoll_pwait(struct thread *td, struct linux_epoll_pwait_args *args)
@@ -707,12 +711,14 @@ eventfd_create(struct thread *td, uint32_t initval, in
return (error);
 }
 
+#ifdef LINUX_LEGACY_SYSCALLS
 int
 linux_eventfd(struct thread *td, struct linux_eventfd_args *args)
 {
 
return (eventfd_create(td, args->initval, 0));
 }
+#endif
 
 int
 linux_eventfd2(struct thread *td, struct linux_eventfd2_args *args)

Modified: head/sys/compat/linux/linux_file.c
==
--- head/sys/compat/linux/linux_file.c  Fri Jun 15 14:29:41 2018
(r335200)
+++ head/sys/compat/linux/linux_file.c  Fri Jun 15 14:41:51 2018
(r335201)
@@ -68,6 +68,7 @@ static intlinux_common_open(struct thread *, int, cha
 static int linux_getdents_error(struct thread *, int, int);
 
 
+#ifdef LINUX_LEGACY_SYSCALLS
 int
 linux_creat(struct thread *td, struct linux_creat_args *args)
 {
@@ -84,8 +85,8 @@ linux_creat(struct thread *td, struct linux_creat_args
LFREEPATH(path);
return (error);
 }
+#endif
 
-
 static int
 linux_common_open(struct thread *td, int dirfd, char *path, int l_flags, int 
mode)
 {
@@ -165,7 +166,11 @@ linux_common_open(struct thread *td, int dirfd, char *
 
 done:
 #ifdef DEBUG
+#ifdef LINUX_LEGACY_SYSCALLS
if (ldebug(open))
+#else
+   if (ldebug(openat))
+#endif
printf(LMSG("open returns error %d"), error);
 #endif
LFREEPATH(path);
@@ -191,6 +196,7 @@ linux_openat(struct thread *td, struct linux_openat_ar
return (linux_common_open(td, dfd, path, args->flags, args->mode));
 }
 
+#ifdef LINUX_LEGACY_SYSCALLS
 int
 linux_open(struct thread *td, struct linux_open_args *args)
 {
@@ -207,6 +213,7 @@ linux_open(struct thread *td, struct linux_open_args *
 #endif
return (linux_common_open(td, AT_FDCWD, path, args->flags, args->mode));
 }
+#endif
 
 int
 linux_lseek(struct thread *td, struct linux_lseek_args *args)
@@ -305,6 +312,7 @@ struct l_dirent64 {
 roundup(offsetof(struct l_dirent64, d_name) + (namlen) + 1,
\
 siz

svn commit: r335209 - head/share/man/man5

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 16:14:42 2018
New Revision: 335209
URL: https://svnweb.freebsd.org/changeset/base/335209

Log:
  elf.5: add readelf cross-reference
  
  objdump is sometimes used in cases where readelf is more appropriate,
  but the obsolete GNU objdump we have in the base system will be removed
  in the future.
  
  .Xr readelf from elf.5 to improve the odds the more appropriate tool
  will be found.
  
  PR:   229046
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man5/elf.5

Modified: head/share/man/man5/elf.5
==
--- head/share/man/man5/elf.5   Fri Jun 15 15:36:10 2018(r335208)
+++ head/share/man/man5/elf.5   Fri Jun 15 16:14:42 2018(r335209)
@@ -1281,6 +1281,7 @@ stored into the relocatable field.
 .Xr gdb 1 ,
 .Xr ld 1 ,
 .Xr objdump 1 ,
+.Xr readelf 1 ,
 .Xr execve 2 ,
 .Xr ar 5 ,
 .Xr core 5
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335210 - head/tools/build/options

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 16:18:39 2018
New Revision: 335210
URL: https://svnweb.freebsd.org/changeset/base/335210

Log:
  Remove objcopy from BINUTILS option descriptions
  
  As of r306649 objcopy is always ELF Tool Chain's elfcopy; binutils
  objcopy is never used.
  
  PR:   229046
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tools/build/options/WITHOUT_BINUTILS
  head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP
  head/tools/build/options/WITH_BINUTILS
  head/tools/build/options/WITH_BINUTILS_BOOTSTRAP

Modified: head/tools/build/options/WITHOUT_BINUTILS
==
--- head/tools/build/options/WITHOUT_BINUTILS   Fri Jun 15 16:14:42 2018
(r335209)
+++ head/tools/build/options/WITHOUT_BINUTILS   Fri Jun 15 16:18:39 2018
(r335210)
@@ -1,4 +1,4 @@
 .\" $FreeBSD$
-Set to not build or install binutils (as, ld, objcopy, and objdump) as part
+Set to not build or install binutils (as, ld, and objdump) as part
 of the normal system build.
 The resulting system cannot build programs from source.

Modified: head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP
==
--- head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP Fri Jun 15 16:14:42 
2018(r335209)
+++ head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP Fri Jun 15 16:18:39 
2018(r335210)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-Set to not build binutils (as, ld, objcopy and objdump)
+Set to not build binutils (as, ld, and objdump)
 as part of the bootstrap process.
 .Bf -symbolic
 The option does not work for build targets unless some alternative

Modified: head/tools/build/options/WITH_BINUTILS
==
--- head/tools/build/options/WITH_BINUTILS  Fri Jun 15 16:14:42 2018
(r335209)
+++ head/tools/build/options/WITH_BINUTILS  Fri Jun 15 16:18:39 2018
(r335210)
@@ -1,3 +1,3 @@
 .\" $FreeBSD$
-Set to build and install binutils (as, ld, objcopy, and objdump) as part
+Set to build and install binutils (as, ld, and objdump) as part
 of the normal system build.

Modified: head/tools/build/options/WITH_BINUTILS_BOOTSTRAP
==
--- head/tools/build/options/WITH_BINUTILS_BOOTSTRAPFri Jun 15 16:14:42 
2018(r335209)
+++ head/tools/build/options/WITH_BINUTILS_BOOTSTRAPFri Jun 15 16:18:39 
2018(r335210)
@@ -1,3 +1,3 @@
 .\" $FreeBSD$
-Set build binutils (as, ld, objcopy and objdump)
+Set build binutils (as, ld, and objdump)
 as part of the bootstrap process.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335212 - head/share/man/man5

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 16:25:36 2018
New Revision: 335212
URL: https://svnweb.freebsd.org/changeset/base/335212

Log:
  src.conf.5: regen after r335210, *BINUTILS description updates
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Fri Jun 15 16:19:10 2018
(r335211)
+++ head/share/man/man5/src.conf.5  Fri Jun 15 16:25:36 2018
(r335212)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd May 30, 2018
+.Dd June 15, 2018
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -144,7 +144,7 @@ associated utilities, and examples.
 .Pp
 This option only affects amd64/amd64.
 .It Va WITHOUT_BINUTILS
-Set to not build or install binutils (as, ld, objcopy, and objdump) as part
+Set to not build or install binutils (as, ld, and objdump) as part
 of the normal system build.
 The resulting system cannot build programs from source.
 .Pp
@@ -157,13 +157,13 @@ When set, it enforces these options:
 .Va WITHOUT_GDB
 .El
 .It Va WITH_BINUTILS
-Set to build and install binutils (as, ld, objcopy, and objdump) as part
+Set to build and install binutils (as, ld, and objdump) as part
 of the normal system build.
 .Pp
 This is a default setting on
 amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, 
mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, 
mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64.
 .It Va WITHOUT_BINUTILS_BOOTSTRAP
-Set to not build binutils (as, ld, objcopy and objdump)
+Set to not build binutils (as, ld, and objdump)
 as part of the bootstrap process.
 .Bf -symbolic
 The option does not work for build targets unless some alternative
@@ -173,7 +173,7 @@ toolchain is provided.
 This is a default setting on
 arm64/aarch64, riscv/riscv64 and riscv/riscv64sf.
 .It Va WITH_BINUTILS_BOOTSTRAP
-Set build binutils (as, ld, objcopy and objdump)
+Set build binutils (as, ld, and objdump)
 as part of the bootstrap process.
 .Pp
 This is a default setting on
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335213 - head/usr.bin/ldd

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 16:28:50 2018
New Revision: 335213
URL: https://svnweb.freebsd.org/changeset/base/335213

Log:
  ldd: reference readelf instead of objdump in warning message
  
  We have an obsolete GNU objdump 2.17.50 in the base system, which will
  be removed in the future.  Suggest readelf(1) for examining ELF files
  instead; for most use cases it is the preferred tool anyhow.
  
  PR:   229046
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.bin/ldd/sods.c

Modified: head/usr.bin/ldd/sods.c
==
--- head/usr.bin/ldd/sods.c Fri Jun 15 16:25:36 2018(r335212)
+++ head/usr.bin/ldd/sods.c Fri Jun 15 16:28:50 2018(r335213)
@@ -203,7 +203,7 @@ dump_file(const char *fname)
 file_base = (const char *) objbase;/* Makes address arithmetic 
easier */
 
 if (IS_ELF(*(const Elf32_Ehdr*) align_struct(file_base))) {
-   warnx("%s: this is an ELF program; use objdump to examine", fname);
+   warnx("%s: this is an ELF program; use readelf to examine", fname);
++error_count;
munmap(objbase, sb.st_size);
return;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335214 - head/sys/conf

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 16:32:18 2018
New Revision: 335214
URL: https://svnweb.freebsd.org/changeset/base/335214

Log:
  Correct kern.pre.mk comment: objcopy, not objdump, copies objects.
  
  PR:   229046
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/conf/kern.pre.mk

Modified: head/sys/conf/kern.pre.mk
==
--- head/sys/conf/kern.pre.mk   Fri Jun 15 16:28:50 2018(r335213)
+++ head/sys/conf/kern.pre.mk   Fri Jun 15 16:32:18 2018(r335214)
@@ -243,7 +243,7 @@ MKMODULESENV+=  DEBUG_FLAGS="${DEBUG}"
 MKMODULESENV+= __MPATH="${__MPATH}"
 .endif
 
-# Architecture and output format arguments for objdump to convert image to
+# Architecture and output format arguments for objcopy to convert image to
 # object file
 
 .if ${MFS_IMAGE:Uno} != "no"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335217 - head/contrib/binutils/binutils/doc

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 17:03:49 2018
New Revision: 335217
URL: https://svnweb.freebsd.org/changeset/base/335217

Log:
  Add deprecation notice to objdump man page
  
  PR:   229046
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D13881

Modified:
  head/contrib/binutils/binutils/doc/binutils.texi

Modified: head/contrib/binutils/binutils/doc/binutils.texi
==
--- head/contrib/binutils/binutils/doc/binutils.texiFri Jun 15 16:48:09 
2018(r335216)
+++ head/contrib/binutils/binutils/doc/binutils.texiFri Jun 15 17:03:49 
2018(r335217)
@@ -1624,6 +1624,10 @@ program to compile and work.
 specify archives, @command{objdump} shows information on each of the member
 object files.
 
+@command{objdump} will be removed from a future version of the
+FreeBSD base system.  Users who require @command{objdump} are advised
+to install the binutils port or package.
+
 @c man end
 
 @c man begin OPTIONS objdump
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335219 - head/gnu/usr.bin/binutils/objdump

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 17:16:27 2018
New Revision: 335219
URL: https://svnweb.freebsd.org/changeset/base/335219

Log:
  objdump.1: manually apply r229046 to the rendered man page

Modified:
  head/gnu/usr.bin/binutils/objdump/objdump.1

Modified: head/gnu/usr.bin/binutils/objdump/objdump.1
==
--- head/gnu/usr.bin/binutils/objdump/objdump.1 Fri Jun 15 17:03:57 2018
(r335218)
+++ head/gnu/usr.bin/binutils/objdump/objdump.1 Fri Jun 15 17:16:27 2018
(r335219)
@@ -179,6 +179,10 @@ information is mostly useful to programmers who are wo
 compilation tools, as opposed to programmers who just want their
 program to compile and work.
 .PP
+\&\fBobjdump\fR will be removed from a future version of the
+FreeBSD base system.  Users who require \&\fBobjdump\fR are advised
+to install the binutils port or package.
+.PP
 \&\fIobjfile\fR... are the object files to be examined.  When you
 specify archives, \fBobjdump\fR shows information on each of the member
 object files.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335221 - head/usr.sbin/asf

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 17:38:07 2018
New Revision: 335221
URL: https://svnweb.freebsd.org/changeset/base/335221

Log:
  Add deprecation notice in asf.8
  
  PR:   229046
  Reviewed by:  jhb
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/asf/asf.8

Modified: head/usr.sbin/asf/asf.8
==
--- head/usr.sbin/asf/asf.8 Fri Jun 15 17:29:32 2018(r335220)
+++ head/usr.sbin/asf/asf.8 Fri Jun 15 17:38:07 2018(r335221)
@@ -37,6 +37,15 @@
 .Op Fl o Ar outfile
 .Op Fl X Ar suffix
 .Op Ar modules-path Op Ar outfile
+.Sh DEPRECATION NOTICE
+The
+.Nm
+utility is not present in
+.Fx 12.0
+and later.
+The
+.Xr kgdb 1
+debugger handles kernel module state internally.
 .Sh DESCRIPTION
 By default,
 .Nm
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335222 - in head: . targets/pseudo/userland usr.sbin usr.sbin/asf

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 17:44:21 2018
New Revision: 335222
URL: https://svnweb.freebsd.org/changeset/base/335222

Log:
  Remove obsolete asf(8)
  
  kgdb now handles kernel module state internally, so the asf tool serves
  no purpose.
  
  PR:   229046
  Reviewed by:  brooks
  Relnotes: yes
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D15827

Deleted:
  head/usr.sbin/asf/
Modified:
  head/ObsoleteFiles.inc
  head/targets/pseudo/userland/Makefile.depend
  head/usr.sbin/Makefile.amd64
  head/usr.sbin/Makefile.i386

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Fri Jun 15 17:38:07 2018(r335221)
+++ head/ObsoleteFiles.inc  Fri Jun 15 17:44:21 2018(r335222)
@@ -38,6 +38,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20180615: asf(8) removed
+OLD_FILES+=usr/bin/asf
+OLD_FILES+=usr/share/man/man8/asf.8.gz
 # 20180609: obsolete libc++ files missed from the 5.0.0 import
 OLD_FILES+=usr/include/c++/v1/__refstring
 OLD_FILES+=usr/include/c++/v1/__undef_min_max

Modified: head/targets/pseudo/userland/Makefile.depend
==
--- head/targets/pseudo/userland/Makefile.dependFri Jun 15 17:38:07 
2018(r335221)
+++ head/targets/pseudo/userland/Makefile.dependFri Jun 15 17:44:21 
2018(r335222)
@@ -810,7 +810,6 @@ DIRDEPS.amd64= \
usr.sbin/acpi/acpidump \
usr.sbin/acpi/iasl \
usr.sbin/apm \
-   usr.sbin/asf \
usr.sbin/bhyve \
usr.sbin/bhyvectl \
usr.sbin/bhyveload \
@@ -842,7 +841,6 @@ DIRDEPS.i386= \
sbin/sconfig \
usr.sbin/apm \
usr.sbin/apmd \
-   usr.sbin/asf \
usr.sbin/btxld \
usr.sbin/cpucontrol \
usr.sbin/hyperv/tools \

Modified: head/usr.sbin/Makefile.amd64
==
--- head/usr.sbin/Makefile.amd64Fri Jun 15 17:38:07 2018
(r335221)
+++ head/usr.sbin/Makefile.amd64Fri Jun 15 17:44:21 2018
(r335222)
@@ -9,7 +9,6 @@ SUBDIR+=acpi
 .if ${MK_APM} != "no"
 SUBDIR+=   apm
 .endif
-SUBDIR+=   asf
 .if ${MK_BHYVE} != "no"
 SUBDIR+=   bhyve
 SUBDIR+=   bhyvectl

Modified: head/usr.sbin/Makefile.i386
==
--- head/usr.sbin/Makefile.i386 Fri Jun 15 17:38:07 2018(r335221)
+++ head/usr.sbin/Makefile.i386 Fri Jun 15 17:44:21 2018(r335222)
@@ -7,7 +7,6 @@ SUBDIR+=acpi
 SUBDIR+=   apm
 SUBDIR+=   apmd
 .endif
-SUBDIR+=   asf
 SUBDIR+=   boot0cfg
 .if ${MK_TOOLCHAIN} != "no"
 SUBDIR+=   btxld
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335232 - head/sys/arm64/linux

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 19:09:17 2018
New Revision: 335232
URL: https://svnweb.freebsd.org/changeset/base/335232

Log:
  arm64: add arm64 linux.h based on i386 linuxulator and Linux headers
  
  Sponsored by: Turing Robotic Industries

Added:
  head/sys/arm64/linux/linux.h   (contents, props changed)

Added: head/sys/arm64/linux/linux.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm64/linux/linux.hFri Jun 15 19:09:17 2018
(r335232)
@@ -0,0 +1,321 @@
+/*-
+ * Copyright (c) 1994-1996 Søren Schmidt
+ * Copyright (c) 2013 Dmitry Chagin
+ * Copyright (c) 2018 Turing Robotic Industries Inc.
+ *
+ * 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
+ */
+
+/*
+ * $FreeBSD$
+ */
+#ifndef _ARM64_LINUX_H_
+#define_ARM64_LINUX_H_
+
+#include 
+#include 
+
+/* Debugging support */
+#define DEBUG
+extern u_char linux_debug_map[];
+#defineldebug(name)isclr(linux_debug_map, LINUX_SYS_linux_ ## name)
+#defineARGS(nm, fmt)   "linux(%ld/%ld): "#nm"("fmt")\n",   
\
+   (long)td->td_proc->p_pid, (long)td->td_tid
+#defineLMSG(fmt)   "linux(%ld/%ld): "fmt"\n",  
\
+   (long)td->td_proc->p_pid, (long)td->td_tid
+#defineLINUX_DTRACElinuxulator
+
+#definePTRIN(v)(void *)(v)
+#definePTROUT(v)   (uintptr_t)(v)
+
+#defineCP(src,dst,fld) do { (dst).fld = (src).fld; } while (0)
+#defineCP2(src,dst,sfld,dfld) do { (dst).dfld = (src).sfld; } while (0)
+#definePTRIN_CP(src,dst,fld) \
+   do { (dst).fld = PTRIN((src).fld); } while (0)
+
+/* Provide a separate set of types for the Linux types */
+typedef int32_tl_int;
+typedef int64_tl_long;
+typedef int16_tl_short;
+typedef uint32_t   l_uint;
+typedef uint64_t   l_ulong;
+typedef uint16_t   l_ushort;
+
+typedef l_ulongl_uintptr_t;
+typedef l_long l_clock_t;
+typedef l_int  l_daddr_t;
+typedef l_ulongl_dev_t;
+typedef l_uint l_gid_t;
+typedef l_ushort   l_gid16_t;  /* XXX */
+typedef l_uint l_uid_t;
+typedef l_ushort   l_uid16_t;  /* XXX */
+typedef l_ulongl_ino_t;
+typedef l_int  l_key_t;
+typedef l_long l_loff_t;
+typedef l_uint l_mode_t;
+typedef l_long l_off_t;
+typedef l_int  l_pid_t;
+typedef l_ulongl_size_t;
+typedef l_long l_suseconds_t;
+typedef l_long l_time_t;
+typedef l_int  l_timer_t;  /* XXX */
+typedef l_ulongl_fd_mask;
+
+typedef struct {
+   l_int   val[2];
+} l_fsid_t;
+
+typedef struct {
+   l_time_ttv_sec;
+   l_suseconds_t   tv_usec;
+} l_timeval;
+
+#definel_fd_setfd_set
+
+/* Miscellaneous */
+#defineLINUX_AT_COUNT  20
+
+struct l___sysctl_args
+{
+   l_uintptr_t name;
+   l_int   nlen;
+   l_uintptr_t oldval;
+   l_uintptr_t oldlenp;
+   l_uintptr_t newval;
+   l_uintptr_t newlen;
+   l_ulong __spare[4];
+};
+
+/* Resource limits */
+#defineLINUX_RLIMIT_CPU0
+#defineLINUX_RLIMIT_FSIZE  1
+#defineLINUX_RLIMIT_DATA   2
+#defineLINUX_RLIMIT_STACK  3
+#defineLINUX_RLIMIT_CORE   4
+#defineLINUX_RLIMIT_RSS5
+#defineLINUX_RLIMIT_NPROC  6
+#defineLINUX_RLIMIT_NOFILE 7
+#defineLINUX_RLIMIT_MEMLOCK8
+#defineLINUX_RLIMIT_AS   

svn commit: r335235 - head/sys/arm64/linux

2018-06-15 Thread Ed Maste
Author: emaste
Date: Fri Jun 15 19:42:52 2018
New Revision: 335235
URL: https://svnweb.freebsd.org/changeset/base/335235

Log:
  arm64 linuxulator: add linux_dummy.c based on amd64
  
  A later change should deduplicate the multiple copies of this file.
  
  Sponsored by: Turing Robotic Industries

Added:
  head/sys/arm64/linux/linux_dummy.c
 - copied, changed from r335234, head/sys/amd64/linux/linux_dummy.c

Copied and modified: head/sys/arm64/linux/linux_dummy.c (from r335234, 
head/sys/amd64/linux/linux_dummy.c)
==
--- head/sys/amd64/linux/linux_dummy.c  Fri Jun 15 19:35:08 2018
(r335234, copy source)
+++ head/sys/arm64/linux/linux_dummy.c  Fri Jun 15 19:42:52 2018
(r335235)
@@ -29,17 +29,22 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_compat.h"
+
 #include 
 #include 
 #include 
 #include 
 #include 
 
-#include 
-#include 
+#include 
+#include 
 #include 
 #include 
 
+// LINUXTODO: deduplicate arm64 dummy against other archs?
+// LINUXTODO: review/update/add unimplemented syscalls
+
 /* DTrace init */
 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
 
@@ -63,14 +68,12 @@ DUMMY(sendfile);
 DUMMY(syslog);
 DUMMY(setfsuid);
 DUMMY(setfsgid);
-DUMMY(sysfs);
 DUMMY(vhangup);
 DUMMY(pivot_root);
 DUMMY(adjtimex);
 DUMMY(swapoff);
 DUMMY(init_module);
 DUMMY(delete_module);
-DUMMY(quotactl);
 DUMMY(lookup_dcookie);
 DUMMY(remap_file_pages);
 DUMMY(semtimedop);
@@ -91,7 +94,6 @@ DUMMY(keyctl);
 /* Linux 2.6.13: */
 DUMMY(ioprio_set);
 DUMMY(ioprio_get);
-DUMMY(inotify_init);
 DUMMY(inotify_add_watch);
 DUMMY(inotify_rm_watch);
 /* Linux 2.6.16: */
@@ -104,8 +106,6 @@ DUMMY(sync_file_range);
 DUMMY(vmsplice);
 /* Linux 2.6.18: */
 DUMMY(move_pages);
-/* Linux 2.6.22: */
-DUMMY(signalfd);
 /* Linux 2.6.27: */
 DUMMY(signalfd4);
 DUMMY(inotify_init1);
@@ -135,7 +135,6 @@ DUMMY(renameat2);
 /* Linux 3.15: */
 DUMMY(seccomp);
 DUMMY(memfd_create);
-DUMMY(kexec_file_load);
 /* Linux 3.18: */
 DUMMY(bpf);
 /* Linux 3.19: */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r335210 - head/tools/build/options

2018-06-15 Thread Ed Maste
On Fri, 15 Jun 2018 at 14:35, John Baldwin  wrote:
>
>
> BTW, I found it confusing recently that objcopy's build glue was in
> usr.bin/elfcopy.  That perhaps made sense during the transition, but
> should we just rename that to usr.bin/objcopy now?

Probably, yes. I'm happy if you want to go ahead and do it, otherwise
I'll get to it sometime later on.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335300 - head/sys/geom/part

2018-06-17 Thread Ed Maste
Author: emaste
Date: Sun Jun 17 20:06:27 2018
New Revision: 335300
URL: https://svnweb.freebsd.org/changeset/base/335300

Log:
  Sort geom/part mbr/ebr/ldm alias table entries
  
  Having the table entries in alpha order simplifies future additions.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/geom/part/g_part_ebr.c
  head/sys/geom/part/g_part_ldm.c
  head/sys/geom/part/g_part_mbr.c

Modified: head/sys/geom/part/g_part_ebr.c
==
--- head/sys/geom/part/g_part_ebr.c Sun Jun 17 19:44:24 2018
(r335299)
+++ head/sys/geom/part/g_part_ebr.c Sun Jun 17 20:06:27 2018
(r335300)
@@ -135,13 +135,13 @@ static struct g_part_ebr_alias {
int alias;
 } ebr_alias_match[] = {
{ DOSPTYP_386BSD,   G_PART_ALIAS_FREEBSD },
-   { DOSPTYP_NTFS, G_PART_ALIAS_MS_NTFS },
{ DOSPTYP_FAT32,G_PART_ALIAS_MS_FAT32 },
{ DOSPTYP_FAT32LBA, G_PART_ALIAS_MS_FAT32LBA },
-   { DOSPTYP_LINSWP,   G_PART_ALIAS_LINUX_SWAP },
-   { DOSPTYP_LINUX,G_PART_ALIAS_LINUX_DATA },
{ DOSPTYP_LINLVM,   G_PART_ALIAS_LINUX_LVM },
{ DOSPTYP_LINRAID,  G_PART_ALIAS_LINUX_RAID },
+   { DOSPTYP_LINSWP,   G_PART_ALIAS_LINUX_SWAP },
+   { DOSPTYP_LINUX,G_PART_ALIAS_LINUX_DATA },
+   { DOSPTYP_NTFS, G_PART_ALIAS_MS_NTFS },
 };
 
 static void ebr_set_chs(struct g_part_table *, uint32_t, u_char *, u_char *,

Modified: head/sys/geom/part/g_part_ldm.c
==
--- head/sys/geom/part/g_part_ldm.c Sun Jun 17 19:44:24 2018
(r335299)
+++ head/sys/geom/part/g_part_ldm.c Sun Jun 17 20:06:27 2018
(r335300)
@@ -369,15 +369,15 @@ static struct g_part_ldm_alias {
u_char  typ;
int alias;
 } ldm_alias_match[] = {
-   { DOSPTYP_NTFS, G_PART_ALIAS_MS_NTFS },
+   { DOSPTYP_386BSD,   G_PART_ALIAS_FREEBSD },
{ DOSPTYP_FAT32,G_PART_ALIAS_MS_FAT32 },
{ DOSPTYP_FAT32LBA, G_PART_ALIAS_MS_FAT32LBA },
-   { DOSPTYP_386BSD,   G_PART_ALIAS_FREEBSD },
{ DOSPTYP_LDM,  G_PART_ALIAS_MS_LDM_DATA },
-   { DOSPTYP_LINSWP,   G_PART_ALIAS_LINUX_SWAP },
-   { DOSPTYP_LINUX,G_PART_ALIAS_LINUX_DATA },
{ DOSPTYP_LINLVM,   G_PART_ALIAS_LINUX_LVM },
{ DOSPTYP_LINRAID,  G_PART_ALIAS_LINUX_RAID },
+   { DOSPTYP_LINSWP,   G_PART_ALIAS_LINUX_SWAP },
+   { DOSPTYP_LINUX,G_PART_ALIAS_LINUX_DATA },
+   { DOSPTYP_NTFS, G_PART_ALIAS_MS_NTFS },
 };
 
 static u_char*

Modified: head/sys/geom/part/g_part_mbr.c
==
--- head/sys/geom/part/g_part_mbr.c Sun Jun 17 19:44:24 2018
(r335299)
+++ head/sys/geom/part/g_part_mbr.c Sun Jun 17 20:06:27 2018
(r335300)
@@ -128,23 +128,23 @@ static struct g_part_mbr_alias {
int alias;
 } mbr_alias_match[] = {
{ DOSPTYP_386BSD,   G_PART_ALIAS_FREEBSD },
+   { DOSPTYP_APPLE_BOOT,   G_PART_ALIAS_APPLE_BOOT },
+   { DOSPTYP_APPLE_UFS,G_PART_ALIAS_APPLE_UFS },
{ DOSPTYP_EXT,  G_PART_ALIAS_EBR },
-   { DOSPTYP_NTFS, G_PART_ALIAS_MS_NTFS },
+   { DOSPTYP_EXTLBA,   G_PART_ALIAS_EBR },
{ DOSPTYP_FAT16,G_PART_ALIAS_MS_FAT16 },
{ DOSPTYP_FAT32,G_PART_ALIAS_MS_FAT32 },
{ DOSPTYP_FAT32LBA, G_PART_ALIAS_MS_FAT32LBA },
-   { DOSPTYP_EXTLBA,   G_PART_ALIAS_EBR },
+   { DOSPTYP_HFS,  G_PART_ALIAS_APPLE_HFS },
{ DOSPTYP_LDM,  G_PART_ALIAS_MS_LDM_DATA },
-   { DOSPTYP_LINSWP,   G_PART_ALIAS_LINUX_SWAP },
-   { DOSPTYP_LINUX,G_PART_ALIAS_LINUX_DATA },
{ DOSPTYP_LINLVM,   G_PART_ALIAS_LINUX_LVM },
{ DOSPTYP_LINRAID,  G_PART_ALIAS_LINUX_RAID },
+   { DOSPTYP_LINSWP,   G_PART_ALIAS_LINUX_SWAP },
+   { DOSPTYP_LINUX,G_PART_ALIAS_LINUX_DATA },
+   { DOSPTYP_NTFS, G_PART_ALIAS_MS_NTFS },
{ DOSPTYP_PPCBOOT,  G_PART_ALIAS_PREP_BOOT },
{ DOSPTYP_VMFS, G_PART_ALIAS_VMFS },
{ DOSPTYP_VMKDIAG,  G_PART_ALIAS_VMKDIAG },
-   { DOSPTYP_APPLE_UFS,G_PART_ALIAS_APPLE_UFS },
-   { DOSPTYP_APPLE_BOOT,   G_PART_ALIAS_APPLE_BOOT },
-   { DOSPTYP_HFS,  G_PART_ALIAS_APPLE_HFS },
 };
 
 static int
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335301 - in head: sbin/geom/class/part sys/geom/part

2018-06-17 Thread Ed Maste
Author: emaste
Date: Sun Jun 17 20:10:48 2018
New Revision: 335301
URL: https://svnweb.freebsd.org/changeset/base/335301

Log:
  gpart: add EFI alias for MBR partition scheme
  
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D15870

Modified:
  head/sbin/geom/class/part/gpart.8
  head/sys/geom/part/g_part_ebr.c
  head/sys/geom/part/g_part_mbr.c

Modified: head/sbin/geom/class/part/gpart.8
==
--- head/sbin/geom/class/part/gpart.8   Sun Jun 17 20:06:27 2018
(r335300)
+++ head/sbin/geom/class/part/gpart.8   Sun Jun 17 20:10:48 2018
(r335301)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 11, 2018
+.Dd June 17, 2018
 .Dt GPART 8
 .Os
 .Sh NAME
@@ -630,9 +630,11 @@ The scheme-specific type is
 .It Cm efi
 The system partition for computers that use the Extensible Firmware
 Interface (EFI).
-In such cases, the GPT partitioning scheme is used and the
-actual partition type for the system partition can also be specified as
-.Qq Li "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b" .
+The scheme-specific types are
+.Qq Li "!239"
+for MBR, and
+.Qq Li "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b"
+for GPT.
 .It Cm freebsd
 A
 .Fx

Modified: head/sys/geom/part/g_part_ebr.c
==
--- head/sys/geom/part/g_part_ebr.c Sun Jun 17 20:06:27 2018
(r335300)
+++ head/sys/geom/part/g_part_ebr.c Sun Jun 17 20:10:48 2018
(r335301)
@@ -135,6 +135,7 @@ static struct g_part_ebr_alias {
int alias;
 } ebr_alias_match[] = {
{ DOSPTYP_386BSD,   G_PART_ALIAS_FREEBSD },
+   { DOSPTYP_EFI,  G_PART_ALIAS_EFI },
{ DOSPTYP_FAT32,G_PART_ALIAS_MS_FAT32 },
{ DOSPTYP_FAT32LBA, G_PART_ALIAS_MS_FAT32LBA },
{ DOSPTYP_LINLVM,   G_PART_ALIAS_LINUX_LVM },

Modified: head/sys/geom/part/g_part_mbr.c
==
--- head/sys/geom/part/g_part_mbr.c Sun Jun 17 20:06:27 2018
(r335300)
+++ head/sys/geom/part/g_part_mbr.c Sun Jun 17 20:10:48 2018
(r335301)
@@ -130,6 +130,7 @@ static struct g_part_mbr_alias {
{ DOSPTYP_386BSD,   G_PART_ALIAS_FREEBSD },
{ DOSPTYP_APPLE_BOOT,   G_PART_ALIAS_APPLE_BOOT },
{ DOSPTYP_APPLE_UFS,G_PART_ALIAS_APPLE_UFS },
+   { DOSPTYP_EFI,  G_PART_ALIAS_EFI },
{ DOSPTYP_EXT,  G_PART_ALIAS_EBR },
{ DOSPTYP_EXTLBA,   G_PART_ALIAS_EBR },
{ DOSPTYP_FAT16,G_PART_ALIAS_MS_FAT16 },
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335315 - head/sys/compat/linsysfs

2018-06-18 Thread Ed Maste
Author: emaste
Date: Mon Jun 18 13:26:45 2018
New Revision: 335315
URL: https://svnweb.freebsd.org/changeset/base/335315

Log:
  linsysfs: depend on linux_common module on arm64, as on amd64
  
  Sponsored by: Turing Robotic Industries

Modified:
  head/sys/compat/linsysfs/linsysfs.c

Modified: head/sys/compat/linsysfs/linsysfs.c
==
--- head/sys/compat/linsysfs/linsysfs.c Mon Jun 18 06:01:28 2018
(r335314)
+++ head/sys/compat/linsysfs/linsysfs.c Mon Jun 18 13:26:45 2018
(r335315)
@@ -557,7 +557,7 @@ linsysfs_uninit(PFS_INIT_ARGS)
 }
 
 PSEUDOFS(linsysfs, 1, VFCF_JAIL);
-#if defined(__amd64__)
+#if defined(__aarch64__) || defined(__amd64__)
 MODULE_DEPEND(linsysfs, linux_common, 1, 1, 1);
 #else
 MODULE_DEPEND(linsysfs, linux, 1, 1, 1);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335323 - head/sys/arm64/linux

2018-06-18 Thread Ed Maste
Author: emaste
Date: Mon Jun 18 18:08:19 2018
New Revision: 335323
URL: https://svnweb.freebsd.org/changeset/base/335323

Log:
  arm64 linuxulator: add dup syscall entry
  
  Missed in r333027
  
  Sponsored by: Turing Robotic Industries Inc.

Modified:
  head/sys/arm64/linux/syscalls.master

Modified: head/sys/arm64/linux/syscalls.master
==
--- head/sys/arm64/linux/syscalls.masterMon Jun 18 17:27:43 2018
(r335322)
+++ head/sys/arm64/linux/syscalls.masterMon Jun 18 18:08:19 2018
(r335323)
@@ -42,7 +42,7 @@
struct epoll_event *events, \
l_int maxevents, l_int timeout, \
l_sigset_t *mask, l_size_t sigsetsize); }
-23 AUE_NULLUNIMPL  linux_dup
+23 AUE_DUP NOPROTO { int dup(u_int fd); }
 24 AUE_NULLSTD { int linux_dup3(l_int oldfd, l_int newfd, \
l_int flags); }
 25 AUE_FCNTL   STD { int linux_fcntl(l_uint fd, l_uint cmd, \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335324 - head/sys/arm64/linux

2018-06-18 Thread Ed Maste
Author: emaste
Date: Mon Jun 18 18:10:11 2018
New Revision: 335324
URL: https://svnweb.freebsd.org/changeset/base/335324

Log:
  Regen arm64 linuxulator sysent files after r335323

Modified:
  head/sys/arm64/linux/linux_syscall.h
  head/sys/arm64/linux/linux_syscalls.c
  head/sys/arm64/linux/linux_sysent.c
  head/sys/arm64/linux/linux_systrace_args.c

Modified: head/sys/arm64/linux/linux_syscall.h
==
--- head/sys/arm64/linux/linux_syscall.hMon Jun 18 18:08:19 2018
(r335323)
+++ head/sys/arm64/linux/linux_syscall.hMon Jun 18 18:10:11 2018
(r335324)
@@ -23,6 +23,7 @@
 #defineLINUX_SYS_linux_epoll_create1   20
 #defineLINUX_SYS_linux_epoll_ctl   21
 #defineLINUX_SYS_linux_epoll_pwait 22
+#defineLINUX_SYS_dup   23
 #defineLINUX_SYS_linux_dup324
 #defineLINUX_SYS_linux_fcntl   25
 #defineLINUX_SYS_linux_inotify_init1   26

Modified: head/sys/arm64/linux/linux_syscalls.c
==
--- head/sys/arm64/linux/linux_syscalls.c   Mon Jun 18 18:08:19 2018
(r335323)
+++ head/sys/arm64/linux/linux_syscalls.c   Mon Jun 18 18:10:11 2018
(r335324)
@@ -30,7 +30,7 @@ const char *linux_syscallnames[] = {
"linux_epoll_create1",  /* 20 = linux_epoll_create1 */
"linux_epoll_ctl",  /* 21 = linux_epoll_ctl */
"linux_epoll_pwait",/* 22 = linux_epoll_pwait */
-   "#23",  /* 23 = linux_dup */
+   "dup",  /* 23 = dup */
"linux_dup3",   /* 24 = linux_dup3 */
"linux_fcntl",  /* 25 = linux_fcntl */
"linux_inotify_init1",  /* 26 = linux_inotify_init1 */

Modified: head/sys/arm64/linux/linux_sysent.c
==
--- head/sys/arm64/linux/linux_sysent.c Mon Jun 18 18:08:19 2018
(r335323)
+++ head/sys/arm64/linux/linux_sysent.c Mon Jun 18 18:10:11 2018
(r335324)
@@ -40,7 +40,7 @@ struct sysent linux_sysent[] = {
{ AS(linux_epoll_create1_args), (sy_call_t *)linux_epoll_create1, 
AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 20 = linux_epoll_create1 */
{ AS(linux_epoll_ctl_args), (sy_call_t *)linux_epoll_ctl, AUE_NULL, 
NULL, 0, 0, 0, SY_THR_STATIC }, /* 21 = linux_epoll_ctl */
{ AS(linux_epoll_pwait_args), (sy_call_t *)linux_epoll_pwait, AUE_NULL, 
NULL, 0, 0, 0, SY_THR_STATIC }, /* 22 = linux_epoll_pwait */
-   { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },  
/* 23 = linux_dup */
+   { AS(dup_args), (sy_call_t *)sys_dup, AUE_DUP, NULL, 0, 0, 0, 
SY_THR_STATIC },  /* 23 = dup */
{ AS(linux_dup3_args), (sy_call_t *)linux_dup3, AUE_NULL, NULL, 0, 0, 
0, SY_THR_STATIC },   /* 24 = linux_dup3 */
{ AS(linux_fcntl_args), (sy_call_t *)linux_fcntl, AUE_FCNTL, NULL, 0, 
0, 0, SY_THR_STATIC },/* 25 = linux_fcntl */
{ AS(linux_inotify_init1_args), (sy_call_t *)linux_inotify_init1, 
AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 26 = linux_inotify_init1 */

Modified: head/sys/arm64/linux/linux_systrace_args.c
==
--- head/sys/arm64/linux/linux_systrace_args.c  Mon Jun 18 18:08:19 2018
(r335323)
+++ head/sys/arm64/linux/linux_systrace_args.c  Mon Jun 18 18:10:11 2018
(r335324)
@@ -122,6 +122,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
*n_args = 6;
break;
}
+   /* dup */
+   case 23: {
+   struct dup_args *p = params;
+   uarg[0] = p->fd; /* u_int */
+   *n_args = 1;
+   break;
+   }
/* linux_dup3 */
case 24: {
struct linux_dup3_args *p = params;
@@ -2234,6 +2241,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
break;
};
break;
+   /* dup */
+   case 23:
+   switch(ndx) {
+   case 0:
+   p = "u_int";
+   break;
+   default:
+   break;
+   };
+   break;
/* linux_dup3 */
case 24:
switch(ndx) {
@@ -5496,6 +5513,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *
break;
/* linux_epoll_pwait */
case 22:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* dup */
+   case 23:
if (ndx == 0 || ndx == 1)
p = "int";
break;
___
svn-src-head@freebsd.org mailing list
h

svn commit: r335327 - head/sys/compat/linux

2018-06-18 Thread Ed Maste
Author: emaste
Date: Mon Jun 18 18:43:45 2018
New Revision: 335327
URL: https://svnweb.freebsd.org/changeset/base/335327

Log:
  linuxulator: add debugging for invalid capget/capset version
  
  Sponsored by: Turing Robotic Industries Inc.

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==
--- head/sys/compat/linux/linux_misc.c  Mon Jun 18 18:38:58 2018
(r335326)
+++ head/sys/compat/linux/linux_misc.c  Mon Jun 18 18:43:45 2018
(r335327)
@@ -1895,6 +1895,11 @@ linux_capget(struct thread *td, struct linux_capget_ar
return (error);
 
if (luch.version != _LINUX_CAPABILITY_VERSION) {
+#ifdef DEBUG
+   if (ldebug(capget))
+   printf(LMSG("invalid capget capability version 0x%x"),
+   luch.version);
+#endif
luch.version = _LINUX_CAPABILITY_VERSION;
error = copyout(&luch, args->hdrp, sizeof(luch));
if (error)
@@ -1934,6 +1939,11 @@ linux_capset(struct thread *td, struct linux_capset_ar
return (error);
 
if (luch.version != _LINUX_CAPABILITY_VERSION) {
+#ifdef DEBUG
+   if (ldebug(capset))
+   printf(LMSG("invalid capset capability version 0x%x"),
+   luch.version);
+#endif
luch.version = _LINUX_CAPABILITY_VERSION;
error = copyout(&luch, args->hdrp, sizeof(luch));
if (error)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335333 - head/sys/arm64/linux

2018-06-18 Thread Ed Maste
Author: emaste
Date: Mon Jun 18 19:34:34 2018
New Revision: 335333
URL: https://svnweb.freebsd.org/changeset/base/335333

Log:
  Introduce arm64 linuxulator stubs
  
  This provides stub implementations of arm64 Linux vdso and machdep,
  ptrace, and futex sufficient for executing an arm64 Linux 'hello world'
  binary.
  
  Reviewed by:  andrew
  Sponsored by: Turing Robotic Industries
  Differential Revision:https://reviews.freebsd.org/D15832

Added:
  head/sys/arm64/linux/linux_locore.s   (contents, props changed)
  head/sys/arm64/linux/linux_machdep.c   (contents, props changed)
  head/sys/arm64/linux/linux_ptrace.c   (contents, props changed)
  head/sys/arm64/linux/linux_support.s   (contents, props changed)

Added: head/sys/arm64/linux/linux_locore.s
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm64/linux/linux_locore.s Mon Jun 18 19:34:34 2018
(r335333)
@@ -0,0 +1,58 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (C) 2018 Turing Robotic Industries Inc.
+ *
+ * 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * arm64 Linux VDSO implementation.
+ */
+
+#include 
+
+   .data
+
+   .globl linux_platform
+linux_platform:
+   .asciz "arm64"
+
+   .text
+
+ENTRY(__kernel_rt_sigreturn)
+   brk #0 /* LINUXTODO: implement __kernel_rt_sigreturn */
+   ret
+
+ENTRY(__kernel_gettimeofday)
+   brk #0 /* LINUXTODO: implement __kernel_gettimeofday */
+   ret
+
+ENTRY(__kernel_clock_gettime)
+   brk #0 /* LINUXTODO: implement __kernel_clock_gettime */
+   ret
+
+ENTRY(__kernel_clock_getres)
+   brk #0 /* LINUXTODO: implement __kernel_clock_getres */
+   ret

Added: head/sys/arm64/linux/linux_machdep.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm64/linux/linux_machdep.cMon Jun 18 19:34:34 2018
(r335333)
@@ -0,0 +1,132 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2018 Turing Robotic Industries Inc.
+ * Copyright (c) 2000 Marcel Moolenaar
+ *
+ * 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
+ *
+ * $FreeBSD$
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include

svn commit: r335376 - head/usr.bin/ar

2018-06-19 Thread Ed Maste
Author: emaste
Date: Tue Jun 19 17:28:05 2018
New Revision: 335376
URL: https://svnweb.freebsd.org/changeset/base/335376

Log:
  usr.bin/ar: use standard 2-Clause FreeBSD license
  
  Many licenses on ar files contained small variations from the standard
  FreeBSD license text. To avoid license proliferation switch to the usual
  standard 2-clause FreeBSD license for those files where I have obtained
  permission from all of the listed copyright holders.
  
  Approved by:  jkoshy, kaiw
  Differential Revision:https://reviews.freebsd.org/D14561

Modified:
  head/usr.bin/ar/acplex.l
  head/usr.bin/ar/acpyacc.y
  head/usr.bin/ar/ar.h
  head/usr.bin/ar/write.c

Modified: head/usr.bin/ar/acplex.l
==
--- head/usr.bin/ar/acplex.lTue Jun 19 17:11:53 2018(r335375)
+++ head/usr.bin/ar/acplex.lTue Jun 19 17:28:05 2018(r335376)
@@ -9,22 +9,22 @@
  * 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
- *in this position and unchanged.
+ *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(S) ``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(S) 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.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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 

Modified: head/usr.bin/ar/acpyacc.y
==
--- head/usr.bin/ar/acpyacc.y   Tue Jun 19 17:11:53 2018(r335375)
+++ head/usr.bin/ar/acpyacc.y   Tue Jun 19 17:28:05 2018(r335376)
@@ -9,22 +9,22 @@
  * 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
- *in this position and unchanged.
+ *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(S) ``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(S) 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.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, S

svn commit: r335377 - head/usr.bin/ar

2018-06-19 Thread Ed Maste
Author: emaste
Date: Tue Jun 19 17:30:11 2018
New Revision: 335377
URL: https://svnweb.freebsd.org/changeset/base/335377

Log:
  usr.bin/ar: remove incorrect SPDX tags
  
  Three ar files have a non-standard variation of the BSD license, so
  remove their SPDX tags.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.bin/ar/ar.c
  head/usr.bin/ar/read.c
  head/usr.bin/ar/util.c

Modified: head/usr.bin/ar/ar.c
==
--- head/usr.bin/ar/ar.cTue Jun 19 17:28:05 2018(r335376)
+++ head/usr.bin/ar/ar.cTue Jun 19 17:30:11 2018(r335377)
@@ -1,6 +1,4 @@
 /*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
  * Copyright (c) 2007 Kai Wang
  * Copyright (c) 2007 Tim Kientzle
  * Copyright (c) 2007 Joseph Koshy

Modified: head/usr.bin/ar/read.c
==
--- head/usr.bin/ar/read.c  Tue Jun 19 17:28:05 2018(r335376)
+++ head/usr.bin/ar/read.c  Tue Jun 19 17:30:11 2018(r335377)
@@ -1,6 +1,4 @@
 /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
  * Copyright (c) 2007 Kai Wang
  * Copyright (c) 2007 Tim Kientzle
  * All rights reserved.

Modified: head/usr.bin/ar/util.c
==
--- head/usr.bin/ar/util.c  Tue Jun 19 17:28:05 2018(r335376)
+++ head/usr.bin/ar/util.c  Tue Jun 19 17:30:11 2018(r335377)
@@ -1,6 +1,4 @@
 /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
  * Copyright (c) 2003-2007 Tim Kientzle
  * All rights reserved.
  *
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335387 - head/sys/compat/linux

2018-06-19 Thread Ed Maste
Author: emaste
Date: Tue Jun 19 21:26:23 2018
New Revision: 335387
URL: https://svnweb.freebsd.org/changeset/base/335387

Log:
  linuxulator: handle V3 capget/capset
  
  Linux 2.6.26 introduced 64-bit capability sets.  Extend our stub
  implementation to handle both 32- and 64-bit.  (We still report no
  capabilities in capget, and disallow any in capset.)
  
  Reviewed by:  chuck
  Sponsored by: Turing Robotic Industries Inc.
  Differential Revision:https://reviews.freebsd.org/D15887

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==
--- head/sys/compat/linux/linux_misc.c  Tue Jun 19 21:07:25 2018
(r335386)
+++ head/sys/compat/linux/linux_misc.c  Tue Jun 19 21:26:23 2018
(r335387)
@@ -1867,7 +1867,9 @@ linux_exit_group(struct thread *td, struct linux_exit_
/* NOTREACHED */
 }
 
-#define _LINUX_CAPABILITY_VERSION  0x19980330
+#define _LINUX_CAPABILITY_VERSION_1  0x19980330
+#define _LINUX_CAPABILITY_VERSION_2  0x20071026
+#define _LINUX_CAPABILITY_VERSION_3  0x20080522
 
 struct l_user_cap_header {
l_int   version;
@@ -1881,27 +1883,35 @@ struct l_user_cap_data {
 };
 
 int
-linux_capget(struct thread *td, struct linux_capget_args *args)
+linux_capget(struct thread *td, struct linux_capget_args *uap)
 {
struct l_user_cap_header luch;
-   struct l_user_cap_data lucd;
-   int error;
+   struct l_user_cap_data lucd[2];
+   int error, u32s;
 
-   if (args->hdrp == NULL)
+   if (uap->hdrp == NULL)
return (EFAULT);
 
-   error = copyin(args->hdrp, &luch, sizeof(luch));
+   error = copyin(uap->hdrp, &luch, sizeof(luch));
if (error != 0)
return (error);
 
-   if (luch.version != _LINUX_CAPABILITY_VERSION) {
+   switch (luch.version) {
+   case _LINUX_CAPABILITY_VERSION_1:
+   u32s = 1;
+   break;
+   case _LINUX_CAPABILITY_VERSION_2:
+   case _LINUX_CAPABILITY_VERSION_3:
+   u32s = 2;
+   break;
+   default:
 #ifdef DEBUG
if (ldebug(capget))
printf(LMSG("invalid capget capability version 0x%x"),
luch.version);
 #endif
-   luch.version = _LINUX_CAPABILITY_VERSION;
-   error = copyout(&luch, args->hdrp, sizeof(luch));
+   luch.version = _LINUX_CAPABILITY_VERSION_1;
+   error = copyout(&luch, uap->hdrp, sizeof(luch));
if (error)
return (error);
return (EINVAL);
@@ -1910,42 +1920,50 @@ linux_capget(struct thread *td, struct linux_capget_ar
if (luch.pid)
return (EPERM);
 
-   if (args->datap) {
+   if (uap->datap) {
/*
 * The current implementation doesn't support setting
 * a capability (it's essentially a stub) so indicate
 * that no capabilities are currently set or available
 * to request.
 */
-   bzero (&lucd, sizeof(lucd));
-   error = copyout(&lucd, args->datap, sizeof(lucd));
+   memset(&lucd, 0, u32s * sizeof(lucd[0]));
+   error = copyout(&lucd, uap->datap, u32s * sizeof(lucd[0]));
}
 
return (error);
 }
 
 int
-linux_capset(struct thread *td, struct linux_capset_args *args)
+linux_capset(struct thread *td, struct linux_capset_args *uap)
 {
struct l_user_cap_header luch;
-   struct l_user_cap_data lucd;
-   int error;
+   struct l_user_cap_data lucd[2];
+   int error, i, u32s;
 
-   if (args->hdrp == NULL || args->datap == NULL)
+   if (uap->hdrp == NULL || uap->datap == NULL)
return (EFAULT);
 
-   error = copyin(args->hdrp, &luch, sizeof(luch));
+   error = copyin(uap->hdrp, &luch, sizeof(luch));
if (error != 0)
return (error);
 
-   if (luch.version != _LINUX_CAPABILITY_VERSION) {
+   switch (luch.version) {
+   case _LINUX_CAPABILITY_VERSION_1:
+   u32s = 1;
+   break;
+   case _LINUX_CAPABILITY_VERSION_2:
+   case _LINUX_CAPABILITY_VERSION_3:
+   u32s = 2;
+   break;
+   default:
 #ifdef DEBUG
if (ldebug(capset))
printf(LMSG("invalid capset capability version 0x%x"),
luch.version);
 #endif
-   luch.version = _LINUX_CAPABILITY_VERSION;
-   error = copyout(&luch, args->hdrp, sizeof(luch));
+   luch.version = _LINUX_CAPABILITY_VERSION_1;
+   error = copyout(&luch, uap->hdrp, sizeof(luch));
if (error)
return (error);
return (EINVAL);
@@ -1954,18 +1972,21 @@ linux_capset(struct thread *td, struct linux_capset_ar
 

svn commit: r335454 - head/usr.bin/ar

2018-06-20 Thread Ed Maste
Author: emaste
Date: Wed Jun 20 18:43:17 2018
New Revision: 335454
URL: https://svnweb.freebsd.org/changeset/base/335454

Log:
  usr.bin/ar: use standard 2-Clause FreeBSD license
  
  Many licenses on ar files contained small variations from the standard
  FreeBSD license text. To avoid license proliferation switch to the usual
  2-clause FreeBSD license after obtaining permission from all copyright
  holders.
  
  Approved by:  jkoshy, kaiw, kientzle
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D14561

Modified:
  head/usr.bin/ar/ar.c
  head/usr.bin/ar/read.c
  head/usr.bin/ar/util.c

Modified: head/usr.bin/ar/ar.c
==
--- head/usr.bin/ar/ar.cWed Jun 20 17:37:55 2018(r335453)
+++ head/usr.bin/ar/ar.cWed Jun 20 18:43:17 2018(r335454)
@@ -1,4 +1,6 @@
 /*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
  * Copyright (c) 2007 Kai Wang
  * Copyright (c) 2007 Tim Kientzle
  * Copyright (c) 2007 Joseph Koshy
@@ -8,22 +10,22 @@
  * 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
- *in this position and unchanged.
+ *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(S) ``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(S) 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.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
  */
 
 /*-

Modified: head/usr.bin/ar/read.c
==
--- head/usr.bin/ar/read.c  Wed Jun 20 17:37:55 2018(r335453)
+++ head/usr.bin/ar/read.c  Wed Jun 20 18:43:17 2018(r335454)
@@ -1,4 +1,6 @@
 /*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
  * Copyright (c) 2007 Kai Wang
  * Copyright (c) 2007 Tim Kientzle
  * All rights reserved.
@@ -7,22 +9,22 @@
  * 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
- *in this position and unchanged.
+ *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(S) ``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(S) 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.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND

svn commit: r335459 - head/usr.sbin/acpi/acpidump

2018-06-20 Thread Ed Maste
Author: emaste
Date: Wed Jun 20 19:40:54 2018
New Revision: 335459
URL: https://svnweb.freebsd.org/changeset/base/335459

Log:
  acpidump.8: include NFIT in the man page list of tables
  
  Was missed in r321298.
  
  Reported by:  Ben Widawsky (in review D15931)
  MFC after:1 week

Modified:
  head/usr.sbin/acpi/acpidump/acpidump.8

Modified: head/usr.sbin/acpi/acpidump/acpidump.8
==
--- head/usr.sbin/acpi/acpidump/acpidump.8  Wed Jun 20 19:23:56 2018
(r335458)
+++ head/usr.sbin/acpi/acpidump/acpidump.8  Wed Jun 20 19:40:54 2018
(r335459)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 14, 2005
+.Dd June 20, 2018
 .Dt ACPIDUMP 8
 .Os
 .Sh NAME
@@ -105,6 +105,7 @@ utility dumps contents of the following tables:
 .It HPET
 .It MADT
 .It MCFG
+.It NFIT
 .It RSD PTR
 .It RSDT
 .It WDDT
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335464 - head

2018-06-20 Thread Ed Maste
Author: emaste
Date: Thu Jun 21 02:15:50 2018
New Revision: 335464
URL: https://svnweb.freebsd.org/changeset/base/335464

Log:
  Makefile.inc1: rename build metadata file to toolchain-metadata.mk
  
  The metadata file contains more than just compiler metadata.
  
  Discussed with:   bdrewery

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Thu Jun 21 01:22:35 2018(r335463)
+++ head/Makefile.inc1  Thu Jun 21 02:15:50 2018(r335464)
@@ -92,8 +92,8 @@ MK_GCC_BOOTSTRAP= no
 # running CC from bsd.compiler.mk.
 .if make(installworld) || make(install) || make(distributeworld) || \
 make(stageworld)
-.-include "${OBJTOP}/compiler-metadata.mk"
-.if !defined(_LOADED_COMPILER_METADATA)
+.-include "${OBJTOP}/toolchain-metadata.mk"
+.if !defined(_LOADED_TOOLCHAIN_METADATA)
 .error A build is required first.  You may have the wrong MAKEOBJDIRPREFIX set.
 .endif
 .endif
@@ -311,7 +311,7 @@ test-system-${_t}: .PHONY
 
 # Store some compiler metadata for use in installworld where we don't
 # want to invoke CC at all.
-_COMPILER_METADATA_VARS=   COMPILER_VERSION \
+_TOOLCHAIN_METADATA_VARS=  COMPILER_VERSION \
COMPILER_TYPE \
COMPILER_FEATURES \
COMPILER_FREEBSD_VERSION \
@@ -319,17 +319,17 @@ _COMPILER_METADATA_VARS=  COMPILER_VERSION \
LINKER_FEATURES \
LINKER_TYPE \
LINKER_FREEBSD_VERSION
-compiler-metadata.mk: .PHONY .META
+toolchain-metadata.mk: .PHONY .META
@: > ${.TARGET}
-   @echo ".info Using cached compiler metadata from build at $$(hostname) 
on $$(date)" \
+   @echo ".info Using cached toolchain metadata from build at $$(hostname) 
on $$(date)" \
> ${.TARGET}
-   @echo "_LOADED_COMPILER_METADATA=t" >> ${.TARGET}
-.for v in ${_COMPILER_METADATA_VARS}
+   @echo "_LOADED_TOOLCHAIN_METADATA=t" >> ${.TARGET}
+.for v in ${_TOOLCHAIN_METADATA_VARS}
@echo "${v}=${${v}}" >> ${.TARGET}
@echo "X_${v}=${X_${v}}" >> ${.TARGET}
 .endfor
-   @echo ".export ${_COMPILER_METADATA_VARS}" >> ${.TARGET}
-   @echo ".export ${_COMPILER_METADATA_VARS:C,^,X_,}" >> ${.TARGET}
+   @echo ".export ${_TOOLCHAIN_METADATA_VARS}" >> ${.TARGET}
+   @echo ".export ${_TOOLCHAIN_METADATA_VARS:C,^,X_,}" >> ${.TARGET}
 
 
 # We must do lib/ and libexec/ before bin/ in case of a mid-install error to
@@ -1015,7 +1015,7 @@ _cross-tools:
@echo "--"
@echo ">>> stage 3: cross tools"
@echo "--"
-   @rm -f ${OBJTOP}/compiler-metadata.mk
+   @rm -f ${OBJTOP}/toolchain-metadata.mk
${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools
 _build-metadata:
@@ -1023,7 +1023,7 @@ _build-metadata:
@echo "--"
@echo ">>> stage 3.1: recording build metadata"
@echo "--"
-   ${_+_}cd ${.CURDIR}; ${WMAKE} compiler-metadata.mk
+   ${_+_}cd ${.CURDIR}; ${WMAKE} toolchain-metadata.mk
${_+_}cd ${.CURDIR}; ${WMAKE} host-osreldate.h
 _includes:
@echo
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r335454 - head/usr.bin/ar

2018-06-20 Thread Ed Maste
On 20 June 2018 at 20:48, Rodney W. Grimes
 wrote:
>
> My claim still stands, the commit message and reality do not match,
> Ed claimed that he was switching to 2-clause FreeBSD license, yet
> it does not appear to actually do that.

The commit message could have been more clear indeed.

> Does SPDX have rules for dual tagging a file?  I seem to recall that
> there was some way to do that at least.

It does (using license1 AND/OR license2), but in this case one of the
licenses is a subset of the other.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r335482 - in head: . usr.bin usr.bin/elfcopy usr.bin/objcopy

2018-06-21 Thread Ed Maste
Author: emaste
Date: Thu Jun 21 14:28:20 2018
New Revision: 335482
URL: https://svnweb.freebsd.org/changeset/base/335482

Log:
  Rename usr.bin/elfcopy to usr.bin/objcopy
  
  We always install ELF Tool Chain's elfcopy as objcopy, so to avoid
  confusion rename the src directory containing our reach-over Makefile
  to match.
  
  Requested by: jhb
  Sponsored by: The FreeBSD Foundation

Added:
  head/usr.bin/objcopy/
 - copied from r335481, head/usr.bin/elfcopy/
Deleted:
  head/usr.bin/elfcopy/
Modified:
  head/Makefile.inc1
  head/usr.bin/Makefile

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Thu Jun 21 14:26:43 2018(r335481)
+++ head/Makefile.inc1  Thu Jun 21 14:28:20 2018(r335482)
@@ -2182,7 +2182,7 @@ _binutils=gnu/usr.bin/binutils
 .if ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no"
 _elftctools=   lib/libelftc \
lib/libpe \
-   usr.bin/elfcopy \
+   usr.bin/objcopy \
usr.bin/nm \
usr.bin/size \
usr.bin/strings
@@ -2195,7 +2195,7 @@ _elftctools+= usr.bin/addr2line
 # the target (for at least crunchide).
 _elftctools=   lib/libelftc \
lib/libpe \
-   usr.bin/elfcopy
+   usr.bin/objcopy
 .endif
 
 .if ${MK_CLANG_BOOTSTRAP} != "no"
@@ -2280,7 +2280,7 @@ NXBDIRS+= \
 usr.bin/cmp \
 usr.bin/diff \
 usr.bin/dirname \
-usr.bin/elfcopy \
+usr.bin/objcopy \
 usr.bin/env \
 usr.bin/fetch \
 usr.bin/find \

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Thu Jun 21 14:26:43 2018(r335481)
+++ head/usr.bin/Makefile   Thu Jun 21 14:28:20 2018(r335482)
@@ -264,7 +264,7 @@ SUBDIR.${MK_TOOLCHAIN}+=c89
 SUBDIR.${MK_TOOLCHAIN}+=   c99
 SUBDIR.${MK_TOOLCHAIN}+=   ctags
 SUBDIR.${MK_TOOLCHAIN}+=   cxxfilt
-SUBDIR.${MK_TOOLCHAIN}+=   elfcopy
+SUBDIR.${MK_TOOLCHAIN}+=   objcopy
 SUBDIR.${MK_TOOLCHAIN}+=   file2c
 # ARM64TODO gprof does not build
 # RISCVTODO gprof does not build
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326287 - head/usr.sbin/efivar

2017-11-27 Thread Ed Maste
Author: emaste
Date: Mon Nov 27 19:35:21 2017
New Revision: 326287
URL: https://svnweb.freebsd.org/changeset/base/326287

Log:
  efivar: add missing getopt 'u' option

Modified:
  head/usr.sbin/efivar/efivar.c

Modified: head/usr.sbin/efivar/efivar.c
==
--- head/usr.sbin/efivar/efivar.c   Mon Nov 27 18:42:23 2017
(r326286)
+++ head/usr.sbin/efivar/efivar.c   Mon Nov 27 19:35:21 2017
(r326287)
@@ -255,7 +255,7 @@ parse_args(int argc, char **argv)
 {
int ch, i;
 
-   while ((ch = getopt_long(argc, argv, "aAbdDf:gHlLNn:OpRt:w",
+   while ((ch = getopt_long(argc, argv, "aAbdDf:gHlLNn:OpRt:uw",
longopts, NULL)) != -1) {
switch (ch) {
case 'a':
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326482 - head/lib/msun/src

2017-12-02 Thread Ed Maste
Author: emaste
Date: Sun Dec  3 01:56:03 2017
New Revision: 326482
URL: https://svnweb.freebsd.org/changeset/base/326482

Log:
  lib/msun: remove trailing whitespace from e_pow.c
  
  Submitted by: Steve Kargl
  MFC after:1 week

Modified:
  head/lib/msun/src/e_pow.c

Modified: head/lib/msun/src/e_pow.c
==
--- head/lib/msun/src/e_pow.c   Sun Dec  3 00:24:22 2017(r326481)
+++ head/lib/msun/src/e_pow.c   Sun Dec  3 01:56:03 2017(r326482)
@@ -4,7 +4,7 @@
  * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * 
  */
@@ -19,7 +19,7 @@ __FBSDID("$FreeBSD$");
  * 1. Compute and return log2(x) in two pieces:
  * log2(x) = w1 + w2,
  *where w1 has 53-24 = 29 bit trailing zeros.
- * 2. Perform y*log2(x) = n+y' by simulating multi-precision 
+ * 2. Perform y*log2(x) = n+y' by simulating multi-precision
  *arithmetic, where |y'|<=0.5.
  * 3. Return x**y = 2**n*exp(y'*log2)
  *
@@ -47,13 +47,13 @@ __FBSDID("$FreeBSD$");
  * Accuracy:
  * pow(x,y) returns x**y nearly rounded. In particular
  * pow(integer,integer)
- * always returns the correct integer provided it is 
+ * always returns the correct integer provided it is
  * representable.
  *
  * Constants :
- * The hexadecimal values are the intended ones for the following 
- * constants. The decimal values may be used, provided that the 
- * compiler will convert from decimal to binary accurately enough 
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
  * to produce the hexadecimal values shown.
  */
 
@@ -107,14 +107,14 @@ __ieee754_pow(double x, double y)
ix = hx&0x7fff;  iy = hy&0x7fff;
 
 /* y==zero: x**0 = 1 */
-   if((iy|ly)==0) return one;  
+   if((iy|ly)==0) return one;
 
 /* x==1: 1**y = 1, even if y is NaN */
if (hx==0x3ff0 && lx == 0) return one;
 
 /* y!=zero: result is NaN if either arg is NaN */
if(ix > 0x7ff0 || ((ix==0x7ff0)&&(lx!=0)) ||
-  iy > 0x7ff0 || ((iy==0x7ff0)&&(ly!=0))) 
+  iy > 0x7ff0 || ((iy==0x7ff0)&&(ly!=0)))
return (x+0.0)+(y+0.0);
 
 /* determine if y is an odd int when x < 0
@@ -123,7 +123,7 @@ __ieee754_pow(double x, double y)
  * yisint = 2  ... y is an even int
  */
yisint  = 0;
-   if(hx<0) {  
+   if(hx<0) {
if(iy>=0x4340) yisint = 2; /* even integer y */
else if(iy>=0x3ff0) {
k = (iy>>20)-0x3ff;/* exponent */
@@ -134,11 +134,11 @@ __ieee754_pow(double x, double y)
j = iy>>(20-k);
if((j<<(20-k))==iy) yisint = 2-(j&1);
}
-   }   
-   } 
+   }
+   }
 
 /* special value of y */
-   if(ly==0) { 
+   if(ly==0) {
if (iy==0x7ff0) {   /* y is +-inf */
if(((ix-0x3ff0)|lx)==0)
return  one;/* (-1)**+-inf is 1 */
@@ -146,14 +146,14 @@ __ieee754_pow(double x, double y)
return (hy>=0)? y: zero;
else/* (|x|<1)**-,+inf = inf,0 */
return (hy<0)?-y: zero;
-   } 
+   }
if(iy==0x3ff0) {/* y is  +-1 */
if(hy<0) return one/x; else return x;
}
if(hy==0x4000) return x*x; /* y is  2 */
if(hy==0x3fe0) {/* y is  0.5 */
if(hx>=0)   /* x >= +0 */
-   return sqrt(x); 
+   return sqrt(x);
}
}
 
@@ -166,13 +166,13 @@ __ieee754_pow(double x, double y)
if(hx<0) {
if(((ix-0x3ff0)|yisint)==0) {
z = (z-z)/(z-z); /* (-1)**non-int is NaN */
-   } else if(yisint==1) 
+   } else if(yisint==1)
z = -z; /* (x<0)**odd = -(|x|**odd) */
}
return z;
}
}
-
+
 /* CYGNUS LOCAL + fdlibm-5.3 fix: This used to be
n = (hx>>31)+1;
but ANSI C says a right shift of a signed negative quantity is
@@ -194,7 +194,7 @@ __ieee754_pow(double x, double y)
/* over/underflow if x is not close to one */
if(ix<0x3fef) return (hy<0)? s*huge*huge:s*tiny*tiny;
if(ix>0x3ff0) return (hy>0)? s*huge*huge:s*tiny*tiny;
-   /* now |1-x| is tiny <= 2**-20, suffice to 

svn commit: r326547 - head/contrib/llvm/tools/lld/ELF

2017-12-04 Thread Ed Maste
Author: emaste
Date: Tue Dec  5 01:47:41 2017
New Revision: 326547
URL: https://svnweb.freebsd.org/changeset/base/326547

Log:
  lld: make -v behave similarly to GNU ld.bfd
  
  Previously, lld exited with an error status if the only option given to
  the command was -v. GNU linkers gracefully exit in that case. This patch
  makes lld behave like GNU.
  
  Note that even with this patch, lld's -v and --version options behave
  slightly differently than GNU linkers' counterparts. For example,
  if you run ld.bfd -v -v, the version string is printed out twice.
  But that is an edge case that I don't think we need to take care of.
  
  Fixes https://bugs.llvm.org/show_bug.cgi?id=31582
  
  Obtained from:LLVM r319717
  MFC after:1 week

Modified:
  head/contrib/llvm/tools/lld/ELF/Driver.cpp

Modified: head/contrib/llvm/tools/lld/ELF/Driver.cpp
==
--- head/contrib/llvm/tools/lld/ELF/Driver.cpp  Tue Dec  5 01:35:04 2017
(r326546)
+++ head/contrib/llvm/tools/lld/ELF/Driver.cpp  Tue Dec  5 01:47:41 2017
(r326547)
@@ -345,9 +345,10 @@ void LinkerDriver::main(ArrayRef ArgsArr
   if (Args.hasArg(OPT_v) || Args.hasArg(OPT_version))
 message(getLLDVersion() + " (compatible with GNU linkers)");
 
-  // ld.bfd always exits after printing out the version string.
-  // ld.gold proceeds if a given option is -v. Because gold's behavior
-  // is more permissive than ld.bfd, we chose what gold does here.
+  // The behavior of -v or --version is a bit strange, but this is
+  // needed for compatibility with GNU linkers.
+  if (Args.hasArg(OPT_v) && !Args.hasArg(OPT_INPUT))
+return;
   if (Args.hasArg(OPT_version))
 return;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


  1   2   3   4   5   6   7   8   9   10   >