Re: svn commit: r271023 - stable/10/sys/dev/vt

2014-09-04 Thread Jean-Sébastien Pédron
On 03.09.2014 16:57, Alexey Dokuchaev wrote:
>> The VGA vt(4) issues all stem from the relatively complex and arcane
>> VGA hardware and a somewhat limited vt_vga implementation.
> 
> Can you elaborate a bit on the technical side of things?  Particularly, it
> looks strange that syscons(4) was able to work just fine on "relatively
> complex and arcane VGA hardware", while more modern vt(4) is fighting with
> problems.

VGA requires that you write 8 pixels at a time (8 pixels stored in one
byte). To update one pixel, the previous version of vt_vga would read
one byte so that the 8 pixels are loaded in special registers (called
"latches"), then would write a new byte to the video memory. The VGA
hardware would process the new byte and the content of the latches to
compute the final data. That's how one pixel out of eight could be modified.

Unfortunately, reading from the video memory is very expensive. The new
version of vt_vga never reads from the video memory. Instead, it uses
the console history to know what those 8 pixels should look like and
write one byte which doesn't need further processing.

One bug in vt(4) was that the mouse cursor position, even if it was
invisible before moused(8) starts, was always considered "dirty" and
required a redraw. The default position being [0;0], each new character
written would trigger a full refresh of the screen from [0;0] to the
position of this character.

Those two problems combined explain the slownness of vt(4), especially
with discrete GPU and virtual machines; i915 users were mostly spared.

Regarding the incorrect refresh when vt-switching, it was caused by a
race between the redraw thread and the switch. The redraw thread was not
stopped during a switch. Therefore, if the thread ran while the switch
was in progress, it could mark the screen as "up-to-date" even though it
displayed the wrong data.

One change did reduce the vt-switch time specifically: in vt_vga, a
switch triggers a clear of the video memory. The loop did read from the
video memory, then wrote 8 black pixels. The useless read was removed.

-- 
Jean-Sébastien Pédron



signature.asc
Description: OpenPGP digital signature


svn commit: r271088 - in head/sys: kern sys

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 09:07:14 2014
New Revision: 271088
URL: http://svnweb.freebsd.org/changeset/base/271088

Log:
  Provide m_catpkt(), a wrapper around m_cat() that deals with M_PKTHDR mbufs.
  
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/kern/uipc_mbuf.c
  head/sys/sys/mbuf.h

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Thu Sep  4 06:07:32 2014(r271087)
+++ head/sys/kern/uipc_mbuf.c   Thu Sep  4 09:07:14 2014(r271088)
@@ -990,6 +990,22 @@ m_cat(struct mbuf *m, struct mbuf *n)
}
 }
 
+/*
+ * Concatenate two pkthdr mbuf chains.
+ */
+void
+m_catpkt(struct mbuf *m, struct mbuf *n)
+{
+
+   M_ASSERTPKTHDR(m);
+   M_ASSERTPKTHDR(n);
+
+   m->m_pkthdr.len += n->m_pkthdr.len;
+   m_demote(n, 1);
+
+   m_cat(m, n);
+}
+
 void
 m_adj(struct mbuf *mp, int req_len)
 {

Modified: head/sys/sys/mbuf.h
==
--- head/sys/sys/mbuf.h Thu Sep  4 06:07:32 2014(r271087)
+++ head/sys/sys/mbuf.h Thu Sep  4 09:07:14 2014(r271088)
@@ -915,6 +915,7 @@ int  m_apply(struct mbuf *, int, int,
int (*)(void *, void *, u_int), void *);
 int m_append(struct mbuf *, int, c_caddr_t);
 voidm_cat(struct mbuf *, struct mbuf *);
+voidm_catpkt(struct mbuf *, struct mbuf *);
 int m_extadd(struct mbuf *, caddr_t, u_int,
void (*)(struct mbuf *, void *, void *), void *, void *,
int, int, int);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271089 - head/sys/netinet

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 09:15:44 2014
New Revision: 271089
URL: http://svnweb.freebsd.org/changeset/base/271089

Log:
  Improve r265338. When inserting mbufs into TCP reassembly queue,
  try to collapse adjacent pieces using m_catpkt(). In best case
  scenario it copies data and frees mbufs, making mbuf exhaustion
  attack harder.
  
  Suggested by: Jonathan Looney 
  Security: Hardens against remote mbuf exhaustion attack.
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/netinet/tcp_reass.c

Modified: head/sys/netinet/tcp_reass.c
==
--- head/sys/netinet/tcp_reass.cThu Sep  4 09:07:14 2014
(r271088)
+++ head/sys/netinet/tcp_reass.cThu Sep  4 09:15:44 2014
(r271089)
@@ -214,16 +214,29 @@ tcp_reass(struct tcpcb *tp, struct tcphd
mq = nq;
}
 
-   /* Insert the new segment queue entry into place. */
+   /*
+* Insert the new segment queue entry into place.  Try to collapse
+* mbuf chains if segments are adjacent.
+*/
if (mp) {
-   m->m_nextpkt = mp->m_nextpkt;
-   mp->m_nextpkt = m;
+   if (M_TCPHDR(mp)->th_seq + mp->m_pkthdr.len == th->th_seq)
+   m_catpkt(mp, m);
+   else {
+   m->m_nextpkt = mp->m_nextpkt;
+   mp->m_nextpkt = m;
+   m->m_pkthdr.pkt_tcphdr = th;
+   }
} else {
-   m->m_nextpkt = tp->t_segq;
-   tp->t_segq = m ;
+   mq = tp->t_segq;
+   tp->t_segq = m;
+   if (mq && th->th_seq + *tlenp == M_TCPHDR(mq)->th_seq) {
+   m->m_nextpkt = mq->m_nextpkt;
+   m_catpkt(m, mq);
+   } else
+   m->m_nextpkt = mq;
+   m->m_pkthdr.pkt_tcphdr = th;
}
-   m->m_pkthdr.pkt_tcphdr = th;
-   tp->t_segqlen += m->m_pkthdr.len;
+   tp->t_segqlen += *tlenp;
 
 present:
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r270999 - head/sys/kern

2014-09-04 Thread Gleb Smirnoff
On Wed, Sep 03, 2014 at 12:10:28PM -0700, John-Mark Gurney wrote:
J> > M> > + if (p->p_pptr) {
J> > M> >   kp->ki_ppid = proc_realparent(p)->p_pid;
J> > M> > - if (p->p_flag & P_TRACED)
J> > M> > - kp->ki_tracer = p->p_pptr->p_pid;
J> > M> > + if (p->p_flag & P_TRACED)
J> > M> > + kp->ki_tracer = p->p_pptr->p_pid;
J> > M> > + }
J> > M> >  }
J> > M> >  
J> > M> >  /*
J> > M> > 
J> > M> 
J> > M> p_pptr must be non-NULL if P_TRACED is set. If there is no way to
J> > M> annotate it for coverity, this change deserves a comment in the code
J> > M> (and in retrospect previous code should have had appropriate comment as
J> > M> well).
J> > 
J> > Thanks for explanation.
J> > 
J> > I'd suggest to leave the change in, since now it is a 
micro-micro-optimization :)
J> 
J> If you must leave it in, then at least compare the pointer against
J> NULL, and collapse two if statements into one...
J> 
J> We should never introduce new pointer checks that aren't against NULL...

I don't see how two if statements can be collapsed? We need to assign
ki_ppid regardless of P_TRACED flag.

-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271090 - stable/10/sys/dev/drm2/radeon

2014-09-04 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Thu Sep  4 09:42:36 2014
New Revision: 271090
URL: http://svnweb.freebsd.org/changeset/base/271090

Log:
  drm/radeon: Fix a memory leak when radeonkms is unloaded
  
  This an MFC of r270750.

Modified:
  stable/10/sys/dev/drm2/radeon/radeon_fb.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/drm2/radeon/radeon_fb.c
==
--- stable/10/sys/dev/drm2/radeon/radeon_fb.c   Thu Sep  4 09:15:44 2014
(r271089)
+++ stable/10/sys/dev/drm2/radeon/radeon_fb.c   Thu Sep  4 09:42:36 2014
(r271090)
@@ -291,6 +291,7 @@ static int radeon_fbdev_destroy(struct d
 
if (rfbdev->helper.fbdev) {
info = rfbdev->helper.fbdev;
+   free(info->fb_priv, DRM_MEM_KMS);
free(info, DRM_MEM_KMS);
}
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271091 - stable/9/sys/dev/drm2/radeon

2014-09-04 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Thu Sep  4 09:49:21 2014
New Revision: 271091
URL: http://svnweb.freebsd.org/changeset/base/271091

Log:
  drm/radeon: Fix a memory leak when radeonkms is unloaded
  
  This an MFC of r270750.

Modified:
  stable/9/sys/dev/drm2/radeon/radeon_fb.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/radeon/radeon_fb.c
==
--- stable/9/sys/dev/drm2/radeon/radeon_fb.cThu Sep  4 09:42:36 2014
(r271090)
+++ stable/9/sys/dev/drm2/radeon/radeon_fb.cThu Sep  4 09:49:21 2014
(r271091)
@@ -291,6 +291,7 @@ static int radeon_fbdev_destroy(struct d
 
if (rfbdev->helper.fbdev) {
info = rfbdev->helper.fbdev;
+   free(info->fb_priv, DRM_MEM_KMS);
free(info, DRM_MEM_KMS);
}
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271092 - stable/10/release/doc/en_US.ISO8859-1/relnotes

2014-09-04 Thread Glen Barber
Author: gjb
Date: Thu Sep  4 11:15:38 2014
New Revision: 271092
URL: http://svnweb.freebsd.org/changeset/base/271092

Log:
  Document r271069, Mac Mini 3,1 support added to asmc(4).
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml  Thu Sep  4 
09:49:21 2014(r271091)
+++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml  Thu Sep  4 
11:15:38 2014(r271092)
@@ -194,6 +194,9 @@
has been updated to implement fast path for
the page fault handler.
 
+  The &man.asmc.4; driver has been updated
+   to support the &apple; Mac Mini 3,1.
+
   
Virtualization Support
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271023 - stable/10/sys/dev/vt

2014-09-04 Thread Bruce Simpson
On Thu, 4 Sep 2014, at 10:05, Jean-Sébastien Pédron wrote:
> Unfortunately, reading from the video memory is very expensive. The new
> version of vt_vga never reads from the video memory. Instead, it uses
> the console history to know what those 8 pixels should look like and
> write one byte which doesn't need further processing.
... 
> Those two problems combined explain the slownness of vt(4), especially
> with discrete GPU and virtual machines; i915 users were mostly spared.

It may be a good idea to monitor the performance of vt(4) under virtual
KVM systems (e.g. Supermicro IPMI, VMware VNC, Cisco UCS etc.) for the
following reasons:

1) users of FreeBSD are likely to rely on them for operations,
2) many of these systems already work along similar principles (i.e.
delta compression),
3) to be sure that cascaded updates don't cause additional display
latency.

-- 
BMS (sent via webmail)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271093 - in head/sys: arm/altera arm/altera/socfpga arm/conf boot/fdt/dts/arm

2014-09-04 Thread Ruslan Bukin
Author: br
Date: Thu Sep  4 12:44:40 2014
New Revision: 271093
URL: http://svnweb.freebsd.org/changeset/base/271093

Log:
  Add initial support for Altera SOCFPGA (heterogeneous ARM/FPGA) SoC family.
  Include board configuration for Terasic SoCKit (Altera Cyclone V).
  
  Sponsored by: DARPA, AFRL

Added:
  head/sys/arm/altera/
  head/sys/arm/altera/socfpga/
  head/sys/arm/altera/socfpga/files.socfpga   (contents, props changed)
  head/sys/arm/altera/socfpga/socfpga_common.c   (contents, props changed)
  head/sys/arm/altera/socfpga/socfpga_machdep.c   (contents, props changed)
  head/sys/arm/altera/socfpga/std.socfpga   (contents, props changed)
  head/sys/arm/conf/SOCKIT   (contents, props changed)
  head/sys/boot/fdt/dts/arm/socfpga-sockit.dts   (contents, props changed)
  head/sys/boot/fdt/dts/arm/socfpga.dtsi   (contents, props changed)

Added: head/sys/arm/altera/socfpga/files.socfpga
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/altera/socfpga/files.socfpga   Thu Sep  4 12:44:40 2014
(r271093)
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+kern/kern_clocksource.cstandard
+
+arm/arm/bus_space_generic.cstandard
+arm/arm/bus_space_asm_generic.Sstandard
+arm/arm/cpufunc_asm_armv5.Sstandard
+arm/arm/cpufunc_asm_arm10.Sstandard
+arm/arm/cpufunc_asm_arm11.Sstandard
+arm/arm/cpufunc_asm_armv7.Sstandard
+
+arm/arm/bus_space-v6.c standard
+arm/arm/gic.c  standard
+arm/arm/mpcore_timer.c standard
+
+arm/altera/socfpga/socfpga_common.cstandard
+arm/altera/socfpga/socfpga_machdep.c   standard

Added: head/sys/arm/altera/socfpga/socfpga_common.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/altera/socfpga/socfpga_common.cThu Sep  4 12:44:40 
2014(r271093)
@@ -0,0 +1,83 @@
+/*-
+ * Copyright (c) 2014 Ruslan Bukin 
+ * All rights reserved.
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * 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.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#defineRESMAN_BASE 0xFFD05000
+#defineRESMAN_CTRL 0x4
+#defineSWWARMRSTREQ(1 << 1)
+
+void
+cpu_reset(void)
+{
+   bus_addr_t vaddr;
+
+   if (bus_space_map(fdtbus_bs_tag, RESMAN_BASE, 0x10, 0, &vaddr) == 0) {
+   bus_space_write_4(fdtbus_bs_tag, vaddr,
+   RESMAN_CTRL, SWWARMRSTREQ);
+   }
+
+   while (1);
+}
+
+struct fdt_fixup_entry fdt_fixup_table[] = {
+   { NULL, NULL }
+};
+
+static int
+fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
+int *pol)
+{
+
+   if (!fdt_is_compatible(node, "arm,gic"))
+   return (ENXIO);
+
+   *interrupt = fdt32_to_cpu(intr[0]);
+   *trig = INTR_TRIGGER_CONFORM;
+   *pol = INTR_POLARITY_CONFORM;
+   return (0);
+}
+
+fdt_pic_decode_t fdt_pic_table[] = {
+   &fdt_pic_decode_ic,
+   NULL
+};

Added: head/sys/arm/altera/socfpga/socfpga_machdep.c
==
--- /dev/null   00:00:00 1970   (empty, becau

svn commit: r271094 - head/sys/arm/freescale/imx

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 13:13:42 2014
New Revision: 271094
URL: http://svnweb.freebsd.org/changeset/base/271094

Log:
  Fix typo in variable name.

Modified:
  head/sys/arm/freescale/imx/imx51_iomux.c

Modified: head/sys/arm/freescale/imx/imx51_iomux.c
==
--- head/sys/arm/freescale/imx/imx51_iomux.cThu Sep  4 12:44:40 2014
(r271093)
+++ head/sys/arm/freescale/imx/imx51_iomux.cThu Sep  4 13:13:42 2014
(r271094)
@@ -222,7 +222,7 @@ imx_iomux_gpr_get(u_int regnum)
 {
 
KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_get() called before attach"));
-   KASSERT(regnum >= 0 && renum <= 1, 
+   KASSERT(regnum >= 0 && regnum <= 1, 
("imx_iomux_gpr_get bad regnum %u", regnum));
return (IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum));
 }
@@ -232,7 +232,7 @@ imx_iomux_gpr_set(u_int regnum, uint32_t
 {
 
KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_set() called before attach"));
-   KASSERT(regnum >= 0 && renum <= 1, 
+   KASSERT(regnum >= 0 && regnum <= 1, 
("imx_iomux_gpr_set bad regnum %u", regnum));
IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val);
 }
@@ -244,7 +244,7 @@ imx_iomux_gpr_set_masked(u_int regnum, u
 
KASSERT(iomuxsc != NULL, 
("imx_iomux_gpr_set_masked called before attach"));
-   KASSERT(regnum >= 0 && renum <= 1, 
+   KASSERT(regnum >= 0 && regnum <= 1, 
("imx_iomux_gpr_set_masked bad regnum %u", regnum));
 
val = IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271095 - in stable/10: etc/defaults etc/rc.d sbin/conscontrol share/man/man4 share/man/man5 share/man/man7 share/man/man8 tools/tools/vt/keymaps usr.bin/lock usr.sbin/bsdconfig usr.sbi...

2014-09-04 Thread Stefan Esser
Author: se
Date: Thu Sep  4 13:45:16 2014
New Revision: 271095
URL: http://svnweb.freebsd.org/changeset/base/271095

Log:
  MFC r270647: Add references to vt(4) and the configuration files in /usr/sha
  MFC r270653: Update man-pages to correctly refer to changed pathes and namin
  MFC r270657: More man pages that need to know about vt in addition to syscon
  MFC r270659: (by pluknet@) Missed comma.
  MFC r270660: Back-out the references to vt(4) from this man-page. It appears
  MFC r270933: Add references to vt(4) to further man-pages.
  MFC r270934: Final patches to the tools used to convert syscons keymaps for
  MFC r270935: Add vt(4) support to the console initialisation script, specifi
  
  Second batch of MFCs to add support for Unicode keymaps for use with vt(4).
  
  It contains the following changes:
  
  - Add references to vt(4) to relevant man-pages.
  - Update comment in defaults/rc.conf to mention vt
  - Update rc.d/syscons to warn about syscons keymaps used under vt.
An attempt is made to identify the vt keymap to load instead.
  - Minor changes to the conversion tool based on mail comments on keymaps.
  
  Relnotes: yes

Modified:
  stable/10/etc/defaults/rc.conf
  stable/10/etc/rc.d/syscons
  stable/10/sbin/conscontrol/conscontrol.8
  stable/10/share/man/man4/atkbd.4
  stable/10/share/man/man4/kbdmux.4
  stable/10/share/man/man4/ukbd.4
  stable/10/share/man/man4/vkbd.4
  stable/10/share/man/man4/vt.4
  stable/10/share/man/man5/rc.conf.5
  stable/10/share/man/man7/hier.7
  stable/10/share/man/man8/nanobsd.8
  stable/10/tools/tools/vt/keymaps/KBDFILES.map
  stable/10/tools/tools/vt/keymaps/convert-keymap.pl
  stable/10/usr.bin/lock/lock.1
  stable/10/usr.sbin/bsdconfig/bsdconfig.8
  stable/10/usr.sbin/bsdinstall/bsdinstall.8
  stable/10/usr.sbin/kbdcontrol/kbdcontrol.1
  stable/10/usr.sbin/kbdcontrol/kbdmap.5
  stable/10/usr.sbin/kbdmap/kbdmap.1
  stable/10/usr.sbin/vidcontrol/vidcontrol.1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/defaults/rc.conf
==
--- stable/10/etc/defaults/rc.conf  Thu Sep  4 13:13:42 2014
(r271094)
+++ stable/10/etc/defaults/rc.conf  Thu Sep  4 13:45:16 2014
(r271095)
@@ -524,15 +524,15 @@ ip6addrctl_policy="AUTO"  # A pre-defined
 ##
 
 keyboard=""# keyboard device to use (default /dev/kbd0).
-keymap="NO"# keymap in /usr/share/syscons/keymaps/* (or NO).
+keymap="NO"# keymap in /usr/share/{syscons,vt}/keymaps/* (or NO).
 keyrate="NO"   # keyboard rate to: slow, normal, fast (or NO).
 keybell="NO"   # See kbdcontrol(1) for options.  Use "off" to disable.
 keychange="NO" # function keys default values (or NO).
 cursor="NO"# cursor type {normal|blink|destructive} (or NO).
 scrnmap="NO"   # screen map in /usr/share/syscons/scrnmaps/* (or NO).
-font8x16="NO"  # font 8x16 from /usr/share/syscons/fonts/* (or NO).
-font8x14="NO"  # font 8x14 from /usr/share/syscons/fonts/* (or NO).
-font8x8="NO"   # font 8x8 from /usr/share/syscons/fonts/* (or NO).
+font8x16="NO"  # font 8x16 from /usr/share/{syscons,vt}/fonts/* (or 
NO).
+font8x14="NO"  # font 8x14 from /usr/share/{syscons,vt}/fonts/* (or 
NO).
+font8x8="NO"   # font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO).
 blanktime="300"# blank time (in seconds) or "NO" to turn it 
off.
 saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko
 moused_nondefault_enable="YES" # Treat non-default mice as enabled unless

Modified: stable/10/etc/rc.d/syscons
==
--- stable/10/etc/rc.d/syscons  Thu Sep  4 13:13:42 2014(r271094)
+++ stable/10/etc/rc.d/syscons  Thu Sep  4 13:45:16 2014(r271095)
@@ -45,16 +45,122 @@ stop_cmd=":"
 kbddev=/dev/ttyv0
 viddev=/dev/ttyv0
 
-_sc_config="syscons"
+_sc_config=
+_sc_console=
 _sc_initdone=
+_sc_keymap_msg=
 sc_init()
 {
if [ -z "${_sc_initdone}" ]; then
+   if [ -z "${_sc_console}" ]; then
+   if [ x`sysctl -n kern.vty` = x"vt" ]; then
+   _sc_console="vt"
+   else
+   _sc_console="syscons"
+   fi
+   _sc_config="${_sc_console}"
+   fi
echo -n "Configuring ${_sc_config}:"
_sc_initdone=yes
fi
 }
 
+# syscons to vt migration helper
+lookup_keymap_for_vt()
+{
+   keymap=`basename $1 .kbd`
+   case $keymap in
+hy.armscii-8)  echo am;;
+be.iso.acc)echo be.acc;;
+be.iso)echo be;;
+bg.bds.ctrlcaps)   echo bg.bds;;
+bg.phonetic.ctrlcaps)  echo bg.phonetic;;
+br

svn commit: r271096 - stable/10/usr.sbin/smbmsg

2014-09-04 Thread Stefan Esser
Author: se
Date: Thu Sep  4 13:47:55 2014
New Revision: 271096
URL: http://svnweb.freebsd.org/changeset/base/271096

Log:
  MFC r270931: Fix typo ("by" -> "be").

Modified:
  stable/10/usr.sbin/smbmsg/smbmsg.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/smbmsg/smbmsg.8
==
--- stable/10/usr.sbin/smbmsg/smbmsg.8  Thu Sep  4 13:45:16 2014
(r271095)
+++ stable/10/usr.sbin/smbmsg/smbmsg.8  Thu Sep  4 13:47:55 2014
(r271096)
@@ -59,7 +59,7 @@ The first form shown in the synopsis can
 the devices on the SMBus.
 This is done by sending each valid device address one
 receive byte, and one quick read message, respectively.
-Devices that respond to these requests will by displayed
+Devices that respond to these requests will be displayed
 by their device address, followed by the strings
 .Ql r ,
 .Ql w ,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271097 - head/sys/arm/freescale/imx

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 14:25:32 2014
New Revision: 271097
URL: http://svnweb.freebsd.org/changeset/base/271097

Log:
  Add a basic iomux driver for imx6.
  
  Submitted by: bsam@

Added:
  head/sys/arm/freescale/imx/imx6_iomux.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx6_iomuxreg.h   (contents, props changed)
Modified:
  head/sys/arm/freescale/imx/files.imx6
  head/sys/arm/freescale/imx/imx_iomuxvar.h

Modified: head/sys/arm/freescale/imx/files.imx6
==
--- head/sys/arm/freescale/imx/files.imx6   Thu Sep  4 13:47:55 2014
(r271096)
+++ head/sys/arm/freescale/imx/files.imx6   Thu Sep  4 14:25:32 2014
(r271097)
@@ -19,11 +19,12 @@ arm/arm/bus_space-v6.c  standard
 arm/arm/mpcore_timer.c standard
 arm/freescale/fsl_ocotp.c  standard
 arm/freescale/imx/imx6_anatop.cstandard
-arm/freescale/imx/imx_common.c standard
 arm/freescale/imx/imx6_ccm.c   standard
+arm/freescale/imx/imx6_iomux.c standard
 arm/freescale/imx/imx6_machdep.c   standard
 arm/freescale/imx/imx6_mp.coptional smp
 arm/freescale/imx/imx6_pl310.c standard
+arm/freescale/imx/imx_common.c standard
 arm/freescale/imx/imx_machdep.cstandard
 arm/freescale/imx/imx_gpt.cstandard
 arm/freescale/imx/imx_gpio.c   optional gpio

Added: head/sys/arm/freescale/imx/imx6_iomux.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/freescale/imx/imx6_iomux.c Thu Sep  4 14:25:32 2014
(r271097)
@@ -0,0 +1,189 @@
+/*-
+ * Copyright (c) 2014 Boris Samorodov 
+ * 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 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 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include "imx6_iomuxreg.h"
+
+#defineIOMUX_WRITE(_sc, _r, _v) \
+   bus_write_4((_sc)->sc_res, (_r), (_v))
+#defineIOMUX_READ(_sc, _r) \
+   bus_read_4((_sc)->sc_res, (_r))
+#defineIOMUX_SET(_sc, _r, _m) \
+   IOMUX_WRITE((_sc), (_r), IOMUX_READ((_sc), (_r)) | (_m))
+#defineIOMUX_CLEAR(_sc, _r, _m) \
+   IOMUX_WRITE((_sc), (_r), IOMUX_READ((_sc), (_r)) & ~(_m))
+
+struct imx6_iomux_softc {
+   struct resource *sc_res;
+   device_t sc_dev;
+};
+
+static struct imx6_iomux_softc *iomuxsc = NULL;
+
+static struct resource_spec imx6_iomux_spec[] = {
+   { SYS_RES_MEMORY,   0,  RF_ACTIVE },
+   { SYS_RES_IRQ,  0,  RF_ACTIVE },
+   { -1, 0 }
+};
+
+static int
+imx6_iomux_probe(device_t dev)
+{
+   if (!ofw_bus_status_okay(dev))
+   return (ENXIO);
+
+   if (!ofw_bus_is_compatible(dev, "fsl,imx6-iomux"))
+   return (ENXIO);
+
+   device_set_desc(dev, "Freescale i.MX6 IO pins multiplexor");
+   return (BUS_PROBE_DEFAULT);
+
+}
+
+static int
+imx6_iomux_attach(device_t dev)
+{
+   struct imx6_iomux_softc * sc;
+
+   sc = device_get_softc(dev);
+
+   if (bus_alloc_resources(dev, imx6_iomux_spec, &sc->sc_res)) {
+   device_printf(dev, "could not allocate resources\n");
+   return (ENXIO);
+   }
+
+   iomuxsc = sc;
+
+   /*
+* XXX: place to fetch all info about pinmuxing from loader data
+* (FDT blob) and apply. Loader (1st one) must care about
+* device-to-device difference.
+*/
+
+   return (0);
+}
+
+static int
+imx6_iomux_detach

svn commit: r271098 - in head/sys: amd64/amd64 conf i386/i386 i386/include x86/x86

2014-09-04 Thread John Baldwin
Author: jhb
Date: Thu Sep  4 14:26:25 2014
New Revision: 271098
URL: http://svnweb.freebsd.org/changeset/base/271098

Log:
  Merge the amd64 and i386 identcpu.c into a single x86 implementation.
  This brings the structured extended features mask and VT-x reporting to
  i386 and Intel cache and TLB info (under bootverbose) to amd64.

Added:
  head/sys/x86/x86/identcpu.c
 - copied, changed from r271083, head/sys/amd64/amd64/identcpu.c
Deleted:
  head/sys/amd64/amd64/identcpu.c
  head/sys/i386/i386/identcpu.c
Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.pc98
  head/sys/i386/i386/initcpu.c
  head/sys/i386/include/md_var.h

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Thu Sep  4 14:25:32 2014(r271097)
+++ head/sys/conf/files.amd64   Thu Sep  4 14:26:25 2014(r271098)
@@ -103,7 +103,6 @@ amd64/amd64/elf_machdep.c   standard
 amd64/amd64/exception.Sstandard
 amd64/amd64/fpu.c  standard
 amd64/amd64/gdb_machdep.c  optionalgdb
-amd64/amd64/identcpu.c standard
 amd64/amd64/in_cksum.c optionalinet | inet6
 amd64/amd64/initcpu.c  standard
 amd64/amd64/io.c   optionalio
@@ -542,6 +541,7 @@ x86/x86/busdma_bounce.c standard
 x86/x86/busdma_machdep.c   standard
 x86/x86/dump_machdep.c standard
 x86/x86/fdt_machdep.c  optionalfdt
+x86/x86/identcpu.c standard
 x86/x86/intr_machdep.c standard
 x86/x86/io_apic.c  standard
 x86/x86/legacy.c   standard

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Thu Sep  4 14:25:32 2014(r271097)
+++ head/sys/conf/files.i386Thu Sep  4 14:26:25 2014(r271098)
@@ -443,7 +443,6 @@ i386/xen/exception.soptional xen
 i386/i386/gdb_machdep.coptional gdb
 i386/i386/geode.c  optional cpu_geode
 i386/i386/i686_mem.c   optional mem
-i386/i386/identcpu.c   standard
 i386/i386/in_cksum.c   optional inet | inet6
 i386/i386/initcpu.cstandard
 i386/i386/io.c optional io
@@ -581,6 +580,7 @@ x86/x86/busdma_bounce.c standard
 x86/x86/busdma_machdep.c   standard
 x86/x86/dump_machdep.c standard
 x86/x86/fdt_machdep.c  optional fdt
+x86/x86/identcpu.c standard
 x86/x86/intr_machdep.c standard
 x86/x86/io_apic.c  optional apic
 x86/x86/legacy.c   optional native

Modified: head/sys/conf/files.pc98
==
--- head/sys/conf/files.pc98Thu Sep  4 14:25:32 2014(r271097)
+++ head/sys/conf/files.pc98Thu Sep  4 14:26:25 2014(r271098)
@@ -140,7 +140,6 @@ i386/i386/elf_machdep.c standard
 i386/i386/exception.s  standard
 i386/i386/gdb_machdep.coptional gdb
 i386/i386/i686_mem.c   optional mem
-i386/i386/identcpu.c   standard
 i386/i386/in_cksum.c   optional inet | inet6
 i386/i386/initcpu.cstandard
 i386/i386/io.c optional io
@@ -248,6 +247,7 @@ x86/pci/pci_bus.c   optional pci
 x86/x86/busdma_bounce.cstandard
 x86/x86/busdma_machdep.c   standard
 x86/x86/dump_machdep.c standard
+x86/x86/identcpu.c standard
 x86/x86/intr_machdep.c standard
 x86/x86/io_apic.c  optional apic
 x86/x86/legacy.c   standard

Modified: head/sys/i386/i386/initcpu.c
==
--- head/sys/i386/i386/initcpu.cThu Sep  4 14:25:32 2014
(r271097)
+++ head/sys/i386/i386/initcpu.cThu Sep  4 14:26:25 2014
(r271098)
@@ -95,6 +95,7 @@ u_int cpu_fxsr;   /* SSE enabled */
 u_int  cpu_mxcsr_mask; /* Valid bits in mxcsr */
 #endif
 u_int  cpu_clflush_line_size = 32;
+u_int  cpu_stdext_feature;
 u_int  cpu_mon_mwait_flags;/* MONITOR/MWAIT flags (CPUID.05H.ECX) */
 u_int  cpu_mon_min_size;   /* MONITOR minimum range size, bytes */
 u_int  cpu_mon_max_size;   /* MONITOR minimum range size, bytes */

Modified: head/sys/i386/include/md_var.h
==
--- head/sys/i386/include/md_var.h  Thu Sep  4 14:25:32 2014
(r271097)
+++ head/sys/i386/include/md_var.h  Thu Sep  4 14:26:25 2014
(r271098)
@@ -48,6 +48,7 @@ externu_int   amd_pminfo;
 extern u_int   via_feature_rng;
 extern u_int   via_feature_xcrypt;
 extern u_int   cpu_clflush_line_size;
+extern u_int   cpu_stdext_feature;
 extern u_int   cpu_fxsr;
 extern u_int   cpu_high;
 extern u_int   cpu_id;

Copied and

Re: svn commit: r270232 - head/tools/tools/vt/keymaps

2014-09-04 Thread Jan Beich
Stefan Esser  writes:

> Author: se
> Date: Wed Aug 20 17:07:41 2014
> New Revision: 270232
> URL: http://svnweb.freebsd.org/changeset/base/270232
>
> Log:
>   The conversion tools have been further improved and some erroneous
>   conversions have been detected and fixed.
[...]
>  sub local_to_UCS_code
>  {
>  my ($char) = @_;
>  
> -return prettyprint_token(ord(Encode::decode("UTF-8", 
> local_to_UCS_string($char;
> +my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char)));
> +
> +$current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n")
> + if $current_char eq "";

The script now emits |SETCUR: 123| lines that kbdcontrol(1) doesn't like.
Either removing debug |print| or adding STDERR seems to fix.

  $ perl tools/tools/vt/keymaps/convert-keymap.pl \
share/vt/keymaps/us.kbd ASCII >foo.kbd

  $ kbdcontrol -l ./foo.kbd http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271099 - head/sys/dev/xen/blkfront

2014-09-04 Thread Roger Pau Monné
Author: royger
Date: Thu Sep  4 14:56:24 2014
New Revision: 271099
URL: http://svnweb.freebsd.org/changeset/base/271099

Log:
  Revert r269814: blkfront: add support for unmapped IO
  
  Current busdma code for unmapped bios will not properly align the segment
  size, causing corruption on blkfront devices. Revert the commit until
  busdma code is fixed.
  
  Reported by:  mav
  MFC after:1 day

Modified:
  head/sys/dev/xen/blkfront/blkfront.c

Modified: head/sys/dev/xen/blkfront/blkfront.c
==
--- head/sys/dev/xen/blkfront/blkfront.cThu Sep  4 14:26:25 2014
(r271098)
+++ head/sys/dev/xen/blkfront/blkfront.cThu Sep  4 14:56:24 2014
(r271099)
@@ -272,12 +272,8 @@ xbd_queue_request(struct xbd_softc *sc, 
 {
int error;
 
-   if (cm->cm_bp != NULL)
-   error = bus_dmamap_load_bio(sc->xbd_io_dmat, cm->cm_map,
-   cm->cm_bp, xbd_queue_cb, cm, 0);
-   else
-   error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map,
-   cm->cm_data, cm->cm_datalen, xbd_queue_cb, cm, 0);
+   error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, cm->cm_data,
+   cm->cm_datalen, xbd_queue_cb, cm, 0);
if (error == EINPROGRESS) {
/*
 * Maintain queuing order by freezing the queue.  The next
@@ -337,6 +333,8 @@ xbd_bio_command(struct xbd_softc *sc)
}
 
cm->cm_bp = bp;
+   cm->cm_data = bp->bio_data;
+   cm->cm_datalen = bp->bio_bcount;
cm->cm_sector_number = (blkif_sector_t)bp->bio_pblkno;
 
switch (bp->bio_cmd) {
@@ -995,7 +993,7 @@ xbd_instance_create(struct xbd_softc *sc
 
sc->xbd_disk->d_mediasize = sectors * sector_size;
sc->xbd_disk->d_maxsize = sc->xbd_max_request_size;
-   sc->xbd_disk->d_flags = DISKFLAG_UNMAPPED_BIO;
+   sc->xbd_disk->d_flags = 0;
if ((sc->xbd_flags & (XBDF_FLUSH|XBDF_BARRIER)) != 0) {
sc->xbd_disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
device_printf(sc->xbd_dev,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271100 - head/sys/arm/freescale/imx

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 14:57:04 2014
New Revision: 271100
URL: http://svnweb.freebsd.org/changeset/base/271100

Log:
  Implement the same public interface in imx51 and imx6 iomux; use the common
  header file for both.  Remove some unused code from imx51_iomux.  The iomux
  drivers are required, not optional, adjust the files.* entries accordingly.

Deleted:
  head/sys/arm/freescale/imx/imx51_iomuxvar.h
Modified:
  head/sys/arm/freescale/imx/files.imx51
  head/sys/arm/freescale/imx/files.imx53
  head/sys/arm/freescale/imx/files.imx6
  head/sys/arm/freescale/imx/imx51_iomux.c

Modified: head/sys/arm/freescale/imx/files.imx51
==
--- head/sys/arm/freescale/imx/files.imx51  Thu Sep  4 14:56:24 2014
(r271099)
+++ head/sys/arm/freescale/imx/files.imx51  Thu Sep  4 14:57:04 2014
(r271100)
@@ -19,7 +19,7 @@ arm/arm/bus_space-v6.cstandard
 arm/freescale/imx/tzic.c   standard
 
 # IOMUX - external pins multiplexor
-arm/freescale/imx/imx51_iomux.coptional iomux
+arm/freescale/imx/imx51_iomux.cstandard
 
 # GPIO
 arm/freescale/imx/imx_gpio.c   optional gpio

Modified: head/sys/arm/freescale/imx/files.imx53
==
--- head/sys/arm/freescale/imx/files.imx53  Thu Sep  4 14:56:24 2014
(r271099)
+++ head/sys/arm/freescale/imx/files.imx53  Thu Sep  4 14:57:04 2014
(r271100)
@@ -22,7 +22,7 @@ dev/uart/uart_dev_imx.c   optional uart
 arm/freescale/imx/tzic.c   standard
 
 # IOMUX - external pins multiplexor
-arm/freescale/imx/imx51_iomux.coptional iomux
+arm/freescale/imx/imx51_iomux.cstandard
 
 # GPIO
 arm/freescale/imx/imx_gpio.c   optional gpio

Modified: head/sys/arm/freescale/imx/files.imx6
==
--- head/sys/arm/freescale/imx/files.imx6   Thu Sep  4 14:56:24 2014
(r271099)
+++ head/sys/arm/freescale/imx/files.imx6   Thu Sep  4 14:57:04 2014
(r271100)
@@ -52,6 +52,4 @@ arm/freescale/imx/imx6_usbphy.c   optiona
 #
 # Not ready yet...
 #
-#arm/freescale/imx/imx51_iomux.c   optional iomux
-#dev/ata/chipsets/ata-fsl.coptional imxata
 #arm/freescale/imx/imx51_ipuv3.c   optional sc

Modified: head/sys/arm/freescale/imx/imx51_iomux.c
==
--- head/sys/arm/freescale/imx/imx51_iomux.cThu Sep  4 14:56:24 2014
(r271099)
+++ head/sys/arm/freescale/imx/imx51_iomux.cThu Sep  4 14:57:04 2014
(r271100)
@@ -75,8 +75,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
-#include 
-#include 
+#include "imx51_iomuxreg.h"
 
 
 #defineIOMUX_WRITE(_sc, _r, _v)
\
@@ -177,45 +176,23 @@ iomux_set_pad(unsigned int pin, unsigned
iomux_set_pad_sub(iomuxsc, pin, config);
 }
 
-#ifdef notyet
-void
-iomux_set_input(unsigned int input, unsigned int config)
+static uint32_t
+iomux_get_pad_config_sub(struct iomux_softc *sc, uint32_t pin)
 {
-   bus_size_t input_ctl_reg = input;
-
-   bus_space_write_4(iomuxsc->iomux_memt, iomuxsc->iomux_memh,
-   input_ctl_reg, config);
-}
-#endif
+   bus_size_t pad_reg = IOMUX_PIN_TO_PAD_ADDRESS(pin);
+   uint32_t result;
 
-void
-iomux_mux_config(const struct iomux_conf *conflist)
-{
-   int i;
+   result = IOMUX_READ(sc, pad_reg);
 
-   if (iomuxsc == NULL)
-   return;
-   for (i = 0; conflist[i].pin != IOMUX_CONF_EOT; i++) {
-   iomux_set_pad_sub(iomuxsc, conflist[i].pin, conflist[i].pad);
-   iomux_set_function_sub(iomuxsc, conflist[i].pin,
-   conflist[i].mux);
-   }
+   return(result);
 }
 
-#ifdef notyet
-void
-iomux_input_config(const struct iomux_input_conf *conflist)
+unsigned int
+iomux_get_pad_config(unsigned int pin)
 {
-   int i;
 
-   if (iomuxsc == NULL)
-   return;
-   for (i = 0; conflist[i].inout != -1; i++) {
-   iomux_set_inout(iomuxsc, conflist[i].inout,
-   conflist[i].inout_mode);
-   }
+   return(iomux_get_pad_config_sub(iomuxsc, pin));
 }
-#endif
 
 uint32_t
 imx_iomux_gpr_get(u_int regnum)
@@ -268,5 +245,5 @@ static driver_t imx_iomux_driver = {
 static devclass_t imx_iomux_devclass;
 
 EARLY_DRIVER_MODULE(imx_iomux, simplebus, imx_iomux_driver,
-imx_iomux_devclass, 0, 0, BUS_PASS_BUS - 1);
+imx_iomux_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_LATE);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271101 - head/sys/arm/conf

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 14:59:27 2014
New Revision: 271101
URL: http://svnweb.freebsd.org/changeset/base/271101

Log:
  The iomux driver is no longer optional, all imx platforms have it as
  standard now, so remove it from kernel configs.

Modified:
  head/sys/arm/conf/DIGI-CCWMX53
  head/sys/arm/conf/EFIKA_MX
  head/sys/arm/conf/IMX53-QSB
  head/sys/arm/conf/IMX6

Modified: head/sys/arm/conf/DIGI-CCWMX53
==
--- head/sys/arm/conf/DIGI-CCWMX53  Thu Sep  4 14:57:04 2014
(r271100)
+++ head/sys/arm/conf/DIGI-CCWMX53  Thu Sep  4 14:59:27 2014
(r271101)
@@ -120,8 +120,6 @@ device  atapci  # Only for 
helper funct
 device imxata
 optionsATA_STATIC_ID   # Static device numbering
 
-device iomux   # IO Multiplexor
-
 device gpio
 device gpioled
 

Modified: head/sys/arm/conf/EFIKA_MX
==
--- head/sys/arm/conf/EFIKA_MX  Thu Sep  4 14:57:04 2014(r271100)
+++ head/sys/arm/conf/EFIKA_MX  Thu Sep  4 14:59:27 2014(r271101)
@@ -116,8 +116,6 @@ device  atapci  # Only for 
helper funct
 device imxata
 optionsATA_STATIC_ID   # Static device numbering
 
-device iomux   # IO Multiplexor
-
 device gpio
 device gpioled
 

Modified: head/sys/arm/conf/IMX53-QSB
==
--- head/sys/arm/conf/IMX53-QSB Thu Sep  4 14:57:04 2014(r271100)
+++ head/sys/arm/conf/IMX53-QSB Thu Sep  4 14:59:27 2014(r271101)
@@ -119,8 +119,6 @@ options ALT_BREAK_TO_DEBUGGER
 #deviceimxata
 #options   ATA_STATIC_ID   # Static device numbering
 
-device iomux   # IO Multiplexor
-
 device gpio
 device gpioled
 

Modified: head/sys/arm/conf/IMX6
==
--- head/sys/arm/conf/IMX6  Thu Sep  4 14:57:04 2014(r271100)
+++ head/sys/arm/conf/IMX6  Thu Sep  4 14:59:27 2014(r271101)
@@ -80,7 +80,6 @@ devicemd  # Memory "disks"
 device ether   # Ethernet support
 device miibus  # Required for ethernet
 device bpf # Berkeley packet filter (required for 
DHCP)
-#deviceiomux   # IO Multiplexor
 
 # General-purpose input/output
 device gpio
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r269814 - head/sys/dev/xen/blkfront

2014-09-04 Thread Roger Pau Monné
El 03/09/14 a les 18.03, Alexander Motin ha escrit:
> On 03.09.2014 18:48, Roger Pau Monné wrote:
>> El 02/09/14 a les 19.18, John-Mark Gurney ha escrit:
>>> Roger Pau Monn wrote this message on Tue, Sep 02, 2014 at 11:30 +0200:
 El 29/08/14 a les 19.52, Roger Pau Monné ha escrit:
> El 28/08/14 a les 20.58, Alexander Motin ha escrit:
>> On 28.08.2014 21:45, John-Mark Gurney wrote:
>>> Alexander Motin wrote this message on Thu, Aug 28, 2014 at 21:23 +0300:
 Hi, Roger.

 It looks to me like this commit does not work as it should. I got
 problem when I just tried `newfs /dev/ada0 ; mount /dev/ada0 /mnt`.
 Somehow newfs does not produce valid filesystem. Problem is reliably
 repeatable and reverting this commit fixes it.

 I found at least one possible cause there: If original data buffer is
 unmapped, misaligned and not physically contiguous, then present x86
 bus_dmamap_load_bio() implementation will process each physically
 contiguous segment separately. Due to the misalignment first and last
 physical segments may have size not multiple to 512 bytes. Since each
 segment processed separately, they are not joined together, and
 xbd_queue_cb() is getting segments not multiple to 512 bytes. Attempt 
 to
 convert them to exact number of sectors in the driver cause data 
 corruption.
>>>
>>> Are you sure this isn't a problem w/ the tag not properly specifying
>>> the correct alignement? 
>>
>> I don't know how to specify it stronger then this:
>> error = bus_dma_tag_create(
>> bus_get_dma_tag(sc->xbd_dev),   /* parent */
>> 512, PAGE_SIZE, /* algnmnt, boundary */
>> BUS_SPACE_MAXADDR,  /* lowaddr */
>> BUS_SPACE_MAXADDR,  /* highaddr */
>> NULL, NULL, /* filter, filterarg */
>> sc->xbd_max_request_size,
>> sc->xbd_max_request_segments,
>> PAGE_SIZE,  /* maxsegsize */
>> BUS_DMA_ALLOCNOW,   /* flags */
>> busdma_lock_mutex,  /* lockfunc */
>> &sc->xbd_io_lock,   /* lockarg */
>> &sc->xbd_io_dmat);
>>
>>> Also, I don't think there is a way for busdma
>>> to say that you MUST have a segment be a multiple of 512, though you
>>> could use a 512 boundary, but that would force all segments to only be
>>> 512 bytes...
>>
>> As I understand, that is mandatory requirement for this "hardware".
>> Alike 4K alignment requirement also exist at least for SDHCI, and IIRC
>> UHCI/OHCI hardware. Even AHCI requires both segment addresses and
>> lengths to be even.
>>
>> I may be wrong, but I think it is quite likely that hardware that
>> requires segment address alignment quite likely will have the same
>> requirements for segments length.

 Hello,

 I have the following fix, which makes sure the total length and the 
 size of each segment is aligned. I'm not very knowledgeable of the 
 busdma code, so someone has to review it.
>>>
>>> I feel that this alignment should only be enforced via a new option on
>>> the tag...  I don't see how alignment and segment size should be
>>> conflated...  I could totally see a device that requires an alignement
>>> of 8 bytes, but has a segment size of 16, or vice versa, and requiring
>>> them to be the same means we will bounce unnecesarily...
>>>
>>> cc'd scottl since he knows this code better than I... and cperciva as
>>> he touched it for similar reasons..
>>>
>>> Oh, I just found PR 152818, where cperciva did a similar fix to
>>> bounce_bus_dmamap_load_buffer for the exact same reason...  It was
>>> committed in r216194...
>>
>> Since Xen blkfront seems to be the only driver to have such segment 
>> size requirements, 
> 
> No, it is not. I've already posted other examples I can recall: SDHCI,
> UHCI/OHCI and AHCI. Their limitations are different and less strict, but
> still may need handling. For SDHCI, since it is quite slow and has many
> other bugs, I practically implemented custom buffer bouncing. AHCI I
> suppose works only because limitation is only for even addresses, and
> odd ones happen extremely rarely (does not happen). For USB I am not
> sure, but at least umass driver does not support unmapped I/O.
> 
>> it might be best to just fix blkfront to always 
>> roundup segment size to 512, like the following:
> 
> I think some coffee is needed here. ;) Rounding addresses won't make
> data properly aligned. Some copy is unavoidable in such cases. It would
> be good if it was done properly by default buffer bouncer.

I've just reverted the commit, will look into fixing busdma when I'm
ba

svn commit: r271102 - head/sys/arm/freescale/imx

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 15:11:57 2014
New Revision: 271102
URL: http://svnweb.freebsd.org/changeset/base/271102

Log:
  Implement the imx_iomux_get/set_gpr() interface for imx6.

Modified:
  head/sys/arm/freescale/imx/imx6_iomux.c

Modified: head/sys/arm/freescale/imx/imx6_iomux.c
==
--- head/sys/arm/freescale/imx/imx6_iomux.c Thu Sep  4 14:59:27 2014
(r271101)
+++ head/sys/arm/freescale/imx/imx6_iomux.c Thu Sep  4 15:11:57 2014
(r271102)
@@ -166,6 +166,42 @@ iomux_get_pad_config(unsigned int pin)
return(iomux_get_pad_config_sub(iomuxsc, pin));
 }
 
+
+uint32_t
+imx_iomux_gpr_get(u_int regnum)
+{
+
+   KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_get() called before attach"));
+   KASSERT(regnum >= 0 && regnum <= 13, 
+   ("imx_iomux_gpr_get bad regnum %u", regnum));
+   return (IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum));
+}
+
+void
+imx_iomux_gpr_set(u_int regnum, uint32_t val)
+{
+
+   KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_set() called before attach"));
+   KASSERT(regnum >= 0 && regnum <= 13, 
+   ("imx_iomux_gpr_set bad regnum %u", regnum));
+   IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val);
+}
+
+void
+imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits)
+{
+   uint32_t val;
+
+   KASSERT(iomuxsc != NULL, 
+   ("imx_iomux_gpr_set_masked called before attach"));
+   KASSERT(regnum >= 0 && regnum <= 13, 
+   ("imx_iomux_gpr_set_masked bad regnum %u", regnum));
+
+   val = IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum);
+   val = (val & ~clrbits) | setbits;
+   IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val);
+}
+
 static device_method_t imx6_iomux_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, imx6_iomux_probe),
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm

2014-09-04 Thread Nikolai Lifanov
On 09/03/14 21:18, Steven Hartland wrote:
> 
> - Original Message - From: "Andriy Gapon" 
> 
> 
>> on 03/09/2014 23:22 Nikolai Lifanov said the following:
>>> On 09/03/14 15:22, John Baldwin wrote:
 On Wednesday, September 03, 2014 11:05:04 AM Nikolai Lifanov wrote:
> On 09/03/14 04:09, Steven Hartland wrote:
>> I'm looking to MFC this change so wanted to check if
>> anyone had an final feedback / objections?
>>
>> I know we currently have Alan's feedback on changing
>> the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC
>> which sounds sensible but waiting Peter to comment on.
>>
>>Regards
>>Steve
>
> I have no technical input, but this change improves ARC usefulness for
> me quite a bit. I would like to see the improvement in 10-STABLE.

 Can you verify that the current 10-STABLE (as of today) with all the
 various pagedaemon fixes still has ARC issues for your workload?

>>>
>>> It doesn't have any issues, but I noticed the improvement on CURRENT. I
>>> observed that just after this change, my package builder is much more
>>> likely to retain MFU and not evict useful things from there (the port
>>> tree) after large builds.
>>> However, I run a lot more 10.0-RELEASE than CURRENT and I would like to
>>> see this improvement release-bound.
>>>
>>> I would be happy to test this on 10-STABLE if you think that this is
>>> relevant.
>>
>>
>> As noted before, unfortunately, this commit (plus its fixups) contains
>> at least
>> two related but distinct changes.  So, to separate the wheat from the
>> chaff,
>> could you please try to comment out the following block in
>> sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c, function
>> arc_reclaim_needed:
>>
>>if (kmem_free_count() < zfs_arc_free_target) {
>>DTRACE_PROBE2(arc__reclaim_freetarget, uint64_t,
>>kmem_free_count(), uint64_t, zfs_arc_free_target);
>>return (1);
>>}
>>
>> Alternatively, I think that the same effect can be achieved by setting
>> sysctl
>> vfs.zfs.arc_free_target to the same value as vm.stats.vm.v_free_min.
> 
> Thats correct that would achieve the same thing.
> 
>> It's interesting to me whether you would still see the better
>> performance or if
>> that improvement would be undone.
> 
> Indeed that would be interesting, but we might find that its quite
> memory size
> dependent given the scaling so confirming HW details would be nice too.
> 
> I'd also be interested to know who wins the free race between the VM and
> ARC
> when using that value.
> 
> For those following this thread but not the review, I've added some
> additional
> information there which you might be interested in:
> https://reviews.freebsd.org/D702
> 
>Regards
>Steve

Just an update: I'm in the middle of testing this. I have to finish a
large bulk build to observe the behavior one way or another.

I have 32G of physical memory and 2x16G dedicated swap SSDs (L2ARC
wasn't very useful, but I should probably retest this) on this machine.
My ARC is usually at 14G with ~5G of MFU full of things I benefit from
keeping there (port trees, base jails). Builds themselves happen in
tmpfs and I usually have around 1.5G - 4G "Free" memory (unless building
something like pypy).

- Nikolai Lifanov
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread John Baldwin
On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
> On  4 Sep, John Baldwin wrote:
> > Author: jhb
> > Date: Thu Sep  4 01:46:06 2014
> > New Revision: 271076
> > URL: http://svnweb.freebsd.org/changeset/base/271076
> > 
> > Log:
> >   - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c.
> 
> That certainly brings back memories ...

Hopefully not too traumatic. :-P

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271082 - in head/sys: i386/i386 x86/x86

2014-09-04 Thread John Baldwin
On Thursday, September 04, 2014 02:26:00 AM John Baldwin wrote:
> Author: jhb
> Date: Thu Sep  4 02:25:59 2014
> New Revision: 271082
> URL: http://svnweb.freebsd.org/changeset/base/271082
> 
> Log:
>   - Move blacklists of broken TSCs out of the printcpuinfo() function
> and into the TSC probe routine.

I believe the previous code that set tsc_freq to 0 didn't fully work since
the ticker was still set to use the TSC in init_TC().

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271085 - head/lib/libgeom

2014-09-04 Thread John Baldwin
On Thursday, September 04, 2014 03:31:49 AM Benno Rice wrote:
> Author: benno
> Date: Thu Sep  4 03:31:48 2014
> New Revision: 271085
> URL: http://svnweb.freebsd.org/changeset/base/271085
> 
> Log:
>   Systems with lots of geom providers can end up with a kern.geom.confxml
>   value too large for the buffer allocated. Work around this by retrying
>   a few times with larger buffer sizes.

Are these systems having lots of changes to the GEOM tree while the sysctl 
handler is being invoked?  If the tree is static, the first call with an old 
of NULL should return the correct length in 'l' regardless of the size as it 
generates the entire buffer and SYSCTL_OUT's it.  (It doesn't do it piecemeal 
and fail on ENOMEM part way through the way some other broken sysctl handlers 
do.)

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271103 - stable/10/contrib/binutils/ld/emultempl

2014-09-04 Thread Tijl Coosemans
Author: tijl
Date: Thu Sep  4 16:05:12 2014
New Revision: 271103
URL: http://svnweb.freebsd.org/changeset/base/271103

Log:
  MFC r270757:
  
  In r253839 the default behaviour of ld(1) was changed such that all
  libraries that need to be linked into an executable or library have to be
  listed on the command line explicitly.  This commit fixes a bug in ld(1)
  where it would scan dependencies of the libraries on the command line and
  link them if needed if they were also found in ld.so.cache.
  
  The important bit of the patch is the initialisation of needed.by such that
  libraries found by scanning dependencies are marked as such and not used in
  the link.
  
  The patch is a backport of binutils git commit
  d5c8b1f8561426b41aa5330ed60f578178fe6be2
  
  The author gave permission to use it under GPLv2 terms.
  
  PR:   192062

Modified:
  stable/10/contrib/binutils/ld/emultempl/elf32.em
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/binutils/ld/emultempl/elf32.em
==
--- stable/10/contrib/binutils/ld/emultempl/elf32.emThu Sep  4 15:11:57 
2014(r271102)
+++ stable/10/contrib/binutils/ld/emultempl/elf32.emThu Sep  4 16:05:12 
2014(r271103)
@@ -541,7 +541,8 @@ EOF
 #endif
 
 static bfd_boolean
-gld${EMULATION_NAME}_check_ld_elf_hints (const char *name, int force)
+gld${EMULATION_NAME}_check_ld_elf_hints (const struct bfd_link_needed_list *l,
+int force)
 {
   static bfd_boolean initialized;
   static char *ld_elf_hints;
@@ -584,10 +585,9 @@ gld${EMULATION_NAME}_check_ld_elf_hints 
   if (ld_elf_hints == NULL)
 return FALSE;
 
-  needed.by = NULL;
-  needed.name = name;
-  return gld${EMULATION_NAME}_search_needed (ld_elf_hints, & needed,
-force);
+  needed.by = l->by;
+  needed.name = l->name;
+  return gld${EMULATION_NAME}_search_needed (ld_elf_hints, &needed, force);
 }
 EOF
 # FreeBSD
@@ -759,7 +759,8 @@ gld${EMULATION_NAME}_parse_ld_so_conf
 }
 
 static bfd_boolean
-gld${EMULATION_NAME}_check_ld_so_conf (const char *name, int force)
+gld${EMULATION_NAME}_check_ld_so_conf (const struct bfd_link_needed_list *l,
+  int force)
 {
   static bfd_boolean initialized;
   static char *ld_so_conf;
@@ -794,8 +795,8 @@ gld${EMULATION_NAME}_check_ld_so_conf (c
 return FALSE;
 
 
-  needed.by = NULL;
-  needed.name = name;
+  needed.by = l->by;
+  needed.name = l->name;
   return gld${EMULATION_NAME}_search_needed (ld_so_conf, &needed, force);
 }
 
@@ -1037,7 +1038,7 @@ if [ "x${USE_LIBPATH}" = xyes ] ; then
   case ${target} in
 *-*-freebsd* | *-*-dragonfly*)
   cat >>e${EMULATION_NAME}.c >e${EMULATION_NAME}.c 

Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Don Lewis
On  4 Sep, John Baldwin wrote:
> On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
>> On  4 Sep, John Baldwin wrote:
>> > Author: jhb
>> > Date: Thu Sep  4 01:46:06 2014
>> > New Revision: 271076
>> > URL: http://svnweb.freebsd.org/changeset/base/271076
>> > 
>> > Log:
>> >   - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c.
>> 
>> That certainly brings back memories ...
> 
> Hopefully not too traumatic. :-P

Not really.  I remember the general sense of panic when the
vulnerability was announced and then the sense of relief when the
workaround was found.  After that, I got lots of reminders because
of the boot message.

I've still got the old hardware and am often tempted to see if it will
run a recent version of FreeBSD.  I don't think I want to know how long
it would take to run buildworld post-clang.

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271085 - head/lib/libgeom

2014-09-04 Thread Benno Rice
On Sep 4, 2014, at 6:51 AM, John Baldwin  wrote:

> On Thursday, September 04, 2014 03:31:49 AM Benno Rice wrote:
>> Author: benno
>> Date: Thu Sep  4 03:31:48 2014
>> New Revision: 271085
>> URL: http://svnweb.freebsd.org/changeset/base/271085
>> 
>> Log:
>>  Systems with lots of geom providers can end up with a kern.geom.confxml
>>  value too large for the buffer allocated. Work around this by retrying
>>  a few times with larger buffer sizes.
> 
> Are these systems having lots of changes to the GEOM tree while the sysctl 
> handler is being invoked?  If the tree is static, the first call with an old 
> of NULL should return the correct length in 'l' regardless of the size as it 
> generates the entire buffer and SYSCTL_OUT's it.  (It doesn't do it piecemeal 
> and fail on ENOMEM part way through the way some other broken sysctl handlers 
> do.)

These systems have a lot of drives in them and around the time when we’re 
trying to enumerate there can be lots of activity. In the case where the tree 
hasn’t changed we’re not doing that much extra work here and it saves us having 
to retry everything that happens around the geom_getxml calls inside libgeom 
when the tree does change.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271104 - head/sys/arm/at91

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 16:40:54 2014
New Revision: 271104
URL: http://svnweb.freebsd.org/changeset/base/271104

Log:
  Wrap some long lines.

Modified:
  head/sys/arm/at91/at91_pinctrl.c

Modified: head/sys/arm/at91/at91_pinctrl.c
==
--- head/sys/arm/at91/at91_pinctrl.cThu Sep  4 16:05:12 2014
(r271103)
+++ head/sys/arm/at91/at91_pinctrl.cThu Sep  4 16:40:54 2014
(r271104)
@@ -138,8 +138,8 @@ at91_pinctrl_setup_dinfo(device_t dev, p
}
if (OF_searchencprop(OF_node_from_xref(iparent), 
"#interrupt-cells", &icells, sizeof(icells)) == -1) {
-   device_printf(dev, "Missing #interrupt-cells property, "
-   "assuming <1>\n");
+   device_printf(dev, "Missing #interrupt-cells property,"
+   " assuming <1>\n");
icells = 1;
}
if (icells < 1 || icells > nintr) {
@@ -388,19 +388,22 @@ pinctrl_walk_tree(device_t bus, phandle_
OF_getprop(node, "status", status, sizeof(status));
OF_getprop(node, "name", name, sizeof(name));
if (strcmp(status, "okay") != 0) {
-// printf("pinctrl: omitting node %s since it isn't 
active\n", name);
+// printf("pinctrl: skipping node %s status %s\n", name,
+// status);
continue;
}
len = OF_getencprop(node, "pinctrl-0", pinctrl, 
sizeof(pinctrl));
if (len <= 0) {
-// printf("pinctrl: no pinctrl-0 property for node %s, 
omitting\n", name);
+// printf("pinctrl: skipping node %s no pinctrl-0\n",
+// name, status);
continue;
}
len /= sizeof(phandle_t);
printf("pinctrl: Found active node %s\n", name);
for (i = 0; i < len; i++) {
scratch = OF_node_from_xref(pinctrl[i]);
-   npins = OF_getencprop(scratch, "atmel,pins", pins, 
sizeof(pins));
+   npins = OF_getencprop(scratch, "atmel,pins", pins,
+   sizeof(pins));
if (npins <= 0) {
printf("We're doing it wrong %s\n", name);
continue;
@@ -408,29 +411,40 @@ pinctrl_walk_tree(device_t bus, phandle_
memset(name, 0, sizeof(name));
OF_getprop(scratch, "name", name, sizeof(name));
npins /= (4 * 4);
-   printf("> need to cope with %d more pins for %s\n", 
npins, name);
+   printf("> need to cope with %d more pins for %s\n",
+   npins, name);
for (j = 0; j < npins; j++) {
uint32_t unit = pins[j * 4];
uint32_t pin = pins[j * 4 + 1];
uint32_t periph = pins[j * 4 + 2];
uint32_t flags = pins[j * 4 + 3];
-   uint32_t pio = (0xfff & sc->ranges[0].bus) 
+ 0x200 * unit;
-   printf("P%c%d %s %#x\n", unit + 'A', pin, 
periphs[periph],
-  flags);
+   uint32_t pio;
+
+   pio = (0xfff & sc->ranges[0].bus) +
+   0x200 * unit;
+   printf("P%c%d %s %#x\n", unit + 'A', pin,
+   periphs[periph], flags);
switch (periph) {
case 0:
at91_pio_use_gpio(pio, 1u << pin);
-   at91_pio_gpio_pullup(pio, 1u << pin, 
!!(flags & 1));
-   at91_pio_gpio_high_z(pio, 1u << pin, 
!!(flags & 2));
-   at91_pio_gpio_set_deglitch(pio, 1u << 
pin, !!(flags & 4));
-   // at91_pio_gpio_pulldown(pio, 1u << 
pin, !!(flags & 8));
-   // at91_pio_gpio_dis_schmidt(pio, 1u << 
pin, !!(flags & 16));
+   at91_pio_gpio_pullup(pio, 1u << pin,
+   !!(flags & 1));
+   at91_pio_gpio_high_z(pio, 1u << pin,
+   !!(flags & 2));
+   at91_pio_gpio_set_deglitch(pio,
+   1u << pin, !!(flags & 4));
+// at91_pio_gpio_pulldown(pio, 1u << pin,
+//   

svn commit: r271105 - stable/10/sys/dev/fb

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 16:51:45 2014
New Revision: 271105
URL: http://svnweb.freebsd.org/changeset/base/271105

Log:
  MFC r260047: Clean up license text
  
- Renumber Regents clauses
- Remove clause 3 and 4 from TNF license, following upstream change
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/dev/fb/boot_font.c
  stable/10/sys/dev/fb/gallant12x22.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/fb/boot_font.c
==
--- stable/10/sys/dev/fb/boot_font.cThu Sep  4 16:40:54 2014
(r271104)
+++ stable/10/sys/dev/fb/boot_font.cThu Sep  4 16:51:45 2014
(r271105)
@@ -13,13 +13,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *contributors may be used to endorse or promote products derived
- *from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED

Modified: stable/10/sys/dev/fb/gallant12x22.c
==
--- stable/10/sys/dev/fb/gallant12x22.c Thu Sep  4 16:40:54 2014
(r271104)
+++ stable/10/sys/dev/fb/gallant12x22.c Thu Sep  4 16:51:45 2014
(r271105)
@@ -17,7 +17,7 @@
  * 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *may be used to endorse or promote products derived from this software
  *without specific prior written permission.
  *
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Alexey Dokuchaev
On Thu, Sep 04, 2014 at 09:22:48AM -0700, Don Lewis wrote:
> I've still got the old hardware and am often tempted to see if it will
> run a recent version of FreeBSD.  I don't think I want to know how long
> it would take to run buildworld post-clang.

My router machine at home is Mendocino-based, runs 9-STABLE flawlessly, not
sure how long does it take to do buildworld (I don't disable Clang).

I have a couple of P55-based mobos, but never bothered to install our fresh
-CURRENT on them.  I guess I should, just to see if we still rock. ;-)

./danfe
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271106 - stable/10/share/examples/bhyve

2014-09-04 Thread Craig Rodrigues
Author: rodrigc
Date: Thu Sep  4 16:55:01 2014
New Revision: 271106
URL: http://svnweb.freebsd.org/changeset/base/271106

Log:
  MFC r270512 r270513 r270754
 - add comments which describe exit status codes of /usr/sbin/bhyve
 - move bhyvectl --destroy outside of the while loop
 - Use "file -s" so that we can run vmrun.sh against special devces such as
   /dev/md memory files systems or zvols

Modified:
  stable/10/share/examples/bhyve/vmrun.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/examples/bhyve/vmrun.sh
==
--- stable/10/share/examples/bhyve/vmrun.sh Thu Sep  4 16:51:45 2014
(r271105)
+++ stable/10/share/examples/bhyve/vmrun.sh Thu Sep  4 16:55:01 2014
(r271106)
@@ -173,13 +173,14 @@ echo "Launching virtual machine \"$vmnam
 
 virtio_diskdev="$disk_dev0"
 
+${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1
+
 while [ 1 ]; do
-   ${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1
 
-   file ${virtio_diskdev} | grep "boot sector" > /dev/null
+   file -s ${virtio_diskdev} | grep "boot sector" > /dev/null
rc=$?
if [ $rc -ne 0 ]; then
-   file ${virtio_diskdev} | grep ": Unix Fast File sys" > /dev/null
+   file -s ${virtio_diskdev} | grep ": Unix Fast File sys" > 
/dev/null
rc=$?
fi
if [ $rc -ne 0 ]; then
@@ -237,6 +238,14 @@ while [ 1 ]; do
-l com1,${console}  \
${installer_opt}\
${vmname}
+
+   # bhyve returns the following status codes:
+   #  0 - VM has been reset
+   #  1 - VM has been powered off
+   #  2 - VM has been halted
+   #  3 - VM generated a triple fault
+   #  all other non-zero status codes are errors
+   #
if [ $? -ne 0 ]; then
break
fi
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271107 - head/sys/netinet

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 17:05:57 2014
New Revision: 271107
URL: http://svnweb.freebsd.org/changeset/base/271107

Log:
  Fixes for tcp_respond() comment.

Modified:
  head/sys/netinet/tcp_subr.c

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Thu Sep  4 16:55:01 2014(r271106)
+++ head/sys/netinet/tcp_subr.c Thu Sep  4 17:05:57 2014(r271107)
@@ -539,16 +539,16 @@ tcpip_maketemplate(struct inpcb *inp)
 /*
  * Send a single message to the TCP at address specified by
  * the given TCP/IP header.  If m == NULL, then we make a copy
- * of the tcpiphdr at ti and send directly to the addressed host.
+ * of the tcpiphdr at th and send directly to the addressed host.
  * This is used to force keep alive messages out using the TCP
  * template for a connection.  If flags are given then we send
- * a message back to the TCP which originated the * segment ti,
+ * a message back to the TCP which originated the segment th,
  * and discard the mbuf containing it and any other attached mbufs.
  *
  * In any case the ack and sequence number of the transmitted
  * segment are as specified by the parameters.
  *
- * NOTE: If m != NULL, then ti must point to *inside* the mbuf.
+ * NOTE: If m != NULL, then th must point to *inside* the mbuf.
  */
 void
 tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r270999 - head/sys/kern

2014-09-04 Thread John-Mark Gurney
Gleb Smirnoff wrote this message on Thu, Sep 04, 2014 at 13:18 +0400:
> On Wed, Sep 03, 2014 at 12:10:28PM -0700, John-Mark Gurney wrote:
> J> > M> > +   if (p->p_pptr) {
> J> > M> > kp->ki_ppid = proc_realparent(p)->p_pid;
> J> > M> > -   if (p->p_flag & P_TRACED)
> J> > M> > -   kp->ki_tracer = p->p_pptr->p_pid;
> J> > M> > +   if (p->p_flag & P_TRACED)
> J> > M> > +   kp->ki_tracer = p->p_pptr->p_pid;
> J> > M> > +   }
> J> > M> >  }
> J> > M> >  
> J> > M> >  /*
> J> > M> > 
> J> > M> 
> J> > M> p_pptr must be non-NULL if P_TRACED is set. If there is no way to
> J> > M> annotate it for coverity, this change deserves a comment in the code
> J> > M> (and in retrospect previous code should have had appropriate comment 
> as
> J> > M> well).
> J> > 
> J> > Thanks for explanation.
> J> > 
> J> > I'd suggest to leave the change in, since now it is a 
> micro-micro-optimization :)
> J> 
> J> If you must leave it in, then at least compare the pointer against
> J> NULL, and collapse two if statements into one...
> J> 
> J> We should never introduce new pointer checks that aren't against NULL...
> 
> I don't see how two if statements can be collapsed? We need to assign
> ki_ppid regardless of P_TRACED flag.

Sorry, misread the diff, you are correct...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271108 - head/tools/tools/vt/keymaps

2014-09-04 Thread Stefan Esser
Author: se
Date: Thu Sep  4 17:19:16 2014
New Revision: 271108
URL: http://svnweb.freebsd.org/changeset/base/271108

Log:
  Fix debug output that has erroneously been committed with the last update.
  
  Obtained from:Jan Beich
  MFC after:3 days

Modified:
  head/tools/tools/vt/keymaps/convert-keymap.pl

Modified: head/tools/tools/vt/keymaps/convert-keymap.pl
==
--- head/tools/tools/vt/keymaps/convert-keymap.pl   Thu Sep  4 17:05:57 
2014(r271107)
+++ head/tools/tools/vt/keymaps/convert-keymap.pl   Thu Sep  4 17:19:16 
2014(r271108)
@@ -51,7 +51,7 @@ sub local_to_UCS_code
 
 my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char)));
 
-$current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n")
+$current_char = lc(chr($ucs_char))
if $current_char eq "";
 
 $ucs_char = 0x20ac # replace with Euro character
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread John-Mark Gurney
Don Lewis wrote this message on Thu, Sep 04, 2014 at 09:22 -0700:
> On  4 Sep, John Baldwin wrote:
> > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
> >> On  4 Sep, John Baldwin wrote:
> >> > Author: jhb
> >> > Date: Thu Sep  4 01:46:06 2014
> >> > New Revision: 271076
> >> > URL: http://svnweb.freebsd.org/changeset/base/271076
> >> > 
> >> > Log:
> >> >   - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c.
> >> 
> >> That certainly brings back memories ...
> > 
> > Hopefully not too traumatic. :-P
> 
> Not really.  I remember the general sense of panic when the
> vulnerability was announced and then the sense of relief when the
> workaround was found.  After that, I got lots of reminders because
> of the boot message.
> 
> I've still got the old hardware and am often tempted to see if it will
> run a recent version of FreeBSD.  I don't think I want to know how long
> it would take to run buildworld post-clang.

Almost as old:
FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014
j...@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU)
  Origin="AuthenticAMD"  Id=0x562  Family=0x5  Model=0x6  Stepping=2
  Features=0x8001bf
  AMD Features=0x400<>
 
Works great... :)

Though I'll admit I didn't buildworld on this, but another newer 
machine and then dd'd an image onto a CF card..

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271109 - stable/10/tools/tools/vt/keymaps

2014-09-04 Thread Stefan Esser
Author: se
Date: Thu Sep  4 17:21:54 2014
New Revision: 271109
URL: http://svnweb.freebsd.org/changeset/base/271109

Log:
  Fix debug output that has erroneously been committed with the last update.
  
  Obtained from:Jan Beich

Modified:
  stable/10/tools/tools/vt/keymaps/convert-keymap.pl
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/tools/vt/keymaps/convert-keymap.pl
==
--- stable/10/tools/tools/vt/keymaps/convert-keymap.pl  Thu Sep  4 17:19:16 
2014(r271108)
+++ stable/10/tools/tools/vt/keymaps/convert-keymap.pl  Thu Sep  4 17:21:54 
2014(r271109)
@@ -51,7 +51,7 @@ sub local_to_UCS_code
 
 my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char)));
 
-$current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n")
+$current_char = lc(chr($ucs_char))
if $current_char eq "";
 
 $ucs_char = 0x20ac # replace with Euro character
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r270232 - head/tools/tools/vt/keymaps

2014-09-04 Thread Stefan Esser
Am 04.09.2014 um 16:52 schrieb Jan Beich:
> Stefan Esser  writes:
> 
>> Author: se
>> Date: Wed Aug 20 17:07:41 2014
>> New Revision: 270232
>> URL: http://svnweb.freebsd.org/changeset/base/270232
>>
>> Log:
>>   The conversion tools have been further improved and some erroneous
>>   conversions have been detected and fixed.
> [...]
>>  sub local_to_UCS_code
>>  {
>>  my ($char) = @_;
>>  
>> -return prettyprint_token(ord(Encode::decode("UTF-8", 
>> local_to_UCS_string($char;
>> +my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char)));
>> +
>> +$current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n")
>> +if $current_char eq "";
> 
> The script now emits |SETCUR: 123| lines that kbdcontrol(1) doesn't like.
> Either removing debug |print| or adding STDERR seems to fix.

Hi Jan,

this is (obviously) a left-over from some tests, which I have now
removed again.

Thanks for reporting!

Best regards, STefan
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Don Lewis
On  4 Sep, Alexey Dokuchaev wrote:
> On Thu, Sep 04, 2014 at 09:22:48AM -0700, Don Lewis wrote:
>> I've still got the old hardware and am often tempted to see if it will
>> run a recent version of FreeBSD.  I don't think I want to know how long
>> it would take to run buildworld post-clang.
> 
> My router machine at home is Mendocino-based, runs 9-STABLE flawlessly, not
> sure how long does it take to do buildworld (I don't disable Clang).

My first home machine had a Pentium II CPU.  I've got a fair amount of
retired Pentium III hardware around still, mostly socket 370 (both
Coppermine and Tualatin), but there might be some slot 1 stuff as well.
My firewall is still running on a Via C3 CPU in a socket 370, but I
don't run buildworld on it.  I just use PXE to reinstall for upgrades.

> I have a couple of P55-based mobos, but never bothered to install our fresh
> -CURRENT on them.  I guess I should, just to see if we still rock. ;-)

RAM size is the probably the biggest issue.  Also, I think all of my
boards use the Dallas RTC chip with builtin battery.  These boards are
approaching twenty years old and Li battery shelf life is only about ten
years.  Unfortunately this chip is soldered to the motherboard, which
makes either the chip replacement or the battery replacement hack more
difficult.

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271110 - head/lib/libc/locale

2014-09-04 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Sep  4 17:36:21 2014
New Revision: 271110
URL: http://svnweb.freebsd.org/changeset/base/271110

Log:
  libc/locale: Remove a wrong comma.
  
  This only had some effect when debugging.
  
  Obtained from:DragonflyBSD
  MFC after:3 days

Modified:
  head/lib/libc/locale/lmonetary.c

Modified: head/lib/libc/locale/lmonetary.c
==
--- head/lib/libc/locale/lmonetary.cThu Sep  4 17:21:54 2014
(r271109)
+++ head/lib/libc/locale/lmonetary.cThu Sep  4 17:36:21 2014
(r271110)
@@ -192,7 +192,7 @@ printf( "int_curr_symbol = %s\n"
"n_cs_precedes = %d\n"
"n_sep_by_space = %d\n"
"p_sign_posn = %d\n"
-   "n_sign_posn = %d\n",
+   "n_sign_posn = %d\n"
"int_p_cs_precedes = %d\n"
"int_p_sep_by_space = %d\n"
"int_n_cs_precedes = %d\n"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Don Lewis
On  4 Sep, John-Mark Gurney wrote:
> Don Lewis wrote this message on Thu, Sep 04, 2014 at 09:22 -0700:
>> On  4 Sep, John Baldwin wrote:
>> > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
>> >> On  4 Sep, John Baldwin wrote:
>> >> > Author: jhb
>> >> > Date: Thu Sep  4 01:46:06 2014
>> >> > New Revision: 271076
>> >> > URL: http://svnweb.freebsd.org/changeset/base/271076
>> >> > 
>> >> > Log:
>> >> >   - Move the declaration of has_f00f_hack out of identcpu.c to 
>> >> > machdep.c.
>> >> 
>> >> That certainly brings back memories ...
>> > 
>> > Hopefully not too traumatic. :-P
>> 
>> Not really.  I remember the general sense of panic when the
>> vulnerability was announced and then the sense of relief when the
>> workaround was found.  After that, I got lots of reminders because
>> of the boot message.
>> 
>> I've still got the old hardware and am often tempted to see if it will
>> run a recent version of FreeBSD.  I don't think I want to know how long
>> it would take to run buildworld post-clang.
> 
> Almost as old:
> FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014
> j...@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386
> FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
> CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU)
>   Origin="AuthenticAMD"  Id=0x562  Family=0x5  Model=0x6  Stepping=2
>   Features=0x8001bf
>   AMD Features=0x400<>
>  
> Works great... :)
> 
> Though I'll admit I didn't buildworld on this, but another newer 
> machine and then dd'd an image onto a CF card..

How much RAM?  I think my boards are using 16 MB DIMMs.  Some have two
and some have four.  It's even ECC RAM.  I suspect that ZFS is out of
the question, though ...


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Alexey Dokuchaev
On Thu, Sep 04, 2014 at 10:31:24AM -0700, Don Lewis wrote:
> On 4 Sep, Alexey Dokuchaev wrote:
> > I have a couple of P55-based mobos, but never bothered to install our
> > fresh -CURRENT on them.  I guess I should, just to see if we still rock.
> 
> RAM size is the probably the biggest issue.  [...]

Moments like this I thank that FreeBSD is pretty much the same from the user
POV, be it now or 15 years ago.  It's still the same console-based install
process, with no one pouring full X11 stack on you by default.  Not sure how
much RAM is required these days to boot into single user and gpart && untar
the kernel+base distsets to obtain a minimal working system, but should not
be too much.  Did anyone try to find out the minimum?  16MB?  32MB?

./danfe

P.S.  ZFS, well yes, is probably out of question.  But UFS is very good FS
even by modern standards (no pun intended).
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271111 - in stable/10/sys: conf powerpc/conf powerpc/ps3

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 18:15:36 2014
New Revision: 27
URL: http://svnweb.freebsd.org/changeset/base/27

Log:
  MFC PS3 vt(4) console support
  
  r265871 (nwhitehorn):
  
Move the PS3 framebuffer console to use vt instead of syscons and
adjust GENERIC64 for PowerPC to use vt with it.
  
Much to my chagrin, PS3 support seems to have bitrotted somewhat since
the last time I tried it. ehci panics on attach and interrupt handling
seems to be faulty. This should be fixed soon...
  
  r269783 (dumbbell):
  
Fix two files forgotten in r269783 (vt_generate_cons_palette)
  
  r268895 (nwhitehorn):
  
Enable X11 via xf86-video-scfb on the Playstation 3. This commit made
from an xterm running for the first time on said Playstation.
  
  Approved by:  nwhitehorn
  Relnotes: yes

Modified:
  stable/10/sys/conf/files.powerpc
  stable/10/sys/powerpc/conf/GENERIC64
  stable/10/sys/powerpc/ps3/ps3_syscons.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/files.powerpc
==
--- stable/10/sys/conf/files.powerpcThu Sep  4 17:36:21 2014
(r271110)
+++ stable/10/sys/conf/files.powerpcThu Sep  4 18:15:36 2014
(r27)
@@ -221,8 +221,8 @@ powerpc/ps3/ps3bus.coptionalps3
 powerpc/ps3/ps3cdrom.c optionalps3 scbus
 powerpc/ps3/ps3disk.c  optionalps3
 powerpc/ps3/ps3pic.c   optionalps3
-powerpc/ps3/ps3_syscons.c  optionalps3 sc
-powerpc/ps3/ps3-hvcall.S   optionalps3 sc
+powerpc/ps3/ps3_syscons.c  optionalps3 vt
+powerpc/ps3/ps3-hvcall.S   optionalps3
 powerpc/pseries/phyp-hvcall.S  optionalpseries powerpc64
 powerpc/pseries/mmu_phyp.c optionalpseries powerpc64
 powerpc/pseries/phyp_console.c optionalpseries powerpc64 uart

Modified: stable/10/sys/powerpc/conf/GENERIC64
==
--- stable/10/sys/powerpc/conf/GENERIC64Thu Sep  4 17:36:21 2014
(r271110)
+++ stable/10/sys/powerpc/conf/GENERIC64Thu Sep  4 18:15:36 2014
(r27)
@@ -111,12 +111,9 @@ device sa  # Sequential Access 
(tape et
 device cd  # CD
 device pass# Passthrough device (direct ATA/SCSI access)
 
-# syscons is the default console driver, resembling an SCO console
-device sc
+# vt is the default console driver, resembling an SCO console
+device vt  # Core console driver
 device kbdmux
-optionsSC_OFWFB# OFW frame buffer
-optionsSC_DFLT_FONT# compile font in
-makeoptionsSC_DFLT_FONT=cp437
 
 # Serial (COM) ports
 device scc

Modified: stable/10/sys/powerpc/ps3/ps3_syscons.c
==
--- stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep  4 17:36:21 2014
(r271110)
+++ stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep  4 18:15:36 2014
(r27)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2003 Peter Grehan
+ * Copyright (c) 2011-2014 Nathan Whitehorn
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -29,31 +29,22 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
-#include 
 
 #include 
 #include 
 
-#include 
-#include 
 #include 
 #include 
 
-#include 
-
-#include 
-#include 
+#include 
+#include 
+#include 
 
 #include "ps3-hvcall.h"
 
@@ -65,62 +56,12 @@ __FBSDID("$FreeBSD$");
 #define  L1GPU_DISPLAY_SYNC_VSYNC  2
 #define L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP   0x0102
 
-extern u_char dflt_font_16[];
-extern u_char dflt_font_14[];
-extern u_char dflt_font_8[];
-
-static int ps3fb_configure(int flags);
+static vd_init_t ps3fb_init;
+static vd_probe_t ps3fb_probe;
 void ps3fb_remap(void);
 
-static vi_probe_t ps3fb_probe;
-static vi_init_t ps3fb_init;
-static vi_get_info_t ps3fb_get_info;
-static vi_query_mode_t ps3fb_query_mode;
-static vi_set_mode_t ps3fb_set_mode;
-static vi_save_font_t ps3fb_save_font;
-static vi_load_font_t ps3fb_load_font;
-static vi_show_font_t ps3fb_show_font;
-static vi_save_palette_t ps3fb_save_palette;
-static vi_load_palette_t ps3fb_load_palette;
-static vi_set_border_t ps3fb_set_border;
-static vi_save_state_t ps3fb_save_state;
-static vi_load_state_t ps3fb_load_state;
-static vi_set_win_org_t ps3fb_set_win_org;
-static vi_read_hw_cursor_t ps3fb_read_hw_cursor;
-static vi_set_hw_cursor_t ps3fb_set_hw_cursor;
-static vi_set_hw_cursor_shape_t ps3fb_set_hw_cursor_shape;
-static vi_blank_display_t ps3fb_blank_display;
-static vi_mmap_t ps3fb_mmap;
-static vi_ioctl_t ps3fb_ioctl;
-static vi_clear_t ps3

svn commit: r271112 - in stable/10/sys: conf dev/fb

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 18:18:29 2014
New Revision: 271112
URL: http://svnweb.freebsd.org/changeset/base/271112

Log:
  MFC vt(4) driver for Sun creator(4) framebuffers
  
  r269601 (nwhitehorn):
  
Add a simple unaccelerated vt(4) framebuffer driver for Sun
framebuffers handled by creator(4) (Sun Creator 3D, Elite 3D, etc.).
This provides vt(4) consoles on all devices currently supported by
syscons on sparc64.  The driver should also be easily adaptable to
support newer Sun framebuffers such as the XVR-500 and higher.
  
Many thanks to dumbbell@ (Jean-Sebastien Pedron) for testing this
remotely during development.
  
  r269783 (dumbbell):
  
vt(4): Colors are indexed against a console palette, not a VGA palette
  
  Sponsored by: The FreeBSD Foundation

Added:
  stable/10/sys/dev/fb/creator_vt.c
 - copied, changed from r269601, head/sys/dev/fb/creator_vt.c
Modified:
  stable/10/sys/conf/files.sparc64
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/files.sparc64
==
--- stable/10/sys/conf/files.sparc64Thu Sep  4 18:15:36 2014
(r27)
+++ stable/10/sys/conf/files.sparc64Thu Sep  4 18:18:29 2014
(r271112)
@@ -35,6 +35,7 @@ dev/atkbdc/psm.c  optionalpsm atkbdc
 dev/auxio/auxio.c  optionalauxio sbus | auxio ebus
 dev/esp/esp_sbus.c optionalesp sbus
 dev/fb/creator.c   optionalcreator sc
+dev/fb/creator_vt.coptionalcreator vt
 dev/fb/fb.coptionalsc
 dev/fb/gallant12x22.c  optionalsc
 dev/fb/machfb.coptionalmachfb sc

Copied and modified: stable/10/sys/dev/fb/creator_vt.c (from r269601, 
head/sys/dev/fb/creator_vt.c)
==
--- head/sys/dev/fb/creator_vt.cTue Aug  5 18:19:51 2014
(r269601, copy source)
+++ stable/10/sys/dev/fb/creator_vt.c   Thu Sep  4 18:18:29 2014
(r271112)
@@ -152,8 +152,9 @@ creatorfb_init(struct vt_device *vd)
sc->memh = sparc64_fake_bustag(space, phys, &sc->memt[0]);
 
/* 32-bit VGA palette */
-   vt_generate_vga_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB,
-   255, 16, 255, 8, 255, 0);
+   vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB,
+   255, 0, 255, 8, 255, 16);
+   sc->fb.fb_cmsize = 16;
 
vt_fb_init(vd);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271113 - in stable/10/sys/powerpc: aim powerpc

2014-09-04 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Thu Sep  4 18:24:47 2014
New Revision: 271113
URL: http://svnweb.freebsd.org/changeset/base/271113

Log:
  MFC r268880:
  Allow mappings of memory not previously direct-mapped by the kernel when
  calling mmap on /dev/mem and add a handler for the possible userland
  machine checks that may result. Remove some pointless and wrong copy/paste
  that has been in here for a decade as well.
  
  This results in a /dev/mem with identical semantics to the x86 version.

Modified:
  stable/10/sys/powerpc/aim/trap.c
  stable/10/sys/powerpc/powerpc/mem.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/powerpc/aim/trap.c
==
--- stable/10/sys/powerpc/aim/trap.cThu Sep  4 18:18:29 2014
(r271112)
+++ stable/10/sys/powerpc/aim/trap.cThu Sep  4 18:24:47 2014
(r271113)
@@ -269,6 +269,15 @@ trap(struct trapframe *frame)
}
break;
 
+   case EXC_MCHK:
+   /*
+* Note that this may not be recoverable for the user
+* process, depending on the type of machine check,
+* but it at least prevents the kernel from dying.
+*/
+   sig = SIGBUS;
+   break;
+
default:
trap_fatal(frame);
}

Modified: stable/10/sys/powerpc/powerpc/mem.c
==
--- stable/10/sys/powerpc/powerpc/mem.c Thu Sep  4 18:18:29 2014
(r271112)
+++ stable/10/sys/powerpc/powerpc/mem.c Thu Sep  4 18:24:47 2014
(r271113)
@@ -179,22 +179,13 @@ memmmap(struct cdev *dev, vm_ooffset_t o
 {
int i;
 
-   /*
-* /dev/mem is the only one that makes sense through this
-* interface.  For /dev/kmem any physaddr we return here
-* could be transient and hence incorrect or invalid at
-* a later time.
-*/
-   if (dev2unit(dev) != CDEV_MINOR_MEM)
-   return (-1);
-
-   /* Only direct-mapped addresses. */
-   if (mem_valid(offset, 0)
-   && pmap_dev_direct_mapped(offset, 0))
+   if (dev2unit(dev) == CDEV_MINOR_MEM)
+   *paddr = offset;
+   else if (dev2unit(dev) == CDEV_MINOR_KMEM)
+   *paddr = vtophys(offset);
+   else
return (EFAULT);
 
-   *paddr = offset;
-
for (i = 0; i < mem_range_softc.mr_ndesc; i++) {
if (!(mem_range_softc.mr_desc[i].mr_flags & MDF_ACTIVE))
continue;
@@ -231,9 +222,7 @@ ppc_mrinit(struct mem_range_softc *sc)
sc->mr_cap = 0;
sc->mr_ndesc = 8; /* XXX: Should be dynamically expandable */
sc->mr_desc = malloc(sc->mr_ndesc * sizeof(struct mem_range_desc),
-   M_MEMDESC, M_NOWAIT | M_ZERO);
-   if (sc->mr_desc == NULL)
-   panic("%s: malloc returns NULL", __func__);
+   M_MEMDESC, M_WAITOK | M_ZERO);
 }
 
 static int
@@ -328,3 +317,4 @@ memioctl(struct cdev *dev __unused, u_lo
}
return (error);
 }
+
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271114 - stable/10/sys/powerpc/ps3

2014-09-04 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Thu Sep  4 18:28:30 2014
New Revision: 271114
URL: http://svnweb.freebsd.org/changeset/base/271114

Log:
  MFC r265883,268898:
  
  Repair bitrot in PS3 memory and interrupt allocation.

Modified:
  stable/10/sys/powerpc/ps3/platform_ps3.c
  stable/10/sys/powerpc/ps3/ps3bus.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/powerpc/ps3/platform_ps3.c
==
--- stable/10/sys/powerpc/ps3/platform_ps3.cThu Sep  4 18:24:47 2014
(r271113)
+++ stable/10/sys/powerpc/ps3/platform_ps3.cThu Sep  4 18:28:30 2014
(r271114)
@@ -110,14 +110,6 @@ ps3_probe(platform_t plat)
 static int
 ps3_attach(platform_t plat)
 {
-   uint64_t junk;
-   int count;
-   struct mem_region avail_regions[2];
-
-   ps3_mem_regions(plat, NULL, NULL, avail_regions, &count);
-
-   lv1_allocate_memory(avail_regions[1].mr_size, 24 /* 16 MB pages */,
-   0, 0x04 /* any address */, &avail_regions[1].mr_start, &junk);
 
pmap_mmu_install("mmu_ps3", BUS_PROBE_SPECIFIC);
cpu_idle_hook = ps3_cpu_idle;
@@ -152,6 +144,11 @@ ps3_mem_regions(platform_t plat, struct 
/* Convert to maximum amount we can allocate in 16 MB pages */
avail_regions[1].mr_size -= avail_regions[0].mr_size;
avail_regions[1].mr_size -= avail_regions[1].mr_size % (16*1024*1024);
+
+   /* Allocate extended memory region */
+   lv1_allocate_memory(avail_regions[1].mr_size, 24 /* 16 MB pages */,
+   0, 0x04 /* any address */, &avail_regions[1].mr_start, &junk);
+
*availsz = 2;
 
if (phys != NULL) {

Modified: stable/10/sys/powerpc/ps3/ps3bus.c
==
--- stable/10/sys/powerpc/ps3/ps3bus.c  Thu Sep  4 18:24:47 2014
(r271113)
+++ stable/10/sys/powerpc/ps3/ps3bus.c  Thu Sep  4 18:28:30 2014
(r271114)
@@ -127,6 +127,7 @@ static device_method_t ps3bus_methods[] 
 
 struct ps3bus_softc {
struct rman sc_mem_rman;
+   struct rman sc_intr_rman;
struct mem_region *regions;
int rcount;
 };
@@ -328,7 +329,11 @@ ps3bus_attach(device_t self) 
sc = device_get_softc(self);
sc->sc_mem_rman.rm_type = RMAN_ARRAY;
sc->sc_mem_rman.rm_descr = "PS3Bus Memory Mapped I/O";
+   sc->sc_intr_rman.rm_type = RMAN_ARRAY;
+   sc->sc_intr_rman.rm_descr = "PS3Bus Interrupts";
rman_init(&sc->sc_mem_rman);
+   rman_init(&sc->sc_intr_rman);
+   rman_manage_region(&sc->sc_intr_rman, 0, ~0);
 
/* Get memory regions for DMA */
mem_regions(&sc->regions, &sc->rcount, &sc->regions, &sc->rcount);
@@ -562,8 +567,13 @@ ps3bus_alloc_resource(device_t bus, devi
rm = &sc->sc_mem_rman;
break;
case SYS_RES_IRQ:
-   return (resource_list_alloc(&dinfo->resources, bus, child,
-   type, rid, start, end, count, flags));
+   rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ,
+   *rid);
+   rm = &sc->sc_intr_rman;
+   adjstart = rle->start;
+   adjcount = ulmax(count, rle->count);
+   adjend = ulmax(rle->end, rle->start + adjcount - 1);
+   break;
default:
device_printf(bus, "unknown resource request from %s\n",
  device_get_nameunit(child));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271115 - stable/10/sys/dev/vt/hw/ofwfb

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 18:30:33 2014
New Revision: 271115
URL: http://svnweb.freebsd.org/changeset/base/271115

Log:
  MFC r268350 (nwhitehorn):
  
Use common vt_fb parts in ofwfb as far as we are able without
sacrificing performance.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
==
--- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c   Thu Sep  4 18:28:30 2014
(r271114)
+++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c   Thu Sep  4 18:30:33 2014
(r271115)
@@ -30,8 +30,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
+#include 
 #include 
 
 #include 
@@ -47,24 +49,17 @@ __FBSDID("$FreeBSD$");
 #include 
 
 struct ofwfb_softc {
+   struct fb_info  fb;
+
phandle_t   sc_node;
+   bus_space_tag_t sc_memt; 
 
struct ofw_pci_register sc_pciaddrs[8];
int sc_num_pciaddrs;
-
-
-   intptr_tsc_addr;
-   int sc_depth;
-   int sc_stride;
-
-   bus_space_tag_t sc_memt; 
-
-   uint32_tsc_colormap[16];
 };
 
 static vd_probe_t  ofwfb_probe;
 static vd_init_t   ofwfb_init;
-static vd_blank_t  ofwfb_blank;
 static vd_bitbltchr_t  ofwfb_bitbltchr;
 static vd_fb_mmap_tofwfb_mmap;
 
@@ -72,7 +67,7 @@ static const struct vt_driver vt_ofwfb_d
.vd_name= "ofwfb",
.vd_probe   = ofwfb_probe,
.vd_init= ofwfb_init,
-   .vd_blank   = ofwfb_blank,
+   .vd_blank   = vt_fb_blank,
.vd_bitbltchr   = ofwfb_bitbltchr,
.vd_maskbitbltchr = ofwfb_bitbltchr,
.vd_fb_mmap = ofwfb_mmap,
@@ -108,36 +103,11 @@ ofwfb_probe(struct vt_device *vd)
 }
 
 static void
-ofwfb_blank(struct vt_device *vd, term_color_t color)
-{
-   struct ofwfb_softc *sc = vd->vd_softc;
-   u_int ofs, size;
-   uint32_t c;
-
-   size = sc->sc_stride * vd->vd_height;
-   switch (sc->sc_depth) {
-   case 8:
-   c = (color << 24) | (color << 16) | (color << 8) | color;
-   for (ofs = 0; ofs < size/4; ofs++)
-   *(uint32_t *)(sc->sc_addr + 4*ofs) = c;
-   break;
-   case 32:
-   c = sc->sc_colormap[color];
-   for (ofs = 0; ofs < size; ofs++)
-   *(uint32_t *)(sc->sc_addr + 4*ofs) = c;
-   break;
-   default:
-   /* panic? */
-   break;
-   }
-}
-
-static void
 ofwfb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask,
 int bpl, vt_axis_t top, vt_axis_t left, unsigned int width,
 unsigned int height, term_color_t fg, term_color_t bg)
 {
-   struct ofwfb_softc *sc = vd->vd_softc;
+   struct fb_info *sc = vd->vd_softc;
u_long line;
uint32_t fgc, bgc;
int c;
@@ -147,8 +117,8 @@ ofwfb_bitbltchr(struct vt_device *vd, co
uint8_t  c[4];
} ch1, ch2;
 
-   fgc = sc->sc_colormap[fg];
-   bgc = sc->sc_colormap[bg];
+   fgc = sc->fb_cmap[fg];
+   bgc = sc->fb_cmap[bg];
b = m = 0;
 
/* Don't try to put off screen pixels */
@@ -156,8 +126,8 @@ ofwfb_bitbltchr(struct vt_device *vd, co
vd->vd_height))
return;
 
-   line = (sc->sc_stride * top) + left * sc->sc_depth/8;
-   if (mask == NULL && sc->sc_depth == 8 && (width % 8 == 0)) {
+   line = (sc->fb_stride * top) + left * sc->fb_bpp/8;
+   if (mask == NULL && sc->fb_bpp == 8 && (width % 8 == 0)) {
for (; height > 0; height--) {
for (c = 0; c < width; c += 8) {
b = *src++;
@@ -183,11 +153,11 @@ ofwfb_bitbltchr(struct vt_device *vd, co
if (b & 0x02) ch2.c[2] = fg;
if (b & 0x01) ch2.c[3] = fg;
 
-   *(uint32_t *)(sc->sc_addr + line + c) = ch1.l;
-   *(uint32_t *)(sc->sc_addr + line + c + 4) =
+   *(uint32_t *)(sc->fb_vbase + line + c) = ch1.l;
+   *(uint32_t *)(sc->fb_vbase + line + c + 4) =
ch2.l;
}
-   line += sc->sc_stride;
+   line += sc->fb_stride;
}
} else {
for (; height > 0; height--) {
@@ -205,13 +175,13 @@ ofwfb_bitbltchr(struct vt_device *vd, co
if ((m & 0x80) == 0)
continue;
}
-   switch(sc->sc_depth) {
+   switch(sc->fb_bpp) {
case 8:
-   

svn commit: r271116 - stable/10/sys/dev/vt/hw/ofwfb

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 18:34:22 2014
New Revision: 271116
URL: http://svnweb.freebsd.org/changeset/base/271116

Log:
  MFC r269278 (nwhitehorn):
  
Make mmap() of the console device when using ofwfb work like other
supported framebuffer drivers. This lets ofwfb work with
xf86-video-scfb and makes the driver much more generic and less
PCI-centric. This changes some user-visible behavior and will require
updates to the xorg-server port on PowerPC when using ATI graphics
cards.
  
  Relnotes: Yes
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
==
--- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c   Thu Sep  4 18:30:33 2014
(r271115)
+++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c   Thu Sep  4 18:34:22 2014
(r271116)
@@ -52,16 +52,13 @@ struct ofwfb_softc {
struct fb_info  fb;
 
phandle_t   sc_node;
+   ihandle_t   sc_handle;
bus_space_tag_t sc_memt; 
-
-   struct ofw_pci_register sc_pciaddrs[8];
-   int sc_num_pciaddrs;
 };
 
 static vd_probe_t  ofwfb_probe;
 static vd_init_t   ofwfb_init;
 static vd_bitbltchr_t  ofwfb_bitbltchr;
-static vd_fb_mmap_tofwfb_mmap;
 
 static const struct vt_driver vt_ofwfb_driver = {
.vd_name= "ofwfb",
@@ -70,7 +67,8 @@ static const struct vt_driver vt_ofwfb_d
.vd_blank   = vt_fb_blank,
.vd_bitbltchr   = ofwfb_bitbltchr,
.vd_maskbitbltchr = ofwfb_bitbltchr,
-   .vd_fb_mmap = ofwfb_mmap,
+   .vd_fb_ioctl= vt_fb_ioctl,
+   .vd_fb_mmap = vt_fb_mmap,
.vd_priority= VD_PRIORITY_GENERIC+1,
 };
 
@@ -198,17 +196,10 @@ static void
 ofwfb_initialize(struct vt_device *vd)
 {
struct ofwfb_softc *sc = vd->vd_softc;
-   char name[64];
-   ihandle_t ih;
int i;
cell_t retval;
uint32_t oldpix;
 
-   /* Open display device, thereby initializing it */
-   memset(name, 0, sizeof(name));
-   OF_package_to_path(sc->sc_node, name, sizeof(name));
-   ih = OF_open(name);
-
/*
 * Set up the color map
 */
@@ -219,7 +210,7 @@ ofwfb_initialize(struct vt_device *vd)
16, 255, 8, 255, 0);
 
for (i = 0; i < 16; i++) {
-   OF_call_method("color!", ih, 4, 1,
+   OF_call_method("color!", sc->sc_handle, 4, 1,
(cell_t)((sc->fb.fb_cmap[i] >> 16) & 0xff),
(cell_t)((sc->fb.fb_cmap[i] >> 8) & 0xff),
(cell_t)((sc->fb.fb_cmap[i] >> 0) & 0xff),
@@ -260,7 +251,6 @@ ofwfb_init(struct vt_device *vd)
struct ofwfb_softc *sc;
char type[64];
phandle_t chosen;
-   ihandle_t stdout;
phandle_t node;
uint32_t depth, height, width, stride;
uint32_t fb_phys;
@@ -275,14 +265,15 @@ ofwfb_init(struct vt_device *vd)
vd->vd_softc = sc = &ofwfb_conssoftc;
 
chosen = OF_finddevice("/chosen");
-   OF_getprop(chosen, "stdout", &stdout, sizeof(stdout));
-   node = OF_instance_to_package(stdout);
+   OF_getprop(chosen, "stdout", &sc->sc_handle, sizeof(ihandle_t));
+   node = OF_instance_to_package(sc->sc_handle);
if (node == -1) {
/*
 * The "/chosen/stdout" does not exist try
 * using "screen" directly.
 */
node = OF_finddevice("screen");
+   sc->sc_handle = OF_open("screen");
}
OF_getprop(node, "device_type", type, sizeof(type));
if (strcmp(type, "display") != 0)
@@ -291,6 +282,13 @@ ofwfb_init(struct vt_device *vd)
/* Keep track of the OF node */
sc->sc_node = node;
 
+   /*
+* Try to use a 32-bit framebuffer if possible. This may be
+* unimplemented and fail. That's fine -- it just means we are
+* stuck with the defaults.
+*/
+   OF_call_method("set-depth", sc->sc_handle, 1, 1, (cell_t)32, &i);
+
/* Make sure we have needed properties */
if (OF_getproplen(node, "height") != sizeof(height) ||
OF_getproplen(node, "width") != sizeof(width) ||
@@ -302,7 +300,7 @@ ofwfb_init(struct vt_device *vd)
OF_getprop(node, "depth", &depth, sizeof(depth));
if (depth != 8 && depth != 32)
return (CN_DEAD);
-   sc->fb.fb_bpp = depth;
+   sc->fb.fb_bpp = sc->fb.fb_depth = depth;
 
OF_getprop(node, "height", &height, sizeof(height));
OF_getprop(node, "width", &width, sizeof(width));
@@ -314,21 +312,6 @@ ofwfb_init(struct vt_device *vd)
sc->fb.fb_size = sc->fb.fb_height * sc->fb.fb_stride;
 
/*
-* Get the PCI addresses of the adapter, if present. The node may 

svn commit: r271117 - in stable/10/sys: dev/fb dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb powerpc/ps3 sys

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 18:43:40 2014
New Revision: 271117
URL: http://svnweb.freebsd.org/changeset/base/271117

Log:
  MFC fbd(4) and vt_fb disentanglement:
  
  r268472 (ray):
  
Should check fb_read method presence instead of double check for fb_write.
  
  r269620 (nwhitehorn):
  
Retire various intertwined bits of fbd(4) and vt_fb, in particular the
pixel modification indirection. No actual drivers use it and those
that might (e.g. creatorfb) use custom implementations of
vd_bitbltchr().
  
  Relnotes: No
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/dev/fb/fbd.c
  stable/10/sys/dev/vt/hw/efifb/efifb.c
  stable/10/sys/dev/vt/hw/fb/vt_early_fb.c
  stable/10/sys/dev/vt/hw/fb/vt_fb.c
  stable/10/sys/dev/vt/hw/fb/vt_fb.h
  stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
  stable/10/sys/powerpc/ps3/ps3_syscons.c
  stable/10/sys/sys/fbio.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/fb/fbd.c
==
--- stable/10/sys/dev/fb/fbd.c  Thu Sep  4 18:34:22 2014(r271116)
+++ stable/10/sys/dev/fb/fbd.c  Thu Sep  4 18:43:40 2014(r271117)
@@ -165,6 +165,10 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o
struct fb_info *info;
 
info = dev->si_drv1;
+
+   if ((info->fb_flags & FB_FLAG_NOMMAP) || info->fb_pbase == 0)
+   return (ENODEV);
+
if (offset < info->fb_size) {
*paddr = info->fb_pbase + offset;
return (0);
@@ -172,103 +176,6 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o
return (EINVAL);
 }
 
-
-static void
-vt_fb_mem_wr1(struct fb_info *sc, uint32_t o, uint8_t v)
-{
-
-   KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o));
-   *(uint8_t *)(sc->fb_vbase + o) = v;
-}
-
-static void
-vt_fb_mem_wr2(struct fb_info *sc, uint32_t o, uint16_t v)
-{
-
-   KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o));
-   *(uint16_t *)(sc->fb_vbase + o) = v;
-}
-
-static void
-vt_fb_mem_wr4(struct fb_info *sc, uint32_t o, uint32_t v)
-{
-
-   KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o));
-   *(uint32_t *)(sc->fb_vbase + o) = v;
-}
-
-static void
-vt_fb_mem_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from,
-uint32_t size)
-{
-
-   memmove((void *)(sc->fb_vbase + offset_to), (void *)(sc->fb_vbase +
-   offset_from), size);
-}
-
-static void
-vt_fb_indir_wr1(struct fb_info *sc, uint32_t o, uint8_t v)
-{
-
-   KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o));
-   sc->fb_write(sc->fb_priv, o, &v, 1);
-}
-
-static void
-vt_fb_indir_wr2(struct fb_info *sc, uint32_t o, uint16_t v)
-{
-
-   KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o));
-   sc->fb_write(sc->fb_priv, o, &v, 2);
-}
-
-static void
-vt_fb_indir_wr4(struct fb_info *sc, uint32_t o, uint32_t v)
-{
-
-   KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o));
-   sc->fb_write(sc->fb_priv, o, &v, 4);
-}
-
-static void
-vt_fb_indir_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from,
-uint32_t size)
-{
-
-   sc->copy(sc->fb_priv, offset_to, offset_from, size);
-}
-
-int
-fb_probe(struct fb_info *info)
-{
-
-   if (info->fb_size == 0)
-   return (ENXIO);
-
-   if (info->fb_write != NULL) {
-   if (info->fb_write == NULL) {
-   return (EINVAL);
-   }
-   info->fb_flags |= FB_FLAG_NOMMAP;
-   info->wr1 = &vt_fb_indir_wr1;
-   info->wr2 = &vt_fb_indir_wr2;
-   info->wr4 = &vt_fb_indir_wr4;
-   info->copy = &vt_fb_indir_copy;
-   } else if (info->fb_vbase != 0) {
-   if (info->fb_pbase == 0) {
-   info->fb_flags |= FB_FLAG_NOMMAP;
-   }
-   info->wr1 = &vt_fb_mem_wr1;
-   info->wr2 = &vt_fb_mem_wr2;
-   info->wr4 = &vt_fb_mem_wr4;
-   info->copy = &vt_fb_mem_copy;
-   } else
-   return (ENXIO);
-
-   return (0);
-}
-
-
 static int
 fb_init(struct fb_list_entry *entry, int unit)
 {
@@ -329,10 +236,6 @@ fbd_register(struct fb_info* info)
return (0);
}
 
-   err = fb_probe(info);
-   if (err)
-   return (err);
-
entry = malloc(sizeof(struct fb_list_entry), M_DEVBUF, M_WAITOK|M_ZERO);
entry->fb_info = info;
 
@@ -342,8 +245,10 @@ fbd_register(struct fb_info* info)
if (err)
return (err);
 
-   if (first)
-   vt_fb_attach(info);
+   if (first) {
+   if (vt_fb_attach(info) == CN_DEAD)
+   return (ENXIO);
+   }
 
return (0);
 }

Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c
==
--- stable/10/sys/dev/vt/hw/efifb/efifb.c  

svn commit: r271118 - stable/10/sys/dev/vt/hw/ofwfb

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 18:54:01 2014
New Revision: 271118
URL: http://svnweb.freebsd.org/changeset/base/271118

Log:
  MFC r269636 by nwhitehorn:
  
Set fb_pbase properly on PowerPC in the case where we have to guess at
the right register bank for the framebuffer. Disable the assigned-
addresses path on SPARC since it is just a hack for IBM PPC systems
and was neither relevant for nor worked on SPARC anyway.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
==
--- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c   Thu Sep  4 18:43:40 2014
(r271117)
+++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c   Thu Sep  4 18:54:01 2014
(r271118)
@@ -337,6 +337,8 @@ ofwfb_init(struct vt_device *vd)
#else
#error Unsupported platform!
#endif
+
+   sc->fb.fb_pbase = fb_phys;
} else {
/*
 * Some IBM systems don't have an address property. Try to
@@ -386,17 +388,13 @@ ofwfb_init(struct vt_device *vd)
 
#if defined(__powerpc__)
OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase);
-   #elif defined(__sparc64__)
-   OF_decode_addr(node, fb_phys, &space, &phys);
-   sc->sc_memt = &ofwfb_memt[0];
-   sc->fb.fb_vbase = sparc64_fake_bustag(space, phys, sc->sc_memt);
+   sc->fb.fb_pbase = sc->fb.fb_vbase; /* 1:1 mapped */
#else
/* No ability to interpret assigned-addresses otherwise */
return (CN_DEAD);
#endif
 }
 
-   sc->fb.fb_pbase = fb_phys;
 
ofwfb_initialize(vd);
vt_fb_init(vd);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread John-Mark Gurney
Don Lewis wrote this message on Thu, Sep 04, 2014 at 10:41 -0700:
> On  4 Sep, John-Mark Gurney wrote:
> > Don Lewis wrote this message on Thu, Sep 04, 2014 at 09:22 -0700:
> >> On  4 Sep, John Baldwin wrote:
> >> > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
> >> >> On  4 Sep, John Baldwin wrote:
> >> >> > Author: jhb
> >> >> > Date: Thu Sep  4 01:46:06 2014
> >> >> > New Revision: 271076
> >> >> > URL: http://svnweb.freebsd.org/changeset/base/271076
> >> >> > 
> >> >> > Log:
> >> >> >   - Move the declaration of has_f00f_hack out of identcpu.c to 
> >> >> > machdep.c.
> >> >> 
> >> >> That certainly brings back memories ...
> >> > 
> >> > Hopefully not too traumatic. :-P
> >> 
> >> Not really.  I remember the general sense of panic when the
> >> vulnerability was announced and then the sense of relief when the
> >> workaround was found.  After that, I got lots of reminders because
> >> of the boot message.
> >> 
> >> I've still got the old hardware and am often tempted to see if it will
> >> run a recent version of FreeBSD.  I don't think I want to know how long
> >> it would take to run buildworld post-clang.
> > 
> > Almost as old:
> > FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014
> > j...@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386
> > FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
> > CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU)
> >   Origin="AuthenticAMD"  Id=0x562  Family=0x5  Model=0x6  Stepping=2
> >   Features=0x8001bf
> >   AMD Features=0x400<>
> >  
> > Works great... :)
> > 
> > Though I'll admit I didn't buildworld on this, but another newer 
> > machine and then dd'd an image onto a CF card..
> 
> How much RAM?  I think my boards are using 16 MB DIMMs.  Some have two
> and some have four.  It's even ECC RAM.  I suspect that ZFS is out of
> the question, though ...

It has 128MB... I think I have sticks that I could up it 256MB iirc,
but for it's needs (serial terminal server), it doesn't need that much
ram...

I've attached /var/run/dmesg.boot...

The other nice thing is that USB finally works on this thing.. :)

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
Copyright (c) 1992-2014 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 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014
j...@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU)
  Origin="AuthenticAMD"  Id=0x562  Family=0x5  Model=0x6  Stepping=2
  Features=0x8001bf
  AMD Features=0x400<>
real memory  = 134217728 (128 MB)
avail memory = 120770560 (115 MB)
random:  initialized
kbd1 at kbdmux0
ACPI BIOS Error (bug): A valid RSDP was not found (20130823/tbxfroot-223)
ACPI: Table initialisation failed: AE_NOT_FOUND
ACPI: Try disabling either ACPI or apic support.
pcib0 pcibus 0 on motherboard
pir0:  on motherboard
pci0:  on pcib0
$PIR: No matching entry for 0.7.INTD
isab0:  at device 7.0 on pci0
isa0:  on isab0
atapci0:  port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x6000-0x600f at device 7.1 on pci0
ata0:  at channel 0 on atapci0
ata1:  at channel 1 on atapci0
uhci0:  port 0x6400-0x641f irq 10 at device 7.2 on 
pci0
usbus0 on uhci0
fxp0:  port 0x6800-0x683f mem 
0xe010-0xe0100fff,0xe000-0xe00f irq 11 at device 10.0 on pci0
miibus0:  on fxp0
inphy0:  PHY 1 on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
fxp0: Ethernet address: 00:d0:b7:90:17:c9
cpu0 on motherboard
attimer0:  at port 0x40-0x43 irq 0 pnpid PNP0100 on isa0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0:  at port 0x70-0x71 irq 8 pnpid PNP0b00 on isa0
Event timer "RTC" frequency 32768 Hz quality 0
atkbdc0:  at port 0x60,0x64 irq 1 pnpid PNP0303 on 
isa0
atkbd0:  irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
unknown:  can't assign resources (memory)
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 pnpid PNP0501 
on isa0
fdc0:  at port 0x3f2-0x3f3,0x3f4-0x3f5,0x3f7 irq 6 
drq 2 pnpid PNP0700 on isa0
ppc0:  at port 0x378-0x37f,0x778-0x77b irq 7 
pnpid PNP0400 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0:  on ppc0
lpt0:  on ppbus0
lpt0: Interrupt-driven port
ppi0:  on ppbus0
uart1: <16550 or compatible> at port 0x2f8-0x2ff irq 3 pnpid PNP0501 on isa0
orm0:  at iomem 0xc-0xc7fff,0xc8000-0xc8fff pnpid ORM 
on isa0
sc0:  at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0:  at port 0x3c0-0x3df iomem 0xa-0xb on isa0
unknown:  can't assign 

Re: svn commit: r271116 - stable/10/sys/dev/vt/hw/ofwfb

2014-09-04 Thread Nathan Whitehorn
There's an UPDATING entry with this commit. Could you please MFC that 
too? Thanks for following all of this.

-Nathan

On 09/04/14 11:34, Ed Maste wrote:

Author: emaste
Date: Thu Sep  4 18:34:22 2014
New Revision: 271116
URL: http://svnweb.freebsd.org/changeset/base/271116

Log:
   MFC r269278 (nwhitehorn):
   
 Make mmap() of the console device when using ofwfb work like other

 supported framebuffer drivers. This lets ofwfb work with
 xf86-video-scfb and makes the driver much more generic and less
 PCI-centric. This changes some user-visible behavior and will require
 updates to the xorg-server port on PowerPC when using ATI graphics
 cards.
   
   Relnotes:	Yes

   Sponsored by:The FreeBSD Foundation

Modified:
   stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
Directory Properties:
   stable/10/   (props changed)

Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
==
--- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c   Thu Sep  4 18:30:33 2014
(r271115)
+++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c   Thu Sep  4 18:34:22 2014
(r271116)
@@ -52,16 +52,13 @@ struct ofwfb_softc {
struct fb_info  fb;
  
  	phandle_t	sc_node;

+   ihandle_t   sc_handle;
bus_space_tag_t sc_memt;
-
-   struct ofw_pci_register sc_pciaddrs[8];
-   int sc_num_pciaddrs;
  };
  
  static vd_probe_t	ofwfb_probe;

  static vd_init_t  ofwfb_init;
  static vd_bitbltchr_t ofwfb_bitbltchr;
-static vd_fb_mmap_tofwfb_mmap;
  
  static const struct vt_driver vt_ofwfb_driver = {

.vd_name= "ofwfb",
@@ -70,7 +67,8 @@ static const struct vt_driver vt_ofwfb_d
.vd_blank   = vt_fb_blank,
.vd_bitbltchr   = ofwfb_bitbltchr,
.vd_maskbitbltchr = ofwfb_bitbltchr,
-   .vd_fb_mmap = ofwfb_mmap,
+   .vd_fb_ioctl= vt_fb_ioctl,
+   .vd_fb_mmap = vt_fb_mmap,
.vd_priority= VD_PRIORITY_GENERIC+1,
  };
  
@@ -198,17 +196,10 @@ static void

  ofwfb_initialize(struct vt_device *vd)
  {
struct ofwfb_softc *sc = vd->vd_softc;
-   char name[64];
-   ihandle_t ih;
int i;
cell_t retval;
uint32_t oldpix;
  
-	/* Open display device, thereby initializing it */

-   memset(name, 0, sizeof(name));
-   OF_package_to_path(sc->sc_node, name, sizeof(name));
-   ih = OF_open(name);
-
/*
 * Set up the color map
 */
@@ -219,7 +210,7 @@ ofwfb_initialize(struct vt_device *vd)
16, 255, 8, 255, 0);
  
  		for (i = 0; i < 16; i++) {

-   OF_call_method("color!", ih, 4, 1,
+   OF_call_method("color!", sc->sc_handle, 4, 1,
(cell_t)((sc->fb.fb_cmap[i] >> 16) & 0xff),
(cell_t)((sc->fb.fb_cmap[i] >> 8) & 0xff),
(cell_t)((sc->fb.fb_cmap[i] >> 0) & 0xff),
@@ -260,7 +251,6 @@ ofwfb_init(struct vt_device *vd)
struct ofwfb_softc *sc;
char type[64];
phandle_t chosen;
-   ihandle_t stdout;
phandle_t node;
uint32_t depth, height, width, stride;
uint32_t fb_phys;
@@ -275,14 +265,15 @@ ofwfb_init(struct vt_device *vd)
vd->vd_softc = sc = &ofwfb_conssoftc;
  
  	chosen = OF_finddevice("/chosen");

-   OF_getprop(chosen, "stdout", &stdout, sizeof(stdout));
-   node = OF_instance_to_package(stdout);
+   OF_getprop(chosen, "stdout", &sc->sc_handle, sizeof(ihandle_t));
+   node = OF_instance_to_package(sc->sc_handle);
if (node == -1) {
/*
 * The "/chosen/stdout" does not exist try
 * using "screen" directly.
 */
node = OF_finddevice("screen");
+   sc->sc_handle = OF_open("screen");
}
OF_getprop(node, "device_type", type, sizeof(type));
if (strcmp(type, "display") != 0)
@@ -291,6 +282,13 @@ ofwfb_init(struct vt_device *vd)
/* Keep track of the OF node */
sc->sc_node = node;
  
+	/*

+* Try to use a 32-bit framebuffer if possible. This may be
+* unimplemented and fail. That's fine -- it just means we are
+* stuck with the defaults.
+*/
+   OF_call_method("set-depth", sc->sc_handle, 1, 1, (cell_t)32, &i);
+
/* Make sure we have needed properties */
if (OF_getproplen(node, "height") != sizeof(height) ||
OF_getproplen(node, "width") != sizeof(width) ||
@@ -302,7 +300,7 @@ ofwfb_init(struct vt_device *vd)
OF_getprop(node, "depth", &depth, sizeof(depth));
if (depth != 8 && depth != 32)
return (CN_DEAD);
-   sc->fb.fb_bpp = depth;
+   sc->fb.fb_bpp = sc->fb.fb_depth = depth;
  
  	OF_getprop(node, "height", &height, sizeof(height));

OF_getprop(node, "width", &width, sizeof(width));
@@ -314,21 +312,6 @@ ofwfb_init(struct vt_device *vd)
  

svn commit: r271119 - head/sys/netinet

2014-09-04 Thread John Baldwin
Author: jhb
Date: Thu Sep  4 19:09:08 2014
New Revision: 271119
URL: http://svnweb.freebsd.org/changeset/base/271119

Log:
  In tcp_input(), don't acquire the pcbinfo global write lock for SYN
  packets targeting a listening socket.  Permit to reduce TCP input
  processing starvation in context of high SYN load (e.g. short-lived TCP
  connections or SYN flood).
  
  Submitted by: Julien Charbon 
  Reviewed by:  adrian, hiren, jhb, Mike Bentkofsky

Modified:
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_syncache.c

Modified: head/sys/netinet/tcp_input.c
==
--- head/sys/netinet/tcp_input.cThu Sep  4 18:54:01 2014
(r271118)
+++ head/sys/netinet/tcp_input.cThu Sep  4 19:09:08 2014
(r271119)
@@ -748,12 +748,12 @@ tcp_input(struct mbuf **mp, int *offp, i
 
/*
 * Locate pcb for segment; if we're likely to add or remove a
-* connection then first acquire pcbinfo lock.  There are two cases
+* connection then first acquire pcbinfo lock.  There are three cases
 * where we might discover later we need a write lock despite the
-* flags: ACKs moving a connection out of the syncache, and ACKs for
-* a connection in TIMEWAIT.
+* flags: ACKs moving a connection out of the syncache, ACKs for a
+* connection in TIMEWAIT and SYNs not targeting a listening socket.
 */
-   if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0) {
+   if ((thflags & (TH_FIN | TH_RST)) != 0) {
INP_INFO_WLOCK(&V_tcbinfo);
ti_locked = TI_WLOCKED;
} else
@@ -982,10 +982,11 @@ relocked:
 * now be in TIMEWAIT.
 */
 #ifdef INVARIANTS
-   if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0)
+   if ((thflags & (TH_FIN | TH_RST)) != 0)
INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
 #endif
-   if (tp->t_state != TCPS_ESTABLISHED) {
+   if (!((tp->t_state == TCPS_ESTABLISHED && (thflags & TH_SYN) == 0) ||
+   (tp->t_state == TCPS_LISTEN && (thflags & TH_SYN {
if (ti_locked == TI_UNLOCKED) {
if (INP_INFO_TRY_WLOCK(&V_tcbinfo) == 0) {
in_pcbref(inp);
@@ -1026,17 +1027,13 @@ relocked:
/*
 * When the socket is accepting connections (the INPCB is in LISTEN
 * state) we look into the SYN cache if this is a new connection
-* attempt or the completion of a previous one.  Because listen
-* sockets are never in TCPS_ESTABLISHED, the V_tcbinfo lock will be
-* held in this case.
+* attempt or the completion of a previous one.
 */
if (so->so_options & SO_ACCEPTCONN) {
struct in_conninfo inc;
 
KASSERT(tp->t_state == TCPS_LISTEN, ("%s: so accepting but "
"tp not listening", __func__));
-   INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
-
bzero(&inc, sizeof(inc));
 #ifdef INET6
if (isipv6) {
@@ -1059,6 +1056,8 @@ relocked:
 * socket appended to the listen queue in SYN_RECEIVED state.
 */
if ((thflags & (TH_RST|TH_ACK|TH_SYN)) == TH_ACK) {
+
+   INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
/*
 * Parse the TCP options here because
 * syncookies need access to the reflected
@@ -1339,8 +1338,12 @@ relocked:
syncache_add(&inc, &to, th, inp, &so, m, NULL, NULL);
/*
 * Entry added to syncache and mbuf consumed.
-* Everything already unlocked by syncache_add().
+* Only the listen socket is unlocked by syncache_add().
 */
+   if (ti_locked == TI_WLOCKED) {
+   INP_INFO_WUNLOCK(&V_tcbinfo);
+   ti_locked = TI_UNLOCKED;
+   }
INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
return (IPPROTO_DONE);
} else if (tp->t_state == TCPS_LISTEN) {

Modified: head/sys/netinet/tcp_syncache.c
==
--- head/sys/netinet/tcp_syncache.c Thu Sep  4 18:54:01 2014
(r271118)
+++ head/sys/netinet/tcp_syncache.c Thu Sep  4 19:09:08 2014
(r271119)
@@ -1118,7 +1118,6 @@ syncache_add(struct in_conninfo *inc, st
struct syncache scs;
struct ucred *cred;
 
-   INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
INP_WLOCK_ASSERT(inp);  /* listen socket */
KASSERT((th->th_flags & (TH_RST|TH_ACK|TH_SYN)) == TH_SYN,
("%s: unexpected tcp flags", __func__));
@@ -1149,13 +1148,11 @@ syncache_add(struct in_conninfo *inc, st
 #ifdef MAC
if (mac_syncache_init(&maclabel) != 0) {
INP_WUNLOCK(inp);
-   INP_INFO_WUNLOCK(&V_tcbinfo);

Re: svn commit: r271085 - head/lib/libgeom

2014-09-04 Thread John Baldwin
On Thursday, September 04, 2014 09:29:24 AM Benno Rice wrote:
> On Sep 4, 2014, at 6:51 AM, John Baldwin  wrote:
> > On Thursday, September 04, 2014 03:31:49 AM Benno Rice wrote:
> >> Author: benno
> >> Date: Thu Sep  4 03:31:48 2014
> >> New Revision: 271085
> >> URL: http://svnweb.freebsd.org/changeset/base/271085
> >> 
> >> Log:
> >>  Systems with lots of geom providers can end up with a kern.geom.confxml
> >>  value too large for the buffer allocated. Work around this by retrying
> >>  a few times with larger buffer sizes.
> > 
> > Are these systems having lots of changes to the GEOM tree while the sysctl
> > handler is being invoked?  If the tree is static, the first call with an
> > old of NULL should return the correct length in 'l' regardless of the
> > size as it generates the entire buffer and SYSCTL_OUT's it.  (It doesn't
> > do it piecemeal and fail on ENOMEM part way through the way some other
> > broken sysctl handlers do.)
> 
> These systems have a lot of drives in them and around the time when we’re
> trying to enumerate there can be lots of activity. In the case where the
> tree hasn’t changed we’re not doing that much extra work here and it saves
> us having to retry everything that happens around the geom_getxml calls
> inside libgeom when the tree does change.

I more meant that the commit message implied you needed this to handle a large 
buffer, but that shouldn't be true.  You should only need this to handle large 
changes in the size of the buffer.  (I.e. it grows by more than 4k in between 
the first two sysctl() invocations.)  Doubling the size on each iteration is 
one approach (and is fine), another common one is to keep both sysctls in the 
loop so you fetch the new size in each iteration, e.g.:

   buf = NULL;
   for (;;) {
   sysctl(..., NULL, &len);
   buf = realloc(buf, len);
   sysctl(..., buf, &len);
   }


-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r271120 - in stable/10/sys: dev/fb dev/vt dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb dev/vt/hw/vga powerpc/ps3

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 19:13:07 2014
New Revision: 271120
URL: http://svnweb.freebsd.org/changeset/base/271120

Log:
  MFC r269685 (nwhitehorn): Retire vd_maskbitbltchr.
  
The same functionality can be obtained by testing for mask != NULL in
vd_bitbltchr, which all implementations of vd_bitbltchr() were doing
anyway.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/dev/fb/creator_vt.c
  stable/10/sys/dev/vt/hw/efifb/efifb.c
  stable/10/sys/dev/vt/hw/fb/vt_fb.c
  stable/10/sys/dev/vt/hw/fb/vt_fb.h
  stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
  stable/10/sys/dev/vt/hw/vga/vt_vga.c
  stable/10/sys/dev/vt/vt.h
  stable/10/sys/dev/vt/vt_core.c
  stable/10/sys/powerpc/ps3/ps3_syscons.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/fb/creator_vt.c
==
--- stable/10/sys/dev/fb/creator_vt.c   Thu Sep  4 19:09:08 2014
(r271119)
+++ stable/10/sys/dev/fb/creator_vt.c   Thu Sep  4 19:13:07 2014
(r271120)
@@ -53,7 +53,6 @@ static const struct vt_driver vt_creator
.vd_init= creatorfb_init,
.vd_blank   = creatorfb_blank,
.vd_bitbltchr   = creatorfb_bitbltchr,
-   .vd_maskbitbltchr = creatorfb_bitbltchr,
.vd_fb_ioctl= vt_fb_ioctl,
.vd_fb_mmap = vt_fb_mmap,
.vd_priority= VD_PRIORITY_SPECIFIC

Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c
==
--- stable/10/sys/dev/vt/hw/efifb/efifb.c   Thu Sep  4 19:09:08 2014
(r271119)
+++ stable/10/sys/dev/vt/hw/efifb/efifb.c   Thu Sep  4 19:13:07 2014
(r271120)
@@ -61,7 +61,6 @@ static struct vt_driver vt_efifb_driver 
.vd_init = vt_efifb_init,
.vd_blank = vt_fb_blank,
.vd_bitbltchr = vt_fb_bitbltchr,
-   .vd_maskbitbltchr = vt_fb_maskbitbltchr,
.vd_fb_ioctl = vt_fb_ioctl,
.vd_fb_mmap = vt_fb_mmap,
/* Better than VGA, but still generic driver. */

Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c
==
--- stable/10/sys/dev/vt/hw/fb/vt_fb.c  Thu Sep  4 19:09:08 2014
(r271119)
+++ stable/10/sys/dev/vt/hw/fb/vt_fb.c  Thu Sep  4 19:13:07 2014
(r271120)
@@ -50,7 +50,6 @@ static struct vt_driver vt_fb_driver = {
.vd_init = vt_fb_init,
.vd_blank = vt_fb_blank,
.vd_bitbltchr = vt_fb_bitbltchr,
-   .vd_maskbitbltchr = vt_fb_maskbitbltchr,
.vd_drawrect = vt_fb_drawrect,
.vd_setpixel = vt_fb_setpixel,
.vd_postswitch = vt_fb_postswitch,
@@ -253,70 +252,6 @@ vt_fb_bitbltchr(struct vt_device *vd, co
uint32_t fgc, bgc, cc, o;
int c, l, bpp;
u_long line;
-   uint8_t b;
-   const uint8_t *ch;
-
-   info = vd->vd_softc;
-   bpp = FBTYPE_GET_BYTESPP(info);
-   fgc = info->fb_cmap[fg];
-   bgc = info->fb_cmap[bg];
-   b = 0;
-   if (bpl == 0)
-   bpl = (width + 7) >> 3; /* Bytes per sorce line. */
-
-   /* Don't try to put off screen pixels */
-   if (((left + width) > info->fb_width) || ((top + height) >
-   info->fb_height))
-   return;
-
-   KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer"));
-
-   line = (info->fb_stride * top) + (left * bpp);
-   for (l = 0; l < height; l++) {
-   ch = src;
-   for (c = 0; c < width; c++) {
-   if (c % 8 == 0)
-   b = *ch++;
-   else
-   b <<= 1;
-   o = line + (c * bpp);
-   cc = b & 0x80 ? fgc : bgc;
-
-   switch(bpp) {
-   case 1:
-   vt_fb_mem_wr1(info, o, cc);
-   break;
-   case 2:
-   vt_fb_mem_wr2(info, o, cc);
-   break;
-   case 3:
-   /* Packed mode, so unaligned. Byte access. */
-   vt_fb_mem_wr1(info, o, (cc >> 16) & 0xff);
-   vt_fb_mem_wr1(info, o + 1, (cc >> 8) & 0xff);
-   vt_fb_mem_wr1(info, o + 2, cc & 0xff);
-   break;
-   case 4:
-   vt_fb_mem_wr4(info, o, cc);
-   break;
-   default:
-   /* panic? */
-   break;
-   }
-   }
-   line += info->fb_stride;
-   src += bpl;
-   }
-}
-
-void
-vt_fb_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t 
*mask,
-int bpl, vt_axis_t top, vt_axis_t left, unsigned int wi

svn commit: r271121 - stable/10/sys/dev/vt/hw/vga

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 19:22:01 2014
New Revision: 271121
URL: http://svnweb.freebsd.org/changeset/base/271121

Log:
  MFC r270299 (dumbbell): vt_vga: When clearing video memory, don't read from it
  
The goal is to clear the video memory, in case an application drew to
it. So the content shouldn't be loaded in the latches, it can't be
trusted anyway.
  
This improves a bit the window switch speed.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/dev/vt/hw/vga/vt_vga.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c
==
--- stable/10/sys/dev/vt/hw/vga/vt_vga.cThu Sep  4 19:13:07 2014
(r271120)
+++ stable/10/sys/dev/vt/hw/vga/vt_vga.cThu Sep  4 19:22:01 2014
(r271121)
@@ -609,7 +609,6 @@ vga_initialize(struct vt_device *vd, int
 * planes.
 */
for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) {
-   MEM_READ1(sc, ofs);
MEM_WRITE1(sc, ofs, 0);
}
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271122 - head/sys/kern

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 19:27:30 2014
New Revision: 271122
URL: http://svnweb.freebsd.org/changeset/base/271122

Log:
  Change a very strange code in m_demote() to simple assertion.
  
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/kern/uipc_mbuf.c

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Thu Sep  4 19:22:01 2014(r271121)
+++ head/sys/kern/uipc_mbuf.c   Thu Sep  4 19:27:30 2014(r271122)
@@ -393,17 +393,13 @@ m_demote(struct mbuf *m0, int all)
struct mbuf *m;
 
for (m = all ? m0 : m0->m_next; m != NULL; m = m->m_next) {
+   KASSERT(m->m_nextpkt == NULL, ("%s: m_nextpkt in m %p, m0 %p",
+   __func__, m, m0));
if (m->m_flags & M_PKTHDR) {
m_tag_delete_chain(m, NULL);
m->m_flags &= ~M_PKTHDR;
bzero(&m->m_pkthdr, sizeof(struct pkthdr));
}
-   if (m != m0 && m->m_nextpkt != NULL) {
-   KASSERT(m->m_nextpkt == NULL,
-   ("%s: m_nextpkt not NULL", __func__));
-   m_freem(m->m_nextpkt);
-   m->m_nextpkt = NULL;
-   }
m->m_flags = m->m_flags & (M_EXT|M_RDONLY|M_NOFREE);
}
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271123 - head/sys/netinet

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 19:28:02 2014
New Revision: 271123
URL: http://svnweb.freebsd.org/changeset/base/271123

Log:
  Satisfy assertion in m_demote().
  
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/netinet/tcp_reass.c

Modified: head/sys/netinet/tcp_reass.c
==
--- head/sys/netinet/tcp_reass.cThu Sep  4 19:27:30 2014
(r271122)
+++ head/sys/netinet/tcp_reass.cThu Sep  4 19:28:02 2014
(r271123)
@@ -231,6 +231,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd
tp->t_segq = m;
if (mq && th->th_seq + *tlenp == M_TCPHDR(mq)->th_seq) {
m->m_nextpkt = mq->m_nextpkt;
+   mq->m_nextpkt = NULL;
m_catpkt(m, mq);
} else
m->m_nextpkt = mq;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271124 - head/sys/boot/fdt/dts/arm

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 19:52:17 2014
New Revision: 271124
URL: http://svnweb.freebsd.org/changeset/base/271124

Log:
  Stop setting the iomux device status to disabled, now that we have a driver.

Modified:
  head/sys/boot/fdt/dts/arm/imx6.dtsi
  head/sys/boot/fdt/dts/arm/wandboard-dual.dts
  head/sys/boot/fdt/dts/arm/wandboard-quad.dts
  head/sys/boot/fdt/dts/arm/wandboard-solo.dts

Modified: head/sys/boot/fdt/dts/arm/imx6.dtsi
==
--- head/sys/boot/fdt/dts/arm/imx6.dtsi Thu Sep  4 19:28:02 2014
(r271123)
+++ head/sys/boot/fdt/dts/arm/imx6.dtsi Thu Sep  4 19:52:17 2014
(r271124)
@@ -134,7 +134,6 @@
reg = <0x020e 0x4000>;
interrupt-parent = <&gic>;
interrupts = <32>;
-   status = "disabled";
};
 
gpio1: gpio@0209c000 {

Modified: head/sys/boot/fdt/dts/arm/wandboard-dual.dts
==
--- head/sys/boot/fdt/dts/arm/wandboard-dual.dtsThu Sep  4 19:28:02 
2014(r271123)
+++ head/sys/boot/fdt/dts/arm/wandboard-dual.dtsThu Sep  4 19:52:17 
2014(r271124)
@@ -44,7 +44,6 @@
 
SOC: soc@ {
aips@0200 { /* AIPS1 */
-   iomux@020e  { status = "disabled"; };
gpio@0209c000   { status = "okay"; };
gpio@020a   { status = "okay"; };
gpio@020a4000   { status = "okay"; };

Modified: head/sys/boot/fdt/dts/arm/wandboard-quad.dts
==
--- head/sys/boot/fdt/dts/arm/wandboard-quad.dtsThu Sep  4 19:28:02 
2014(r271123)
+++ head/sys/boot/fdt/dts/arm/wandboard-quad.dtsThu Sep  4 19:52:17 
2014(r271124)
@@ -44,7 +44,6 @@
 
SOC: soc@ {
aips@0200 { /* AIPS1 */
-   iomux@020e  { status = "disabled"; };
gpio@0209c000   { status = "okay"; };
gpio@020a   { status = "okay"; };
gpio@020a4000   { status = "okay"; };

Modified: head/sys/boot/fdt/dts/arm/wandboard-solo.dts
==
--- head/sys/boot/fdt/dts/arm/wandboard-solo.dtsThu Sep  4 19:28:02 
2014(r271123)
+++ head/sys/boot/fdt/dts/arm/wandboard-solo.dtsThu Sep  4 19:52:17 
2014(r271124)
@@ -44,7 +44,6 @@
 
SOC: soc@ {
aips@0200 { /* AIPS1 */
-   iomux@020e  { status = "disabled"; };
gpio@0209c000   { status = "okay"; };
gpio@020a   { status = "okay"; };
gpio@020a4000   { status = "okay"; };
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271125 - stable/10/gnu/lib/libgcc

2014-09-04 Thread Garrett Cooper
Author: ngie
Date: Thu Sep  4 20:02:28 2014
New Revision: 271125
URL: http://svnweb.freebsd.org/changeset/base/271125

Log:
  MFC r270216:
  
Add ${LIBC} to DPADD to fix "make checkdpadd"
  
Phabric: D632
Approved by: jmmv (mentor)

Modified:
  stable/10/gnu/lib/libgcc/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/gnu/lib/libgcc/Makefile
==
--- stable/10/gnu/lib/libgcc/Makefile   Thu Sep  4 19:52:17 2014
(r271124)
+++ stable/10/gnu/lib/libgcc/Makefile   Thu Sep  4 20:02:28 2014
(r271125)
@@ -28,6 +28,7 @@ CFLAGS+=  -DIN_GCC -DIN_LIBGCC2 -D__GCC_F
-I${.CURDIR}/../../usr.bin/cc/cc_tools
 
 LDFLAGS+=  -nodefaultlibs
+DPADD+=${LIBC}
 LDADD+=-lc
 
 OBJS=  # added to below in various ways depending on TARGET_CPUARCH
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271126 - stable/9/sbin/hastd

2014-09-04 Thread Garrett Cooper
Author: ngie
Date: Thu Sep  4 20:07:44 2014
New Revision: 271126
URL: http://svnweb.freebsd.org/changeset/base/271126

Log:
  MFC r270433:
  
Garbage collect libl dependency
  
The application links and runs without libl
  
Approved by: rpaulo (mentor)
Phabric: D673
Submitted by: trociny

Modified:
  stable/9/sbin/hastd/Makefile
Directory Properties:
  stable/9/   (props changed)
  stable/9/sbin/   (props changed)
  stable/9/sbin/hastd/   (props changed)

Modified: stable/9/sbin/hastd/Makefile
==
--- stable/9/sbin/hastd/MakefileThu Sep  4 20:02:28 2014
(r271125)
+++ stable/9/sbin/hastd/MakefileThu Sep  4 20:07:44 2014
(r271126)
@@ -29,8 +29,8 @@ CFLAGS+=-DINET
 CFLAGS+=-DINET6
 .endif
 
-DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
-LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil
+DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBPTHREAD} ${LIBUTIL}
+LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil
 .if ${MK_OPENSSL} != "no"
 DPADD+=${LIBCRYPTO}
 LDADD+=-lcrypto
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271127 - in stable/10/sys: contrib/rdma/krping dev/cxgb dev/cxgbe/iw_cxgbe modules/mlx4 modules/mlx4ib modules/mlxen ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/d...

2014-09-04 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Sep  4 20:12:36 2014
New Revision: 271127
URL: http://svnweb.freebsd.org/changeset/base/271127

Log:
  MFC r270710 and r270821:
  - Update the OFED Linux Emulation layer as a preparation for a
  hardware driver update from Mellanox Technologies.
  - Remove empty files from the OFED Linux Emulation layer.
  - Fix compile warnings related to printf() and the "%lld" and "%llx"
  format specifiers.
  - Add some missing 2-clause BSD copyrights.
  - Add "Mellanox Technologies, Ltd." to list of copyright holders.
  - Add some new compatibility files.
  - Fix order of uninit in the mlx4ib module to avoid crash at unload
  using the new module_exit_order() function.
  
  Sponsored by: Mellanox Technologies

Added:
  stable/10/sys/ofed/include/linux/cache.h
 - copied unchanged from r270710, head/sys/ofed/include/linux/cache.h
  stable/10/sys/ofed/include/linux/etherdevice.h
 - copied unchanged from r270710, head/sys/ofed/include/linux/etherdevice.h
  stable/10/sys/ofed/include/linux/kmod.h
 - copied unchanged from r270710, head/sys/ofed/include/linux/kmod.h
  stable/10/sys/ofed/include/linux/ktime.h
 - copied unchanged from r270710, head/sys/ofed/include/linux/ktime.h
  stable/10/sys/ofed/include/linux/math64.h
 - copied unchanged from r270710, head/sys/ofed/include/linux/math64.h
  stable/10/sys/ofed/include/net/if_inet6.h
 - copied unchanged from r270710, head/sys/ofed/include/net/if_inet6.h
Deleted:
  stable/10/sys/ofed/include/asm/current.h
  stable/10/sys/ofed/include/asm/semaphore.h
  stable/10/sys/ofed/include/asm/system.h
  stable/10/sys/ofed/include/linux/atomic.h
  stable/10/sys/ofed/include/linux/bitmap.h
  stable/10/sys/ofed/include/linux/ctype.h
  stable/10/sys/ofed/include/linux/init.h
  stable/10/sys/ofed/include/linux/rtnetlink.h
  stable/10/sys/ofed/include/linux/stddef.h
  stable/10/sys/ofed/include/net/addrconf.h
  stable/10/sys/ofed/include/net/arp.h
  stable/10/sys/ofed/include/net/ip6_route.h
  stable/10/sys/ofed/include/net/neighbour.h
Modified:
  stable/10/sys/contrib/rdma/krping/krping.c
  stable/10/sys/dev/cxgb/cxgb_osdep.h
  stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c
  stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c
  stable/10/sys/modules/mlx4/Makefile
  stable/10/sys/modules/mlx4ib/Makefile
  stable/10/sys/modules/mlxen/Makefile
  stable/10/sys/ofed/drivers/infiniband/core/addr.c
  stable/10/sys/ofed/drivers/infiniband/core/cm.c
  stable/10/sys/ofed/drivers/infiniband/core/device.c
  stable/10/sys/ofed/drivers/infiniband/core/iwcm.c
  stable/10/sys/ofed/drivers/infiniband/core/sa_query.c
  stable/10/sys/ofed/drivers/infiniband/core/sysfs.c
  stable/10/sys/ofed/drivers/infiniband/core/ucm.c
  stable/10/sys/ofed/drivers/infiniband/core/user_mad.c
  stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
  stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c
  stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c
  stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
  stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c
  stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c
  stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
  stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h
  stable/10/sys/ofed/drivers/net/mlx4/alloc.c
  stable/10/sys/ofed/drivers/net/mlx4/cmd.c
  stable/10/sys/ofed/drivers/net/mlx4/cq.c
  stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c
  stable/10/sys/ofed/drivers/net/mlx4/en_rx.c
  stable/10/sys/ofed/drivers/net/mlx4/eq.c
  stable/10/sys/ofed/drivers/net/mlx4/fw.c
  stable/10/sys/ofed/drivers/net/mlx4/main.c
  stable/10/sys/ofed/drivers/net/mlx4/mcg.c
  stable/10/sys/ofed/drivers/net/mlx4/mr.c
  stable/10/sys/ofed/drivers/net/mlx4/pd.c
  stable/10/sys/ofed/drivers/net/mlx4/qp.c
  stable/10/sys/ofed/drivers/net/mlx4/reset.c
  stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c
  stable/10/sys/ofed/drivers/net/mlx4/sense.c
  stable/10/sys/ofed/drivers/net/mlx4/srq.c
  stable/10/sys/ofed/drivers/net/mlx4/xrcd.c
  stable/10/sys/ofed/include/asm/atomic-long.h
  stable/10/sys/ofed/include/asm/atomic.h
  stable/10/sys/ofed/include/asm/byteorder.h
  stable/10/sys/ofed/include/asm/fcntl.h
  stable/10/sys/ofed/include/asm/io.h
  stable/10/sys/ofed/include/asm/page.h
  stable/10/sys/ofed/include/asm/pgtable.h
  stable/10/sys/ofed/include/asm/types.h
  stable/10/sys/ofed/include/asm/uaccess.h
  stable/10/sys/ofed/include/linux/bitops.h
  stable/10/sys/ofed/include/linux/cdev.h
  stable/10/sys/ofed/include/linux/clocksource.h
  stable/10/sys/ofed/include/l

svn commit: r271128 - in stable/10/sys: dev/fb dev/vt dev/vt/font dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb dev/vt/hw/vga powerpc/ps3

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 20:18:08 2014
New Revision: 271128
URL: http://svnweb.freebsd.org/changeset/base/271128

Log:
  MFC vt(4) improvements / sync with HEAD
  
  These are largely dumbbell@'s changes.  Most significantly they address
  the extreme performance degradation with VGA hardware.
  
  SVN revisions in this MFC:
269471 270290 270293 270322 270324 270329 270331 270336 270338 270340
270341 270342 270343 270388 270390 270404 270411 270412 270413 270431
270446 270448 270485 270587 270589 270613 270618 270620 270667 270702
270707 270708 270720 270721 270785 270786
  
  Detailed commit list:
  
  r270290: Test if the cursor is shown only once
  
Later, we just see if the "struct mouse_cursor" pointer is set. This
avoids the need to mess with all the conditions several times; this
has been error prone.
  
While here, rename the variable "m" to a more meaningful "cursor",
like it's done elsewhere in the code.
  
  r270293: Rename the "mouse_cursor" structure to "vt_mouse_cursor"
  
At the same time, "w" and "h" members are now called "width" and
"height". The goal is to have a more "public" structure, because it
will soon be passed as argument to a new callback, replacing
vd_bitbltchr_t.
  
  r269471 (ray):
  
Fix vt_vga driver to draw not-8-bit-aligned fonts correctly.
Still one bug here: mouse left some gaps on track when moving left.
  
  r270322:
  
Add new vd_bitblt_text_t callback, and implement it for vt_vga
  
Compared to the deprecated vd_bitbltchr_t callback, vd_bitblt_text_t
receives:
  o  the whole text buffer
  o  the dirty area
  o  the mouse cursor (map, position, colors)
  
This allows the backend to perform optimization on how to draw things.
The goal is to remove vd_bitbltchr_t and vd_putchar_t, once all driver
are converted (only vt_vga is included in this commit).
  
In vt_vga, this allows to draw the text and the cursor in one pass,
without ever reading from video memory (because it has all the context).
The main benefit is the speed improvement: no more slideshow during
boot!
  
Other bugs fixed in vt_vga are:
  o  left-most characters are drawn properly (the left-most pixels were
 missing with bold characters and some wide letters such as 'm')
  o  no more black square around the cursor
  o  no cursor flickering when the text is scrolling
  
There are still many problems to fix: the known issues are marked with
"FIXME" inside the code.
  
  r270411:
  
vt_fb: Implement vd_bitblt_text_t for vt_fb and derivatives
  
  r270412:
  
creator_fb: Implement vd_bitblt_text_t
  
  r270413: ofwfb: Implement vd_bitblt_text_t
  
  r270324: vt_vga: Clip the draw area to never draw offscreen
  
This fixes a bug when two windows use different fonts, but a longer-
term solution is required. The dirty area should be stored as pixels,
not character cells, because such coordinates don't have the same
meaning in all windows, when using different fonts.
  
  r270329: Mark new mouse position as dirty only when it's actually displayed
  
  r270331: Store cursor bitmap & colors in struct vt_device
  
This removes the need to specify them to each call to vd_bitblt_text_t
and, therefore, simplifies the API.
  
  r270336: Give the window to vd_bitblt_text_t callback
  
... instead of both the buffer and the font. Again, this simplifies
the API.
  
  r270338: The offset to center the text area is per-window now
  
The previous global offset, based on the last loaded font, had no
meaning for other windows. This caused a shifted text area, often
partly out-of-screen.
  
  r270341:  vt_vga: Remove a "FIXME" comment; the issue was solved in r270338
  
  r270340: Don't run vt_set_border() and vt_flush() concurrently
  
In the case of vt_vga, the two concurrent calls were writing to the
same VGA registers, causing incorrect refresh of the screen.
  
  r270342: Use the actual size of the mouse when marking its position as dirty
  
This fixes a bug where part of the cursor was not erased.
  
  r270343: Remove "FIXME" about multiple locking of vt_buf in vt_flush()
  
After some testing, it appears that acquiring the lock once and keeping
it longer is slower than taking it multiple times.
  
While here, fix a typo in another comment.
  
  r270388: vt_vga: Give only the character part of term_char_t to 
vga_get_cp437()
  
This fixes a bug where vga_get_cp437() was called with an invalid
argument. The screen was then filled with '?' instead of the actual
character.
  
  r270390: Fix a crash in vt_mark_mouse_position_as_dirty() when in textmode
  
In textmode, no font is loaded, thus the page fault in
vt_mark_mouse_position_as_dirty() when it wants the font width/height.
  
For now, create a fake area for the textmode. This needs to be
modified if vt_vga gains mouse sup

svn commit: r271129 - stable/10/lib/libstand/powerpc

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 20:21:30 2014
New Revision: 271129
URL: http://svnweb.freebsd.org/changeset/base/271129

Log:
  MFC r261591 (nwhitehorn):
  
Make libstand setjmp work for both 64- and 32-bit ABIs.

Modified:
  stable/10/lib/libstand/powerpc/_setjmp.S
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libstand/powerpc/_setjmp.S
==
--- stable/10/lib/libstand/powerpc/_setjmp.SThu Sep  4 20:18:08 2014
(r271128)
+++ stable/10/lib/libstand/powerpc/_setjmp.SThu Sep  4 20:21:30 2014
(r271129)
@@ -1,36 +1,115 @@
-/* $NetBSD: _setjmp.S,v 1.1 1997/03/29 20:55:53 thorpej Exp $  */
+/* $FreeBSD$  */
+/* from:   NetBSD: setjmp.S,v 1.1 1998/01/27 15:13:12 sakamoto Exp $  */
+/* from:   OpenBSD: setjmp.S,v 1.2 1996/12/28 06:22:18 rahnds Exp  */
+/* kernel version of this file, does not have signal goop */
+/* int setjmp(jmp_buf env) */
 
 #include 
 
-#if (defined(LIBC_SCCS) || defined(LIBC_RCS)) && !defined(lint)
-   .text
-   .asciz "$FreeBSD$"
+#ifdef __powerpc64__
+#define LD_REG ld
+#defineST_REG  std
+#defineREGWIDTH 8
+#else
+#defineLD_REG  lwz
+#defineST_REG  stw
+#defineREGWIDTH 4
 #endif
 
-/*
- * C library -- _setjmp, _longjmp
- *
- * _longjmp(a,v)
- * will generate a "return(v?v:1)" from the last call to
- * _setjmp(a)
- * by restoring registers from the stack.
- * The previous signal state is NOT restored.
- */
-
-ENTRY(_setjmp)
-   mflr11
-   mfcr12
-   mr  10,1
-   mr  9,2
-   stmw9,8(3)
-   li  3,0
+#define JMP_r1 1*REGWIDTH
+#define JMP_r2 2*REGWIDTH
+#define JMP_r143*REGWIDTH
+#define JMP_r15 4*REGWIDTH
+#define JMP_r16 5*REGWIDTH
+#define JMP_r17 6*REGWIDTH
+#define JMP_r18 7*REGWIDTH
+#define JMP_r19 8*REGWIDTH
+#define JMP_r20 9*REGWIDTH
+#define JMP_r21 10*REGWIDTH
+#define JMP_r22 11*REGWIDTH
+#define JMP_r23 12*REGWIDTH
+#define JMP_r24 13*REGWIDTH
+#define JMP_r25 14*REGWIDTH
+#define JMP_r26 15*REGWIDTH
+#define JMP_r27 16*REGWIDTH
+#define JMP_r28 17*REGWIDTH
+#define JMP_r29 18*REGWIDTH
+#define JMP_r30 19*REGWIDTH
+#define JMP_r31 20*REGWIDTH
+#define JMP_lr 21*REGWIDTH
+#define JMP_cr 22*REGWIDTH
+#define JMP_ctr23*REGWIDTH
+#define JMP_xer24*REGWIDTH
+#define JMP_sig25*REGWIDTH
+
+ASENTRY_NOPROF(setjmp)
+   ST_REG 31, JMP_r31(3)
+   /* r1, r2, r14-r30 */
+   ST_REG 1,  JMP_r1 (3)
+   ST_REG 2,  JMP_r2 (3)
+   ST_REG 14, JMP_r14(3)
+   ST_REG 15, JMP_r15(3)
+   ST_REG 16, JMP_r16(3)
+   ST_REG 17, JMP_r17(3)
+   ST_REG 18, JMP_r18(3)
+   ST_REG 19, JMP_r19(3)
+   ST_REG 20, JMP_r20(3)
+   ST_REG 21, JMP_r21(3)
+   ST_REG 22, JMP_r22(3)
+   ST_REG 23, JMP_r23(3)
+   ST_REG 24, JMP_r24(3)
+   ST_REG 25, JMP_r25(3)
+   ST_REG 26, JMP_r26(3)
+   ST_REG 27, JMP_r27(3)
+   ST_REG 28, JMP_r28(3)
+   ST_REG 29, JMP_r29(3)
+   ST_REG 30, JMP_r30(3)
+   /* cr, lr, ctr, xer */
+   mfcr 0
+   ST_REG 0, JMP_cr(3)
+   mflr 0
+   ST_REG 0, JMP_lr(3)
+   mfctr 0
+   ST_REG 0, JMP_ctr(3)
+   mfxer 0
+   ST_REG 0, JMP_xer(3)
+   /* f14-f31, fpscr */
+   li 3, 0
blr
 
-ENTRY(_longjmp)
-   lmw 9,8(3)
-   mtlr11
-   mtcr12
-   mr  2,9
-   mr  1,10
-   mr  3,4
+
+.extern sigsetmask
+ASENTRY_NOPROF(longjmp)
+   LD_REG 31, JMP_r31(3)
+   /* r1, r2, r14-r30 */
+   LD_REG 1,  JMP_r1 (3)
+   LD_REG 2,  JMP_r2 (3)
+   LD_REG 14, JMP_r14(3)
+   LD_REG 15, JMP_r15(3)
+   LD_REG 16, JMP_r16(3)
+   LD_REG 17, JMP_r17(3)
+   LD_REG 18, JMP_r18(3)
+   LD_REG 19, JMP_r19(3)
+   LD_REG 20, JMP_r20(3)
+   LD_REG 21, JMP_r21(3)
+   LD_REG 22, JMP_r22(3)
+   LD_REG 23, JMP_r23(3)
+   LD_REG 24, JMP_r24(3)
+   LD_REG 25, JMP_r25(3)
+   LD_REG 26, JMP_r26(3)
+   LD_REG 27, JMP_r27(3)
+   LD_REG 28, JMP_r28(3)
+   LD_REG 29, JMP_r29(3)
+   LD_REG 30, JMP_r30(3)
+   /* cr, lr, ctr, xer */
+   LD_REG 0, JMP_cr(3)
+   mtcr 0
+   LD_REG 0, JMP_lr(3)
+   mtlr 0
+   LD_REG 0, JMP_ctr(3)
+   mtctr 0
+   LD_REG 0, JMP_xer(3)
+   mtxer 0
+   /* f14-f31, fpscr */
+   mr 3, 4
blr
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271130 - in stable/10/sys/boot: . i386/efi i386/gptboot i386/gptzfsboot i386/loader i386/zfsboot libstand32 powerpc/ofw powerpc/ps3 powerpc/uboot

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 20:35:53 2014
New Revision: 271130
URL: http://svnweb.freebsd.org/changeset/base/271130

Log:
  r261567: Build a 32-bit libstand under sys/boot/
  
A 32-bit libstand is needed on 64-bit platforms for use by various
bootloaders.  Previously only the 32-bit version was built, installed
as /usr/lib/libstand.a.
  
A new 64-bit libstand consumer will arrive in the near future, so move
the bootloader-specific 32-bit version to sys/boot/libstand32/.
  
Explicitly link against this version in the 32-bit loaders.
  
  r261614: Build a 32-bit libstand under sys/boot/ for ppc64
  
This change is equivalent to r261567 for i386/amd64.
  
  Relnotes: Yes
  Sponsored by: The FreeBSD Foundation

Added:
  stable/10/sys/boot/libstand32/
 - copied from r261567, head/sys/boot/libstand32/
Modified:
  stable/10/sys/boot/Makefile.amd64
  stable/10/sys/boot/Makefile.i386
  stable/10/sys/boot/Makefile.powerpc
  stable/10/sys/boot/i386/efi/Makefile
  stable/10/sys/boot/i386/gptboot/Makefile
  stable/10/sys/boot/i386/gptzfsboot/Makefile
  stable/10/sys/boot/i386/loader/Makefile
  stable/10/sys/boot/i386/zfsboot/Makefile
  stable/10/sys/boot/powerpc/ofw/Makefile
  stable/10/sys/boot/powerpc/ps3/Makefile
  stable/10/sys/boot/powerpc/uboot/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/Makefile.amd64
==
--- stable/10/sys/boot/Makefile.amd64   Thu Sep  4 20:21:30 2014
(r271129)
+++ stable/10/sys/boot/Makefile.amd64   Thu Sep  4 20:35:53 2014
(r271130)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
 SUBDIR+=   efi
+SUBDIR+=   libstand32
 SUBDIR+=   zfs
 SUBDIR+=   userboot

Modified: stable/10/sys/boot/Makefile.i386
==
--- stable/10/sys/boot/Makefile.i386Thu Sep  4 20:21:30 2014
(r271129)
+++ stable/10/sys/boot/Makefile.i386Thu Sep  4 20:35:53 2014
(r271130)
@@ -1,4 +1,5 @@
 # $FreeBSD$
 
 SUBDIR+=   efi
+SUBDIR+=   libstand32
 SUBDIR+=   zfs

Modified: stable/10/sys/boot/Makefile.powerpc
==
--- stable/10/sys/boot/Makefile.powerpc Thu Sep  4 20:21:30 2014
(r271129)
+++ stable/10/sys/boot/Makefile.powerpc Thu Sep  4 20:35:53 2014
(r271130)
@@ -4,5 +4,6 @@
 SUBDIR+=   fdt
 .endif
 
+SUBDIR+=   libstand32
 SUBDIR+=   ofw
 SUBDIR+=   uboot

Modified: stable/10/sys/boot/i386/efi/Makefile
==
--- stable/10/sys/boot/i386/efi/MakefileThu Sep  4 20:21:30 2014
(r271129)
+++ stable/10/sys/boot/i386/efi/MakefileThu Sep  4 20:35:53 2014
(r271130)
@@ -60,6 +60,7 @@ loader.efi: loader.sym
--target=efi-app-ia32 ${.ALLSRC} ${.TARGET}
 
 LIBEFI=${.OBJDIR}/../../efi/libefi/libefi.a
+LIBSTAND=  ${.OBJDIR}/../../libstand32/libstand.a
 CFLAGS+=   -I${.CURDIR}/../libi386
 CFLAGS+=   -I${.CURDIR}/../btx/lib
 

Modified: stable/10/sys/boot/i386/gptboot/Makefile
==
--- stable/10/sys/boot/i386/gptboot/MakefileThu Sep  4 20:21:30 2014
(r271129)
+++ stable/10/sys/boot/i386/gptboot/MakefileThu Sep  4 20:35:53 2014
(r271130)
@@ -41,6 +41,8 @@ CFLAGS.gcc+=  --param max-inline-insns-si
 
 LD_FLAGS=-static -N --gc-sections
 
+LIBSTAND=  ${.OBJDIR}/../../libstand32/libstand.a
+
 # Pick up ../Makefile.inc early.
 .include 
 

Modified: stable/10/sys/boot/i386/gptzfsboot/Makefile
==
--- stable/10/sys/boot/i386/gptzfsboot/Makefile Thu Sep  4 20:21:30 2014
(r271129)
+++ stable/10/sys/boot/i386/gptzfsboot/Makefile Thu Sep  4 20:35:53 2014
(r271130)
@@ -38,6 +38,8 @@ CFLAGS.gcc+=  --param max-inline-insns-si
 
 LD_FLAGS=-static -N --gc-sections
 
+LIBSTAND=  ${.OBJDIR}/../../libstand32/libstand.a
+
 # Pick up ../Makefile.inc early.
 .include 
 

Modified: stable/10/sys/boot/i386/loader/Makefile
==
--- stable/10/sys/boot/i386/loader/Makefile Thu Sep  4 20:21:30 2014
(r271129)
+++ stable/10/sys/boot/i386/loader/Makefile Thu Sep  4 20:35:53 2014
(r271130)
@@ -69,6 +69,8 @@ LDFLAGS=  -static -Ttext 0x0
 LIBI386=   ${.OBJDIR}/../libi386/libi386.a
 CFLAGS+=   -I${.CURDIR}/..
 
+LIBSTAND=  ${.OBJDIR}/../../libstand32/libstand.a
+
 # BTX components
 CFLAGS+=   -I${.CURDIR}/../btx/lib
 

Modified: stable/10/sys/boot/i386/zfsboot/Makefile
==
--- stable

svn commit: r271131 - stable/10/sys/boot/libstand32

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 20:44:41 2014
New Revision: 271131
URL: http://svnweb.freebsd.org/changeset/base/271131

Log:
  MFC libstand32 clean target fixes
  
  r269029 (sbruno):
  
Update so that clean target in sys/boot will delete the symlink
created for machine
  
  r269036 (sbruno):
  
Delete the entire cleandepend/cleanmachine target thing now that its
been cleared out in r269029

Modified:
  stable/10/sys/boot/libstand32/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/libstand32/Makefile
==
--- stable/10/sys/boot/libstand32/Makefile  Thu Sep  4 20:35:53 2014
(r271130)
+++ stable/10/sys/boot/libstand32/Makefile  Thu Sep  4 20:44:41 2014
(r271131)
@@ -186,11 +186,8 @@ SRCS+= nandfs.c
 .include 
 
 .if ${MACHINE_CPUARCH} == "amd64"
+CLEANFILES+= machine
 beforedepend ${OBJS}: machine
-cleandepend: cleanmachine
-cleanmachine:
-   rm -f machine
-
 machine:
-   ln -s ${.CURDIR}/../../i386/include machine
+   ln -fs ${.CURDIR}/../../i386/include machine
 .endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271132 - in stable/10/sys: boot/i386/efi boot/i386/libi386 boot/ia64/common boot/powerpc/ofw boot/powerpc/ps3 boot/sparc64/loader boot/uboot/common boot/userboot/userboot i386/xen sys

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 20:47:14 2014
New Revision: 271132
URL: http://svnweb.freebsd.org/changeset/base/271132

Log:
  MFC r263005 by royger: howto_names: unify declaration

Added:
  stable/10/sys/sys/boot.h
 - copied unchanged from r263005, head/sys/sys/boot.h
Modified:
  stable/10/sys/boot/i386/efi/bootinfo.c
  stable/10/sys/boot/i386/libi386/bootinfo.c
  stable/10/sys/boot/ia64/common/bootinfo.c
  stable/10/sys/boot/powerpc/ofw/metadata.c
  stable/10/sys/boot/powerpc/ps3/metadata.c
  stable/10/sys/boot/sparc64/loader/metadata.c
  stable/10/sys/boot/uboot/common/metadata.c
  stable/10/sys/boot/userboot/userboot/bootinfo.c
  stable/10/sys/i386/xen/xen_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/i386/efi/bootinfo.c
==
--- stable/10/sys/boot/i386/efi/bootinfo.c  Thu Sep  4 20:44:41 2014
(r271131)
+++ stable/10/sys/boot/i386/efi/bootinfo.c  Thu Sep  4 20:47:14 2014
(r271132)
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -41,29 +42,6 @@ __FBSDID("$FreeBSD$");
 #include "libi386.h"
 #include 
 
-/*
- * Return a 'boothowto' value corresponding to the kernel arguments in
- * (kargs) and any relevant environment variables.
- */
-static struct 
-{
-   const char  *ev;
-   int mask;
-} howto_names[] = {
-   { "boot_askname",   RB_ASKNAME},
-   { "boot_cdrom", RB_CDROM},
-   { "boot_ddb",   RB_KDB},
-   { "boot_dfltroot",  RB_DFLTROOT},
-   { "boot_gdb",   RB_GDB},
-   { "boot_multicons", RB_MULTIPLE},
-   { "boot_mute",  RB_MUTE},
-   { "boot_pause", RB_PAUSE},
-   { "boot_serial",RB_SERIAL},
-   { "boot_single",RB_SINGLE},
-   { "boot_verbose",   RB_VERBOSE},
-   { NULL, 0}
-};
-
 static const char howto_switches[] = "aCdrgDmphsv";
 static int howto_masks[] = {
RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE,

Modified: stable/10/sys/boot/i386/libi386/bootinfo.c
==
--- stable/10/sys/boot/i386/libi386/bootinfo.c  Thu Sep  4 20:44:41 2014
(r271131)
+++ stable/10/sys/boot/i386/libi386/bootinfo.c  Thu Sep  4 20:47:14 2014
(r271132)
@@ -31,33 +31,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include "bootstrap.h"
 #include "libi386.h"
 #include "btxv86.h"
 
-/*
- * Return a 'boothowto' value corresponding to the kernel arguments in
- * (kargs) and any relevant environment variables.
- */
-static struct 
-{
-const char *ev;
-intmask;
-} howto_names[] = {
-{"boot_askname",   RB_ASKNAME},
-{"boot_cdrom", RB_CDROM},
-{"boot_ddb",   RB_KDB},
-{"boot_dfltroot",  RB_DFLTROOT},
-{"boot_gdb",   RB_GDB},
-{"boot_multicons", RB_MULTIPLE},
-{"boot_mute",  RB_MUTE},
-{"boot_pause", RB_PAUSE},
-{"boot_serial",RB_SERIAL},
-{"boot_single",RB_SINGLE},
-{"boot_verbose",   RB_VERBOSE},
-{NULL, 0}
-};
-
 int
 bi_getboothowto(char *kargs)
 {

Modified: stable/10/sys/boot/ia64/common/bootinfo.c
==
--- stable/10/sys/boot/ia64/common/bootinfo.c   Thu Sep  4 20:44:41 2014
(r271131)
+++ stable/10/sys/boot/ia64/common/bootinfo.c   Thu Sep  4 20:47:14 2014
(r271132)
@@ -33,35 +33,13 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 
 #include "libia64.h"
 
-/*
- * Return a 'boothowto' value corresponding to the kernel arguments in
- * (kargs) and any relevant environment variables.
- */
-static struct 
-{
-   const char  *ev;
-   int mask;
-} howto_names[] = {
-   { "boot_askname",   RB_ASKNAME},
-   { "boot_cdrom", RB_CDROM},
-   { "boot_ddb",   RB_KDB},
-   { "boot_dfltroot",  RB_DFLTROOT},
-   { "boot_gdb",   RB_GDB},
-   { "boot_multicons", RB_MULTIPLE},
-   { "boot_mute",  RB_MUTE},
-   { "boot_pause", RB_PAUSE},
-   { "boot_serial",RB_SERIAL},
-   { "boot_single",RB_SINGLE},
-   { "boot_verbose",   RB_VERBOSE},
-   { NULL, 0}
-};
-
 static const char howto_switches[] = "aCdrgDmphsv";
 static int howto_masks[] = {
RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE,

Modified: stable/10/sys/boot/powerpc/ofw/metadata.c
==
--- stable/10/sys/boot/powerpc/ofw/metadata.c   Thu Sep  4 20:44:41 2014
(r271131)
+++ stable/10/sys/boot/powerpc/ofw/metadata.c   Thu Sep  4 20:47:14 2014
(r271132)
@@ -33,35 +33,13 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 

svn commit: r271133 - in head/sys/gnu/dts/include/dt-bindings: clk clock dma gpio input interrupt-controller mfd phy pinctrl pwm reset reset-controller soc sound spmi thermal

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 20:48:16 2014
New Revision: 271133
URL: http://svnweb.freebsd.org/changeset/base/271133

Log:
  Update bindings to latest vendor branch representing 3.17-rc2 level of
  Linux DTS API.

Added:
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clk/ti-dra7-atl.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/at91.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/bcm21664.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/bcm281xx.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/berlin2.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/berlin2q.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/clps711x-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/exynos-audss-clk.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/exynos3250.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/exynos5260-clk.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/exynos5410.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/hip04-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/hix5hd2-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx1-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx21-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx27-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx6qdl-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx6sx-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/lsi,axm5516-clks.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-apq8084.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-ipq806x.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,mmcc-apq8084.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/r7s72100-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/r8a7779-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/rk3066a-cru.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru-common.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/rk3288-cru.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s3c2410.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s3c2412.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s3c2443.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s5pv210-audss.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s5pv210.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/stih415-clks.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/stih416-clks.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/dma/nbpfaxi.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/mfd/palmas.h
 - copied from r270866, vendor/device-tree/dist/include/dt-bindings/phy/
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h
 - copied from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset-controller/
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset/altr,rst-mgr.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset/qcom,gcc-apq8084.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset/qcom,gcc-ipq806x.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset/qcom,mmcc-apq8084.h
 - copied from r270866, vendor/device-tree/dist/include/dt-bindings/soc/
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/sound/tlv320aic31xx-micbias.h
 - copied from r270866, vendor/device-tree/dist/include/dt-bindings/

svn commit: r271134 - stable/10/lib/libstand

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 20:49:11 2014
New Revision: 271134
URL: http://svnweb.freebsd.org/changeset/base/271134

Log:
  MFC r269077 (sbruno): libstand qdivrem warning fixes
  
libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not
true on amd64 I'm not quite positive this is the "correct" solution for
this but it does seem to compile and shut up the spew of warnings when
compiling libstand for userboot.
  
Add two _Static_asserts() so that in the future somebody will get a compile
failure if an architecture develops that violates the assumptions of this
code. (strongly suggested by jmg)
  
Change commetns to indicate int types instead of long.  (noted by ian in
phabric review)
  
Phabric:https://phabric.freebsd.org/D443

Modified:
  stable/10/lib/libstand/qdivrem.c
  stable/10/lib/libstand/quad.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libstand/qdivrem.c
==
--- stable/10/lib/libstand/qdivrem.cThu Sep  4 20:48:16 2014
(r271133)
+++ stable/10/lib/libstand/qdivrem.cThu Sep  4 20:49:11 2014
(r271134)
@@ -46,14 +46,13 @@ __FBSDID("$FreeBSD$");
 #defineB   (1 << HALF_BITS)/* digit base */
 
 /* Combine two `digits' to make a single two-digit number. */
-#defineCOMBINE(a, b) (((u_long)(a) << HALF_BITS) | (b))
+#defineCOMBINE(a, b) (((u_int)(a) << HALF_BITS) | (b))
+
+_Static_assert(sizeof(int) / 2 == sizeof(short),
+   "Bitwise functions in libstand are broken on this architecture\n");
 
 /* select a type for digits in base B: use unsigned short if they fit */
-#if ULONG_MAX == 0x && USHRT_MAX >= 0x
 typedef unsigned short digit;
-#else
-typedef u_long digit;
-#endif
 
 /*
  * Shift p[0]..p[len] left `sh' bits, ignoring any bits that
@@ -74,7 +73,7 @@ shl(digit *p, int len, int sh)
  * __qdivrem(u, v, rem) returns u/v and, optionally, sets *rem to u%v.
  *
  * We do this in base 2-sup-HALF_BITS, so that all intermediate products
- * fit within u_long.  As a consequence, the maximum length dividend and
+ * fit within u_int.  As a consequence, the maximum length dividend and
  * divisor are 4 `digits' in this base (they are shorter if they have
  * leading zeros).
  */
@@ -85,7 +84,7 @@ __qdivrem(uq, vq, arq)
union uu tmp;
digit *u, *v, *q;
digit v1, v2;
-   u_long qhat, rhat, t;
+   u_int qhat, rhat, t;
int m, n, d, j, i;
digit uspace[5], vspace[5], qspace[5];
 
@@ -136,7 +135,7 @@ __qdivrem(uq, vq, arq)
v[4] = LHALF(tmp.ul[L]);
for (n = 4; v[1] == 0; v++) {
if (--n == 1) {
-   u_long rbj; /* r*B+u[j] (not root boy jim) */
+   u_int rbj;  /* r*B+u[j] (not root boy jim) */
digit q1, q2, q3, q4;
 
/*
@@ -212,7 +211,7 @@ __qdivrem(uq, vq, arq)
rhat = uj1;
goto qhat_too_big;
} else {
-   u_long nn = COMBINE(uj0, uj1);
+   u_int nn = COMBINE(uj0, uj1);
qhat = nn / v1;
rhat = nn % v1;
}

Modified: stable/10/lib/libstand/quad.h
==
--- stable/10/lib/libstand/quad.h   Thu Sep  4 20:48:16 2014
(r271133)
+++ stable/10/lib/libstand/quad.h   Thu Sep  4 20:49:11 2014
(r271134)
@@ -54,6 +54,9 @@
 #include 
 #include 
 
+_Static_assert(sizeof(quad_t) == sizeof(int) * 2,
+   "Bitwise function in libstand are broken on this architecture\n");
+
 /*
  * Depending on the desired operation, we view a `long long' (aka quad_t) in
  * one or more of the following formats.
@@ -61,8 +64,8 @@
 union uu {
quad_t  q;  /* as a (signed) quad */
quad_t  uq; /* as an unsigned quad */
-   longsl[2];  /* as two signed longs */
-   u_long  ul[2];  /* as two unsigned longs */
+   int sl[2];  /* as two signed ints */
+   u_int   ul[2];  /* as two unsigned ints */
 };
 
 /*
@@ -77,8 +80,7 @@ union uu {
  * and assembly.
  */
 #defineQUAD_BITS   (sizeof(quad_t) * CHAR_BIT)
-#defineLONG_BITS   (sizeof(long) * CHAR_BIT)
-#defineHALF_BITS   (sizeof(long) * CHAR_BIT / 2)
+#defineHALF_BITS   (sizeof(int) * CHAR_BIT / 2)
 
 /*
  * Extract high and low shortwords from longword, and move low shortword of
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271135 - in stable/10: lib/libstand sys/boot sys/boot/amd64 sys/boot/amd64/efi sys/boot/efi sys/boot/efi/include sys/boot/efi/include/amd64 sys/boot/efi/libefi sys/boot/ficl sys/boot/f...

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 21:01:10 2014
New Revision: 271135
URL: http://svnweb.freebsd.org/changeset/base/271135

Log:
  MFC UEFI loader
  
  This MFC consists of the following SVN revisions:
258741 261568 261603 261668 263115 263117 263968 264078 264087 264088
264092 264095 264115 264132 264208 264261 264262 264263 264319 265028
265057 268974
  
  Detailed commit messages:
  
  r258741: Note that libstand is 32-bit on amd64 and powerpc64
  
  r261568: Build libstand as a 64-bit library on amd64
  
The 32-bit bootloaders now link against libstand.a in
sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a
to be 32-bit.
  
  r261603: Don't force efi to a 32-bit build on amd64
  
  r261668: Build libstand as a 64-bit library on ppc64
  
The 32-bit bootloaders now link against libstand.a in
sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a
to be 32-bit.
  
This is equivalent to r261568 for amd64.
  
  r263115: Add amd64 EFI headers
  
  r263117: Connect 64-bit boot ficl to the build
  
It is not yet used, but this will ensure it doesn't get broken.
  
  r263968: Use EFI types for EFI values (silences warnings).
  
EFI UINTN is actually a 64-bit type on 64-bit processors.
  
  r264078: Put each source file on a separate line
  
This will simplify rebasing the amd64 UEFI patch set.
  
  r264087: Build boot/ficl as 64-bit library on amd64
  
The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32,
as is done with libstand32.  The native 64-bit ficl will be used by the
upcoming UEFI loader.
  
  r264088: Merge efilib changes from projects/uefi
  
r247216: Add the ability for a device to have an "alias" handle.
  
r247379: Fix network device registration.
  
r247380: Adjust our load device when we boot from CD under UEFI.
  
  The process for booting from a CD under UEFI involves adding a FAT
  filesystem containing your loader code as an El Torito boot image.
  When UEFI detects this, it provides a block IO instance that points
  at the FAT filesystem as a child of the device that represents the CD
  itself. The problem being that the CD device is flagged as a "raw
  device" while the boot image is flagged as a "logical partition".
  The existing EFI partition code only looks for logical partitions and
  so the CD filesystem was rendered invisible.
  
  To fix this, check the type of each block IO device. If it's found to
  be a CD, and thus an El Torito boot image, look up its parent device
  and add that instead so that the loader will then load the kernel from
  the CD filesystem.  This is done by using the handle for the boot
  filesystem as an alias.
  
  Something similar to this will be required for booting from other media
  as well as the loader will live in the EFI system partition, not on the
  partition containing the kernel.
  
r247381: Remove a scatalogical debug printf that crept in.
  
  r264092: Add -fPIC for amd64
  
  r264095: Support UEFI booting on amd64 via loader.efi
  
This is largely the work from the projects/uefi branch, with some
additional refinements.  This is derived from (and replaces) the
original i386 efi implementation; i386 support will be restored later.
  
Specific revisions of note from projects/uefi:
  
r247380:
  
  Adjust our load device when we boot from CD under UEFI.
  
  The process for booting from a CD under UEFI involves adding a FAT
  filesystem containing your loader code as an El Torito boot image.
  When UEFI detects this, it provides a block IO instance that points at
  the FAT filesystem as a child of the device that represents the CD
  itself. The problem being that the CD device is flagged as a "raw
  device" while the boot image is flagged as a "logical partition". The
  existing EFI partition code only looks for logical partitions and so
  the CD filesystem was rendered invisible.
  
  To fix this, check the type of each block IO device. If it's found to
  be a CD, and thus an El Torito boot image, look up its parent device
  and add that instead so that the loader will then load the kernel from
  the CD filesystem.  This is done by using the handle for the boot
  filesystem as an alias.
  
  Something similar to this will be required for booting from other
  media as well as the loader will live in the EFI system partition, not
  on the partition containing the kernel.
  
r246231:
  
  Add necessary code to hand off from loader to an amd64 kernel.
  
r246335:
  
  Grab the EFI memory map and store it as module metadata on the kernel.
  
  This is the same approach used to provide the BIOS SMAP to the kernel.
  
r246336:
  
  Pass the ACPI table metadata via hints so the kernel ACPI code can
  find them.
  
r246608:
  
  Rework copy r

svn commit: r271136 - in stable/10/sys/boot/amd64: . boot1.efi

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 21:05:04 2014
New Revision: 271136
URL: http://svnweb.freebsd.org/changeset/base/271136

Log:
  MFC boot1.efi stub loader
  
  r264391 (nwhitehorn):
  
Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp
from the PowerPC port with all the Open Firmware bits removed and
replaced by their EFI counterparts. On the whole, I think I prefer
Open Firmware.
  
This code is supposed to be an immutable shim that sits on the EFI
system partition, loads /boot/loader.efi from UFS and tells the real
loader what disk/partition to look at. It finds the UFS root partition
by the somewhat braindead approach of picking the first UFS partition
it can find. Better approaches are called for, but this works for now.
This shim loader will also be useful for secure boot in the future,
which will require some rearchitecture.
  
  r264403 (nwhitehorn):
  
Fix buildworld. I had some local bits in my build tree that caused
this to work by accident.
  
  r264404 (nwhitehorn):
  
Add my copyright here. Most of this is unmodified from the original
sparc64 version, but at least some indication of changes that postdate
the actual invention of EFI is probably a good idea.
  
  r264414 (nwhitehorn):
  
Apparently some of the i386 boot blocks are so close to full that
adding single lines to ufsread.c spills them over. Duplicate a whole
bunch of code to get file sizes into boot1.efi/boot1.c rather than
modifying ufsread.c.
  
  r264975 (nwhitehorn):
  
Add generation of an EFI filesystem to hold boot1.efi. This is a near-
exact copy of the code from boot1.chrp again.
  
The resulting image is installed to /boot/boot1.efifat. If dd'ed to an
800K "efi" partition, it should result in a bootable system.
  
  r268975 (sbruno): Remove boot1.efi during clean target.
  
  Relnotes: Yes
  Sponsored by: The FreeBSD Foundation

Added:
  stable/10/sys/boot/amd64/boot1.efi/
 - copied from r264391, head/sys/boot/amd64/boot1.efi/
  stable/10/sys/boot/amd64/boot1.efi/Makefile.fat
 - copied unchanged from r264975, head/sys/boot/amd64/boot1.efi/Makefile.fat
  stable/10/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu
 - copied unchanged from r264975, 
head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu
  stable/10/sys/boot/amd64/boot1.efi/generate-fat.sh
 - copied unchanged from r264975, 
head/sys/boot/amd64/boot1.efi/generate-fat.sh
Modified:
  stable/10/sys/boot/amd64/Makefile
  stable/10/sys/boot/amd64/boot1.efi/Makefile
  stable/10/sys/boot/amd64/boot1.efi/boot1.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/amd64/Makefile
==
--- stable/10/sys/boot/amd64/Makefile   Thu Sep  4 21:01:10 2014
(r271135)
+++ stable/10/sys/boot/amd64/Makefile   Thu Sep  4 21:05:04 2014
(r271136)
@@ -2,6 +2,6 @@
 
 .include 
 
-SUBDIR=efi
+SUBDIR=efi boot1.efi
 
 .include 

Modified: stable/10/sys/boot/amd64/boot1.efi/Makefile
==
--- head/sys/boot/amd64/boot1.efi/Makefile  Sun Apr 13 01:14:25 2014
(r264391)
+++ stable/10/sys/boot/amd64/boot1.efi/Makefile Thu Sep  4 21:05:04 2014
(r271136)
@@ -22,11 +22,11 @@ CFLAGS+=-I${.CURDIR}/../../efi/include/
 CFLAGS+=   -I${.CURDIR}/../../../contrib/dev/acpica/include
 CFLAGS+=   -I${.CURDIR}/../../..
 
-# Always add MI sources 
-.PATH: ${.CURDIR}/../../common ../efi
+# Always add MI sources and REGULAR efi loader bits
+.PATH: ${.CURDIR}/../efi ${.CURDIR}/../../common
 CFLAGS+=   -I${.CURDIR}/../../common
 
-FILES= boot1.efi
+FILES= boot1.efi boot1.efifat
 FILESMODE_boot1.efi=   ${BINMODE}
 
 LDSCRIPT=  ${.CURDIR}/../efi/ldscript.${MACHINE_CPUARCH}
@@ -55,13 +55,29 @@ boot1.efi: loader.sym
 
 CFLAGS+=   -I${.CURDIR}/../../common
 
+boot1.o: ${.CURDIR}/../../common/ufsread.c
+
+# The following inserts out objects into a template FAT file system
+# created by generate-fat.sh
+
+.include "${.CURDIR}/Makefile.fat"
+
+boot1.efifat: boot1.efi
+   echo ${.OBJDIR}
+   uudecode ${.CURDIR}/fat.tmpl.bz2.uu
+   mv fat.tmpl.bz2 ${.TARGET}.bz2
+   bzip2 -f -d ${.TARGET}.bz2
+   dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc
+
+CLEANFILES= boot1.efifat
+
 .endif # ${COMPILER_TYPE} != "gcc"
 
 .include 
 
 beforedepend ${OBJS}: machine x86
 
-CLEANFILES+=   machine x86
+CLEANFILES+=   machine x86 boot1.efi
 
 machine:
ln -sf ${.CURDIR}/../../../amd64/include machine

Copied: stable/10/sys/boot/amd64/boot1.efi/Makefile.fat (from r264975, 
head/sys/boot/amd64/boot1.efi/Makefile.fat)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/boot/amd64/boot1.efi/Makefil

svn commit: r271137 - in head/sys: amd64/conf conf i386/conf

2014-09-04 Thread Mark Johnston
Author: markj
Date: Thu Sep  4 21:06:33 2014
New Revision: 271137
URL: http://svnweb.freebsd.org/changeset/base/271137

Log:
  Add mrsas(4) to GENERIC for i386 and amd64.
  
  Approved by:  ambrisko, kadesai
  MFC after:3 days

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/conf/NOTES
  head/sys/i386/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Thu Sep  4 21:05:04 2014(r271136)
+++ head/sys/amd64/conf/GENERIC Thu Sep  4 21:06:33 2014(r271137)
@@ -164,6 +164,7 @@ device  aacraid # Adaptec by 
PMC RAID
 device ida # Compaq Smart RAID
 device mfi # LSI MegaRAID SAS
 device mlx # Mylex DAC960 family
+device mrsas   # LSI/Avago MegaRAID SAS/SATA, 6Gb/s 
and 12Gb/s
 #XXX pointer/int warnings
 #devicepst # Promise Supertrak SX6000
 device twe # 3ware ATA RAID

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Thu Sep  4 21:05:04 2014(r271136)
+++ head/sys/conf/NOTES Thu Sep  4 21:06:33 2014(r271137)
@@ -1677,6 +1677,7 @@ deviceamrp# SCSI Passthrough 
interfa
 device mfi # LSI MegaRAID SAS
 device mfip# LSI MegaRAID SAS passthrough, requires CAM
 optionsMFI_DEBUG
+device mrsas   # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s
 
 #
 # 3ware ATA RAID

Modified: head/sys/i386/conf/GENERIC
==
--- head/sys/i386/conf/GENERIC  Thu Sep  4 21:05:04 2014(r271136)
+++ head/sys/i386/conf/GENERIC  Thu Sep  4 21:06:33 2014(r271137)
@@ -168,6 +168,7 @@ device  aacraid # Adaptec by 
PMC RAID
 device ida # Compaq Smart RAID
 device mfi # LSI MegaRAID SAS
 device mlx # Mylex DAC960 family
+device mrsas   # LSI/Avago MegaRAID SAS/SATA, 6Gb/s 
and 12Gb/s
 device pst # Promise Supertrak SX6000
 device twe # 3ware ATA RAID
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271138 - stable/10

2014-09-04 Thread Ed Maste
Author: emaste
Date: Thu Sep  4 21:10:24 2014
New Revision: 271138
URL: http://svnweb.freebsd.org/changeset/base/271138

Log:
  Add UPDATING entry for r271116
  
  Noticed by:   nwhitehorn

Modified:
  stable/10/UPDATING

Modified: stable/10/UPDATING
==
--- stable/10/UPDATING  Thu Sep  4 21:06:33 2014(r271137)
+++ stable/10/UPDATING  Thu Sep  4 21:10:24 2014(r271138)
@@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITH
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20140904:
+   The ofwfb driver, used to provide a graphics console on PowerPC when
+   using vt(4), no longer allows mmap() of all of physical memory. This
+   will prevent Xorg on PowerPC with some ATI graphics cards from
+   initializing properly unless x11-servers/xorg-server is updated to
+   1.12.4_8 or newer.
+
 20140831:
The libatf-c and libatf-c++ major versions were downgraded to 0 and
1 respectively to match the upstream numbers.  They were out of
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271139 - in vendor/device-tree/dist/src: arc arm arm64 c6x metag microblaze mips openrisc powerpc x86 xtensa

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 21:26:34 2014
New Revision: 271139
URL: http://svnweb.freebsd.org/changeset/base/271139

Log:
  Properly trim the vendor tree to include only those files that we want
  merged into FreeBSD. Cherry picking from a full vendor tree was too
  hard and lead to undestirable svn results.
  
  Note: We only tim the dts* files, we don't trim the dt-bindings tree,
  since having all of them causes no problems and the benefit to
  trimming there is far out weighed by the cost of doing the trim each
  time.

Deleted:
  vendor/device-tree/dist/src/arc/
  vendor/device-tree/dist/src/arm/aks-cdu.dts
  vendor/device-tree/dist/src/arm/am335x-base0033.dts
  vendor/device-tree/dist/src/arm/am335x-bone-common.dtsi
  vendor/device-tree/dist/src/arm/am335x-bone.dts
  vendor/device-tree/dist/src/arm/am335x-boneblack.dts
  vendor/device-tree/dist/src/arm/am335x-evm.dts
  vendor/device-tree/dist/src/arm/am335x-evmsk.dts
  vendor/device-tree/dist/src/arm/am335x-igep0033.dtsi
  vendor/device-tree/dist/src/arm/am335x-nano.dts
  vendor/device-tree/dist/src/arm/am335x-pepper.dts
  vendor/device-tree/dist/src/arm/am33xx-clocks.dtsi
  vendor/device-tree/dist/src/arm/am33xx.dtsi
  vendor/device-tree/dist/src/arm/am3517-craneboard.dts
  vendor/device-tree/dist/src/arm/am3517-evm.dts
  vendor/device-tree/dist/src/arm/am3517.dtsi
  vendor/device-tree/dist/src/arm/am3517_mt_ventoux.dts
  vendor/device-tree/dist/src/arm/am35xx-clocks.dtsi
  vendor/device-tree/dist/src/arm/am4372.dtsi
  vendor/device-tree/dist/src/arm/am437x-gp-evm.dts
  vendor/device-tree/dist/src/arm/am437x-sk-evm.dts
  vendor/device-tree/dist/src/arm/am43x-epos-evm.dts
  vendor/device-tree/dist/src/arm/am43xx-clocks.dtsi
  vendor/device-tree/dist/src/arm/armada-370-db.dts
  vendor/device-tree/dist/src/arm/armada-370-mirabox.dts
  vendor/device-tree/dist/src/arm/armada-370-netgear-rn102.dts
  vendor/device-tree/dist/src/arm/armada-370-netgear-rn104.dts
  vendor/device-tree/dist/src/arm/armada-370-rd.dts
  vendor/device-tree/dist/src/arm/armada-370-xp.dtsi
  vendor/device-tree/dist/src/arm/armada-370.dtsi
  vendor/device-tree/dist/src/arm/armada-375-db.dts
  vendor/device-tree/dist/src/arm/armada-375.dtsi
  vendor/device-tree/dist/src/arm/armada-380.dtsi
  vendor/device-tree/dist/src/arm/armada-385-db.dts
  vendor/device-tree/dist/src/arm/armada-385-rd.dts
  vendor/device-tree/dist/src/arm/armada-385.dtsi
  vendor/device-tree/dist/src/arm/armada-38x.dtsi
  vendor/device-tree/dist/src/arm/armada-xp-axpwifiap.dts
  vendor/device-tree/dist/src/arm/armada-xp-db.dts
  vendor/device-tree/dist/src/arm/armada-xp-gp.dts
  vendor/device-tree/dist/src/arm/armada-xp-lenovo-ix4-300d.dts
  vendor/device-tree/dist/src/arm/armada-xp-matrix.dts
  vendor/device-tree/dist/src/arm/armada-xp-mv78230.dtsi
  vendor/device-tree/dist/src/arm/armada-xp-mv78260.dtsi
  vendor/device-tree/dist/src/arm/armada-xp-mv78460.dtsi
  vendor/device-tree/dist/src/arm/armada-xp-netgear-rn2120.dts
  vendor/device-tree/dist/src/arm/armada-xp-openblocks-ax3-4.dts
  vendor/device-tree/dist/src/arm/armada-xp.dtsi
  vendor/device-tree/dist/src/arm/armv7-m.dtsi
  vendor/device-tree/dist/src/arm/atlas6-evb.dts
  vendor/device-tree/dist/src/arm/atlas6.dtsi
  vendor/device-tree/dist/src/arm/axm5516-amarillo.dts
  vendor/device-tree/dist/src/arm/axm5516-cpus.dtsi
  vendor/device-tree/dist/src/arm/axm55xx.dtsi
  vendor/device-tree/dist/src/arm/bcm11351-brt.dts
  vendor/device-tree/dist/src/arm/bcm11351.dtsi
  vendor/device-tree/dist/src/arm/bcm21664-garnet.dts
  vendor/device-tree/dist/src/arm/bcm21664.dtsi
  vendor/device-tree/dist/src/arm/bcm28155-ap.dts
  vendor/device-tree/dist/src/arm/bcm2835-rpi-b.dts
  vendor/device-tree/dist/src/arm/bcm2835.dtsi
  vendor/device-tree/dist/src/arm/bcm4708-netgear-r6250.dts
  vendor/device-tree/dist/src/arm/bcm4708.dtsi
  vendor/device-tree/dist/src/arm/bcm5301x.dtsi
  vendor/device-tree/dist/src/arm/bcm59056.dtsi
  vendor/device-tree/dist/src/arm/bcm7445-bcm97445svmb.dts
  vendor/device-tree/dist/src/arm/bcm7445.dtsi
  vendor/device-tree/dist/src/arm/berlin2-sony-nsz-gs7.dts
  vendor/device-tree/dist/src/arm/berlin2.dtsi
  vendor/device-tree/dist/src/arm/berlin2cd-google-chromecast.dts
  vendor/device-tree/dist/src/arm/berlin2cd.dtsi
  vendor/device-tree/dist/src/arm/berlin2q-marvell-dmp.dts
  vendor/device-tree/dist/src/arm/berlin2q.dtsi
  vendor/device-tree/dist/src/arm/cros-ec-keyboard.dtsi
  vendor/device-tree/dist/src/arm/da850-enbw-cmc.dts
  vendor/device-tree/dist/src/arm/da850-evm.dts
  vendor/device-tree/dist/src/arm/da850.dtsi
  vendor/device-tree/dist/src/arm/dove-cm-a510.dts
  vendor/device-tree/dist/src/arm/dove-cubox-es.dts
  vendor/device-tree/dist/src/arm/dove-cubox.dts
  vendor/device-tree/dist/src/arm/dove-d2plug.dts
  vendor/device-tree/dist/src/arm/dove-d3plug.dts
  vendor/device-tree/dist/src/arm/dove-dove-db.dts
  vendor/device-tree/dist/src/arm/dove.dtsi
  vendor/device-tree/dist/src/arm/dra7-evm.dts
  vendor/device-tree/dist/src/arm/dra

svn commit: r271140 - head/sys/gnu/dts/arm

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 21:28:25 2014
New Revision: 271140
URL: http://svnweb.freebsd.org/changeset/base/271140

Log:
  Delete old arm dts tree. This was created by cherry picking from a
  full vendor tree. This worked great until it was time to update, but
  now it is time to update. Hit the rest button by removing this branch
  and re-adding it by a full copy of whatever is in the vendor tree.

Deleted:
  head/sys/gnu/dts/arm/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271141 - in head/sys: kern sys

2014-09-04 Thread Sean Bruno
Author: sbruno
Date: Thu Sep  4 21:31:25 2014
New Revision: 271141
URL: http://svnweb.freebsd.org/changeset/base/271141

Log:
  Allow multiple image activators to run on the same execution by changing
  imgp->interpreted to a bitmask instead of, functionally, a bool. Each
  imgactivator now requires its own flag in interpreted to indicate whether
  or not it has already examined argv[0].
  
  Change imgp->interpreted to an unsigned char to add one extra bit for
  future use.
  
  With this change, one can execute a shell script from a 64bit host native
  make and still get the binmisc image activator to fire for the script
  interpreter.  Prior to this, execution would fail.
  
  Phabric:  https://reviews.freebsd.org/D696
  Reviewed by:  jhb@
  MFC after:4 weeks

Modified:
  head/sys/kern/imgact_binmisc.c
  head/sys/kern/imgact_shell.c
  head/sys/sys/imgact.h

Modified: head/sys/kern/imgact_binmisc.c
==
--- head/sys/kern/imgact_binmisc.c  Thu Sep  4 21:28:25 2014
(r271140)
+++ head/sys/kern/imgact_binmisc.c  Thu Sep  4 21:31:25 2014
(r271141)
@@ -600,12 +600,12 @@ imgact_binmisc_exec(struct image_params 
}
 
/* No interpreter nesting allowed. */
-   if (imgp->interpreted) {
+   if (imgp->interpreted & IMGACT_BINMISC) {
mtx_unlock(&interp_list_mtx);
return (ENOEXEC);
}
 
-   imgp->interpreted = 1;
+   imgp->interpreted |= IMGACT_BINMISC;
 
if (imgp->args->fname != NULL) {
fname = imgp->args->fname;

Modified: head/sys/kern/imgact_shell.c
==
--- head/sys/kern/imgact_shell.cThu Sep  4 21:28:25 2014
(r271140)
+++ head/sys/kern/imgact_shell.cThu Sep  4 21:31:25 2014
(r271141)
@@ -115,10 +115,10 @@ exec_shell_imgact(imgp)
 * Don't allow a shell script to be the shell for a shell
 *  script. :-)
 */
-   if (imgp->interpreted)
+   if (imgp->interpreted & IMGACT_SHELL)
return (ENOEXEC);
 
-   imgp->interpreted = 1;
+   imgp->interpreted |= IMGACT_SHELL;
 
/*
 * At this point we have the first page of the file mapped.

Modified: head/sys/sys/imgact.h
==
--- head/sys/sys/imgact.h   Thu Sep  4 21:28:25 2014(r271140)
+++ head/sys/sys/imgact.h   Thu Sep  4 21:31:25 2014(r271141)
@@ -61,7 +61,9 @@ struct image_params {
unsigned long entry_addr; /* entry address of target executable */
unsigned long reloc_base; /* load address of image */
char vmspace_destroyed; /* flag - we've blown away original vm space */
-   char interpreted;   /* flag - this executable is interpreted */
+#define IMGACT_SHELL   0x1
+#define IMGACT_BINMISC 0x2
+   unsigned char interpreted;  /* mask of interpreters that have run */
char opened;/* flag - we have opened executable vnode */
char *interpreter_name; /* name of the interpreter */
void *auxargs;  /* ELF Auxinfo structure pointer */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271142 - svnadmin/conf

2014-09-04 Thread Glen Barber
Author: gjb
Date: Thu Sep  4 21:44:44 2014
New Revision: 271142
URL: http://svnweb.freebsd.org/changeset/base/271142

Log:
  Require explicit re@ approval for commits to stable/10
  as, the code freeze for 10.1-RELEASE is now in effect.
  
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

Modified:
  svnadmin/conf/approvers

Modified: svnadmin/conf/approvers
==
--- svnadmin/conf/approvers Thu Sep  4 21:31:25 2014(r271141)
+++ svnadmin/conf/approvers Thu Sep  4 21:44:44 2014(r271142)
@@ -17,7 +17,7 @@
 # $FreeBSD$
 #
 #^head/re
-#^stable/10/   re
+^stable/10/re
 #^stable/9/re
 #^stable/8/re
 #^stable/7/re
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271143 - head/sys/gnu/dts/arm

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 21:48:33 2014
New Revision: 271143
URL: http://svnweb.freebsd.org/changeset/base/271143

Log:
  Reimport dts files from vendor repo now that it has been properly
  trimmed.

Added:
  head/sys/gnu/dts/arm/
 - copied from r271142, vendor/device-tree/dist/src/arm/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271144 - head/bin/sh

2014-09-04 Thread Jilles Tjoelker
Author: jilles
Date: Thu Sep  4 21:48:33 2014
New Revision: 271144
URL: http://svnweb.freebsd.org/changeset/base/271144

Log:
  sh: Allow enabling job control without a tty in non-interactive mode.
  
  If no tty is available, 'set -m' is still useful to put jobs in their own
  process groups.

Modified:
  head/bin/sh/jobs.c
  head/bin/sh/sh.1

Modified: head/bin/sh/jobs.c
==
--- head/bin/sh/jobs.c  Thu Sep  4 21:48:33 2014(r271143)
+++ head/bin/sh/jobs.c  Thu Sep  4 21:48:33 2014(r271144)
@@ -118,6 +118,24 @@ static void showjob(struct job *, int);
 static int jobctl;
 
 #if JOBS
+static void
+jobctl_notty(void)
+{
+   if (ttyfd >= 0) {
+   close(ttyfd);
+   ttyfd = -1;
+   }
+   if (!iflag) {
+   setsignal(SIGTSTP);
+   setsignal(SIGTTOU);
+   setsignal(SIGTTIN);
+   jobctl = 1;
+   return;
+   }
+   out2fmt_flush("sh: can't access tty; job control turned off\n");
+   mflag = 0;
+}
+
 void
 setjobctl(int on)
 {
@@ -133,8 +151,10 @@ setjobctl(int on)
while (i <= 2 && !isatty(i))
i++;
if (i > 2 ||
-   (ttyfd = fcntl(i, F_DUPFD_CLOEXEC, 10)) < 0)
-   goto out;
+   (ttyfd = fcntl(i, F_DUPFD_CLOEXEC, 10)) < 0) {
+   jobctl_notty();
+   return;
+   }
}
if (ttyfd < 10) {
/*
@@ -142,9 +162,8 @@ setjobctl(int on)
 * the user's redirections.
 */
if ((i = fcntl(ttyfd, F_DUPFD_CLOEXEC, 10)) < 0) {
-   close(ttyfd);
-   ttyfd = -1;
-   goto out;
+   jobctl_notty();
+   return;
}
close(ttyfd);
ttyfd = i;
@@ -152,11 +171,15 @@ setjobctl(int on)
do { /* while we are in the background */
initialpgrp = tcgetpgrp(ttyfd);
if (initialpgrp < 0) {
-out:   out2fmt_flush("sh: can't access tty; job 
control turned off\n");
-   mflag = 0;
+   jobctl_notty();
return;
}
if (initialpgrp != getpgrp()) {
+   if (!iflag) {
+   initialpgrp = -1;
+   jobctl_notty();
+   return;
+   }
kill(0, SIGTTIN);
continue;
}
@@ -168,9 +191,11 @@ out:   out2fmt_flush("sh: 
can't access 
tcsetpgrp(ttyfd, rootpid);
} else { /* turning job control off */
setpgid(0, initialpgrp);
-   tcsetpgrp(ttyfd, initialpgrp);
-   close(ttyfd);
-   ttyfd = -1;
+   if (ttyfd >= 0) {
+   tcsetpgrp(ttyfd, initialpgrp);
+   close(ttyfd);
+   ttyfd = -1;
+   }
setsignal(SIGTSTP);
setsignal(SIGTTOU);
setsignal(SIGTTIN);
@@ -195,7 +220,8 @@ fgcmd(int argc __unused, char **argv __u
printjobcmd(jp);
flushout(&output);
pgrp = jp->ps[0].pid;
-   tcsetpgrp(ttyfd, pgrp);
+   if (ttyfd >= 0)
+   tcsetpgrp(ttyfd, pgrp);
restartjob(jp);
jp->foreground = 1;
INTOFF;
@@ -847,7 +873,8 @@ forkshell(struct job *jp, union node *n,
pgrp = getpid();
else
pgrp = jp->ps[0].pid;
-   if (setpgid(0, pgrp) == 0 && mode == FORK_FG) {
+   if (setpgid(0, pgrp) == 0 && mode == FORK_FG &&
+   ttyfd >= 0) {
/*** this causes superfluous TIOCSPGRPS ***/
if (tcsetpgrp(ttyfd, pgrp) < 0)
error("tcsetpgrp failed, errno=%d", 
errno);
@@ -1007,7 +1034,7 @@ waitforjob(struct job *jp, int *origstat
dotrap();
 #if JOBS
if (jp->jobctl) {
-   if (tcsetpgrp(ttyfd, rootpid) < 0)
+   if (ttyfd >= 0 && tcsetpgrp(ttyfd, rootpid) < 0)
error("tcsetpgrp failed, errno=%d\n", errno);
}
if (jp->state == JOBSTOPPED)

Modified: head/bin/sh/sh.1
==

svn commit: r271145 - head/etc/rc.d

2014-09-04 Thread Hiroki Sato
Author: hrs
Date: Thu Sep  4 22:00:52 2014
New Revision: 271145
URL: http://svnweb.freebsd.org/changeset/base/271145

Log:
  Fix a bug which prevented mount.fstab parameter from being converted
  when jail_JID_devfs_enable=NO.
  
  Spotted by:   peter

Modified:
  head/etc/rc.d/jail

Modified: head/etc/rc.d/jail
==
--- head/etc/rc.d/jail  Thu Sep  4 21:48:33 2014(r271144)
+++ head/etc/rc.d/jail  Thu Sep  4 22:00:52 2014(r271145)
@@ -207,6 +207,10 @@ parse_options()
extract_var $_j consolelog exec.consolelog - \
/var/log/jail_${_j}_console.log
 
+   if [ -r $_fstab ]; then
+   echo "  mount.fstab = \"$_fstab\";"
+   fi
+
eval : \${jail_${_j}_devfs_enable:=${jail_devfs_enable:-NO}}
if checkyesno jail_${_j}_devfs_enable; then
echo "  mount.devfs;"
@@ -222,11 +226,7 @@ parse_options()
;;
*)  warn "devfs_ruleset must be an integer." ;;
esac
-   if [ -r $_fstab ]; then
-   echo "  mount.fstab = \"$_fstab\";"
-   fi
fi
-
eval : \${jail_${_j}_fdescfs_enable:=${jail_fdescfs_enable:-NO}}
if checkyesno jail_${_j}_fdescfs_enable; then
echo "  mount.fdescfs;"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271146 - in head/sys: conf dev/ahci modules/ahci

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 22:22:53 2014
New Revision: 271146
URL: http://svnweb.freebsd.org/changeset/base/271146

Log:
  Separate out PCI attachment from the main AHCI driver. Move checks of
  PCI IDs into quirks, which mostly fit (though you'd get no argument
  from me that AHCI_Q_SATA1_UNIT0 is oddly specific). Set these quirks
  in the PCI attachment. Make some shared functions public so that PCI
  and possibly other bus attachments can use them.
  
  The split isn't perfect yet, but it is functional. The split will be
  perfected as other bus attachments for AHCI are written.
  
  Sponsored by: Netflix
  Reviewed by: kan, mav
  Differential Revision: https://reviews.freebsd.org/D699

Added:
  head/sys/dev/ahci/ahci_pci.c
 - copied, changed from r271145, head/sys/dev/ahci/ahci.c
Modified:
  head/sys/conf/files
  head/sys/dev/ahci/ahci.c
  head/sys/dev/ahci/ahci.h
  head/sys/modules/ahci/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Sep  4 22:00:52 2014(r271145)
+++ head/sys/conf/files Thu Sep  4 22:22:53 2014(r271146)
@@ -622,8 +622,9 @@ dev/aha/aha.c   optional aha
 dev/aha/aha_isa.c  optional aha isa
 dev/aha/aha_mca.c  optional aha mca
 dev/ahb/ahb.c  optional ahb eisa
-dev/ahci/ahci.coptional ahci pci
-dev/ahci/ahciem.c  optional ahci pci
+dev/ahci/ahci.coptional ahci
+dev/ahci/ahciem.c  optional ahci
+dev/ahci/ahci_pci.coptional ahci pci
 dev/aic/aic.c  optional aic
 dev/aic/aic_pccard.c   optional aic pccard
 dev/aic7xxx/ahc_eisa.c optional ahc eisa

Modified: head/sys/dev/ahci/ahci.c
==
--- head/sys/dev/ahci/ahci.cThu Sep  4 22:00:52 2014(r271145)
+++ head/sys/dev/ahci/ahci.cThu Sep  4 22:22:53 2014(r271146)
@@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
-#include 
 #include "ahci.h"
 
 #include 
@@ -52,12 +50,9 @@ __FBSDID("$FreeBSD$");
 #include 
 
 /* local prototypes */
-static int ahci_setup_interrupt(device_t dev);
 static void ahci_intr(void *data);
 static void ahci_intr_one(void *data);
 static void ahci_intr_one_edge(void *data);
-static int ahci_suspend(device_t dev);
-static int ahci_resume(device_t dev);
 static int ahci_ch_init(device_t dev);
 static int ahci_ch_deinit(device_t dev);
 static int ahci_ch_suspend(device_t dev);
@@ -66,8 +61,6 @@ static void ahci_ch_pm(void *arg);
 static void ahci_ch_intr(void *arg);
 static void ahci_ch_intr_direct(void *arg);
 static void ahci_ch_intr_main(struct ahci_channel *ch, uint32_t istatus);
-static int ahci_ctlr_reset(device_t dev);
-static int ahci_ctlr_setup(device_t dev);
 static void ahci_begin_transaction(device_t dev, union ccb *ccb);
 static void ahci_dmasetprd(void *arg, bus_dma_segment_t *segs, int nsegs, int 
error);
 static void ahci_execute_transaction(struct ahci_slot *slot);
@@ -99,366 +92,76 @@ static void ahcipoll(struct cam_sim *sim
 
 static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers");
 
-static struct {
-   uint32_tid;
-   uint8_t rev;
-   const char  *name;
-   int quirks;
-#define AHCI_Q_NOFORCE 1
-#define AHCI_Q_NOPMP   2
-#define AHCI_Q_NONCQ   4
-#define AHCI_Q_1CH 8
-#define AHCI_Q_2CH 16
-#define AHCI_Q_4CH 32
-#define AHCI_Q_EDGEIS  64
-#define AHCI_Q_SATA2   128
-#define AHCI_Q_NOBSYRES256
-#define AHCI_Q_NOAA512
-#define AHCI_Q_NOCOUNT 1024
-#define AHCI_Q_ALTSIG  2048
-#define AHCI_Q_NOMSI   4096
-
-#define AHCI_Q_BIT_STRING  \
-   "\020"  \
-   "\001NOFORCE"   \
-   "\002NOPMP" \
-   "\003NONCQ" \
-   "\0041CH"   \
-   "\0052CH"   \
-   "\0064CH"   \
-   "\007EDGEIS"\
-   "\010SATA2" \
-   "\011NOBSYRES"  \
-   "\012NOAA"  \
-   "\013NOCOUNT"   \
-   "\014ALTSIG"\
-   "\015NOMSI"
-} ahci_ids[] = {
-   {0x43801002, 0x00, "AMD SB600", AHCI_Q_NOMSI},
-   {0x43901002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43911002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43921002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43931002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43941002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43951002, 0x00, "AMD SB8x0/SB9x0",   0},
-   {0x78001022, 0x00, "AMD Hudson-2",  0},
-   {0x78011022, 0x00, "AMD Hudson-2",  0},
-   {0x78021022, 0x00, "AMD Hudson-2",  0},
-   {0x78031022, 0x00, "AMD Hudson-2",  0},
-   {0x78041022, 0x00, "AMD Hudson-2",  0},
-   {0x06111b21, 0x00, "ASMed

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

2014-09-04 Thread Steve Kargl
Author: kargl
Date: Thu Sep  4 23:50:05 2014
New Revision: 271147
URL: http://svnweb.freebsd.org/changeset/base/271147

Log:
  Remove an initialized, but otherwise, unused variable.

Modified:
  head/lib/msun/src/e_lgamma_r.c
  head/lib/msun/src/e_lgammaf_r.c

Modified: head/lib/msun/src/e_lgamma_r.c
==
--- head/lib/msun/src/e_lgamma_r.c  Thu Sep  4 22:22:53 2014
(r271146)
+++ head/lib/msun/src/e_lgamma_r.c  Thu Sep  4 23:50:05 2014
(r271147)
@@ -90,7 +90,6 @@ static const volatile double vzero = 0;
 
 static const double
 zero=  0.e+00,
-two52=  4.5035996273704960e+15, /* 0x4330, 0x */
 half=  5.e-01, /* 0x3FE0, 0x */
 one =  1.e+00, /* 0x3FF0, 0x */
 pi  =  3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */

Modified: head/lib/msun/src/e_lgammaf_r.c
==
--- head/lib/msun/src/e_lgammaf_r.c Thu Sep  4 22:22:53 2014
(r271146)
+++ head/lib/msun/src/e_lgammaf_r.c Thu Sep  4 23:50:05 2014
(r271147)
@@ -23,7 +23,6 @@ static const volatile float vzero = 0;
 
 static const float
 zero=  0.00e+00,
-two23=  8.388608e+06, /* 0x4b00 */
 half=  5.00e-01, /* 0x3f00 */
 one =  1.00e+00, /* 0x3f80 */
 pi  =  3.1415927410e+00, /* 0x40490fdb */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271148 - head/sys/geom/eli

2014-09-04 Thread John-Mark Gurney
Author: jmg
Date: Thu Sep  4 23:53:51 2014
New Revision: 271148
URL: http://svnweb.freebsd.org/changeset/base/271148

Log:
  use a straight buffer instead of an iov w/ 1 segment...  The aesni
  driver when it hits a mbuf/iov buffer, it mallocs and copies the data
  for processing..  This improves perf by ~8-10% on my machine...
  
  I have thoughts of fixing AES-NI so that it can better handle segmented
  buffers, which should help improve IPSEC performance, but that is for
  the future...

Modified:
  head/sys/geom/eli/g_eli_crypto.c
  head/sys/geom/eli/g_eli_integrity.c
  head/sys/geom/eli/g_eli_privacy.c

Modified: head/sys/geom/eli/g_eli_crypto.c
==
--- head/sys/geom/eli/g_eli_crypto.cThu Sep  4 23:50:05 2014
(r271147)
+++ head/sys/geom/eli/g_eli_crypto.cThu Sep  4 23:53:51 2014
(r271148)
@@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #else
 #include 
 #include 
@@ -63,8 +62,6 @@ g_eli_crypto_cipher(u_int algo, int enc,
struct cryptoini cri;
struct cryptop *crp;
struct cryptodesc *crd;
-   struct uio *uio;
-   struct iovec *iov;
uint64_t sid;
u_char *p;
int error;
@@ -79,24 +76,13 @@ g_eli_crypto_cipher(u_int algo, int enc,
error = crypto_newsession(&sid, &cri, CRYPTOCAP_F_SOFTWARE);
if (error != 0)
return (error);
-   p = malloc(sizeof(*crp) + sizeof(*crd) + sizeof(*uio) + sizeof(*iov),
-   M_ELI, M_NOWAIT | M_ZERO);
+   p = malloc(sizeof(*crp) + sizeof(*crd), M_ELI, M_NOWAIT | M_ZERO);
if (p == NULL) {
crypto_freesession(sid);
return (ENOMEM);
}
crp = (struct cryptop *)p;  p += sizeof(*crp);
crd = (struct cryptodesc *)p;   p += sizeof(*crd);
-   uio = (struct uio *)p;  p += sizeof(*uio);
-   iov = (struct iovec *)p;p += sizeof(*iov);
-
-   iov->iov_len = datasize;
-   iov->iov_base = data;
-
-   uio->uio_iov = iov;
-   uio->uio_iovcnt = 1;
-   uio->uio_segflg = UIO_SYSSPACE;
-   uio->uio_resid = datasize;
 
crd->crd_skip = 0;
crd->crd_len = datasize;
@@ -114,8 +100,8 @@ g_eli_crypto_cipher(u_int algo, int enc,
crp->crp_olen = datasize;
crp->crp_opaque = NULL;
crp->crp_callback = g_eli_crypto_done;
-   crp->crp_buf = (void *)uio;
-   crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIFSYNC | CRYPTO_F_REL;
+   crp->crp_buf = (void *)data;
+   crp->crp_flags = CRYPTO_F_CBIFSYNC | CRYPTO_F_REL;
crp->crp_desc = crd;
 
error = crypto_dispatch(crp);

Modified: head/sys/geom/eli/g_eli_integrity.c
==
--- head/sys/geom/eli/g_eli_integrity.c Thu Sep  4 23:50:05 2014
(r271147)
+++ head/sys/geom/eli/g_eli_integrity.c Thu Sep  4 23:53:51 2014
(r271148)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -363,8 +362,6 @@ g_eli_auth_read(struct g_eli_softc *sc, 
size += sizeof(struct cryptop) * nsec;
size += sizeof(struct cryptodesc) * nsec * 2;
size += G_ELI_AUTH_SECKEYLEN * nsec;
-   size += sizeof(struct uio) * nsec;
-   size += sizeof(struct iovec) * nsec;
cbp->bio_offset = (bp->bio_offset / bp->bio_to->sectorsize) * 
sc->sc_bytes_per_sector;
bp->bio_driver2 = malloc(size, M_ELI, M_WAITOK);
cbp->bio_data = bp->bio_driver2;
@@ -409,8 +406,6 @@ g_eli_auth_run(struct g_eli_worker *wr, 
struct g_eli_softc *sc;
struct cryptop *crp;
struct cryptodesc *crde, *crda;
-   struct uio *uio;
-   struct iovec *iov;
u_int i, lsec, nsec, data_secsize, decr_secsize, encr_secsize;
off_t dstoff;
int err, error;
@@ -449,8 +444,6 @@ g_eli_auth_run(struct g_eli_worker *wr, 
size += sizeof(*crde) * nsec;
size += sizeof(*crda) * nsec;
size += G_ELI_AUTH_SECKEYLEN * nsec;
-   size += sizeof(*uio) * nsec;
-   size += sizeof(*iov) * nsec;
data = malloc(size, M_ELI, M_WAITOK);
bp->bio_driver2 = data;
p = data + encr_secsize * nsec;
@@ -464,8 +457,6 @@ g_eli_auth_run(struct g_eli_worker *wr, 
crde = (struct cryptodesc *)p;  p += sizeof(*crde);
crda = (struct cryptodesc *)p;  p += sizeof(*crda);
authkey = (u_char *)p;  p += G_ELI_AUTH_SECKEYLEN;
-   uio = (struct uio *)p;  p += sizeof(*uio);
-   iov = (struct iovec *)p;p += sizeof(*iov);
 
data_secsize = sc->sc_data_per_sector;
if ((i % lsec) == 0)
@@ -482,21 +473,13 @@ g_eli_auth_run(struct g_eli_worker *wr, 
plaindata += data_secsize;
 

svn commit: r271149 - in head/sys: amd64/amd64 i386/i386

2014-09-04 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Sep  5 01:06:45 2014
New Revision: 271149
URL: http://svnweb.freebsd.org/changeset/base/271149

Log:
  Apply known workarounds for modern MacBooks.
  
  The legacy USB circuit tends to give trouble on MacBook.
  While the original report covered MacBook, extend the fix
  preemptively for the newer MacBookPro too.
  
  PR:   191693
  Reviewed by:  emaste
  MFC after:5 days

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/i386/i386/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Thu Sep  4 23:53:51 2014
(r271148)
+++ head/sys/amd64/amd64/machdep.c  Fri Sep  5 01:06:45 2014
(r271149)
@@ -250,9 +250,11 @@ cpu_startup(dummy)
if (sysenv != NULL) {
if (strncmp(sysenv, "MacBook1,1", 10) == 0 ||
strncmp(sysenv, "MacBook3,1", 10) == 0 ||
+   strncmp(sysenv, "MacBook4,1", 10) == 0 ||
strncmp(sysenv, "MacBookPro1,1", 13) == 0 ||
strncmp(sysenv, "MacBookPro1,2", 13) == 0 ||
strncmp(sysenv, "MacBookPro3,1", 13) == 0 ||
+   strncmp(sysenv, "MacBookPro4,1", 13) == 0 ||
strncmp(sysenv, "Macmini1,1", 10) == 0) {
if (bootverbose)
printf("Disabling LEGACY_USB_EN bit on "

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cThu Sep  4 23:53:51 2014
(r271148)
+++ head/sys/i386/i386/machdep.cFri Sep  5 01:06:45 2014
(r271149)
@@ -273,9 +273,11 @@ cpu_startup(dummy)
if (sysenv != NULL) {
if (strncmp(sysenv, "MacBook1,1", 10) == 0 ||
strncmp(sysenv, "MacBook3,1", 10) == 0 ||
+   strncmp(sysenv, "MacBook4,1", 10) == 0 ||
strncmp(sysenv, "MacBookPro1,1", 13) == 0 ||
strncmp(sysenv, "MacBookPro1,2", 13) == 0 ||
strncmp(sysenv, "MacBookPro3,1", 13) == 0 ||
+   strncmp(sysenv, "MacBookPro4,1", 13) == 0 ||
strncmp(sysenv, "Macmini1,1", 10) == 0) {
if (bootverbose)
printf("Disabling LEGACY_USB_EN bit on "
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271150 - vendor/device-tree/dist/src/arm

2014-09-04 Thread Warner Losh
Author: imp
Date: Fri Sep  5 02:20:06 2014
New Revision: 271150
URL: http://svnweb.freebsd.org/changeset/base/271150

Log:
  Bring in forgotten pinfunc.h files from last import.

Added:
  vendor/device-tree/dist/src/arm/imx51-pinfunc.h
 - copied unchanged from r271109, 
vendor/device-tree/ianc-b78b6b80/src/arm/imx51-pinfunc.h
  vendor/device-tree/dist/src/arm/imx53-pinfunc.h
 - copied unchanged from r271109, 
vendor/device-tree/ianc-b78b6b80/src/arm/imx53-pinfunc.h
  vendor/device-tree/dist/src/arm/imx6dl-pinfunc.h
 - copied unchanged from r271109, 
vendor/device-tree/ianc-b78b6b80/src/arm/imx6dl-pinfunc.h
  vendor/device-tree/dist/src/arm/imx6q-pinfunc.h
 - copied unchanged from r271109, 
vendor/device-tree/ianc-b78b6b80/src/arm/imx6q-pinfunc.h
  vendor/device-tree/dist/src/arm/imx6sl-pinfunc.h
 - copied unchanged from r271109, 
vendor/device-tree/ianc-b78b6b80/src/arm/imx6sl-pinfunc.h

Copied: vendor/device-tree/dist/src/arm/imx51-pinfunc.h (from r271109, 
vendor/device-tree/ianc-b78b6b80/src/arm/imx51-pinfunc.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/device-tree/dist/src/arm/imx51-pinfunc.h Fri Sep  5 02:20:06 
2014(r271150, copy of r271109, 
vendor/device-tree/ianc-b78b6b80/src/arm/imx51-pinfunc.h)
@@ -0,0 +1,773 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef __DTS_IMX51_PINFUNC_H
+#define __DTS_IMX51_PINFUNC_H
+
+/*
+ * The pin function ID is a tuple of
+ * 
+ */
+#define MX51_PAD_EIM_D16__AUD4_RXFS0x05c 0x3f0 0x000 0x5 
0x0
+#define MX51_PAD_EIM_D16__AUD5_TXD 0x05c 0x3f0 0x8d8 0x7 
0x0
+#define MX51_PAD_EIM_D16__EIM_D16  0x05c 0x3f0 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D16__GPIO2_0  0x05c 0x3f0 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D16__I2C1_SDA 0x05c 0x3f0 0x9b4 0x4 
0x0
+#define MX51_PAD_EIM_D16__UART2_CTS0x05c 0x3f0 0x000 0x3 
0x0
+#define MX51_PAD_EIM_D16__USBH2_DATA0  0x05c 0x3f0 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D17__AUD5_RXD 0x060 0x3f4 0x8d4 0x7 
0x0
+#define MX51_PAD_EIM_D17__EIM_D17  0x060 0x3f4 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D17__GPIO2_1  0x060 0x3f4 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D17__UART2_RXD0x060 0x3f4 0x9ec 0x3 
0x0
+#define MX51_PAD_EIM_D17__UART3_CTS0x060 0x3f4 0x000 0x4 
0x0
+#define MX51_PAD_EIM_D17__USBH2_DATA1  0x060 0x3f4 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D18__AUD5_TXC 0x064 0x3f8 0x8e4 0x7 
0x0
+#define MX51_PAD_EIM_D18__EIM_D18  0x064 0x3f8 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D18__GPIO2_2  0x064 0x3f8 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D18__UART2_TXD0x064 0x3f8 0x000 0x3 
0x0
+#define MX51_PAD_EIM_D18__UART3_RTS0x064 0x3f8 0x9f0 0x4 
0x1
+#define MX51_PAD_EIM_D18__USBH2_DATA2  0x064 0x3f8 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D19__AUD4_RXC 0x068 0x3fc 0x000 0x5 
0x0
+#define MX51_PAD_EIM_D19__AUD5_TXFS0x068 0x3fc 0x8e8 0x7 
0x0
+#define MX51_PAD_EIM_D19__EIM_D19  0x068 0x3fc 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D19__GPIO2_3  0x068 0x3fc 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D19__I2C1_SCL 0x068 0x3fc 0x9b0 0x4 
0x0
+#define MX51_PAD_EIM_D19__UART2_RTS0x068 0x3fc 0x9e8 0x3 
0x1
+#define MX51_PAD_EIM_D19__USBH2_DATA3  0x068 0x3fc 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D20__AUD4_TXD 0x06c 0x400 0x8c8 0x5 
0x0
+#define MX51_PAD_EIM_D20__EIM_D20  0x06c 0x400 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D20__GPIO2_4  0x06c 0x400 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D20__SRTC_ALARM_DEB   0x06c 0x400 0x000 0x4 
0x0
+#define MX51_PAD_EIM_D20__USBH2_DATA4  0x06c 0x400 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D21__AUD4_RXD 0x070 0x404 0x8c4 0x5 
0x0
+#define MX51_PAD_EIM_D21__EIM_D21  0x070 0x404 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D21__GPIO2_5  0x070 0x404 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D21__SRTC_ALARM_DEB   0x070 0x404 0x000 0x3 
0x0
+#define MX51_PAD_EIM_D21__USBH2_DATA5  0x070 0x404 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D22__AUD4_TXC 0x074 0x408 0x8cc 0x5 
0x0
+#define MX51_PAD_EIM_D22__EIM_D22  0x074 0x408 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D22__GPIO2_6  0x074 0x408 0x000 0x1 

svn commit: r271151 - head/sys/gnu/dts/arm

2014-09-04 Thread Warner Losh
Author: imp
Date: Fri Sep  5 02:21:45 2014
New Revision: 271151
URL: http://svnweb.freebsd.org/changeset/base/271151

Log:
  Merge forgotten .h files from vendor branch.

Added:
  head/sys/gnu/dts/arm/imx51-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx51-pinfunc.h
  head/sys/gnu/dts/arm/imx53-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx53-pinfunc.h
  head/sys/gnu/dts/arm/imx6dl-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx6dl-pinfunc.h
  head/sys/gnu/dts/arm/imx6q-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx6q-pinfunc.h
  head/sys/gnu/dts/arm/imx6sl-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx6sl-pinfunc.h
Modified:
Directory Properties:
  head/sys/gnu/dts/arm/   (props changed)

Copied: head/sys/gnu/dts/arm/imx51-pinfunc.h (from r271150, 
vendor/device-tree/dist/src/arm/imx51-pinfunc.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/gnu/dts/arm/imx51-pinfunc.hFri Sep  5 02:21:45 2014
(r271151, copy of r271150, vendor/device-tree/dist/src/arm/imx51-pinfunc.h)
@@ -0,0 +1,773 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef __DTS_IMX51_PINFUNC_H
+#define __DTS_IMX51_PINFUNC_H
+
+/*
+ * The pin function ID is a tuple of
+ * 
+ */
+#define MX51_PAD_EIM_D16__AUD4_RXFS0x05c 0x3f0 0x000 0x5 
0x0
+#define MX51_PAD_EIM_D16__AUD5_TXD 0x05c 0x3f0 0x8d8 0x7 
0x0
+#define MX51_PAD_EIM_D16__EIM_D16  0x05c 0x3f0 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D16__GPIO2_0  0x05c 0x3f0 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D16__I2C1_SDA 0x05c 0x3f0 0x9b4 0x4 
0x0
+#define MX51_PAD_EIM_D16__UART2_CTS0x05c 0x3f0 0x000 0x3 
0x0
+#define MX51_PAD_EIM_D16__USBH2_DATA0  0x05c 0x3f0 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D17__AUD5_RXD 0x060 0x3f4 0x8d4 0x7 
0x0
+#define MX51_PAD_EIM_D17__EIM_D17  0x060 0x3f4 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D17__GPIO2_1  0x060 0x3f4 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D17__UART2_RXD0x060 0x3f4 0x9ec 0x3 
0x0
+#define MX51_PAD_EIM_D17__UART3_CTS0x060 0x3f4 0x000 0x4 
0x0
+#define MX51_PAD_EIM_D17__USBH2_DATA1  0x060 0x3f4 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D18__AUD5_TXC 0x064 0x3f8 0x8e4 0x7 
0x0
+#define MX51_PAD_EIM_D18__EIM_D18  0x064 0x3f8 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D18__GPIO2_2  0x064 0x3f8 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D18__UART2_TXD0x064 0x3f8 0x000 0x3 
0x0
+#define MX51_PAD_EIM_D18__UART3_RTS0x064 0x3f8 0x9f0 0x4 
0x1
+#define MX51_PAD_EIM_D18__USBH2_DATA2  0x064 0x3f8 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D19__AUD4_RXC 0x068 0x3fc 0x000 0x5 
0x0
+#define MX51_PAD_EIM_D19__AUD5_TXFS0x068 0x3fc 0x8e8 0x7 
0x0
+#define MX51_PAD_EIM_D19__EIM_D19  0x068 0x3fc 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D19__GPIO2_3  0x068 0x3fc 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D19__I2C1_SCL 0x068 0x3fc 0x9b0 0x4 
0x0
+#define MX51_PAD_EIM_D19__UART2_RTS0x068 0x3fc 0x9e8 0x3 
0x1
+#define MX51_PAD_EIM_D19__USBH2_DATA3  0x068 0x3fc 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D20__AUD4_TXD 0x06c 0x400 0x8c8 0x5 
0x0
+#define MX51_PAD_EIM_D20__EIM_D20  0x06c 0x400 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D20__GPIO2_4  0x06c 0x400 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D20__SRTC_ALARM_DEB   0x06c 0x400 0x000 0x4 
0x0
+#define MX51_PAD_EIM_D20__USBH2_DATA4  0x06c 0x400 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D21__AUD4_RXD 0x070 0x404 0x8c4 0x5 
0x0
+#define MX51_PAD_EIM_D21__EIM_D21  0x070 0x404 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D21__GPIO2_5  0x070 0x404 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D21__SRTC_ALARM_DEB   0x070 0x404 0x000 0x3 
0x0
+#define MX51_PAD_EIM_D21__USBH2_DATA5  0x070 0x404 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D22__AUD4_TXC 0x074 0x408 0x8cc 0x5 
0x0
+#define MX51_PAD_EIM_D22__EIM_D22  0x074 0x408 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D22__GPIO2_6  0x074 0x408 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D22__USBH2_DATA6  0x074 0x408 

Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica

2014-09-04 Thread John Baldwin
On Tuesday, September 02, 2014 06:41:27 PM Konstantin Belousov wrote:
> On Tue, Sep 02, 2014 at 11:00:57AM -0400, John Baldwin wrote:
> > I thought about that.  I could easily make a parallel array, or perhaps
> > use a separate 'susppcb' structure that includes a pcb and the savefpu
> > union and change susppcbs to be an array of those.  Which do you prefer? 
> > If we want to move some state out of the PCB on amd64 into this, then a
> > separate struct for susppcbs might be the sanest.
> 
> Yes, separate structure seems to be a way forward.

Please see www.freebsd.org/~jhb/patches/susppcb.patch  Note that I moved
fpususpend() out into a C function on amd64 so that resumectx() could still 
operate on just a pcb.  This also makes savectx and resumectx more symmetric
and matches what I ended up doing on i386.  This is tested for suspend and
resume on both i386 and amd64.

> FWIW, I do not understand the need for pcb in its current form, allocated
> on the thread kernel stack, at all.  It looks like a vestige of the
> u-area, but serves no real purpose except to consume now precious stack
> space.
> 
> The idea of the part of the thread state that can be swapped out, together
> with the stack, seems to become alien.  Most of the thread state which is
> not needed when the thread is not runnable, now goes to struct thread
> anyway.  Might be, we should move the pcb into td_md.  People actively
> object to the idea of the swappable kernel stack when they learn
> hard that local vars cannot participate in the global lists.
> 
> The only thing which is currently allocated below the pcb and which
> seems to be reasonable to swap out, is the FPU context on amd64.

I will defer to Peter on this as I believe he is the one that split the PCB 
out from the rest of the u-area (or what was left of it).  My gut is that you 
are probably right and that it would be better to leave that room for the 
stack than to use it for the pcb.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271153 - stable/10/sys/powerpc/include

2014-09-04 Thread Justin Hibbits
Author: jhibbits
Date: Fri Sep  5 05:07:38 2014
New Revision: 271153
URL: http://svnweb.freebsd.org/changeset/base/271153

Log:
  MFC r258078,258079
  
  Increase the stack size for ppc64 from 4 pages to 8.
  
  I found a stack overflow when a coredump was taken onto a ZFS volume with
  heavy network activity.  2 DSI traps, plus one DECR trap, along with several
  function calls in the stack, overflowed the 4 pages.  8 page stack fixes this.
  
  Discussed with: nwhitehorn
  Approved by:  re
  Relnotes: yes

Modified:
  stable/10/sys/powerpc/include/param.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/powerpc/include/param.h
==
--- stable/10/sys/powerpc/include/param.h   Fri Sep  5 03:33:16 2014
(r271152)
+++ stable/10/sys/powerpc/include/param.h   Fri Sep  5 05:07:38 2014
(r271153)
@@ -104,8 +104,12 @@
 #defineMAXPAGESIZES1   /* maximum number of supported 
page sizes */
 
 #ifndef KSTACK_PAGES
+#ifdef __powerpc64__
+#defineKSTACK_PAGES8   /* includes pcb */
+#else
 #defineKSTACK_PAGES4   /* includes pcb */
 #endif
+#endif
 #defineKSTACK_GUARD_PAGES  1   /* pages of kstack guard; 0 
disables */
 #defineUSPACE  (KSTACK_PAGES * PAGE_SIZE)  /* total size 
of pcb */
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271154 - head/sys/sys

2014-09-04 Thread Ed Schouten
Author: ed
Date: Fri Sep  5 05:20:52 2014
New Revision: 271154
URL: http://svnweb.freebsd.org/changeset/base/271154

Log:
  Partially revert r271012.
  
  Incredibly weird: GCC 4.7/4.9 do support the _Noreturn and _Thread_local
  keywords, but not during bootstrapping. GCC is by far the weirdest
  compiler that I've ever used.
  
  Reported by:  andreast@

Modified:
  head/sys/sys/cdefs.h

Modified: head/sys/sys/cdefs.h
==
--- head/sys/sys/cdefs.hFri Sep  5 05:07:38 2014(r271153)
+++ head/sys/sys/cdefs.hFri Sep  5 05:20:52 2014(r271154)
@@ -280,13 +280,11 @@
 #define_Atomic(T)  struct { T volatile __val; }
 #endif
 
-#if !__GNUC_PREREQ__(4, 7)
 #if defined(__cplusplus) && __cplusplus >= 201103L
 #define_Noreturn   [[noreturn]]
 #else
 #define_Noreturn   __dead2
 #endif
-#endif
 
 #if !__has_extension(c_static_assert) && !__GNUC_PREREQ__(4, 7)
 #if (defined(__cplusplus) && __cplusplus >= 201103L) || \
@@ -301,7 +299,7 @@
 #endif
 #endif
 
-#if !__has_extension(c_thread_local) && !__GNUC_PREREQ__(4, 9)
+#if !__has_extension(c_thread_local)
 /*
  * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode
  * without actually supporting the thread_local keyword. Don't check for
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r271155 - in head: include sys/sys

2014-09-04 Thread Ed Schouten
Author: ed
Date: Fri Sep  5 05:36:32 2014
New Revision: 271155
URL: http://svnweb.freebsd.org/changeset/base/271155

Log:
  Roll back r271012 even more aggressively.
  
  I've looked at the GCC sources and I now understand what's going wrong.
  THe C11 keywords are simply nonexistent when using C++ mode. They are
  marked as C-only in the parser. This is absolutely impractical for
  multiple reasons:
  
  - The C11 keywords do not conflict with C++ naming rules. They all start
with _[A-Z]. There is no reason to make them C-only.
  
  - It makes it practically impossible for people to use these keywords in
C header files and expect them to work from within C++ sources.
  
  As I said in my previous commit message: GCC is by far the weirdest
  compiler that I've ever used.

Modified:
  head/include/tgmath.h
  head/sys/sys/cdefs.h

Modified: head/include/tgmath.h
==
--- head/include/tgmath.h   Fri Sep  5 05:20:52 2014(r271154)
+++ head/include/tgmath.h   Fri Sep  5 05:36:32 2014(r271155)
@@ -61,7 +61,7 @@
  */
 
 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
-__has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9)
+__has_extension(c_generic_selections)
 #define__tg_generic(x, cfnl, cfn, cfnf, fnl, fn, fnf)  
\
_Generic(x, \
long double _Complex: cfnl, \

Modified: head/sys/sys/cdefs.h
==
--- head/sys/sys/cdefs.hFri Sep  5 05:20:52 2014(r271154)
+++ head/sys/sys/cdefs.hFri Sep  5 05:36:32 2014(r271155)
@@ -254,7 +254,7 @@
 
 #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
 
-#if !__has_extension(c_alignas) && !__GNUC_PREREQ__(4, 7)
+#if !__has_extension(c_alignas)
 #if (defined(__cplusplus) && __cplusplus >= 201103L) || \
 __has_extension(cxx_alignas)
 #define_Alignas(x) alignas(x)
@@ -264,13 +264,11 @@
 #endif
 #endif
 
-#if !__GNUC_PREREQ__(4, 7)
 #if defined(__cplusplus) && __cplusplus >= 201103L
 #define_Alignof(x) alignof(x)
 #else
 #define_Alignof(x) __alignof(x)
 #endif
-#endif
 
 #if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
 /*
@@ -286,7 +284,7 @@
 #define_Noreturn   __dead2
 #endif
 
-#if !__has_extension(c_static_assert) && !__GNUC_PREREQ__(4, 7)
+#if !__has_extension(c_static_assert)
 #if (defined(__cplusplus) && __cplusplus >= 201103L) || \
 __has_extension(cxx_static_assert)
 #define_Static_assert(x, y)static_assert(x, y)
@@ -325,7 +323,7 @@
  */
 
 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
-__has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9)
+__has_extension(c_generic_selections)
 #define__generic(expr, t, yes, no) 
\
_Generic(expr, t: yes, default: no)
 #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"