svn commit: r261541 - in head/sys: conf dev/usb dev/usb/net modules/usb modules/usb/urndis

2014-02-06 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Feb  6 08:47:14 2014
New Revision: 261541
URL: http://svnweb.freebsd.org/changeset/base/261541

Log:
  Import USB RNDIS driver to FreeBSD from OpenBSD.
  Useful for so-called USB tethering.
  - Imported code from OpenBSD
  - Adapted code to FreeBSD
  - Removed some unused functions
  - Fixed some buffer encoding and decoding issues
  - Optimised data transport path a bit, by sending multiple packets at a time
  - Increased receive buffer to 16K
  
  Obtained from:OpenBSD
  Requested by: eadler @
  MFC after:2 weeks

Added:
  head/sys/dev/usb/net/if_urndis.c   (contents, props changed)
  head/sys/dev/usb/net/if_urndisreg.h   (contents, props changed)
  head/sys/modules/usb/urndis/
  head/sys/modules/usb/urndis/Makefile   (contents, props changed)
Modified:
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/dev/usb/usb.h
  head/sys/modules/usb/Makefile

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Thu Feb  6 07:59:05 2014(r261540)
+++ head/sys/conf/NOTES Thu Feb  6 08:47:14 2014(r261541)
@@ -2746,6 +2746,8 @@ deviceupgt
 # Ralink Technology RT2500USB wireless driver
 device ural
 #
+# RNDIS USB ethernet driver
+device urndis
 # Realtek RTL8187B/L wireless driver
 device urtw
 #

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Feb  6 07:59:05 2014(r261540)
+++ head/sys/conf/files Thu Feb  6 08:47:14 2014(r261541)
@@ -2293,9 +2293,11 @@ dev/usb/net/if_rue.c optional rue
 dev/usb/net/if_smsc.c  optional smsc
 dev/usb/net/if_udav.c  optional udav
 dev/usb/net/if_usie.c  optional usie
+dev/usb/net/if_urndis.coptional urndis
 dev/usb/net/ruephy.c   optional rue
 dev/usb/net/usb_ethernet.c optional aue | axe | axge | cdce | cue | kue | \
-mos | rue | smsc | udav | ipheth
+mos | rue | smsc | udav | ipheth | \
+urndis
 dev/usb/net/uhso.c optional uhso
 #
 # USB WLAN drivers

Added: head/sys/dev/usb/net/if_urndis.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/usb/net/if_urndis.cThu Feb  6 08:47:14 2014
(r261541)
@@ -0,0 +1,1013 @@
+/* $OpenBSD: if_urndis.c,v 1.46 2013/12/09 15:45:29 pirofti Exp $ */
+
+/*
+ * Copyright (c) 2010 Jonathan Armani arm...@openbsd.org
+ * Copyright (c) 2010 Fabien Romano fab...@openbsd.org
+ * Copyright (c) 2010 Michael Knudsen m...@openbsd.org
+ * Copyright (c) 2014 Hans Petter Selasky hsela...@freebsd.org
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include sys/stdint.h
+#include sys/stddef.h
+#include sys/param.h
+#include sys/queue.h
+#include sys/types.h
+#include sys/systm.h
+#include sys/socket.h
+#include sys/kernel.h
+#include sys/bus.h
+#include sys/module.h
+#include sys/lock.h
+#include sys/mutex.h
+#include sys/condvar.h
+#include sys/sysctl.h
+#include sys/sx.h
+#include sys/unistd.h
+#include sys/callout.h
+#include sys/malloc.h
+#include sys/priv.h
+
+#include net/if.h
+#include net/if_var.h
+
+#include dev/usb/usb.h
+#include dev/usb/usbdi.h
+#include dev/usb/usbdi_util.h
+#include usbdevs.h
+
+#defineUSB_DEBUG_VAR urndis_debug
+#include dev/usb/usb_debug.h
+#include dev/usb/usb_process.h
+#include usb_if.h
+
+#include dev/usb/net/usb_ethernet.h
+#include dev/usb/net/if_urndisreg.h
+
+#include dev/usb/usb_cdc.h
+
+static device_probe_t urndis_probe;
+static device_attach_t urndis_attach;
+static device_detach_t urndis_detach;
+static device_suspend_t urndis_suspend;
+static device_resume_t urndis_resume;
+
+static usb_callback_t urndis_bulk_write_callback;
+static usb_callback_t urndis_bulk_read_callback;
+static usb_callback_t urndis_intr_read_callback;
+
+static uether_fn_t urndis_attach_post;
+static uether_fn_t urndis_init;
+static uether_fn_t urndis_stop;
+static uether_fn_t urndis_start;

svn commit: r261553 - head/sys/dev/vt

2014-02-06 Thread Aleksandr Rybalko
Author: ray
Date: Thu Feb  6 15:16:38 2014
New Revision: 261553
URL: http://svnweb.freebsd.org/changeset/base/261553

Log:
  Add vt_set_border function to help to change border color.
  Use vt_set_border to reset color after font changed (different font size may
  change border sizes)
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/vt_core.c
==
--- head/sys/dev/vt/vt_core.c   Thu Feb  6 15:12:44 2014(r261552)
+++ head/sys/dev/vt/vt_core.c   Thu Feb  6 15:16:38 2014(r261553)
@@ -1045,6 +1045,30 @@ vt_change_font(struct vt_window *vw, str
 }
 
 static int
+vt_set_border(struct vt_window *vw, struct vt_font *vf, term_color_t c)
+{
+   struct vt_device *vd = vw-vw_device;
+   int l, r, t, b, w, h;
+
+   if (vd-vd_driver-vd_drawrect == NULL)
+   return (ENOTSUP);
+
+   w = vd-vd_width - 1;
+   h = vd-vd_height - 1;
+   l = vd-vd_offset.tp_col - 1;
+   r = w - l;
+   t = vd-vd_offset.tp_row - 1;
+   b = h - t;
+
+   vd-vd_driver-vd_drawrect(vd, 0, 0, w, t, 1, c); /* Top bar. */
+   vd-vd_driver-vd_drawrect(vd, 0, t, l, b, 1, c); /* Left bar. */
+   vd-vd_driver-vd_drawrect(vd, r, t, w, b, 1, c); /* Right bar. */
+   vd-vd_driver-vd_drawrect(vd, 0, b, w, h, 1, c); /* Bottom bar. */
+
+   return (0);
+}
+
+static int
 vt_proc_alive(struct vt_window *vw)
 {
struct proc *p;
@@ -1562,6 +1586,10 @@ skip_thunk:
return (error);
 
error = vt_change_font(vw, vf);
+   if (error == 0) {
+   /* XXX: replace 0 with current bg color. */
+   vt_set_border(vw, vf, 0);
+   }
vtfont_unref(vf);
return (error);
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261555 - head/usr.bin/units

2014-02-06 Thread David Malone
Author: dwmalone
Date: Thu Feb  6 15:55:29 2014
New Revision: 261555
URL: http://svnweb.freebsd.org/changeset/base/261555

Log:
  Let units deal with Gas Mark and Stufe.

Modified:
  head/usr.bin/units/units.lib

Modified: head/usr.bin/units/units.lib
==
--- head/usr.bin/units/units.libThu Feb  6 15:46:33 2014
(r261554)
+++ head/usr.bin/units/units.libThu Feb  6 15:55:29 2014
(r261555)
@@ -679,6 +679,8 @@ degreesrankine  5|9 K
 degrankine degreesrankine
 degreerankine  degreesrankine
 degreaumur 10|8+273.15 K
+gasmark25|1250 degF
+Stufe  25|1125 degC
 drachm 60 grain
 poncelet   100 kg m g / sec
 denier .05|450 gram / m
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261558 - head/sys/dev/cxgbe

2014-02-06 Thread Scott Long
Author: scottl
Date: Thu Feb  6 18:40:38 2014
New Revision: 261558
URL: http://svnweb.freebsd.org/changeset/base/261558

Log:
  Add a new sysctl, dev.cxgbe.N.rsrv_noflow, and a companion tunable,
  hw.cxgbe.rsrv_noflow.  When set, queue 0 of the port is reserved for
  TX packets without a flowid.  The hash value of packets with a flowid
  is bumped up by 1.  The intent is to provide a private queue for
  link-level packets like LACP that is unlikely to overflow or suffer
  deep queue latency.
  
  Reviewed by:  np
  Obtained from:Netflix
  MFC after:3 days

Modified:
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hThu Feb  6 17:57:23 2014
(r261557)
+++ head/sys/dev/cxgbe/adapter.hThu Feb  6 18:40:38 2014
(r261558)
@@ -215,6 +215,7 @@ struct port_info {
/* These need to be int as they are used in sysctl */
int ntxq;   /* # of tx queues */
int first_txq;  /* index of first tx queue */
+   int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */
int nrxq;   /* # of rx queues */
int first_rxq;  /* index of first rx queue */
 #ifdef TCP_OFFLOAD

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cThu Feb  6 17:57:23 2014
(r261557)
+++ head/sys/dev/cxgbe/t4_main.cThu Feb  6 18:40:38 2014
(r261558)
@@ -197,6 +197,9 @@ TUNABLE_INT(hw.cxgbe.ntxq1g, t4_ntxq1
 static int t4_nrxq1g = -1;
 TUNABLE_INT(hw.cxgbe.nrxq1g, t4_nrxq1g);
 
+static int t4_rsrv_noflowq = 0;
+TUNABLE_INT(hw.cxgbe.rsrv_noflowq, t4_rsrv_noflowq);
+
 #ifdef TCP_OFFLOAD
 #define NOFLDTXQ_10G 8
 static int t4_nofldtxq10g = -1;
@@ -299,6 +302,7 @@ struct intrs_and_queues {
int nrxq10g;/* # of NIC rxq's for each 10G port */
int ntxq1g; /* # of NIC txq's for each 1G port */
int nrxq1g; /* # of NIC rxq's for each 1G port */
+   int rsrv_noflowq;   /* Flag whether to reserve queue 0 */
 #ifdef TCP_OFFLOAD
int nofldtxq10g;/* # of TOE txq's for each 10G port */
int nofldrxq10g;/* # of TOE rxq's for each 10G port */
@@ -375,6 +379,7 @@ static int cxgbe_sysctls(struct port_inf
 static int sysctl_int_array(SYSCTL_HANDLER_ARGS);
 static int sysctl_bitfield(SYSCTL_HANDLER_ARGS);
 static int sysctl_btphy(SYSCTL_HANDLER_ARGS);
+static int sysctl_noflowq(SYSCTL_HANDLER_ARGS);
 static int sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS);
 static int sysctl_holdoff_pktc_idx(SYSCTL_HANDLER_ARGS);
 static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS);
@@ -783,6 +788,11 @@ t4_attach(device_t dev)
pi-ntxq = iaq.ntxq1g;
}
 
+   if (pi-ntxq  1)
+   pi-rsrv_noflowq = iaq.rsrv_noflowq ? 1 : 0;
+   else
+   pi-rsrv_noflowq = 0;
+
rqidx += pi-nrxq;
tqidx += pi-ntxq;
 
@@ -1283,7 +1293,8 @@ cxgbe_transmit(struct ifnet *ifp, struct
}
 
if (m-m_flags  M_FLOWID)
-   txq += (m-m_pkthdr.flowid % pi-ntxq);
+   txq += ((m-m_pkthdr.flowid % (pi-ntxq - pi-rsrv_noflowq))
+   + pi-rsrv_noflowq);
br = txq-br;
 
if (TXQ_TRYLOCK(txq) == 0) {
@@ -1735,6 +1746,7 @@ cfg_itype_and_nqueues(struct adapter *sc
iaq-ntxq1g = t4_ntxq1g;
iaq-nrxq10g = nrxq10g = t4_nrxq10g;
iaq-nrxq1g = nrxq1g = t4_nrxq1g;
+   iaq-rsrv_noflowq = t4_rsrv_noflowq;
 #ifdef TCP_OFFLOAD
if (is_offload(sc)) {
iaq-nofldtxq10g = t4_nofldtxq10g;
@@ -4548,6 +4560,9 @@ cxgbe_sysctls(struct port_info *pi)
pi-first_rxq, 0, index of first rx queue);
SYSCTL_ADD_INT(ctx, children, OID_AUTO, first_txq, CTLFLAG_RD,
pi-first_txq, 0, index of first tx queue);
+   SYSCTL_ADD_PROC(ctx, children, OID_AUTO, rsrv_noflowq, CTLTYPE_INT |
+   CTLFLAG_RW, pi, 0, sysctl_noflowq, IU,
+   Reserve queue 0 for non-flowid packets);
 
 #ifdef TCP_OFFLOAD
if (is_offload(sc)) {
@@ -4802,6 +4817,25 @@ sysctl_btphy(SYSCTL_HANDLER_ARGS)
 }
 
 static int
+sysctl_noflowq(SYSCTL_HANDLER_ARGS)
+{
+   struct port_info *pi = arg1;
+   int rc, val;
+
+   val = pi-rsrv_noflowq;
+   rc = sysctl_handle_int(oidp, val, 0, req);
+   if (rc != 0 || req-newptr == NULL)
+   return (rc);
+
+   if ((val = 1)  (pi-ntxq  1))
+   pi-rsrv_noflowq = 1;
+   else
+   pi-rsrv_noflowq = 0;
+
+   return (rc);
+}
+
+static int
 sysctl_holdoff_tmr_idx(SYSCTL_HANDLER_ARGS)
 {
struct port_info *pi = arg1;
___
svn-src-head@freebsd.org mailing list

Re: svn commit: r261216 - head/sys/dev/pccbb

2014-02-06 Thread John Baldwin
On Wednesday, February 05, 2014 7:26:33 pm Gavin Atkinson wrote:
 On Tue, 4 Feb 2014, John Baldwin wrote:
  On Sunday, February 02, 2014 5:34:58 pm Gavin Atkinson wrote:
   On Mon, 27 Jan 2014, John Baldwin wrote:
Author: jhb
Date: Mon Jan 27 19:49:52 2014
New Revision: 261216
URL: http://svnweb.freebsd.org/changeset/base/261216

Log:
  Explicitly enable I/O and memory decoding in the bridge's command 
register
  when activating an I/O or memory window on the CardBus bridge.
   
   This fixes some, but not all of my machines.  One in particular, a 
   Toshiba 
   M5 laptop, remains broken by r254263 even with this change.  Specificaly, 
   the laptop does not notice when a card is inserted.
   
   The attached minimal patch gets things working again, though I don't know 
   if is the correct fix or if a more involved fix is required.
   
   dmesg before and after that patch:
   
   http://people.freebsd.org/~gavin/m5-dmesg-before.txt
   http://people.freebsd.org/~gavin/m5-dmesg-after.txt
   
   The only difference is the cbb register dump, the one bit that I am 
   setting in the patch.
  
  Your patch effectively reverts r254263.  It may be the correct thing to do,
  but the question is why. :)  Can you provide 'pciconf -lbc' output for this
  device?  (You can just do 'pciconf -lbc pccbb0' in HEAD now)
 
 Full pciconf -lbc output at 
 http://people.freebsd.org/~gavin/m5-pciconf-lbc.txt
 
 It's the same both with and without my hack-patch.

Humm, no I/O port BAR.  I found a copy of the cardbus spec online and there is
nothing special that says it requires I/O decoding to be enabled.  I guess add 
it
with an XXX comment of some sort to note that at least one chipset requires 
this.

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


svn commit: r261562 - in head/sys/arm: arm include

2014-02-06 Thread Andrew Turner
Author: andrew
Date: Thu Feb  6 20:17:58 2014
New Revision: 261562
URL: http://svnweb.freebsd.org/changeset/base/261562

Log:
  Pass the kernel physical address to initarm through the boot param struct.

Modified:
  head/sys/arm/arm/locore.S
  head/sys/arm/include/cpu.h

Modified: head/sys/arm/arm/locore.S
==
--- head/sys/arm/arm/locore.S   Thu Feb  6 19:47:50 2014(r261561)
+++ head/sys/arm/arm/locore.S   Thu Feb  6 20:17:58 2014(r261562)
@@ -216,7 +216,7 @@ mmu_done:
ldr pc, .Lvirt_done
 
 virt_done:
-   mov r1, #20 /* loader info size is 20 bytes also 
second arg */
+   mov r1, #24 /* loader info size is 24 bytes also 
second arg */
subssp, sp, r1  /* allocate arm_boot_params struct on 
stack */
bic sp, sp, #7  /* align stack to 8 bytes */
mov r0, sp  /* loader info pointer is first arg */
@@ -225,6 +225,8 @@ virt_done:
str r8, [r0, #8]/* Store r1 from boot loader */
str ip, [r0, #12]   /* store r2 from boot loader */
str fp, [r0, #16]   /* store r3 from boot loader */
+   ldr r5, =KERNPHYSADDR   /* load KERNPHYSADDR as the physical 
address */
+   str r5, [r0, #20]   /* store the physical address */
mov fp, #0  /* trace back starts here */
bl  _C_LABEL(initarm)   /* Off we go */
 

Modified: head/sys/arm/include/cpu.h
==
--- head/sys/arm/include/cpu.h  Thu Feb  6 19:47:50 2014(r261561)
+++ head/sys/arm/include/cpu.h  Thu Feb  6 20:17:58 2014(r261562)
@@ -41,6 +41,7 @@ struct arm_boot_params {
register_t  abp_r1; /* r1 from the boot loader */
register_t  abp_r2; /* r2 from the boot loader */
register_t  abp_r3; /* r3 from the boot loader */
+   vm_offset_t abp_physaddr;   /* The kernel physical address */
 };
 
 void   arm_vector_init(vm_offset_t, int);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261565 - in head/sys/arm: arm at91 econa include s3c2xx0 xscale/ixp425

2014-02-06 Thread Andrew Turner
Author: andrew
Date: Thu Feb  6 20:35:33 2014
New Revision: 261565
URL: http://svnweb.freebsd.org/changeset/base/261565

Log:
  Use abp_physaddr for the physical address over KERNPHYSADDR. This helps us
  remove the need to load the kernel at a fixed address.

Modified:
  head/sys/arm/arm/machdep.c
  head/sys/arm/at91/at91_machdep.c
  head/sys/arm/econa/econa_machdep.c
  head/sys/arm/include/machdep.h
  head/sys/arm/s3c2xx0/s3c24x0_machdep.c
  head/sys/arm/xscale/ixp425/avila_machdep.c

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Thu Feb  6 20:26:36 2014(r261564)
+++ head/sys/arm/arm/machdep.c  Thu Feb  6 20:35:33 2014(r261565)
@@ -788,7 +788,7 @@ makectx(struct trapframe *tf, struct pcb
  * calling pmap_bootstrap.
  */
 void
-arm_dump_avail_init(vm_offset_t ramsize, size_t max)
+arm_dump_avail_init(vm_paddr_t physaddr, vm_offset_t ramsize, size_t max)
 {
 #ifdef LINUX_BOOT_ABI
/*
@@ -814,8 +814,8 @@ arm_dump_avail_init(vm_offset_t ramsize,
if (max  4)
panic(dump_avail too small\n);
 
-   dump_avail[0] = round_page(PHYSADDR);
-   dump_avail[1] = trunc_page(PHYSADDR + ramsize);
+   dump_avail[0] = round_page(physaddr);
+   dump_avail[1] = trunc_page(physaddr + ramsize);
dump_avail[2] = 0;
dump_avail[3] = 0;
 }
@@ -901,7 +901,7 @@ linux_parse_boot_param(struct arm_boot_p
 
board_id = abp-abp_r1;
walker = (struct arm_lbabi_tag *)
-   (abp-abp_r2 + KERNVIRTADDR - KERNPHYSADDR);
+   (abp-abp_r2 + KERNVIRTADDR - abp-abp_physaddr);
 
/* xxx - Need to also look for binary device tree */
if (ATAG_TAG(walker) != ATAG_CORE)
@@ -979,7 +979,7 @@ freebsd_parse_boot_param(struct arm_boot
ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);
ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);
 #endif
-   preload_addr_relocate = KERNVIRTADDR - KERNPHYSADDR;
+   preload_addr_relocate = KERNVIRTADDR - abp-abp_physaddr;
return lastaddr;
 }
 #endif
@@ -1081,15 +1081,15 @@ print_kenv(void)
 }
 
 static void
-physmap_init(struct mem_region *availmem_regions, int availmem_regions_sz)
+physmap_init(struct mem_region *availmem_regions, int availmem_regions_sz,
+vm_offset_t kernload)
 {
int i, j, cnt;
-   vm_offset_t phys_kernelend, kernload;
+   vm_offset_t phys_kernelend;
uint32_t s, e, sz;
struct mem_region *mp, *mp1;
 
-   phys_kernelend = KERNPHYSADDR + (virtual_avail - KERNVIRTADDR);
-   kernload = KERNPHYSADDR;
+   phys_kernelend = kernload + (virtual_avail - KERNVIRTADDR);
 
/*
 * Remove kernel physical address range from avail
@@ -1331,7 +1331,7 @@ initarm(struct arm_boot_params *abp)
/* Define a macro to simplify memory allocation */
 #define valloc_pages(var, np)  \
alloc_pages((var).pv_va, (np)); \
-   (var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR);
+   (var).pv_pa = (var).pv_va + (abp-abp_physaddr - KERNVIRTADDR);
 
 #define alloc_pages(var, np)   \
(var) = freemempos; \
@@ -1352,7 +1352,7 @@ initarm(struct arm_boot_params *abp)
L2_TABLE_SIZE_REAL * (i - j);
kernel_pt_table[i].pv_pa =
kernel_pt_table[i].pv_va - KERNVIRTADDR +
-   KERNPHYSADDR;
+   abp-abp_physaddr;
 
}
}
@@ -1397,7 +1397,7 @@ initarm(struct arm_boot_params *abp)
pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE;
 
/* Map kernel code and data */
-   pmap_map_chunk(l1pagetable, KERNVIRTADDR, KERNPHYSADDR,
+   pmap_map_chunk(l1pagetable, KERNVIRTADDR, abp-abp_physaddr,
   (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK)  ~PAGE_MASK,
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 
@@ -1501,7 +1501,8 @@ initarm(struct arm_boot_params *abp)
 
arm_intrnames_init();
arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
-   arm_dump_avail_init(memsize, sizeof(dump_avail) / 
sizeof(dump_avail[0]));
+   arm_dump_avail_init(abp-abp_physaddr, memsize,
+   sizeof(dump_avail) / sizeof(dump_avail[0]));
pmap_bootstrap(freemempos, kernel_l1pt);
msgbufp = (void *)msgbufpv.pv_va;
msgbufinit(msgbufp, msgbufsize);
@@ -1510,7 +1511,7 @@ initarm(struct arm_boot_params *abp)
/*
 * Prepare map of physical memory regions available to vm subsystem.
 */
-   physmap_init(availmem_regions, availmem_regions_sz);
+   physmap_init(availmem_regions, availmem_regions_sz, abp-abp_physaddr);
 
init_param2(physmem);
kdb_init();

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

svn commit: r261566 - in head: sbin/dhclient tools/regression/security/cap_test

2014-02-06 Thread Christian Brueffer
Author: brueffer
Date: Thu Feb  6 21:36:14 2014
New Revision: 261566
URL: http://svnweb.freebsd.org/changeset/base/261566

Log:
  Use CAP_EVENT instead of the deprecated CAP_POLL_EVENT.
  
  PR:   185382 (based on)
  Submitted by: Loganaden Velvindron
  Reviewed by:  pjd
  MFC after:1 week

Modified:
  head/sbin/dhclient/bpf.c
  head/sbin/dhclient/dhclient.c
  head/tools/regression/security/cap_test/cap_test_capabilities.c

Modified: head/sbin/dhclient/bpf.c
==
--- head/sbin/dhclient/bpf.cThu Feb  6 20:35:33 2014(r261565)
+++ head/sbin/dhclient/bpf.cThu Feb  6 21:36:14 2014(r261566)
@@ -269,7 +269,7 @@ if_register_receive(struct interface_inf
if (ioctl(info-rfdesc, BIOCLOCK, NULL)  0)
error(Cannot lock bpf);
 
-   cap_rights_init(rights, CAP_IOCTL, CAP_POLL_EVENT, CAP_READ);
+   cap_rights_init(rights, CAP_IOCTL, CAP_EVENT, CAP_READ);
if (cap_rights_limit(info-rfdesc, rights)  0  errno != ENOSYS)
error(Can't limit bpf descriptor: %m);
if (cap_ioctls_limit(info-rfdesc, cmds, 2)  0  errno != ENOSYS)

Modified: head/sbin/dhclient/dhclient.c
==
--- head/sbin/dhclient/dhclient.c   Thu Feb  6 20:35:33 2014
(r261565)
+++ head/sbin/dhclient/dhclient.c   Thu Feb  6 21:36:14 2014
(r261566)
@@ -494,7 +494,7 @@ main(int argc, char *argv[])
add_protocol(AF_ROUTE, routefd, routehandler, ifi);
if (shutdown(routefd, SHUT_WR)  0)
error(can't shutdown route socket: %m);
-   cap_rights_init(rights, CAP_POLL_EVENT, CAP_READ);
+   cap_rights_init(rights, CAP_EVENT, CAP_READ);
if (cap_rights_limit(routefd, rights)  0  errno != ENOSYS)
error(can't limit route socket: %m);
 

Modified: head/tools/regression/security/cap_test/cap_test_capabilities.c
==
--- head/tools/regression/security/cap_test/cap_test_capabilities.c Thu Feb 
 6 20:35:33 2014(r261565)
+++ head/tools/regression/security/cap_test/cap_test_capabilities.c Thu Feb 
 6 21:36:14 2014(r261566)
@@ -396,7 +396,7 @@ try_file_ops(int filefd, int dirfd, cap_
pollfd.revents = 0;
 
ret = poll(pollfd, 1, 0);
-   if (rights  CAP_POLL_EVENT)
+   if (rights  CAP_EVENT)
CHECK((pollfd.revents  POLLNVAL) == 0);
else
CHECK((pollfd.revents  POLLNVAL) != 0);
@@ -546,7 +546,7 @@ test_capabilities(void)
TRY(CAP_SEM_POST);
TRY(CAP_SEM_WAIT);
TRY(CAP_POST_EVENT);
-   TRY(CAP_POLL_EVENT);
+   TRY(CAP_EVENT);
TRY(CAP_IOCTL);
TRY(CAP_TTYHOOK);
TRY(CAP_PDGETPID);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r261567 - in head/sys/boot: . i386/efi i386/gptboot i386/gptzfsboot i386/loader i386/zfsboot libstand32

2014-02-06 Thread Ed Maste
Author: emaste
Date: Thu Feb  6 21:54:21 2014
New Revision: 261567
URL: http://svnweb.freebsd.org/changeset/base/261567

Log:
  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.
  
  Sponsored by: The FreeBSD Foundation

Added:
  head/sys/boot/libstand32/
  head/sys/boot/libstand32/Makefile   (contents, props changed)
Modified:
  head/sys/boot/Makefile.amd64
  head/sys/boot/Makefile.i386
  head/sys/boot/i386/efi/Makefile
  head/sys/boot/i386/gptboot/Makefile
  head/sys/boot/i386/gptzfsboot/Makefile
  head/sys/boot/i386/loader/Makefile
  head/sys/boot/i386/zfsboot/Makefile

Modified: head/sys/boot/Makefile.amd64
==
--- head/sys/boot/Makefile.amd64Thu Feb  6 21:36:14 2014
(r261566)
+++ head/sys/boot/Makefile.amd64Thu Feb  6 21:54:21 2014
(r261567)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
 SUBDIR+=   efi
+SUBDIR+=   libstand32
 SUBDIR+=   zfs
 SUBDIR+=   userboot

Modified: head/sys/boot/Makefile.i386
==
--- head/sys/boot/Makefile.i386 Thu Feb  6 21:36:14 2014(r261566)
+++ head/sys/boot/Makefile.i386 Thu Feb  6 21:54:21 2014(r261567)
@@ -1,4 +1,5 @@
 # $FreeBSD$
 
 SUBDIR+=   efi
+SUBDIR+=   libstand32
 SUBDIR+=   zfs

Modified: head/sys/boot/i386/efi/Makefile
==
--- head/sys/boot/i386/efi/Makefile Thu Feb  6 21:36:14 2014
(r261566)
+++ head/sys/boot/i386/efi/Makefile Thu Feb  6 21:54:21 2014
(r261567)
@@ -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: head/sys/boot/i386/gptboot/Makefile
==
--- head/sys/boot/i386/gptboot/Makefile Thu Feb  6 21:36:14 2014
(r261566)
+++ head/sys/boot/i386/gptboot/Makefile Thu Feb  6 21:54:21 2014
(r261567)
@@ -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 bsd.init.mk
 

Modified: head/sys/boot/i386/gptzfsboot/Makefile
==
--- head/sys/boot/i386/gptzfsboot/Makefile  Thu Feb  6 21:36:14 2014
(r261566)
+++ head/sys/boot/i386/gptzfsboot/Makefile  Thu Feb  6 21:54:21 2014
(r261567)
@@ -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 bsd.init.mk
 

Modified: head/sys/boot/i386/loader/Makefile
==
--- head/sys/boot/i386/loader/Makefile  Thu Feb  6 21:36:14 2014
(r261566)
+++ head/sys/boot/i386/loader/Makefile  Thu Feb  6 21:54:21 2014
(r261567)
@@ -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: head/sys/boot/i386/zfsboot/Makefile
==
--- head/sys/boot/i386/zfsboot/Makefile Thu Feb  6 21:36:14 2014
(r261566)
+++ head/sys/boot/i386/zfsboot/Makefile Thu Feb  6 21:54:21 2014
(r261567)
@@ -35,6 +35,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 bsd.init.mk
 

Added: head/sys/boot/libstand32/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/libstand32/Makefile   Thu Feb  6 21:54:21 2014
(r261567)
@@ -0,0 +1,196 @@
+# $FreeBSD$
+# Originally from  $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $
+#
+# Notes:
+# - We don't use the libc strerror/sys_errlist because the string table is
+#   quite large.
+#
+
+NO_MAN=
+
+.include bsd.own.mk
+MK_SSP=no
+
+S= 

svn commit: r261568 - head/lib/libstand

2014-02-06 Thread Ed Maste
Author: emaste
Date: Thu Feb  6 21:57:27 2014
New Revision: 261568
URL: http://svnweb.freebsd.org/changeset/base/261568

Log:
  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.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/lib/libstand/Makefile
  head/lib/libstand/libstand.3

Modified: head/lib/libstand/Makefile
==
--- head/lib/libstand/Makefile  Thu Feb  6 21:54:21 2014(r261567)
+++ head/lib/libstand/Makefile  Thu Feb  6 21:57:27 2014(r261568)
@@ -21,16 +21,21 @@ CFLAGS+= -ffreestanding -Wformat
 CFLAGS+= -I${.CURDIR}
 
 .if ${MACHINE_CPUARCH} == i386 || ${MACHINE_CPUARCH} == amd64
-CFLAGS.gcc+=   -mpreferred-stack-boundary=2
 CFLAGS+=   -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
 .endif
+.if ${MACHINE_CPUARCH} == i386
+CFLAGS.gcc+=   -mpreferred-stack-boundary=2
+.endif
+.if ${MACHINE_CPUARCH} == amd64
+CFLAGS+=   -fPIC
+.endif
 .if ${MACHINE} == pc98
 CFLAGS+=   -Os
 .endif
 .if ${MACHINE_CPUARCH} == powerpc
 CFLAGS+=   -msoft-float -D_STANDALONE -DNETIF_DEBUG
 .endif
-.if ${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == powerpc64
+.if ${MACHINE_ARCH} == powerpc64
 CFLAGS+=   -m32 -I.
 .endif
 .if ${MACHINE_CPUARCH} == arm
@@ -103,9 +108,7 @@ SRCS+=  syncicache.c
 SRCS+= uuid_equal.c uuid_is_nil.c
 
 # _setjmp/_longjmp
-.if ${MACHINE_CPUARCH} == amd64
-.PATH: ${.CURDIR}/i386
-.elif ${MACHINE_ARCH} == powerpc64
+.if ${MACHINE_ARCH} == powerpc64
 .PATH: ${.CURDIR}/powerpc
 .else
 .PATH: ${.CURDIR}/${MACHINE_CPUARCH}
@@ -179,12 +182,3 @@ SRCS+= nandfs.c
 
 .include bsd.lib.mk
 
-.if ${MACHINE_CPUARCH} == amd64
-beforedepend ${OBJS}: machine
-cleandepend: cleanmachine
-cleanmachine:
-   rm -f machine
-
-machine:
-   ln -s ${.CURDIR}/../../sys/i386/include machine
-.endif

Modified: head/lib/libstand/libstand.3
==
--- head/lib/libstand/libstand.3Thu Feb  6 21:54:21 2014
(r261567)
+++ head/lib/libstand/libstand.3Thu Feb  6 21:57:27 2014
(r261568)
@@ -675,6 +675,6 @@ the environment functions and this manpa
 .Sh BUGS
 The lack of detailed memory usage data is unhelpful.
 .Pp
-On the amd64 and powerpc64 architectures
+On the powerpc64 architecture
 .Nm
 is a 32-bit library.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r261266 - in head: sys/dev/drm sys/kern sys/sys usr.sbin/jail

2014-02-06 Thread John Baldwin
On Thursday, February 06, 2014 3:53:00 pm Alexander Leidinger wrote:
 On Wed, 05 Feb 2014 14:05:29 -0500
 John Baldwin j...@freebsd.org wrote:
 
  I think having a kmem flag for jails is a hack and not the right
  approach. It does make a jail useless security-wise, but by
  masquerading as a flag, it implies that it is only partially
  violating security which gives a false sense of security.
 
 I think we need to differentiate between security and safety here. The
 allow_kmem flag disables security (protections against a malicious
 program which was written specially to make use of kmem/io to do
 something nasty and requires much more knowledge to write) but does not
 allow all the other things for which we have flags (raw sockets,
 chflags, mount). The safety aspect comes into play when you have badly
 behaving programs (in the sense of bugs, stupid programmers or unwanted
 behavior in some parts of a program). In such a case you may want to
 allow kmem access, but not raw socket / ... access.

If a programmer writing a program can't be trusted to use a raw socket, you 
really think they can be trusted with kmem access?  If they are careful
enough to be trusted with kmem access, they are careful enough to be trusted
to only open a raw socket if they need it.  The problem with kmem is that
it subverts everything you could put into place including capsicum, etc.  Put 
another way: if you think you can't trust the program to not open a raw 
socket, then you definitely shouldn't trust it with kmem access.  Also, in 
terms of bugs, kmem access is actually far worse!  Now if you get a simple 
buffer overflow you might end up trashing kmem.  I'd much rather a buggy 
program open a raw socket than be able to open /dev/kmem.

 Having it as a flag does not imply to me that is is only partly
 violating security, I think it is just a matter of wording. Either in
 the description of the flag, or additionally in the naming of the
 flag (maybe more in the sense of allow.open_backdoor?)

All the other flags poke small holes in the existing jail barrier.  The kmem 
flag shreds the barrier, so it is not of the same class.  Any new flag that 
removes all security needs to be very explicitly labelled as such so that it 
is clear to users what is actually occurring.

  A short term solution that would permit non-security jails without
  having to do the longer term work that Robert would like might be to
  add a new per-jail flag that in effect means no security at all.
 
 Personally I wouldn't object if we replace the kmem flag with a no
 security at all solution, I would keep the patch locally until the
 long term solution may or may not surface.
 
 Note: over the years I had several people which were interested in my
 patch. Not an overwhelming amount, but still, there are people
 interested in it.

Interest in a patch doesn't mean it is correct.

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


Re: svn commit: r261283 - in head: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src etc/mtree lib/libc++ sys/sys tools/build/mk

2014-02-06 Thread Alan Somers
On Thu, Jan 30, 2014 at 12:44 AM, Dimitry Andric d...@freebsd.org wrote:
 Author: dim
 Date: Thu Jan 30 07:44:22 2014
 New Revision: 261283
 URL: http://svnweb.freebsd.org/changeset/base/261283

 Log:
   Import libc++ 3.4 release.  This contains a lot of bugfixes, and some
   preliminary support for C++1y.

   MFC after:3 weeks

 Added:
...
   head/contrib/libc++/include/locale

This broke the build when WITH_TESTS=yes is set.
contrib/atf/atf-c++/detail/application.cpp fails to compile as shown
below.  All that file does is #include several standard headers, so I
think the problem is strictly within libc++.  Tinderbox probably
didn't catch it because the base system includes so little C++, and
WITH_TESTS is off by default.  By inspection, I can't tell why locale
compiled before this change; the offending LOC are identical.  Can you
please take a look?

c++  -fpic -DPIC  -O2 -pipe -DHAVE_CONFIG_H -DATF_ARCH='amd64'
-DATF_BUILD_CC='cc ' -DATF_BUILD_CFLAGS='-O2 -pipe '
-DATF_BUILD_CPP='cpp ' -DATF_BUILD_CPPFLAGS=''
-DATF_BUILD_CXX='c++ ' -DATF_BUILD_CXXFLAGS='-O2 -pipe'
-DATF_CONFDIR='/etc/atf'
-DATF_C_TESTS_BASE='/usr/tests/lib/atf/libatf-c'
-DATF_INCLUDEDIR='/usr/include' -DATF_LIBDIR='/usr/lib'
-DATF_LIBEXECDIR='/usr/libexec' -DATF_MACHINE='amd64'
-DATF_M4='/usr/bin/m4' -DATF_PKGDATADIR='/usr/share/atf'
-DATF_SHELL='/bin/sh' -DATF_WORKDIR='/tmp'
-I/usr/home/alans/freebsd/head/contrib/atf
-I/usr/home/alans/freebsd/head/lib/atf/libatf-c++/../libatf-c -I.
-DHAVE_CONFIG_H -Qunused-arguments -fstack-protector -Wsystem-headers
-Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith
-Wno-uninitialized -Wno-empty-body -Wno-string-plus-int
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality
-Wno-unused-function -Wno-enum-conversion -Wno-c++11-extensions  -c
/usr/home/alans/freebsd/head/contrib/atf/atf-c++/detail/application.cpp
-o application.So
In file included from
/usr/home/alans/freebsd/head/contrib/atf/atf-c++/detail/application.cpp:42:
In file included from
/vmpool/obj/usr/home/alans/freebsd/head/tmp/usr/include/c++/v1/iostream:40:
In file included from
/vmpool/obj/usr/home/alans/freebsd/head/tmp/usr/include/c++/v1/istream:156:
In file included from
/vmpool/obj/usr/home/alans/freebsd/head/tmp/usr/include/c++/v1/ostream:133:
/vmpool/obj/usr/home/alans/freebsd/head/tmp/usr/include/c++/v1/locale:1015:27:
error: comparison of integers of different signs: 'long' and
'size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
if (__a_end - __a == __buf.size())
~ ^  
/vmpool/obj/usr/home/alans/freebsd/head/tmp/usr/include/c++/v1/locale:1065:27:
error: comparison of integers of different signs: 'long' and
'size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
if (__a_end - __a == __buf.size())
~ ^  
/vmpool/obj/usr/home/alans/freebsd/head/tmp/usr/include/c++/v1/locale:1119:27:
error: comparison of integers of different signs: 'long' and
'size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
if (__a_end - __a == __buf.size())
~ ^  
3 errors generated.
*** [application.So] Error code 1

bmake[4]: stopped in /usr/home/alans/freebsd/head/lib/atf/libatf-c++
1 error


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


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

2014-02-06 Thread Ian Lepore
Author: ian
Date: Fri Feb  7 03:30:16 2014
New Revision: 261570
URL: http://svnweb.freebsd.org/changeset/base/261570

Log:
  Revert r260440.  I didn't realize that most of this change was already
  in effect due to r250753.  That is sufficient for all SoCs with a 32 byte
  cache line size.  Systems with 64 byte cache lines will need the option;
  that will be done in a separate commit.
  
  Thanks to loos@ for pointing out r250753.

Modified:
  head/sys/arm/conf/AC100
  head/sys/arm/conf/ARMADAXP
  head/sys/arm/conf/ARNDALE
  head/sys/arm/conf/ATMEL
  head/sys/arm/conf/AVILA
  head/sys/arm/conf/BWCT
  head/sys/arm/conf/CAMBRIA
  head/sys/arm/conf/CNS11XXNAS
  head/sys/arm/conf/CUBIEBOARD
  head/sys/arm/conf/CUBIEBOARD2
  head/sys/arm/conf/DB-78XXX
  head/sys/arm/conf/DB-88F5XXX
  head/sys/arm/conf/DB-88F6XXX
  head/sys/arm/conf/DIGI-CCWMX53
  head/sys/arm/conf/EA3250
  head/sys/arm/conf/EB9200
  head/sys/arm/conf/EFIKA_MX
  head/sys/arm/conf/ETHERNUT5
  head/sys/arm/conf/HL200
  head/sys/arm/conf/HL201
  head/sys/arm/conf/IMX53-QSB
  head/sys/arm/conf/KB920X
  head/sys/arm/conf/LN2410SBC
  head/sys/arm/conf/NSLU
  head/sys/arm/conf/PANDABOARD
  head/sys/arm/conf/QILA9G20
  head/sys/arm/conf/RPI-B
  head/sys/arm/conf/SAM9260EK
  head/sys/arm/conf/SAM9G20EK
  head/sys/arm/conf/SAM9X25EK
  head/sys/arm/conf/SHEEVAPLUG
  head/sys/arm/conf/SN9G45
  head/sys/arm/conf/TS7800
  head/sys/arm/conf/ZEDBOARD

Modified: head/sys/arm/conf/AC100
==
--- head/sys/arm/conf/AC100 Thu Feb  6 22:10:26 2014(r261569)
+++ head/sys/arm/conf/AC100 Fri Feb  7 03:30:16 2014(r261570)
@@ -66,7 +66,6 @@ deviceloop
 device md
 
 # USB
-optionsUSB_HOST_ALIGN=32   # Align usb buffers to cache line size.
 #options   USB_DEBUG   # enable debug msgs
 #deviceusb
 #deviceehci

Modified: head/sys/arm/conf/ARMADAXP
==
--- head/sys/arm/conf/ARMADAXP  Thu Feb  6 22:10:26 2014(r261569)
+++ head/sys/arm/conf/ARMADAXP  Fri Feb  7 03:30:16 2014(r261570)
@@ -67,7 +67,6 @@ deviceloop
 device md
 
 # USB
-optionsUSB_HOST_ALIGN=32   # Align usb buffers to cache line size.
 optionsUSB_DEBUG   # enable debug msgs
 device usb
 device ehci

Modified: head/sys/arm/conf/ARNDALE
==
--- head/sys/arm/conf/ARNDALE   Thu Feb  6 22:10:26 2014(r261569)
+++ head/sys/arm/conf/ARNDALE   Fri Feb  7 03:30:16 2014(r261570)
@@ -94,7 +94,6 @@ devicemd
 device gpio
 
 # USB support
-optionsUSB_HOST_ALIGN=64   # Align usb buffers to cache line size.
 device usb
 optionsUSB_DEBUG
 #options   USB_REQ_DEBUG

Modified: head/sys/arm/conf/ATMEL
==
--- head/sys/arm/conf/ATMEL Thu Feb  6 22:10:26 2014(r261569)
+++ head/sys/arm/conf/ATMEL Fri Feb  7 03:30:16 2014(r261570)
@@ -156,7 +156,6 @@ device  uart# Multi-uart driver
 optionsALT_BREAK_TO_DEBUGGER
 
 # USB support
-optionsUSB_HOST_ALIGN=32   # Align usb buffers to cache line size.
 optionsUSB_DEBUG   # enable debug msgs
 device ohci# OHCI USB interface
 device usb # USB Bus (required)

Modified: head/sys/arm/conf/AVILA
==
--- head/sys/arm/conf/AVILA Thu Feb  6 22:10:26 2014(r261569)
+++ head/sys/arm/conf/AVILA Fri Feb  7 03:30:16 2014(r261570)
@@ -143,7 +143,6 @@ device  ath_ar9160
 device ath_ar9280
 
 device usb
-optionsUSB_HOST_ALIGN=32   # Align usb buffers to cache line size.
 #options   USB_DEBUG
 device ohci
 device ehci

Modified: head/sys/arm/conf/BWCT
==
--- head/sys/arm/conf/BWCT  Thu Feb  6 22:10:26 2014(r261569)
+++ head/sys/arm/conf/BWCT  Fri Feb  7 03:30:16 2014(r261570)
@@ -104,7 +104,6 @@ device  spibus
 device bpf # Berkeley packet filter
 
 #options USB_DEBUG
-optionsUSB_HOST_ALIGN=32   # Align usb buffers to cache line size.
 #deviceohci
 #deviceusb
 #deviceumass   # Disks/Mass storage - Requires scbus 
and da

Modified: head/sys/arm/conf/CAMBRIA
==
--- head/sys/arm/conf/CAMBRIA   Thu Feb  6 22:10:26 2014(r261569)
+++ head/sys/arm/conf/CAMBRIA   Fri Feb  7 03:30:16 2014(r261570)
@@ 

Re: svn commit: r261567 - in head/sys/boot: . i386/efi i386/gptboot i386/gptzfsboot i386/loader i386/zfsboot libstand32

2014-02-06 Thread Nathan Whitehorn

On 02/06/14 15:54, Ed Maste wrote:

Author: emaste
Date: Thu Feb  6 21:54:21 2014
New Revision: 261567
URL: http://svnweb.freebsd.org/changeset/base/261567

Log:
   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.
   
   Sponsored by:	The FreeBSD Foundation




Please also do this for the powerpc64 bootloader, which, like amd64, is 
32-bit.

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


Re: svn commit: r261564 - head/sys/arm/arm

2014-02-06 Thread John-Mark Gurney
Nathan Whitehorn wrote this message on Thu, Feb 06, 2014 at 21:03 -0600:
 On 02/06/14 14:26, Andrew Turner wrote:
 Author: andrew
 Date: Thu Feb  6 20:26:36 2014
 New Revision: 261564
 URL: http://svnweb.freebsd.org/changeset/base/261564
 
 Log:
Fix __syscall on armeb EABI. As it returns a 64-bit value it needs to 
place
32-bit data in r1, not r0. 64-bit data is already packed correctly.
 
 Does this mean armeb works again?

It's getting closer...   I have a pending fix for off_t that I need to
resolve w/ bde, and then there is the wired mapping panic issue that
I've posted about to -arm...  I've gotten a bit busy the last couple
weeks, so I haven't had time to work on it recently...

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

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


Re: svn commit: r261071 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc

2014-02-06 Thread Lawrence Stewart
Hi Jason,

On 01/23/14 13:47, Jason Evans wrote:
 Author: jasone
 Date: Thu Jan 23 02:47:36 2014
 New Revision: 261071
 URL: http://svnweb.freebsd.org/changeset/base/261071
 
 Log:
   Update jemalloc to version 3.5.0.

I suspect that this commit is related to the assertion failures I've
been seeing on recent head when I updated from r260427 to r261453.
Here's two I noticed today:

jemalloc:
/usr/local/poudriere/jails/head-amd64/usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:7
76: Failed assertion: binind == actual_binind
*** Signal 6

and

jemalloc:
/usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:776:
Failed assertion: binind == actual_binind
Abort trap

I seem to be able to reproduce the first one readily when poudriere
tries to build chromium so I can provide more info and help test ideas.

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


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

2014-02-06 Thread Ian Lepore
Author: ian
Date: Fri Feb  7 04:05:08 2014
New Revision: 261572
URL: http://svnweb.freebsd.org/changeset/base/261572

Log:
  Add option USB_HOST_ALIGN=64 for all SoCs that have 64 byte cache lines.

Modified:
  head/sys/arm/conf/ARNDALE
  head/sys/arm/conf/CUBIEBOARD
  head/sys/arm/conf/CUBIEBOARD2
  head/sys/arm/conf/DIGI-CCWMX53
  head/sys/arm/conf/EFIKA_MX
  head/sys/arm/conf/IMX53-QSB
  head/sys/arm/conf/PANDABOARD

Modified: head/sys/arm/conf/ARNDALE
==
--- head/sys/arm/conf/ARNDALE   Fri Feb  7 04:02:14 2014(r261571)
+++ head/sys/arm/conf/ARNDALE   Fri Feb  7 04:05:08 2014(r261572)
@@ -94,6 +94,7 @@ devicemd
 device gpio
 
 # USB support
+optionsUSB_HOST_ALIGN=64   # Align usb buffers to cache line size.
 device usb
 optionsUSB_DEBUG
 #options   USB_REQ_DEBUG

Modified: head/sys/arm/conf/CUBIEBOARD
==
--- head/sys/arm/conf/CUBIEBOARDFri Feb  7 04:02:14 2014
(r261571)
+++ head/sys/arm/conf/CUBIEBOARDFri Feb  7 04:05:08 2014
(r261572)
@@ -106,6 +106,7 @@ device  da  # Direct Access 
(disks)
 device pass
 
 # USB support
+optionsUSB_HOST_ALIGN=64   # Align usb buffers to cache line size.
 device usb
 optionsUSB_DEBUG
 #options   USB_REQ_DEBUG

Modified: head/sys/arm/conf/CUBIEBOARD2
==
--- head/sys/arm/conf/CUBIEBOARD2   Fri Feb  7 04:02:14 2014
(r261571)
+++ head/sys/arm/conf/CUBIEBOARD2   Fri Feb  7 04:05:08 2014
(r261572)
@@ -106,6 +106,7 @@ device  da  # Direct Access 
(disks)
 device pass
 
 # USB support
+optionsUSB_HOST_ALIGN=64   # Align usb buffers to cache line size.
 device usb
 optionsUSB_DEBUG
 #options   USB_REQ_DEBUG

Modified: head/sys/arm/conf/DIGI-CCWMX53
==
--- head/sys/arm/conf/DIGI-CCWMX53  Fri Feb  7 04:02:14 2014
(r261571)
+++ head/sys/arm/conf/DIGI-CCWMX53  Fri Feb  7 04:05:08 2014
(r261572)
@@ -134,6 +134,7 @@ device  cd  # CD
 device pass# Passthrough device (direct SCSI access)
 
 # USB support
+optionsUSB_HOST_ALIGN=64   # Align usb buffers to cache line size.
 optionsUSB_DEBUG   # enable debug msgs
 device ehci# OHCI USB interface
 device usb # USB Bus (required)

Modified: head/sys/arm/conf/EFIKA_MX
==
--- head/sys/arm/conf/EFIKA_MX  Fri Feb  7 04:02:14 2014(r261571)
+++ head/sys/arm/conf/EFIKA_MX  Fri Feb  7 04:05:08 2014(r261572)
@@ -130,6 +130,7 @@ device  cd  # CD
 device pass# Passthrough device (direct SCSI access)
 
 # USB support
+optionsUSB_HOST_ALIGN=64   # Align usb buffers to cache line size.
 #options   USB_DEBUG   # enable debug msgs
 device ehci# OHCI USB interface
 device usb # USB Bus (required)

Modified: head/sys/arm/conf/IMX53-QSB
==
--- head/sys/arm/conf/IMX53-QSB Fri Feb  7 04:02:14 2014(r261571)
+++ head/sys/arm/conf/IMX53-QSB Fri Feb  7 04:05:08 2014(r261572)
@@ -133,6 +133,7 @@ device  cd  # CD
 device pass# Passthrough device (direct SCSI access)
 
 # USB support
+optionsUSB_HOST_ALIGN=64   # Align usb buffers to cache line size.
 #options   USB_DEBUG   # enable debug msgs
 device ehci# OHCI USB interface
 device usb # USB Bus (required)

Modified: head/sys/arm/conf/PANDABOARD
==
--- head/sys/arm/conf/PANDABOARDFri Feb  7 04:02:14 2014
(r261571)
+++ head/sys/arm/conf/PANDABOARDFri Feb  7 04:05:08 2014
(r261572)
@@ -112,6 +112,7 @@ device  md
 device random  # Entropy device
 
 # USB support
+optionsUSB_HOST_ALIGN=64   # Align usb buffers to cache line size.
 device usb
 optionsUSB_DEBUG
 #options   USB_REQ_DEBUG
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r261564 - head/sys/arm/arm

2014-02-06 Thread Nathan Whitehorn

On 02/06/14 14:26, Andrew Turner wrote:

Author: andrew
Date: Thu Feb  6 20:26:36 2014
New Revision: 261564
URL: http://svnweb.freebsd.org/changeset/base/261564

Log:
   Fix __syscall on armeb EABI. As it returns a 64-bit value it needs to place
   32-bit data in r1, not r0. 64-bit data is already packed correctly.



Does this mean armeb works again?
-Nathan
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r261071 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc

2014-02-06 Thread Jason Evans
On Feb 6, 2014, at 8:01 PM, Lawrence Stewart lstew...@freebsd.org wrote:
 On 01/23/14 13:47, Jason Evans wrote:
 Author: jasone
 Date: Thu Jan 23 02:47:36 2014
 New Revision: 261071
 URL: http://svnweb.freebsd.org/changeset/base/261071
 
 Log:
  Update jemalloc to version 3.5.0.
 
 I suspect that this commit is related to the assertion failures I've
 been seeing on recent head when I updated from r260427 to r261453.
 Here's two I noticed today:
 
 jemalloc:
 /usr/local/poudriere/jails/head-amd64/usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:7
 76: Failed assertion: binind == actual_binind
 *** Signal 6
 
 and
 
 jemalloc:
 /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:776:
 Failed assertion: binind == actual_binind
 Abort trap
 
 I seem to be able to reproduce the first one readily when poudriere
 tries to build chromium so I can provide more info and help test ideas.
 
 Cheers,
 Lawrence

Are the failures you saw happening only for the chromium build, or have you 
seen that same failure for other things as well?  If it’s just the chromium 
build, is there any chance that this same failure would have occurred prior to 
the jemalloc 3.5.0 update?

If this is an application bug, it’s probably due do a buffer overrun corrupting 
an adjacent page that contains page run metadata.  If it’s a jemalloc bug, I’m 
going to need to reproduce it and dig in; it’s unlikely to be easy to diagnose.

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


svn commit: r261577 - head/sys/dev/msk

2014-02-06 Thread Pyun YongHyeon
Author: yongari
Date: Fri Feb  7 05:08:59 2014
New Revision: 261577
URL: http://svnweb.freebsd.org/changeset/base/261577

Log:
  Revert r234666.  Clearing TWSI IRQ seems to cause watchdog timeout
  on old Yukon II controllers.
  
  Tested by:bsam
  MFC after:2 weeks

Modified:
  head/sys/dev/msk/if_msk.c

Modified: head/sys/dev/msk/if_msk.c
==
--- head/sys/dev/msk/if_msk.c   Fri Feb  7 04:35:20 2014(r261576)
+++ head/sys/dev/msk/if_msk.c   Fri Feb  7 05:08:59 2014(r261577)
@@ -3750,9 +3750,6 @@ msk_intr(void *xsc)
if ((status  Y2_IS_STAT_BMU) != 0  domore == 0)
CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_CLR_IRQ);
 
-   /* Clear TWSI IRQ. */
-   if ((status  Y2_IS_TWSI_RDY) != 0)
-   CSR_WRITE_4(sc, B2_I2C_IRQ, 1);
/* Reenable interrupts. */
CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2);
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org