Re: svn commit: r327140 - head/sbin/ipfw

2017-12-23 Thread Andrey V. Elsukov
On 24.12.2017 10:11, Rodney W. Grimes wrote:
>> -uint32_t masks[2];
>> -int i;
>> -uint8_t cmd, rulenum;
>>  ipfw_range_tlv rt;
>>  char *msg;
>>  size_t size;
>> +uint32_t masks[2];
>> +int i;
> 
> Why do these 2 lines show up as null changes in the diff
> I can not see any change, not even white space.

They are sorted by size according to style(9).

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r327140 - head/sbin/ipfw

2017-12-23 Thread Rodney W. Grimes
> Author: ae
> Date: Sun Dec 24 01:55:12 2017
> New Revision: 327140
> URL: https://svnweb.freebsd.org/changeset/base/327140
> 
> Log:
>   Fix rule number truncation, use uint16_t type to specify rulenum.
>   
>   PR: 224555
>   MFC after:  1 week
> 
> Modified:
>   head/sbin/ipfw/ipfw2.c
> 
> Modified: head/sbin/ipfw/ipfw2.c
> ==
> --- head/sbin/ipfw/ipfw2.cSun Dec 24 01:16:28 2017(r327139)
> +++ head/sbin/ipfw/ipfw2.cSun Dec 24 01:55:12 2017(r327140)
> @@ -2256,12 +2256,13 @@ do_range_cmd(int cmd, ipfw_range_tlv *rt)
>  void
>  ipfw_sets_handler(char *av[])
>  {
> - uint32_t masks[2];
> - int i;
> - uint8_t cmd, rulenum;
>   ipfw_range_tlv rt;
>   char *msg;
>   size_t size;
> + uint32_t masks[2];
> + int i;

Why do these 2 lines show up as null changes in the diff
I can not see any change, not even white space.

> + uint16_t rulenum;
> + uint8_t cmd;
>  
>   av++;
>   memset(, 0, sizeof(rt));

-- 
Rod Grimes rgri...@freebsd.org
___
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: r327013 - head/sys/net

2017-12-23 Thread Stephen Hurd

Oleg Bulyzhin wrote:

On Fri, Dec 22, 2017 at 07:11:36PM -0500, Stephen Hurd wrote:


Interesting... is this a standard GENERIC kernel, or is this a custom
config?  If a custom config, can you send it to me?

Also, does this system have any other iflib drivers?  igb, em, or bnxt?
Can you include the log info (if any) for them as well?

It's custom kernel on my testing machine. It has em too but ix is probed first..
If i comment out if_ix.ko load - it boots just fine (looks like if_em is
not calling iflib_irq_set_affinity()):

em0:  port 0xdc00-0xdc1f mem 0xfeae-0x
feaf,0xfeac-0xfead irq 17 at device 0.0 on pci3
em0: attach_pre capping queues at 1
em0: using 1024 tx descriptors and 1024 rx descriptors
em0: msix_init qsets capped at 1
em0: PCIY_MSIX capability not found; or rid 0 == 0.
em0: Using a Legacy interrupt
em0: allocated for 1 tx_queues
em0: allocated for 1 rx_queues
ioapic0: routing intpin 17 (PCI IRQ 17) to lapic 0 vector 54
em0: bpf attached
em0: Ethernet address: 00:15:17:3a:0c:7a
em0: netmap queues/slots: TX 1/1024, RX 1/1024

P.S. verbose dmesg & kernel conf attached


Hrm, can you try it with:
optionsEARLY_AP_STARTUP

In slave-amd64-smp-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"


svn commit: r327140 - head/sbin/ipfw

2017-12-23 Thread Andrey V. Elsukov
Author: ae
Date: Sun Dec 24 01:55:12 2017
New Revision: 327140
URL: https://svnweb.freebsd.org/changeset/base/327140

Log:
  Fix rule number truncation, use uint16_t type to specify rulenum.
  
  PR:   224555
  MFC after:1 week

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==
--- head/sbin/ipfw/ipfw2.c  Sun Dec 24 01:16:28 2017(r327139)
+++ head/sbin/ipfw/ipfw2.c  Sun Dec 24 01:55:12 2017(r327140)
@@ -2256,12 +2256,13 @@ do_range_cmd(int cmd, ipfw_range_tlv *rt)
 void
 ipfw_sets_handler(char *av[])
 {
-   uint32_t masks[2];
-   int i;
-   uint8_t cmd, rulenum;
ipfw_range_tlv rt;
char *msg;
size_t size;
+   uint32_t masks[2];
+   int i;
+   uint16_t rulenum;
+   uint8_t cmd;
 
av++;
memset(, 0, sizeof(rt));
___
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: r327121 - head/bin/sh

2017-12-23 Thread Jilles Tjoelker
Author: jilles
Date: Sat Dec 23 22:58:19 2017
New Revision: 327121
URL: https://svnweb.freebsd.org/changeset/base/327121

Log:
  sh(1): Markup and spelling fixes

Modified:
  head/bin/sh/sh.1

Modified: head/bin/sh/sh.1
==
--- head/bin/sh/sh.1Sat Dec 23 22:57:14 2017(r327120)
+++ head/bin/sh/sh.1Sat Dec 23 22:58:19 2017(r327121)
@@ -343,7 +343,7 @@ Write each command
 variable subjected to parameter expansion and arithmetic expansion)
 to standard error before it is executed.
 Useful for debugging.
-.It nolog
+.It Li nolog
 Another do-nothing option for
 .Tn POSIX
 compliance.
@@ -2739,7 +2739,7 @@ were a known job that exited with exit status 127.
 If no operands are given, wait for all jobs to complete
 and return an exit status of zero.
 .El
-.Ss Commandline Editing
+.Ss Command Line Editing
 When
 .Nm
 is being used interactively from a terminal, the current command
___
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: r327120 - in head/sys: isa x86/isa

2017-12-23 Thread Warner Losh
Author: imp
Date: Sat Dec 23 22:57:14 2017
New Revision: 327120
URL: https://svnweb.freebsd.org/changeset/base/327120

Log:
  Warn when nonPNP ISA devices are attached in GENERIC that they are
  being removed from GENERIC in 12. Always print PNP info for ISA when
  it exists: it doesn't depend on ISAPNP. Add PNP ID to orm and vga to
  prevent us from warning about them since those devices aren't being
  removed from GENERIC. PNP devices will be removed from GENERIC too,
  but they will be automatically loaded, so need no warning. We don't
  warn for non-GENERIC kernels because people running them are presumed
  to know what they are doing.
  
  MFC After: 2 weeks

Modified:
  head/sys/isa/isa_common.c
  head/sys/isa/pnp.c
  head/sys/isa/vga_isa.c
  head/sys/x86/isa/orm.c

Modified: head/sys/isa/isa_common.c
==
--- head/sys/isa/isa_common.c   Sat Dec 23 21:41:32 2017(r327119)
+++ head/sys/isa/isa_common.c   Sat Dec 23 22:57:14 2017(r327120)
@@ -68,10 +68,12 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -499,7 +501,7 @@ isa_probe_children(device_t dev)
struct isa_device *idev;
device_t *children, child;
struct isa_config *cfg;
-   int nchildren, i;
+   int nchildren, i, err;
 
/*
 * Create all the non-hinted children by calling drivers'
@@ -569,7 +571,11 @@ isa_probe_children(device_t dev)
!TAILQ_EMPTY(>id_configs))
continue;
 
-   device_probe_and_attach(child);
+   err = device_probe_and_attach(child);
+   if (err == 0 && idev->id_vendorid == 0 &&
+   strcmp(kern_ident, "GENERIC") == 0)
+   device_printf(child,
+   "non-PNP ISA device will be removed from GENERIC in 
FreeBSD 12.");
}
 
/*
@@ -637,10 +643,8 @@ isa_print_all_resources(device_t dev)
retval += resource_list_print_type(rl, "drq", SYS_RES_DRQ, "%jd");
if (device_get_flags(dev))
retval += printf(" flags %#x", device_get_flags(dev));
-#ifdef ISAPNP
if (idev->id_vendorid)
retval += printf(" pnpid %s", 
pnp_eisaformat(idev->id_vendorid));
-#endif
 
return (retval);
 }
@@ -1030,13 +1034,11 @@ static int
 isa_child_pnpinfo_str(device_t bus, device_t child, char *buf,
 size_t buflen)
 {
-#ifdef ISAPNP
struct isa_device *idev = DEVTOISA(child);
 
if (idev->id_vendorid)
snprintf(buf, buflen, "pnpid=%s",
pnp_eisaformat(idev->id_vendorid));
-#endif
return (0);
 }
 
@@ -1124,4 +1126,24 @@ isab_attach(device_t dev)
if (child != NULL)
return (bus_generic_attach(dev));
return (ENXIO);
+}
+
+char *
+pnp_eisaformat(uint32_t id)
+{
+   uint8_t *data;
+   static char idbuf[8];
+   const char  hextoascii[] = "0123456789abcdef";
+
+   id = htole32(id);
+   data = (uint8_t *)
+   idbuf[0] = '@' + ((data[0] & 0x7c) >> 2);
+   idbuf[1] = '@' + (((data[0] & 0x3) << 3) + ((data[1] & 0xe0) >> 5));
+   idbuf[2] = '@' + (data[1] & 0x1f);
+   idbuf[3] = hextoascii[(data[2] >> 4)];
+   idbuf[4] = hextoascii[(data[2] & 0xf)];
+   idbuf[5] = hextoascii[(data[3] >> 4)];
+   idbuf[6] = hextoascii[(data[3] & 0xf)];
+   idbuf[7] = 0;
+   return(idbuf);
 }

Modified: head/sys/isa/pnp.c
==
--- head/sys/isa/pnp.c  Sat Dec 23 21:41:32 2017(r327119)
+++ head/sys/isa/pnp.c  Sat Dec 23 22:57:14 2017(r327120)
@@ -103,26 +103,6 @@ static void   pnp_send_initiation_key(void);
 static intpnp_get_serial(pnp_id *p);
 static intpnp_isolation_protocol(device_t parent);
 
-char *
-pnp_eisaformat(uint32_t id)
-{
-   uint8_t *data;
-   static char idbuf[8];
-   const char  hextoascii[] = "0123456789abcdef";
-
-   id = htole32(id);
-   data = (uint8_t *)
-   idbuf[0] = '@' + ((data[0] & 0x7c) >> 2);
-   idbuf[1] = '@' + (((data[0] & 0x3) << 3) + ((data[1] & 0xe0) >> 5));
-   idbuf[2] = '@' + (data[1] & 0x1f);
-   idbuf[3] = hextoascii[(data[2] >> 4)];
-   idbuf[4] = hextoascii[(data[2] & 0xf)];
-   idbuf[5] = hextoascii[(data[3] >> 4)];
-   idbuf[6] = hextoascii[(data[3] & 0xf)];
-   idbuf[7] = 0;
-   return(idbuf);
-}
-
 static void
 pnp_write(int d, u_char r)
 {

Modified: head/sys/isa/vga_isa.c
==
--- head/sys/isa/vga_isa.c  Sat Dec 23 21:41:32 2017(r327119)
+++ head/sys/isa/vga_isa.c  Sat Dec 23 22:57:14 2017(r327120)
@@ -175,6 +175,7 @@ isavga_probe(device_t dev)
 adp.va_io_base, adp.va_io_size);

svn commit: r327118 - in head/sys/x86: include x86

2017-12-23 Thread Konstantin Belousov
Author: kib
Date: Sat Dec 23 21:32:50 2017
New Revision: 327118
URL: https://svnweb.freebsd.org/changeset/base/327118

Log:
  Add missed AVX512VL (128 and 256 bit vector length) extension
  identification bit.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

Modified:
  head/sys/x86/include/specialreg.h
  head/sys/x86/x86/identcpu.c

Modified: head/sys/x86/include/specialreg.h
==
--- head/sys/x86/include/specialreg.h   Sat Dec 23 21:04:32 2017
(r327117)
+++ head/sys/x86/include/specialreg.h   Sat Dec 23 21:32:50 2017
(r327118)
@@ -409,6 +409,7 @@
 #defineCPUID_STDEXT_AVX512CD   0x1000
 #defineCPUID_STDEXT_SHA0x2000
 #defineCPUID_STDEXT_AVX512BW   0x4000
+#defineCPUID_STDEXT_AVX512VL   0x8000
 
 /*
  * CPUID instruction 7 Structured Extended Features, leaf 0 ecx info

Modified: head/sys/x86/x86/identcpu.c
==
--- head/sys/x86/x86/identcpu.c Sat Dec 23 21:04:32 2017(r327117)
+++ head/sys/x86/x86/identcpu.c Sat Dec 23 21:32:50 2017(r327118)
@@ -963,6 +963,7 @@ printcpuinfo(void)
   "\035AVX512CD"
   "\036SHA"
   "\037AVX512BW"
+  "\040AVX512VL"
   );
}
 
___
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: r327117 - head/usr.bin/calendar

2017-12-23 Thread Eitan Adler
Author: eadler
Date: Sat Dec 23 21:04:32 2017
New Revision: 327117
URL: https://svnweb.freebsd.org/changeset/base/327117

Log:
  calendar: add missing header file
  
  time.h is required for strftime and struct tm
  
  Reviewed by:  edje

Modified:
  head/usr.bin/calendar/io.c

Modified: head/usr.bin/calendar/io.c
==
--- head/usr.bin/calendar/io.c  Sat Dec 23 19:48:57 2017(r327116)
+++ head/usr.bin/calendar/io.c  Sat Dec 23 21:04:32 2017(r327117)
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "pathnames.h"
___
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: r327094 - in head/sys/dev: ahci usb/controller

2017-12-23 Thread Conrad Meyer
I see similar devices on my AMD TR + X399 system that should be added
as well.  I don't have time to reboot/test a patch right now, but here
are the device ids:

  pci1
ahci0 pnpinfo vendor=0x1022 device=0x43b6 subvendor=0x1b21
subdevice=0x1062 class=0x010601 at slot=0 function=1 dbsf=pci0:1:0:1
handle=\_SB_.PCI0.D0A0.P101
   xhci0 pnpinfo vendor=0x1022 device=0x43ba subvendor=0x1b21
subdevice=0x1142 class=0x0c0330 at slot=0 function=0 dbsf=pci0:1:0:0
handle=\_SB_.PCI0.D0A0.PTXH

(0x43b61022 for ahci0, 0x43ba1022 for xhci0.)

If no one else commits them, I'll get to it eventually.

Best,
Conrad

On Fri, Dec 22, 2017 at 12:44 PM, Alexander Motin  wrote:
> Author: mav
> Date: Fri Dec 22 20:44:21 2017
> New Revision: 327094
> URL: https://svnweb.freebsd.org/changeset/base/327094
>
> Log:
>   Add AHCI/XHCI device IDs found on AMD Ryzen+B350 system.
>
>   MFC after:2 weeks
>
> Modified:
>   head/sys/dev/ahci/ahci_pci.c
>   head/sys/dev/usb/controller/xhci_pci.c
>
> Modified: head/sys/dev/ahci/ahci_pci.c
> ==
> --- head/sys/dev/ahci/ahci_pci.cFri Dec 22 19:10:19 2017
> (r327093)
> +++ head/sys/dev/ahci/ahci_pci.cFri Dec 22 20:44:21 2017
> (r327094)
> @@ -68,6 +68,7 @@ static const struct {
> AHCI_Q_ATI_PMP_BUG | AHCI_Q_1MSI},
> /* Not sure SB8x0/SB9x0 needs this quirk. Be conservative though */
> {0x43951002, 0x00, "AMD SB8x0/SB9x0",   AHCI_Q_ATI_PMP_BUG},
> +   {0x43b71022, 0x00, "AMD 300 Series",0},
> {0x78001022, 0x00, "AMD Hudson-2",  0},
> {0x78011022, 0x00, "AMD Hudson-2",  0},
> {0x78021022, 0x00, "AMD Hudson-2",  0},
>
> Modified: head/sys/dev/usb/controller/xhci_pci.c
> ==
> --- head/sys/dev/usb/controller/xhci_pci.c  Fri Dec 22 19:10:19 2017  
>   (r327093)
> +++ head/sys/dev/usb/controller/xhci_pci.c  Fri Dec 22 20:44:21 2017  
>   (r327094)
> @@ -97,6 +97,10 @@ xhci_pci_match(device_t self)
> uint32_t device_id = pci_get_devid(self);
>
> switch (device_id) {
> +   case 0x145c1022:
> +   return ("AMD KERNCZ USB 3.0 controller");
> +   case 0x43bb1022:
> +   return ("AMD 300 Series USB 3.0 controller");
> case 0x78141022:
> return ("AMD FCH USB 3.0 controller");
>
>
___
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: r327116 - head/usr.bin/ldd

2017-12-23 Thread Eitan Adler
Author: eadler
Date: Sat Dec 23 19:48:57 2017
New Revision: 327116
URL: https://svnweb.freebsd.org/changeset/base/327116

Log:
  ldd: avoid statically linked executables in example
  
  The example works but spews warnings if run over a directory with
  statically linked binaries.
  
  PR:   211024
  Submitted by: m...@skew.org

Modified:
  head/usr.bin/ldd/ldd.1

Modified: head/usr.bin/ldd/ldd.1
==
--- head/usr.bin/ldd/ldd.1  Sat Dec 23 18:07:43 2017(r327115)
+++ head/usr.bin/ldd/ldd.1  Sat Dec 23 19:48:57 2017(r327116)
@@ -63,7 +63,7 @@ The following is an example of a shell pipeline which 
 option.
 It will print a report of all ELF binaries in the current directory,
 which link against libc.so.6:
-.Dl "find . -type f | xargs -n1 file -F ' ' | grep ELF | cut -f1 -d' ' | xargs 
ldd -f '%A %o\en' | grep libc.so.6"
+.Dl "find . -type f | xargs -n1 file -F ' ' | grep 'ELF.*dynamically' | cut 
-f1 -d' ' | xargs ldd -f '%A %o\en' | grep libc.so.6"
 .Sh SEE ALSO
 .Xr ld 1 ,
 .Xr nm 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"


Re: svn commit: r327084 - head/sys/dev/pccard

2017-12-23 Thread Warner Losh
On Sat, Dec 23, 2017 at 12:14 PM, Conrad Meyer  wrote:

> On Fri, Dec 22, 2017 at 8:59 AM, Warner Losh  wrote:
> > ...
> > New Revision: 327084
> >
> >   PC Card PNP tables are terminated by a NULL sentinel. This shouldn't
> >   be recorded in the linker hints, so subtract one to omit it.
> > 
> ==
> > --- head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:27:29 2017
> (r327083)
> > +++ head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:59:50 2017
> (r327084)
> > @@ -95,7 +95,7 @@ struct pccard_product {
> >   */
> >  #define PCCARD_PNP_DESCR "D:#;V32:manufacturer;V32:
> product;Z:cisvendor;Z:cisproduct;"
> >  #define PCCARD_PNP_INFO(t) \
> > -   MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]),
> sizeof(t) / sizeof(t[0])); \
> > +   MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]),
> sizeof(t) / sizeof(t[0]) - 1); \
>
> Perhaps more clearly, this could be:
> MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), nitems(t) -
> 1)
>

Yup. A later commit did just that when I saw the construct used elsewhere.
Thanks for the suggestion!

Warner
___
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: r327084 - head/sys/dev/pccard

2017-12-23 Thread Conrad Meyer
On Fri, Dec 22, 2017 at 8:59 AM, Warner Losh  wrote:
> ...
> New Revision: 327084
>
>   PC Card PNP tables are terminated by a NULL sentinel. This shouldn't
>   be recorded in the linker hints, so subtract one to omit it.
> ==
> --- head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:27:29 2017
> (r327083)
> +++ head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:59:50 2017
> (r327084)
> @@ -95,7 +95,7 @@ struct pccard_product {
>   */
>  #define PCCARD_PNP_DESCR 
> "D:#;V32:manufacturer;V32:product;Z:cisvendor;Z:cisproduct;"
>  #define PCCARD_PNP_INFO(t) \
> -   MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), 
> sizeof(t) / sizeof(t[0])); \
> +   MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), 
> sizeof(t) / sizeof(t[0]) - 1); \

Perhaps more clearly, this could be:
MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), nitems(t) - 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: r327115 - in head: include lib/libc/gen

2017-12-23 Thread Mariusz Zaborski
Author: oshogbo
Date: Sat Dec 23 18:07:43 2017
New Revision: 327115
URL: https://svnweb.freebsd.org/changeset/base/327115

Log:
  Introduce the daemonfd function.
  
  The daemonfd function is equivalent to the daemon(3) function expect that
  arguments are descriptors. For example dhclient(8) which is sandboxed is
  unable to open /dev/null to close stdio instead it's allows to fail
  daemon(3) function to close the descriptors and then do it explicit in code.
  Instead of such hacks we can use now daemonfd.
  
  This API can be also helpful to migrate system to platforms like CheriBSD.
  
  Reviewed by:  brooks@, bcr@, jilles@ (earlier version)
  Differential Revision:https://reviews.freebsd.org/D13433

Modified:
  head/include/stdlib.h
  head/lib/libc/gen/Symbol.map
  head/lib/libc/gen/daemon.3
  head/lib/libc/gen/daemon.c

Modified: head/include/stdlib.h
==
--- head/include/stdlib.h   Sat Dec 23 17:55:19 2017(r327114)
+++ head/include/stdlib.h   Sat Dec 23 18:07:43 2017(r327115)
@@ -274,6 +274,7 @@ int  cgetstr(char *, const char *, char **);
 int cgetustr(char *, const char *, char **);
 
 int daemon(int, int);
+int daemonfd(int, int);
 char   *devname(__dev_t, __mode_t);
 char   *devname_r(__dev_t, __mode_t, char *, int);
 char   *fdevname(int);

Modified: head/lib/libc/gen/Symbol.map
==
--- head/lib/libc/gen/Symbol.mapSat Dec 23 17:55:19 2017
(r327114)
+++ head/lib/libc/gen/Symbol.mapSat Dec 23 18:07:43 2017
(r327115)
@@ -394,6 +394,7 @@ FBSD_1.4 {
 FBSD_1.5 {
alphasort;
basename;
+   daemonfd;
devname;
devname_r;
dirname;

Modified: head/lib/libc/gen/daemon.3
==
--- head/lib/libc/gen/daemon.3  Sat Dec 23 17:55:19 2017(r327114)
+++ head/lib/libc/gen/daemon.3  Sat Dec 23 18:07:43 2017(r327115)
@@ -28,7 +28,7 @@
 .\"@(#)daemon.38.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
-.Dd June 9, 1993
+.Dd December 23, 2017
 .Dt DAEMON 3
 .Os
 .Sh NAME
@@ -40,6 +40,8 @@
 .In stdlib.h
 .Ft int
 .Fn daemon "int nochdir" "int noclose"
+.Ft int
+.Fn daemonfd "int chdirfd" "int nullfd"
 .Sh DESCRIPTION
 The
 .Fn daemon
@@ -59,15 +61,39 @@ is non-zero,
 .Fn daemon
 will redirect standard input, standard output, and standard error to
 .Pa /dev/null .
+.Pp
+The
+.Fn daemonfd
+function is equivalent to the
+.Fn daemon
+function except that arguments are the descriptors for the current working
+directory and to the descriptor to
+.Pa /dev/null .
+.Pp
+If
+.Fa chdirfd
+is equal to
+.Pq -1
+the current working directory is not changed.
+.Pp
+If
+.Fa nullfd
+is equals to
+.Pq -1
+the redirection of standard input, standard output, and standard error is not
+closed.
 .Sh RETURN VALUES
-.Rv -std daemon
+.Rv -std daemon daemonfd
 .Sh ERRORS
 The
 .Fn daemon
+and
+.Fn daemonfd
 function may fail and set
 .Va errno
 for any of the errors specified for the library functions
 .Xr fork 2
+.Xr open 2,
 and
 .Xr setsid 2 .
 .Sh SEE ALSO
@@ -79,6 +105,10 @@ The
 .Fn daemon
 function first appeared in
 .Bx 4.4 .
+The
+.Fn daemonfd
+function first appeared in
+.Fx 12.0 .
 .Sh CAVEATS
 Unless the
 .Fa noclose

Modified: head/lib/libc/gen/daemon.c
==
--- head/lib/libc/gen/daemon.c  Sat Dec 23 17:55:19 2017(r327114)
+++ head/lib/libc/gen/daemon.c  Sat Dec 23 18:07:43 2017(r327115)
@@ -1,8 +1,9 @@
 /*-
  * SPDX-License-Identifier: BSD-3-Clause
  *
- * Copyright (c) 1990, 1993
- * The Regents of the University of California.  All rights reserved.
+ * Copyright (c) 1990, 1993 The Regents of the University of California.
+ * Copyright (c) 2017 Mariusz Zaborski 
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -46,10 +47,9 @@ __FBSDID("$FreeBSD$");
 #include "libc_private.h"
 
 int
-daemon(int nochdir, int noclose)
+daemonfd(int chdirfd, int nullfd)
 {
struct sigaction osa, sa;
-   int fd;
pid_t newgrp;
int oerrno;
int osa_ok;
@@ -83,15 +83,39 @@ daemon(int nochdir, int noclose)
return (-1);
}
 
-   if (!nochdir)
-   (void)chdir("/");
+   if (chdirfd != -1)
+   (void)fchdir(chdirfd);
 
-   if (!noclose && (fd = _open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
-   (void)_dup2(fd, STDIN_FILENO);
-   (void)_dup2(fd, STDOUT_FILENO);
-   (void)_dup2(fd, STDERR_FILENO);
-   if (fd > 2)
-   (void)_close(fd);
+   if (nullfd != -1) {
+   (void)_dup2(nullfd, STDIN_FILENO);
+ 

svn commit: r327114 - head/sys/kern

2017-12-23 Thread Alexander Kabaev
Author: kan
Date: Sat Dec 23 17:55:19 2017
New Revision: 327114
URL: https://svnweb.freebsd.org/changeset/base/327114

Log:
  Reverse the check to allocate the buffer if cached pointer is NULL.
  
  Reviewed by: kib
  Differential Revision: https://reviews.freebsd.org/D13596

Modified:
  head/sys/kern/vfs_export.c

Modified: head/sys/kern/vfs_export.c
==
--- head/sys/kern/vfs_export.c  Sat Dec 23 16:49:57 2017(r327113)
+++ head/sys/kern/vfs_export.c  Sat Dec 23 17:55:19 2017(r327114)
@@ -412,7 +412,7 @@ vfs_setpublicfs(struct mount *mp, struct netexport *ne
 * If an indexfile was specified, pull it in.
 */
if (argp->ex_indexfile != NULL) {
-   if (nfs_pub.np_index != NULL)
+   if (nfs_pub.np_index == NULL)
nfs_pub.np_index = malloc(MAXNAMLEN + 1, M_TEMP,
M_WAITOK);
error = copyinstr(argp->ex_indexfile, nfs_pub.np_index,
___
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: r327113 - head/sys/kern

2017-12-23 Thread Alexander Kabaev
Author: kan
Date: Sat Dec 23 16:49:57 2017
New Revision: 327113
URL: https://svnweb.freebsd.org/changeset/base/327113

Log:
  Remove dead store to local variable.

Modified:
  head/sys/kern/kern_shutdown.c

Modified: head/sys/kern/kern_shutdown.c
==
--- head/sys/kern/kern_shutdown.c   Sat Dec 23 16:45:26 2017
(r327112)
+++ head/sys/kern/kern_shutdown.c   Sat Dec 23 16:49:57 2017
(r327113)
@@ -536,7 +536,6 @@ shutdown_halt(void *junk, int howto)
cpu_halt();
/* NOTREACHED */
default:
-   howto &= ~RB_HALT;
break;
}
}
___
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: r327112 - head/sys/netinet6

2017-12-23 Thread Alexander Kabaev
Author: kan
Date: Sat Dec 23 16:45:26 2017
New Revision: 327112
URL: https://svnweb.freebsd.org/changeset/base/327112

Log:
  Silence clang analyzer false positive.
  
  clang does not know that two lookup calls will return the same
  pointer, so it assumes correctly that using the old pointer
  after dropping the reference to it is a bit risky.

Modified:
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/netinet6/nd6_nbr.c
==
--- head/sys/netinet6/nd6_nbr.c Sat Dec 23 16:45:24 2017(r327111)
+++ head/sys/netinet6/nd6_nbr.c Sat Dec 23 16:45:26 2017(r327112)
@@ -1307,7 +1307,8 @@ nd6_dad_stop(struct ifaddr *ifa)
 * we were waiting for it to stop, so re-do the lookup.
 */
nd6_dad_rele(dp);
-   if (nd6_dad_find(ifa, NULL) == NULL)
+   dp = nd6_dad_find(ifa, NULL);
+   if (dp == NULL)
return;
 
nd6_dad_del(dp);
___
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: r327111 - head/sys/net

2017-12-23 Thread Alexander Kabaev
Author: kan
Date: Sat Dec 23 16:45:24 2017
New Revision: 327111
URL: https://svnweb.freebsd.org/changeset/base/327111

Log:
  Do not pass NULL pointer to copyout in if_clone_list.
  
  Sometimes caller is only interested in how many clones
  are there and NULL pointer is passed for the destination
  buffer. Do not pass it to copyout then.

Modified:
  head/sys/net/if_clone.c

Modified: head/sys/net/if_clone.c
==
--- head/sys/net/if_clone.c Sat Dec 23 16:24:02 2017(r327110)
+++ head/sys/net/if_clone.c Sat Dec 23 16:45:24 2017(r327111)
@@ -508,7 +508,7 @@ if_clone_list(struct if_clonereq *ifcr)
 
 done:
IF_CLONERS_UNLOCK();
-   if (err == 0)
+   if (err == 0 && dst != NULL)
err = copyout(outbuf, dst, buf_count*IFNAMSIZ);
if (outbuf != NULL)
free(outbuf, M_CLONE);
___
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: r327108 - head/sys/net

2017-12-23 Thread Alexander Kabaev
Author: kan
Date: Sat Dec 23 16:23:58 2017
New Revision: 327108
URL: https://svnweb.freebsd.org/changeset/base/327108

Log:
  Do not double free the memory in if_clone.
  
  if_clone_attach function will drop the reference on failure  which will
  free the if_clone structure. No need to do it second time.
  
  Reviewed by: glebius, ae
  Differential Revision: https://reviews.freebsd.org/D10386

Modified:
  head/sys/net/if_clone.c

Modified: head/sys/net/if_clone.c
==
--- head/sys/net/if_clone.c Sat Dec 23 14:30:44 2017(r327107)
+++ head/sys/net/if_clone.c Sat Dec 23 16:23:58 2017(r327108)
@@ -387,10 +387,8 @@ if_clone_advanced(const char *name, u_int maxunit, ifc
ifc->ifc_create = create;
ifc->ifc_destroy = destroy;
 
-   if (if_clone_attach(ifc) != 0) {
-   if_clone_free(ifc);
+   if (if_clone_attach(ifc) != 0)
return (NULL);
-   }
 
EVENTHANDLER_INVOKE(if_clone_event, ifc);
 
@@ -410,10 +408,8 @@ if_clone_simple(const char *name, ifcs_create_t create
ifc->ifcs_destroy = destroy;
ifc->ifcs_minifs = minifs;
 
-   if (if_clone_attach(ifc) != 0) {
-   if_clone_free(ifc);
+   if (if_clone_attach(ifc) != 0)
return (NULL);
-   }
 
for (unit = 0; unit < minifs; unit++) {
char name[IFNAMSIZ];
___
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: r327110 - head/sys/ufs/ffs

2017-12-23 Thread Alexander Kabaev
Author: kan
Date: Sat Dec 23 16:24:02 2017
New Revision: 327110
URL: https://svnweb.freebsd.org/changeset/base/327110

Log:
  Remove dead initialization of the inode pointer.
  
  The pointer gets initialized again later in the code. This also
  improves code style(9).

Modified:
  head/sys/ufs/ffs/ffs_snapshot.c

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==
--- head/sys/ufs/ffs/ffs_snapshot.c Sat Dec 23 16:24:00 2017
(r327109)
+++ head/sys/ufs/ffs/ffs_snapshot.c Sat Dec 23 16:24:02 2017
(r327110)
@@ -2502,7 +2502,7 @@ readblock(vp, bp, lbn)
struct buf *bp;
ufs2_daddr_t lbn;
 {
-   struct inode *ip = VTOI(vp);
+   struct inode *ip;
struct bio *bip;
struct fs *fs;
 
___
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: r327109 - head/sys/net

2017-12-23 Thread Alexander Kabaev
Author: kan
Date: Sat Dec 23 16:24:00 2017
New Revision: 327109
URL: https://svnweb.freebsd.org/changeset/base/327109

Log:
  Remove some trailing whitespace.
  
  Reviewed by: glebius, ae
  Differential Revision: https://reviews.freebsd.org/D10386

Modified:
  head/sys/net/if_clone.c

Modified: head/sys/net/if_clone.c
==
--- head/sys/net/if_clone.c Sat Dec 23 16:23:58 2017(r327108)
+++ head/sys/net/if_clone.c Sat Dec 23 16:24:00 2017(r327109)
@@ -355,7 +355,7 @@ if_clone_alloc(const char *name, int maxunit)
 
return (ifc);
 }
-   
+
 static int
 if_clone_attach(struct if_clone *ifc)
 {
@@ -446,7 +446,7 @@ if_clone_detach(struct if_clone *ifc)
/* destroy all interfaces for this cloner */
while (!LIST_EMPTY(>ifc_iflist))
if_clone_destroyif(ifc, LIST_FIRST(>ifc_iflist));
-   
+
IF_CLONE_REMREF(ifc);
 }
 
___
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: r327107 - in head/sys: conf dev/extres/syscon dev/syscon

2017-12-23 Thread Kyle Evans
Author: kevans
Date: Sat Dec 23 14:30:44 2017
New Revision: 327107
URL: https://svnweb.freebsd.org/changeset/base/327107

Log:
  Move syscon into extres framework
  
  This should help reduce confusion between syscon/syscons a little bit.
  syscon is a resource generally modeled by FDT platforms, and not to be
  confused with syscons.

Added:
  head/sys/dev/extres/syscon/
 - copied from r327106, head/sys/dev/syscon/
Deleted:
  head/sys/dev/syscon/
Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sat Dec 23 14:27:42 2017(r327106)
+++ head/sys/conf/files Sat Dec 23 14:30:44 2017(r327107)
@@ -1723,6 +1723,9 @@ dev/extres/regulator/regnode_if.m optional ext_resourc
 dev/extres/regulator/regulator.c   optional ext_resources regulator fdt
 dev/extres/regulator/regulator_bus.c   optional ext_resources regulator fdt
 dev/extres/regulator/regulator_fixed.c optional ext_resources regulator fdt
+dev/extres/syscon/syscon.c optional ext_resources syscon
+dev/extres/syscon/syscon_generic.c optional ext_resources syscon fdt
+dev/extres/syscon/syscon_if.m  optional ext_resources syscon
 dev/fb/fbd.c   optional fbd | vt
 dev/fb/fb_if.m standard
 dev/fb/splash.coptional sc splash
@@ -3107,9 +3110,6 @@ dev/stg/tmc18c30_subr.c   optional stg
 dev/stge/if_stge.c optional stge
 dev/sym/sym_hipd.c optional sym\
dependency  "$S/dev/sym/sym_{conf,defs}.h"
-dev/syscon/syscon.coptional syscon
-dev/syscon/syscon_generic.coptional fdt syscon
-dev/syscon/syscon_if.m optional syscon
 dev/syscons/blank/blank_saver.coptional blank_saver
 dev/syscons/daemon/daemon_saver.c optional daemon_saver
 dev/syscons/dragon/dragon_saver.c optional dragon_saver
___
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: r327106 - in head/sys: conf dev/syscon

2017-12-23 Thread Kyle Evans
Author: kevans
Date: Sat Dec 23 14:27:42 2017
New Revision: 327106
URL: https://svnweb.freebsd.org/changeset/base/327106

Log:
  syscon: Introduce kobj and split out fdt bits
  
  Allow more flexibility by kobj'ifying syscon and splitting out fdt specific
  bits in preparation of a move to the extres framework.
  
  The generic fdt driver has been moved to syscon_generic.c and the fdt
  requirement has been removed from the syscon interface, as is common to the
  extres framework.
  
  Reviewed by:  strejda
  Differential Revision:https://reviews.freebsd.org/D13521

Added:
  head/sys/dev/syscon/syscon.h   (contents, props changed)
  head/sys/dev/syscon/syscon_generic.c   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/dev/syscon/syscon.c
  head/sys/dev/syscon/syscon_if.m

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sat Dec 23 13:10:36 2017(r327105)
+++ head/sys/conf/files Sat Dec 23 14:27:42 2017(r327106)
@@ -3107,8 +3107,9 @@ dev/stg/tmc18c30_subr.c   optional stg
 dev/stge/if_stge.c optional stge
 dev/sym/sym_hipd.c optional sym\
dependency  "$S/dev/sym/sym_{conf,defs}.h"
-dev/syscon/syscon.coptional fdt syscon
-dev/syscon/syscon_if.m optional fdt syscon
+dev/syscon/syscon.coptional syscon
+dev/syscon/syscon_generic.coptional fdt syscon
+dev/syscon/syscon_if.m optional syscon
 dev/syscons/blank/blank_saver.coptional blank_saver
 dev/syscons/daemon/daemon_saver.c optional daemon_saver
 dev/syscons/dragon/dragon_saver.c optional dragon_saver

Modified: head/sys/dev/syscon/syscon.c
==
--- head/sys/dev/syscon/syscon.cSat Dec 23 13:10:36 2017
(r327105)
+++ head/sys/dev/syscon/syscon.cSat Dec 23 14:27:42 2017
(r327106)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2015 Michal Meloun
+ * Copyright (c) 2017 Kyle Evans 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Added: head/sys/dev/syscon/syscon.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/syscon/syscon.hSat Dec 23 14:27:42 2017
(r327106)
@@ -0,0 +1,77 @@
+/*-
+ * Copyright 2017 Kyle Evans 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef DEV_SYSCON_H
+#define DEV_SYSCON_H
+
+#include "opt_platform.h"
+
+#include 
+#include 
+#ifdef FDT
+#include 
+#endif
+
+struct syscon {
+   KOBJ_FIELDS;
+
+   TAILQ_ENTRY(syscon) syscon_link;   /* Global list entry */
+
+   device_tpdev;   /* provider device */
+#ifdef FDT
+   phandle_t   ofw_node;   /* OFW node for syscon */
+#endif
+   void*softc; /* provider softc */
+};
+
+/*
+ * Shorthands for constructing method tables.
+ */
+#defineSYSCONMETHODKOBJMETHOD
+#defineSYSCONMETHOD_ENDKOBJMETHOD_END
+#definesyscon_method_t kobj_method_t
+#definesyscon_class_t  kobj_class_t
+DECLARE_CLASS(syscon_class);
+
+void *syscon_get_softc(struct syscon *syscon);
+
+/*
+ * Provider interface
+ */
+struct syscon *syscon_create(device_t pdev, syscon_class_t syscon_class);
+struct syscon *syscon_register(struct syscon *syscon);
+int syscon_unregister(struct syscon *syscon);
+
+#ifdef FDT
+struct syscon *syscon_create_ofw_node(device_t pdev,
+

Re: svn commit: r327013 - head/sys/net

2017-12-23 Thread Oleg Bulyzhin
On Fri, Dec 22, 2017 at 07:11:36PM -0500, Stephen Hurd wrote:

> Interesting... is this a standard GENERIC kernel, or is this a custom 
> config?  If a custom config, can you send it to me?
> 
> Also, does this system have any other iflib drivers?  igb, em, or bnxt?  
> Can you include the log info (if any) for them as well?

It's custom kernel on my testing machine. It has em too but ix is probed first..
If i comment out if_ix.ko load - it boots just fine (looks like if_em is
not calling iflib_irq_set_affinity()):

em0:  port 0xdc00-0xdc1f mem 0xfeae-0x
feaf,0xfeac-0xfead irq 17 at device 0.0 on pci3
em0: attach_pre capping queues at 1
em0: using 1024 tx descriptors and 1024 rx descriptors
em0: msix_init qsets capped at 1
em0: PCIY_MSIX capability not found; or rid 0 == 0.
em0: Using a Legacy interrupt
em0: allocated for 1 tx_queues
em0: allocated for 1 rx_queues
ioapic0: routing intpin 17 (PCI IRQ 17) to lapic 0 vector 54
em0: bpf attached
em0: Ethernet address: 00:15:17:3a:0c:7a
em0: netmap queues/slots: TX 1/1024, RX 1/1024

P.S. verbose dmesg & kernel conf attached

-- 
Oleg.


=== Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- o...@rinet.ru ===


/boot/config: 0:ad(0,a)/boot/loader -Dh -S115200

FreeBSD/x86 boot
Default: 0:ad(0,a)/boot/loader
boot:
Consoles: internal video/keyboard  serial port
BIOS drive C: is disk0
BIOS 619kB/3111360kB available memory

FreeBSD/x86 bootstrap loader, Revision 1.1
(Thu Dec 21 19:31:04 MSK 2017 r...@slave.rinet.ru)
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0x5826b8 data=0x7d500+0x2b3378 
syms=[0x8+0x9e880+0x8+0xa0fbf]
/boot/entropy size=0x1000
/boot/kernel/nullfs.ko size 0xbd30 at 0xdf4000
/boot/kernel/geom_mirror.ko size 0x2c968 at 0xe0
/boot/kernel/ipfw.ko size 0x47820 at 0xe2d000
/boot/kernel/carp.ko size 0x13420 at 0xe75000
/boot/kernel/if_bge.ko size 0x247c8 at 0xe89000
loading required module 'miibus'
/boot/kernel/miibus.ko size 0x414b8 at 0xeae000
/boot/kernel/if_em.ko size 0x6ca88 at 0xef
/boot/kernel/if_nfe.ko size 0x13480 at 0xf5d000
/boot/kernel/if_re.ko size 0x13e98 at 0xf71000
/boot/kernel/if_ix.ko size 0x52bc0 at 0xf85000
/boot/kernel/libalias.ko size 0x19dd8 at 0xfd8000

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
Table 'FACP' at 0xbdf70290
Table 'APIC' at 0xbdf70390
APIC: Found table at 0xbdf70390
APIC: Using the MADT enumerator.
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-CURRENT #5 r327061M: Sat Dec 23 01:53:58 MSK 2017
r...@slave.rinet.ru:/usr/obj/usr/src/amd64.amd64/sys/slave-amd64-smp-debug 
amd64
FreeBSD clang version 5.0.1 (tags/RELEASE_501/final 320880) (based on LLVM 
5.0.1)
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
Table 'FACP' at 0xbdf70290
Table 'APIC' at 0xbdf70390
Table 'MCFG' at 0xbdf70420
Table 'OEMB' at 0xbdf88040
Table 'HPET' at 0xbdf7f8b0
Table 'SSDT' at 0xbdf7f8f0
ACPI: No SRAT table found
Preloaded elf kernel "/boot/kernel/kernel" at 0x80ff2000.
Preloaded boot_entropy_cache "/boot/entropy" at 0x80ffacd8.
Preloaded elf obj module "/boot/kernel/nullfs.ko" at 0x80ffad30.
Preloaded elf obj module "/boot/kernel/geom_mirror.ko" at 0x80ffb358.
Preloaded elf obj module "/boot/kernel/ipfw.ko" at 0x80ffba48.
Preloaded elf obj module "/boot/kernel/carp.ko" at 0x80ffc0f0.
Preloaded elf obj module "/boot/kernel/if_bge.ko" at 0x80ffc7d8.
Preloaded elf obj module "/boot/kernel/miibus.ko" at 0x80ffce40.
Preloaded elf obj module "/boot/kernel/if_em.ko" at 0x80ffd428.
Preloaded elf obj module "/boot/kernel/if_nfe.ko" at 0x80ffda90.
Preloaded elf obj module "/boot/kernel/if_re.ko" at 0x80ffe038.
Preloaded elf obj module "/boot/kernel/if_ix.ko" at 0x80ffe5e0.
Preloaded elf obj module "/boot/kernel/libalias.ko" at 0x80ffed08.
link_elf_obj: symbol sctp_calculate_cksum undefined
KLD file ipfw.ko - could not finalize loading
Calibrating TSC clock ... TSC clock: 3515725584 Hz
CPU: AMD Phenom(tm) II X4 970 Processor (3515.73-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x100f43  Family=0x10  Model=0x4  Stepping=3
  
Features=0x178bfbff
  Features2=0x802009
  AMD 
Features=0xee500800
  AMD 

Re: svn commit: r327058 - head/stand/efi/boot1

2017-12-23 Thread Tomoaki AOKI
This broke screen after kernel starts.
ThinkPad T420 with nvidia NVS 4200M.

boot1 screen and loader screen (beastie menu) shows up smaller (but not
broken) than usual, and small five interlaced kernel outputs (not
actually readable at all) are shown on top of screen.

So screen resolution setting should be different and not re-initialized
in kernel properly.


  *Setting hw.vga.textmode (0 and 1) didn't help.
  *Setting resolution (assuming it wouldn't work, though)
   via kern.vt.fb.default_mode didn't work as expected.
 (the option is for scfb, not for UEFI fb.)
  *Removing nvidia.ko and nvidia-modeset.ko from loader.conf
   didn't help.
  *Last known-to-be-OK revision was r326876 and no other commit
   is done to boot1 codes before this rev.
  *Using known-to-be-OK rev of boot1.efi, all goes fine.

As some commits are done to toolchain codes, I tried rebuilding
known-to-be-OK boot1.efi with current toolchains and confirmed
working OK.


> Author: mizhka
> Date: Thu Dec 21 12:21:35 2017
> New Revision: 327058
> URL: https://svnweb.freebsd.org/changeset/base/327058
> 
> Log:
>   [boot/efi] scan all display modes rather than sequential try-fail way
>   
>   This patch allows to scan all display modes in boot1 as loader does.
>   
>   Before system tried to select optimal display mode by sequential scan
of
>   modes and if error then stop scanning. This way is not good, because
>   if mode N is not present, mode N+1 may exist.
>   
>   In loader we use conout->Mode->MaxMode to identify maximum number of
modes.
>   This commit is to use same way in boot1 as in loader.
  
>   Reported by:Andrey Pustovetov 
>   Reviewed by:tsoome
>   Differential Revision:  https://reviews.freebsd.org/D13541
> 
> Modified:
>   head/stand/efi/boot1/boot1.c
> 
> Modified: head/stand/efi/boot1/boot1.c
> ==
> --- head/stand/efi/boot1/boot1.c  Thu Dec 21 09:21:40 2017
(r327057)
> +++ head/stand/efi/boot1/boot1.c  Thu Dec 21 12:21:35
2017(r327058)
> @@ -430,10 +430,10 @@ efi_main(EFI_HANDLE Ximage,
EFI_SYSTEM_TABLE *Xsystab)
>   conout = ST->ConOut;
>   conout->Reset(conout, TRUE);
>   max_dim = best_mode = 0;
> - for (i = 0; ; i++) {
> + for (i = 0; i < conout->Mode->MaxMode; i++) {
>   status = conout->QueryMode(conout, i, , );
>   if (EFI_ERROR(status))
> - break;
> + continue;
>   if (cols * rows > max_dim) {
>   max_dim = cols * rows;
>   best_mode = i;

-- 
Tomoaki AOKI
___
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"