svn commit: r280948 - head/sys/mips/conf

2015-03-31 Thread Adrian Chadd
Author: adrian
Date: Wed Apr  1 06:44:39 2015
New Revision: 280948
URL: https://svnweb.freebsd.org/changeset/base/280948

Log:
  Migrate the TL-WR1043nd v2 to use the new map based MAC hints mechanism.
  
  This programs separate, correct mac addresses for the ethernet and
  wlan interfaces.

Modified:
  head/sys/mips/conf/TL-WR1043NDv2.hints

Modified: head/sys/mips/conf/TL-WR1043NDv2.hints
==
--- head/sys/mips/conf/TL-WR1043NDv2.hints  Wed Apr  1 05:55:03 2015
(r280947)
+++ head/sys/mips/conf/TL-WR1043NDv2.hints  Wed Apr  1 06:44:39 2015
(r280948)
@@ -6,6 +6,25 @@
 # QCA955X_ETH_CFG_RGMII_EN (1 << 0)
 hint.qca955x_gmac.0.gmac_cfg=0x1
 
+# Use base mac address for wifi; +1 and +2 for arge0/arge1.
+hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00
+hint.ar71xx.0.eeprom_mac_isascii=0
+
+hint.ar71xx_mac_map.0.devid=ath
+hint.ar71xx_mac_map.0.unitid=0
+hint.ar71xx_mac_map.0.offset=0
+hint.ar71xx_mac_map.0.is_local=0
+
+hint.ar71xx_mac_map.1.devid=arge
+hint.ar71xx_mac_map.1.unitid=0
+hint.ar71xx_mac_map.1.offset=1
+hint.ar71xx_mac_map.1.is_local=0
+
+hint.ar71xx_mac_map.2.devid=arge
+hint.ar71xx_mac_map.2.unitid=1
+hint.ar71xx_mac_map.2.offset=2
+hint.ar71xx_mac_map.2.is_local=0
+
 # mdiobus0 on arge0
 hint.argemdio.0.at="nexus0"
 hint.argemdio.0.maddr=0x1900
@@ -89,8 +108,6 @@ hint.arge.0.media=1000
 hint.arge.0.fduplex=1
 hint.arge.0.pll_1000=0x5600
 
-hint.arge.0.eeprommac=0x1f01fc00
-
 # arge1 - lock up to 1000/full
 hint.arge.1.phymask=0x0
 hint.arge.1.media=1000
___
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: r280818 - in head: lib/libc/include lib/libc/sys lib/libthr/thread share/man/man3

2015-03-31 Thread John-Mark Gurney
Konstantin Belousov wrote this message on Sun, Mar 29, 2015 at 19:14 +:
> -.Fn EV_SET "&kev" ident filter flags fflags data udata
> +.Fn EV_SET "kev" ident filter flags fflags data udata

I'm wondering if this change was intentional?  Are you planning on
changing the EV_SET macro?

-- 
  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: r280943 - head/tools/tools/ath/athstats

2015-03-31 Thread Adrian Chadd
Author: adrian
Date: Wed Apr  1 04:57:27 2015
New Revision: 280943
URL: https://svnweb.freebsd.org/changeset/base/280943

Log:
  Don't use a private copy of the ANI definitions - use the HAL definitions.
  
  Whilst I'm at it:
  
  * fix the NI+ to be correct, rather than NI-;
  * use the diag api codes, now that the HAL is public.
  
  Tested:
  
  * AR9380, STA mode

Modified:
  head/tools/tools/ath/athstats/athstats.c

Modified: head/tools/tools/ath/athstats/athstats.c
==
--- head/tools/tools/ath/athstats/athstats.cWed Apr  1 04:56:22 2015
(r280942)
+++ head/tools/tools/ath/athstats/athstats.cWed Apr  1 04:57:27 2015
(r280943)
@@ -51,6 +51,7 @@
 
 #include "ah.h"
 #include "ah_desc.h"
+#include "ah_diagcodes.h"
 #include "net80211/ieee80211_ioctl.h"
 #include "net80211/ieee80211_radiotap.h"
 #include "if_athioctl.h"
@@ -336,7 +337,7 @@ static const struct fmt athstats[] = {
 #defineS_ANI_LISTENAFTER(S_ANI_MAXSPUR)
{ 6,"listen","LISTEN",  "listen time" },
 #defineS_ANI_NIUP  AFTER(S_ANI_LISTEN)
-   { 4,"ni+",  "NI-",  "ANI increased noise immunity" },
+   { 4,"ni+",  "NI+",  "ANI increased noise immunity" },
 #defineS_ANI_NIDOWNAFTER(S_ANI_NIUP)
{ 4,"ni-",  "NI-",  "ANI decrease noise immunity" },
 #defineS_ANI_SIUP  AFTER(S_ANI_NIDOWN)
@@ -428,39 +429,11 @@ static const struct fmt athstats[] = {
 #defineS_LAST  S_ANT_TX0
 #defineS_MAX   S_BMISSCOUNT+1
 
-/*
- * XXX fold this into the external HAL definitions! -adrian
- */
 struct _athstats {
struct ath_stats ath;
 #ifdef ATH_SUPPORT_ANI
-   struct {
-   uint32_t ast_ani_niup;  /* increased noise immunity */
-   uint32_t ast_ani_nidown;/* decreased noise immunity */
-   uint32_t ast_ani_spurup;/* increased spur immunity */
-   uint32_t ast_ani_spurdown;  /* descreased spur immunity */
-   uint32_t ast_ani_ofdmon;/* OFDM weak signal detect on */
-   uint32_t ast_ani_ofdmoff;   /* OFDM weak signal detect off*/
-   uint32_t ast_ani_cckhigh;   /* CCK weak signal thr high */
-   uint32_t ast_ani_ccklow;/* CCK weak signal thr low */
-   uint32_t ast_ani_stepup;/* increased first step level */
-   uint32_t ast_ani_stepdown;  /* decreased first step level */
-   uint32_t ast_ani_ofdmerrs;  /* cumulative ofdm phy err cnt*/
-   uint32_t ast_ani_cckerrs;   /* cumulative cck phy err cnt */
-   uint32_t ast_ani_reset; /* params zero'd for non-STA */
-   uint32_t ast_ani_lzero; /* listen time forced to zero */
-   uint32_t ast_ani_lneg;  /* listen time calculated < 0 */
-   HAL_MIB_STATS ast_mibstats; /* MIB counter stats */
-   HAL_NODE_STATS ast_nodestats;   /* latest rssi stats */
-   } ani_stats;
-   struct {
-   uint8_t noiseImmunityLevel;
-   uint8_t spurImmunityLevel;
-   uint8_t firstepLevel;
-   uint8_t ofdmWeakSigDetectOff;
-   uint8_t cckWeakSigThreshold;
-   uint32_t listenTime;
-   } ani_state;
+   HAL_ANI_STATS ani_stats;
+   HAL_ANI_STATE ani_state;
 #endif
 };
 
@@ -504,14 +477,14 @@ ath_collect(struct athstatfoo_p *wf, str
err(1, "ioctl: %s", wf->ifr.ifr_name);
 #ifdef ATH_SUPPORT_ANI
if (wf->optstats & ATHSTATS_ANI) {
-   wf->atd.ad_id = 5;
+   wf->atd.ad_id = HAL_DIAG_ANI_CURRENT; /* HAL_DIAG_ANI_CURRENT */
wf->atd.ad_out_data = (caddr_t) &stats->ani_state;
wf->atd.ad_out_size = sizeof(stats->ani_state);
if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) {
warn("ioctl: %s", wf->atd.ad_name);
wf->optstats &= ~ATHSTATS_ANI;
}
-   wf->atd.ad_id = 8;
+   wf->atd.ad_id = HAL_DIAG_ANI_STATS; /* HAL_DIAG_ANI_STATS */
wf->atd.ad_out_data = (caddr_t) &stats->ani_stats;
wf->atd.ad_out_size = sizeof(stats->ani_stats);
if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 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: r280944 - stable/10/release/doc/en_US.ISO8859-1/errata

2015-03-31 Thread Glen Barber
Author: gjb
Date: Wed Apr  1 04:58:08 2015
New Revision: 280944
URL: https://svnweb.freebsd.org/changeset/base/280944

Log:
  Document removal of 10.1-RELEASE QCOW2 virtual machine disk
  images from FTP, due to a crash-on-boot problem.
  
  Requested by: jhb (months ago), bapt (recently)
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

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

Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml
==
--- stable/10/release/doc/en_US.ISO8859-1/errata/article.xmlWed Apr  1 
04:57:27 2015(r280943)
+++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xmlWed Apr  1 
04:58:08 2015(r280944)
@@ -232,6 +232,17 @@ boot
  is expected to be issued when a solution to the problem is
  identified.
   
+
+  
+   [2015-03-31] Several reports were received regarding the
+ QCOW2 &os; virtual machine images
+ crashing on boot.  As result of this, these images have been
+ removed from the FTP mirrors, and the
+ hashes removed from CHECKSUM.SHA256 and
+ CHECKSUM.MD5 in the VM-IMAGES/ directory on the
+ FTP mirrors.
+  
 
   
 
___
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: r280941 - head/sys/contrib/dev/ath/ath_hal/ar9300

2015-03-31 Thread Adrian Chadd
Author: adrian
Date: Wed Apr  1 04:56:10 2015
New Revision: 280941
URL: https://svnweb.freebsd.org/changeset/base/280941

Log:
  Expose the ANI state / statistics using the public ANI function, rather than
  the ar9300_* definitions.
  
  .. which of course don't match, and athstats was reading garbage ANI
  data.

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.hWed Apr  1 03:42:46 
2015(r280940)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.hWed Apr  1 04:56:10 
2015(r280941)
@@ -206,6 +206,7 @@ struct ar9300_ani_state {
 #define DO_ANI(ah) \
 ((AH9300(ah)->ah_proc_phy_err & HAL_PROCESS_ANI))
 
+#if 0
 struct ar9300_stats {
 u_int32_t   ast_ani_niup;   /* ANI increased noise immunity */
 u_int32_t   ast_ani_nidown; /* ANI decreased noise immunity */
@@ -225,6 +226,7 @@ struct ar9300_stats {
 HAL_MIB_STATS   ast_mibstats;   /* MIB counter stats */
 HAL_NODE_STATS  ast_nodestats;  /* Latest rssi stats from driver */
 };
+#endif
 
 struct ar9300_rad_reader {
 u_int16_t   rd_index;
@@ -431,7 +433,7 @@ struct ath_hal_9300 {
 u_int32_t   ah_mask2Reg; /* copy of AR_IMR_S2 */
 u_int32_t   ah_msi_reg;  /* copy of AR_PCIE_MSI */
 os_atomic_t ah_ier_ref_count;/* reference count for enabling 
interrupts */
-struct ar9300_stats ah_stats;/* various statistics */
+HAL_ANI_STATS ah_stats;/* various statistics */
 RF_HAL_FUNCSah_rf_hal;
 u_int32_t   ah_tx_desc_mask;  /* mask for TXDESC */
 u_int32_t   ah_tx_ok_interrupt_mask;
@@ -887,6 +889,7 @@ struct ath_hal_9300 {
 int  ah_fccaifs;
 int ah_reset_reason;
 int ah_dcs_enable;
+HAL_ANI_STATE ext_ani_state; /* FreeBSD; external facing ANI state */
 
 struct ar9300NfLimits nf_2GHz;
 struct ar9300NfLimits nf_5GHz;
@@ -1443,7 +1446,7 @@ extern  void ar9300_disable_mib_counters
 extern  void ar9300_ani_attach(struct ath_hal *);
 extern  void ar9300_ani_detach(struct ath_hal *);
 extern  struct ar9300_ani_state *ar9300_ani_get_current_state(struct ath_hal 
*);
-extern  struct ar9300_stats *ar9300_ani_get_current_stats(struct ath_hal *);
+extern  HAL_ANI_STATS *ar9300_ani_get_current_stats(struct ath_hal *);
 extern  HAL_BOOL ar9300_ani_control(struct ath_hal *, HAL_ANI_CMD cmd, int 
param);
 struct ath_rx_status;
 

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.cWed Apr  1 
03:42:46 2015(r280940)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.cWed Apr  1 
04:56:10 2015(r280941)
@@ -210,7 +210,7 @@ ar9300_ani_get_current_state(struct ath_
 /*
  * Return the current statistics.
  */
-struct ar9300_stats *
+HAL_ANI_STATS *
 ar9300_ani_get_current_stats(struct ath_hal *ah)
 {
 return &AH9300(ah)->ah_stats;

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c   Wed Apr  1 
03:42:46 2015(r280940)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c   Wed Apr  1 
04:56:10 2015(r280941)
@@ -1179,6 +1179,7 @@ ar9300_get_diag_state(struct ath_hal *ah
 void **result, u_int32_t *resultsize)
 {
 struct ath_hal_9300 *ahp = AH9300(ah);
+struct ar9300_ani_state *ani;
 
 (void) ahp;
 if (ath_hal_getdiagstate(ah, request, args, argsize, result, resultsize)) {
@@ -1219,14 +1220,35 @@ ar9300_get_diag_state(struct ath_hal *ah
 return AH_TRUE;
 #endif
 case HAL_DIAG_ANI_CURRENT:
+
+ani = ar9300_ani_get_current_state(ah);
+if (ani == AH_NULL)
+return AH_FALSE;
+/* Convert ar9300 HAL to FreeBSD HAL ANI state */
+/* XXX TODO: add all of these to the HAL ANI state structure */
+bzero(&ahp->ext_ani_state, sizeof(ahp->ext_ani_state));
+/* XXX should this be OFDM or CCK noise immunity level? */
+ahp->ext_ani_state.noiseImmunityLevel = ani->ofdm_noise_immunity_level;
+ahp->ext_ani_state.spurImmunityLevel = ani->spur_immunity_level;
+ahp->ext_ani_state.firstepLevel = ani->firstep_level;
+ahp->ext_ani_state.ofdmWeakSigDetectOff = 
ani->ofdm_weak_sig_detect_off;
+/* mrc_cck_off */
+/* cck_noise_immunity_level */
+
+ahp->ext_ani_state.listenTime = ani->listen_time;
+
+*result = &ahp->ext_ani_state;
+*resultsize = sizeof(ahp->ext_ani_state);
+#if 0
 *result = ar9300_ani_get_current_state(ah);
   

svn commit: r280942 - head/sys/dev/ath/ath_hal/ar5212

2015-03-31 Thread Adrian Chadd
Author: adrian
Date: Wed Apr  1 04:56:22 2015
New Revision: 280942
URL: https://svnweb.freebsd.org/changeset/base/280942

Log:
  Use the HAL API for returning ar5212AniState, rather than just dumping
  AniState itself.

Modified:
  head/sys/dev/ath/ath_hal/ar5212/ar5212.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h
==
--- head/sys/dev/ath/ath_hal/ar5212/ar5212.hWed Apr  1 04:56:10 2015
(r280941)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212.hWed Apr  1 04:56:22 2015
(r280942)
@@ -345,6 +345,7 @@ struct ath_hal_5212 {
uint32_tah_txBusy;
uint32_tah_rx_chainmask;
uint32_tah_tx_chainmask;
+   HAL_ANI_STATE   ext_ani_state;
 };
 #defineAH5212(_ah) ((struct ath_hal_5212 *)(_ah))
 

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
==
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c   Wed Apr  1 04:56:10 
2015(r280941)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c   Wed Apr  1 04:56:22 
2015(r280942)
@@ -1052,6 +1052,7 @@ ar5212GetDiagState(struct ath_hal *ah, i
void **result, uint32_t *resultsize)
 {
struct ath_hal_5212 *ahp = AH5212(ah);
+   struct ar5212AniState *astate;
 
(void) ahp;
if (ath_hal_getdiagstate(ah, request, args, argsize, result, 
resultsize))
@@ -1083,9 +1084,28 @@ ar5212GetDiagState(struct ath_hal *ah, i
0 : sizeof(struct ar5212AniState);
return AH_TRUE;
case HAL_DIAG_ANI_STATS:
-   *result = ar5212AniGetCurrentStats(ah);
-   *resultsize = (*result == AH_NULL) ?
-   0 : sizeof(HAL_ANI_STATS);
+   OS_MEMZERO(&ahp->ext_ani_state, sizeof(ahp->ext_ani_state));
+   astate = ar5212AniGetCurrentState(ah);
+   if (astate == NULL) {
+   *result = NULL;
+   *resultsize = 0;
+   } else {
+   ahp->ext_ani_state.noiseImmunityLevel =
+   astate->noiseImmunityLevel;
+   ahp->ext_ani_state.spurImmunityLevel =
+   astate->spurImmunityLevel;
+   ahp->ext_ani_state.firstepLevel =
+   astate->firstepLevel;
+   ahp->ext_ani_state.ofdmWeakSigDetectOff =
+   astate->ofdmWeakSigDetectOff;
+   ahp->ext_ani_state.cckWeakSigThreshold =
+   astate->cckWeakSigThreshold;
+   ahp->ext_ani_state.listenTime =
+   astate->listenTime;
+
+   *result = &ahp->ext_ani_state;
+   *resultsize = sizeof(ahp->ext_ani_state);
+   }
return AH_TRUE;
case HAL_DIAG_ANI_CMD:
if (argsize != 2*sizeof(uint32_t))
___
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: r280940 - in head/sys/dev/ath/ath_hal: . ar5212

2015-03-31 Thread Adrian Chadd
Author: adrian
Date: Wed Apr  1 03:42:46 2015
New Revision: 280940
URL: https://svnweb.freebsd.org/changeset/base/280940

Log:
  Start the process of migrating the ANI statistics out of the HALs and into
  the top-level HAL.
  
  The athstats program is blindly using a copy of the ar5212 ANI stats structure
  to pull out ANI statistics/state and this is problematic for the AR9300
  HAL.
  
  So:
  
  * Define HAL_ANI_STATS and HAL_ANI_STATE
  * Use HAL_ANI_STATS inside the AR5212 HAL
  
  This commit doesn't (yet) convert the ar5212AniState -> HAL_ANI_STATE when
  exporting it to userland; that'll come in the next commit.

Modified:
  head/sys/dev/ath/ath_hal/ah.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c

Modified: head/sys/dev/ath/ath_hal/ah.h
==
--- head/sys/dev/ath/ath_hal/ah.h   Wed Apr  1 02:05:26 2015
(r280939)
+++ head/sys/dev/ath/ath_hal/ah.h   Wed Apr  1 03:42:46 2015
(r280940)
@@ -850,6 +850,48 @@ typedef struct {
 
 #defineHAL_RSSI_EP_MULTIPLIER  (1<<7)  /* pow2 to optimize out * and / 
*/
 
+/*
+ * This is the ANI state and MIB stats.
+ *
+ * It's used by the HAL modules to keep state /and/ by the debug ioctl
+ * to fetch ANI information.
+ */
+typedef struct {
+   uint32_tast_ani_niup;   /* ANI increased noise immunity */
+   uint32_tast_ani_nidown; /* ANI decreased noise immunity */
+   uint32_tast_ani_spurup; /* ANI increased spur immunity */
+   uint32_tast_ani_spurdown;/* ANI descreased spur immunity */
+   uint32_tast_ani_ofdmon; /* ANI OFDM weak signal detect on */
+   uint32_tast_ani_ofdmoff;/* ANI OFDM weak signal detect off */
+   uint32_tast_ani_cckhigh;/* ANI CCK weak signal threshold high */
+   uint32_tast_ani_ccklow; /* ANI CCK weak signal threshold low */
+   uint32_tast_ani_stepup; /* ANI increased first step level */
+   uint32_tast_ani_stepdown;/* ANI decreased first step level */
+   uint32_tast_ani_ofdmerrs;/* ANI cumulative ofdm phy err count */
+   uint32_tast_ani_cckerrs;/* ANI cumulative cck phy err count */
+   uint32_tast_ani_reset;  /* ANI parameters zero'd for non-STA */
+   uint32_tast_ani_lzero;  /* ANI listen time forced to zero */
+   uint32_tast_ani_lneg;   /* ANI listen time calculated < 0 */
+   HAL_MIB_STATS   ast_mibstats;   /* MIB counter stats */
+   HAL_NODE_STATS  ast_nodestats;  /* Latest rssi stats from driver */
+} HAL_ANI_STATS;
+
+typedef struct {
+   uint8_t noiseImmunityLevel;
+   uint8_t spurImmunityLevel;
+   uint8_t firstepLevel;
+   uint8_t ofdmWeakSigDetectOff;
+   uint8_t cckWeakSigThreshold;
+   uint32_tlistenTime;
+
+   /* NB: intentionally ordered so data exported to user space is first */
+   uint32_ttxFrameCount;   /* Last txFrameCount */
+   uint32_trxFrameCount;   /* Last rx Frame count */
+   uint32_tcycleCount; /* Last cycleCount
+  (to detect wrap-around) */
+   uint32_tofdmPhyErrCount;/* OFDM err count since last reset */
+   uint32_tcckPhyErrCount; /* CCK err count since last reset */
+} HAL_ANI_STATE;
 
 struct ath_desc;
 struct ath_tx_status;

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h
==
--- head/sys/dev/ath/ath_hal/ar5212/ar5212.hWed Apr  1 02:05:26 2015
(r280939)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212.hWed Apr  1 03:42:46 2015
(r280940)
@@ -200,6 +200,7 @@ struct ar5212AniState {
 #defineHAL_ANI_ENA 0x0001  /* ANI operation 
enabled */
 #defineHAL_RSSI_ANI_ENA0x0002  /* rssi-based 
processing ena'd*/
 
+#if 0
 struct ar5212Stats {
uint32_tast_ani_niup;   /* ANI increased noise immunity */
uint32_tast_ani_nidown; /* ANI decreased noise immunity */
@@ -219,6 +220,7 @@ struct ar5212Stats {
HAL_MIB_STATS   ast_mibstats;   /* MIB counter stats */
HAL_NODE_STATS  ast_nodestats;  /* Latest rssi stats from driver */
 };
+#endif
 
 /*
  * NF Cal history buffer
@@ -258,7 +260,7 @@ struct ath_hal_5212 {
 * Runtime state.
 */
uint32_tah_maskReg; /* copy of AR_IMR */
-   struct ar5212Stats ah_stats;/* various statistics */
+   HAL_ANI_STATS   ah_stats;   /* various statistics */
RF_HAL_FUNCS*ah_rfHal;
uint32_tah_txDescMask;  /* mask for TXDESC */
uint32_tah_txOkInterruptMask;
@@ -625,7 +627,7 @@ extern  void ar5212AniAttach(struct ath_h

svn commit: r280939 - in head: sys/boot/forth usr.sbin/bsdinstall/scripts

2015-03-31 Thread Devin Teske
Author: dteske
Date: Wed Apr  1 02:05:26 2015
New Revision: 280939
URL: https://svnweb.freebsd.org/changeset/base/280939

Log:
  Whoops! "arc commit --revision" != "arc diff --update"

Modified:
  head/sys/boot/forth/check-password.4th
  head/sys/boot/forth/check-password.4th.8
  head/sys/boot/forth/loader.conf
  head/usr.sbin/bsdinstall/scripts/zfsboot

Modified: head/sys/boot/forth/check-password.4th
==
--- head/sys/boot/forth/check-password.4th  Wed Apr  1 02:01:34 2015
(r280938)
+++ head/sys/boot/forth/check-password.4th  Wed Apr  1 02:05:26 2015
(r280939)
@@ -146,15 +146,6 @@ only forth definitions also password-pro
2drop read-reset
else drop then
 
-   \ Prompt for GEOM ELI (geli(4)) passphrase if enabled
-   s" geom_eli_passphrase_prompt" getenv dup -1 <> if
-   s" YES" compare-insensitive 0= if
-   s" GELI Passphrase: " read ( prompt -- )
-   readval readlen @ s" kern.geom.eli.passphrase" setenv
-   read-reset
-   then
-   else drop then
-
\ Exit if a password was not set
s" password" getenv -1 = if exit else drop then
 

Modified: head/sys/boot/forth/check-password.4th.8
==
--- head/sys/boot/forth/check-password.4th.8Wed Apr  1 02:01:34 2015
(r280938)
+++ head/sys/boot/forth/check-password.4th.8Wed Apr  1 02:05:26 2015
(r280939)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011-2015 Devin Teske
+.\" Copyright (c) 2011-2012 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 20, 2015
+.Dd December 10, 2012
 .Dt CHECK-PASSWORD.4TH 8
 .Os
 .Sh NAME
@@ -33,12 +33,8 @@
 .Sh DESCRIPTION
 The file that goes by the name of
 .Nm
-is a set of commands designed to do one or more of the following:
-.Pp
-.Dl o Prevent booting without password
-.Dl o Prevent modification of boot options without password
-.Dl o Provide a password to mount geli(8) encrypted root disk(s)
-.Pp
+is a set of commands designed to either prevent booting or prevent modification
+of boot options without an appropriately configured password.
 The commands of
 .Nm
 by themselves are not enough for most uses.
@@ -62,23 +58,14 @@ The commands provided by it are:
 .Pp
 .Bl -tag -width disable-module_module -compact -offset indent
 .It Ic check-password
-Multi-purpose function that can protect the interactive boot menu,
-prevent boot without password, or prompt for geli(8) passphrase
-.Pq depending on Xr loader.conf 5 settings .
+Dual-purpose function that can either protect the interactive boot menu or
+prevent boot without password (separately).
 .Pp
 First checks
 .Va bootlock_password
 and if-set, the user cannot continue until the correct password is entered.
 .Pp
-Next, checks
-.Va geom_eli_passphrase_prompt
-and if set to
-.Li YES
-.Pq case-insensitive
-prompts the user to enter their GELI password for later mounting of the root
-device(s) during boot.
-.Pp
-Last, checks
+Next checks
 .Va password
 and if-set, tries to
 .Ic autoboot
@@ -94,11 +81,6 @@ The environment variables that effect it
 Sets the bootlock password (up to 16 characters long) that is required by
 .Ic check-password
 to be entered before the system is allowed to boot.
-.It Va geom_eli_passphrase_prompt
-Selects whether loader(8) will prompt for GELI credentials, handing-off to the
-kernel for later mounting of
-.Xr geli 8
-encrypted root device(s).
 .It Va password
 Sets the password (up to 16 characters long) that is required by
 .Ic check-password
@@ -140,16 +122,6 @@ to prevent booting without password:
 .Bd -literal -offset indent -compact
 bootlock_password="boot"
 .Ed
-.Pp
-Add the following to
-.Xr loader.conf 5
-to generate a prompt at boot to collect GELI credentials for mounting
-.Xr geli 8
-encrypted root device(s):
-.Pp
-.Bd -literal -offset indent -compact
-geom_eli_passphrase_prompt="YES"
-.Ed
 .Sh SEE ALSO
 .Xr loader.conf 5 ,
 .Xr loader 8 ,

Modified: head/sys/boot/forth/loader.conf
==
--- head/sys/boot/forth/loader.conf Wed Apr  1 02:01:34 2015
(r280938)
+++ head/sys/boot/forth/loader.conf Wed Apr  1 02:05:26 2015
(r280939)
@@ -62,7 +62,6 @@ entropy_cache_type="/boot/entropy"
# "NO" to disable autobooting
 #password=""   # Prevent changes to boot options
 #bootlock_password=""  # Prevent booting (see check-password.4th(8))
-#geom_eli_passphrase_prompt="NO" # Prompt for geli(8) passphrase to mount root
 #beastie_disable="NO"  # Turn the beastie boot menu on and off
 #kernels="kernel kernel.old"   # Kernels to display in the boot menu
 #loader_logo="orb

svn commit: r280938 - in head: sys/boot/forth usr.sbin/bsdinstall/scripts

2015-03-31 Thread Devin Teske
Author: dteske
Date: Wed Apr  1 02:01:34 2015
New Revision: 280938
URL: https://svnweb.freebsd.org/changeset/base/280938

Log:
  Add "GELI Passphrase:" prompt to boot loader.
  
  Summary:
  Add "GELI Passphrase:" prompt to boot loader.
  
  A new loader.conf(5) option of geom_eli_passphrase_prompt="YES" will now
  allow you to enter your geli(8) root-mount credentials prior to invoking
  the kernel.
  
  See check-password.4th(8) for details.
  
  Differential Revision:https://reviews.freebsd.org/D2105
  Reviewed by:  (your name[s] here)
  MFC after:3 days
  X-MFC-to: stable/10
  Relnotes: yes
  
  Test Plan:
  Drop a head copy of check-password.4th into /boot and then apply the patch
  (only the patch to /boot/check-password.4th is required; no other changes are
  required but you do have to have a HEAD copy of check-password.4th to
  apply the patch).
  
  NB: The rest of your /boot files can be up to 2 years old but no older.
  NB: The test won't work unless your kernel has the following change
  
  https://svnweb.freebsd.org/base?view=revision&revision=273489
  
  Now, put into /boot/loader.conf:
  
  geom_eli_passphrase_prompt="YES"
  
  and reboot.
  
  You should be prompted for a GELI passphrase before the menu (if enabled),
  just after loading loader.conf(5).
  
  NB: It doesn't matter if you're using GELI or not. However if you are using
  GELI and a sufficiently new enough release (has SVN r273489) and you entered
  the proper passphrase to mount your GELI encrypted root device(s), you should
  notice that the boot process did not stop (you went from loader all the way 
to login).
  
  Reviewers: cperciva, allanjude, scottl, kmoore
  
  Subscribers: jkh, imp
  
  Differential Revision: https://reviews.freebsd.org/D2105

Modified:
  head/sys/boot/forth/check-password.4th
  head/sys/boot/forth/check-password.4th.8
  head/sys/boot/forth/loader.conf
  head/usr.sbin/bsdinstall/scripts/zfsboot

Modified: head/sys/boot/forth/check-password.4th
==
--- head/sys/boot/forth/check-password.4th  Wed Apr  1 01:54:28 2015
(r280937)
+++ head/sys/boot/forth/check-password.4th  Wed Apr  1 02:01:34 2015
(r280938)
@@ -146,6 +146,15 @@ only forth definitions also password-pro
2drop read-reset
else drop then
 
+   \ Prompt for GEOM ELI (geli(4)) passphrase if enabled
+   s" geom_eli_passphrase_prompt" getenv dup -1 <> if
+   s" YES" compare-insensitive 0= if
+   s" GELI Passphrase: " read ( prompt -- )
+   readval readlen @ s" kern.geom.eli.passphrase" setenv
+   read-reset
+   then
+   else drop then
+
\ Exit if a password was not set
s" password" getenv -1 = if exit else drop then
 

Modified: head/sys/boot/forth/check-password.4th.8
==
--- head/sys/boot/forth/check-password.4th.8Wed Apr  1 01:54:28 2015
(r280937)
+++ head/sys/boot/forth/check-password.4th.8Wed Apr  1 02:01:34 2015
(r280938)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011-2012 Devin Teske
+.\" Copyright (c) 2011-2015 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 10, 2012
+.Dd March 20, 2015
 .Dt CHECK-PASSWORD.4TH 8
 .Os
 .Sh NAME
@@ -33,8 +33,12 @@
 .Sh DESCRIPTION
 The file that goes by the name of
 .Nm
-is a set of commands designed to either prevent booting or prevent modification
-of boot options without an appropriately configured password.
+is a set of commands designed to do one or more of the following:
+.Pp
+.Dl o Prevent booting without password
+.Dl o Prevent modification of boot options without password
+.Dl o Provide a password to mount geli(8) encrypted root disk(s)
+.Pp
 The commands of
 .Nm
 by themselves are not enough for most uses.
@@ -58,14 +62,23 @@ The commands provided by it are:
 .Pp
 .Bl -tag -width disable-module_module -compact -offset indent
 .It Ic check-password
-Dual-purpose function that can either protect the interactive boot menu or
-prevent boot without password (separately).
+Multi-purpose function that can protect the interactive boot menu,
+prevent boot without password, or prompt for geli(8) passphrase
+.Pq depending on Xr loader.conf 5 settings .
 .Pp
 First checks
 .Va bootlock_password
 and if-set, the user cannot continue until the correct password is entered.
 .Pp
-Next checks
+Next, checks
+.Va geom_eli_passphrase_prompt
+and if set to
+.Li YES
+.Pq case-insensitive
+prompts the user to enter their GELI password for later mounting of the root
+device(s) during boot.
+.Pp
+Last, checks
 .Va password
 and if-set, tries to
 .Ic autoboot
@@ -81,6 +94,11 @@ The environment variables that effect it
 Sets the bootlock password (up to 16 charac

Re: svn commit: r280308 - head/sys/fs/devfs

2015-03-31 Thread Bruce Evans

On Mon, 30 Mar 2015, Konstantin Belousov wrote:


On Mon, Mar 30, 2015 at 03:14:10PM +1100, Bruce Evans wrote:

File timestamps use CLOCK_REALTIME, so they are supposed to go backwards
sometimes.  More importantly, if the time is set to a future time (by
utimes(), etc., not due to a clock step), this prevents it being correted.
I think you only want to do a null update if tv_nsec is nonzero due to a
previous setting with vfs_timestamp(), and the new second hasn't arrived
yet.  Something like:

if (tsp->tv_sec != ts) ...

If '<', then as above.  If '>', it means a correction by >= 1 second
(strictly greater if tv_nsec != 0).  The initial value tv_nsec is
irrelevant in both cases.


The future times happen often in practice.  Any time the system is on
local time East of Greenwich, using a device file early in the boot
sets its timestamps in the future (9-11 hours here).  Then using the
file later should set it to the current time without waiting until
the future time is reached.


Below is the updated patch.  I also added a comment to devfs_timestamp(),
please reformulate it to your liking.


I like this version.

Bruce
___
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: r280937 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Wed Apr  1 01:54:28 2015
New Revision: 280937
URL: https://svnweb.freebsd.org/changeset/base/280937

Log:
  Solve dreaded "dictionary full" issue by segregating words into new
  vocabularies delay-processing, password-processing, version-processing,
  frame-drawing, menu-infrastructure, menu-namespace, menu-command-helpers,
  and menusets-infrastructure. The net effect is to remove almost 200
  definitions from the main forth vocabulary reducing the dictionary size
  by over 50%. The chances of hitting "dictionary full" should be greatly
  reduced by this patch.
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/sys/boot/forth/beastie.4th
  head/sys/boot/forth/check-password.4th
  head/sys/boot/forth/delay.4th
  head/sys/boot/forth/frames.4th
  head/sys/boot/forth/loader.4th
  head/sys/boot/forth/menu-commands.4th
  head/sys/boot/forth/menu.4th
  head/sys/boot/forth/menusets.4th
  head/sys/boot/forth/support.4th
  head/sys/boot/forth/version.4th

Modified: head/sys/boot/forth/beastie.4th
==
--- head/sys/boot/forth/beastie.4th Wed Apr  1 01:25:58 2015
(r280936)
+++ head/sys/boot/forth/beastie.4th Wed Apr  1 01:54:28 2015
(r280937)
@@ -28,7 +28,7 @@
 
 marker task-beastie.4th
 
-only forth definitions also support-functions
+only forth definitions
 
 variable logoX
 variable logoY
@@ -82,6 +82,8 @@ variable logoY
then
 ;
 
+also support-functions
+
 : beastie-start ( -- ) \ starts the menu
s" console" getenv dup -1 <> if
s" efi" 2swap contains? if
@@ -110,4 +112,4 @@ variable logoY
then
 ;
 
-only forth also
+only forth definitions

Modified: head/sys/boot/forth/check-password.4th
==
--- head/sys/boot/forth/check-password.4th  Wed Apr  1 01:25:58 2015
(r280936)
+++ head/sys/boot/forth/check-password.4th  Wed Apr  1 01:54:28 2015
(r280937)
@@ -28,6 +28,9 @@ marker task-check-password.4th
 
 include /boot/screen.4th
 
+vocabulary password-processing
+only forth also password-processing definitions
+
 13  constant enter_key   \ The decimal ASCII value for Enter key
 8   constant bs_key  \ The decimal ASCII value for Backspace key
 21  constant ctrl_u  \ The decimal ASCII value for Ctrl-U sequence
@@ -126,6 +129,8 @@ variable readlen \ input len
again \ Enter was not pressed; repeat
 ;
 
+only forth definitions also password-processing
+
 : check-password ( -- )
 
\ Do not allow the user to proceed beyond this point if a boot-lock
@@ -161,3 +166,5 @@ variable readlen \ input len
3000 ms ." loader: incorrect password" 10 emit
again
 ;
+
+only forth definitions

Modified: head/sys/boot/forth/delay.4th
==
--- head/sys/boot/forth/delay.4th   Wed Apr  1 01:25:58 2015
(r280936)
+++ head/sys/boot/forth/delay.4th   Wed Apr  1 01:54:28 2015
(r280937)
@@ -1,4 +1,4 @@
-\ Copyright (c) 2008-2011 Devin Teske 
+\ Copyright (c) 2008-2015 Devin Teske 
 \ All rights reserved.
 \ 
 \ Redistribution and use in source and binary forms, with or without
@@ -26,6 +26,9 @@
 
 marker task-delay.4th
 
+vocabulary delay-processing
+only forth also delay-processing definitions
+
 2  constant delay_default \ Default delay (in seconds)
 3  constant etx_key   \ End-of-Text character produced by Ctrl+C
 13 constant enter_key \ Carriage-Return character produce by ENTER
@@ -36,6 +39,8 @@ variable delay_delay  \ determined c
 variable delay_cancelled  \ state variable for user cancellation
 variable delay_showdots   \ whether continually print dots while waiting
 
+only forth definitions also delay-processing
+
 : delay_execute ( -- )
 
\ make sure that we have a command to execute
@@ -110,3 +115,5 @@ variable delay_showdots   \ whether cont
evaluate \ evaluate/execute the command string
then
 ;
+
+only forth definitions

Modified: head/sys/boot/forth/frames.4th
==
--- head/sys/boot/forth/frames.4th  Wed Apr  1 01:25:58 2015
(r280936)
+++ head/sys/boot/forth/frames.4th  Wed Apr  1 01:54:28 2015
(r280937)
@@ -27,6 +27,9 @@
 
 marker task-frames.4th
 
+vocabulary frame-drawing
+only forth also frame-drawing definitions
+
 \ XXX Filled boxes are left as an exercise for the reader... ;-/
 
 variable h_el
@@ -87,6 +90,8 @@ s" arch-pc98" environment? [if]
178 constant fill_bright
 [then]
 
+only forth definitions also frame-drawing
+
 : hline( len x y -- )  \ Draw horizontal single line
at-xy   \ move cursor
0 do
@@ -156,3 +161,5 @@ s" arch-pc98" environment? [if]
 
 f_single
 fill_none fill !
+
+only forth definiti

svn commit: r280936 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Wed Apr  1 01:25:58 2015
New Revision: 280936
URL: https://svnweb.freebsd.org/changeset/base/280936

Log:
  When forced to draw ASCII lines/boxen, use `=' for the horizontal line
  when double frames are requested versus single.
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/sys/boot/forth/frames.4th

Modified: head/sys/boot/forth/frames.4th
==
--- head/sys/boot/forth/frames.4th  Wed Apr  1 01:22:30 2015
(r280935)
+++ head/sys/boot/forth/frames.4th  Wed Apr  1 01:25:58 2015
(r280936)
@@ -39,6 +39,7 @@ variable fill
 
 \ ASCII frames (used when serial console is detected)
  45 constant ascii_dash
+ 61 constant ascii_equal
 124 constant ascii_pipe
  43 constant ascii_plus
 
@@ -113,7 +114,11 @@ s" arch-pc98" environment? [if]
 ;
 
 : f_double ( -- )  \ set frames to double
-   boot_serial? if f_ascii exit then
+   boot_serial? if
+   f_ascii
+   ascii_equal h_el !
+   exit
+   then
dh_el h_el !
dv_el v_el !
dlt_el lt_el !
___
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: r280935 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Wed Apr  1 01:22:30 2015
New Revision: 280935
URL: https://svnweb.freebsd.org/changeset/base/280935

Log:
  Securely overwrite (zero) user input when we finish password checks.
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/sys/boot/forth/check-password.4th

Modified: head/sys/boot/forth/check-password.4th
==
--- head/sys/boot/forth/check-password.4th  Wed Apr  1 01:17:36 2015
(r280934)
+++ head/sys/boot/forth/check-password.4th  Wed Apr  1 01:22:30 2015
(r280935)
@@ -78,6 +78,17 @@ variable readlen \ input len
again
 ;
 
+: cfill ( c c-addr/u -- )
+   begin dup 0> while
+   -rot 2dup c! 1+ rot 1-
+   repeat 2drop drop
+;
+
+: read-reset ( -- )
+   0 readlen !
+   0 readval readmax cfill
+;
+
 : read ( c-addr/u -- ) \ Expects string prompt as stack input
 
0 25 at-xy   \ Move the cursor to the bottom-left
@@ -127,10 +138,8 @@ variable readlen \ input len
while
3000 ms ." loader: incorrect password" 10 emit
repeat
-   2drop ( c-addr/u )
-   else
-   drop ( -1 ) \ getenv cruft
-   then
+   2drop read-reset
+   else drop then
 
\ Exit if a password was not set
s" password" getenv -1 = if exit else drop then
@@ -147,7 +156,7 @@ variable readlen \ input len
begin
s" Password: " read ( prompt -- )
2dup readval readlen @ compare 0= if \ Correct password?
-   2drop exit
+   2drop read-reset exit
then
3000 ms ." loader: incorrect password" 10 emit
again
___
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: r280934 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Wed Apr  1 01:17:36 2015
New Revision: 280934
URL: https://svnweb.freebsd.org/changeset/base/280934

Log:
  Add remainder of supported ANSI escape sequences.
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/sys/boot/forth/screen.4th

Modified: head/sys/boot/forth/screen.4th
==
--- head/sys/boot/forth/screen.4th  Wed Apr  1 01:14:19 2015
(r280933)
+++ head/sys/boot/forth/screen.4th  Wed Apr  1 01:17:36 2015
(r280934)
@@ -50,3 +50,15 @@ marker task-screen.4th
 
 \ Mode end (clear attributes)
 : me ( -- ) escc [char] m emit ;
+
+\ Enable bold mode ( Esc-[1m )
+: b ( -- ) escc 1 .# [char] m emit ;
+
+\ Disable bold mode ( Esc-[22m )
+: -b ( -- ) escc 22 .# [char] m emit ;
+
+\ Enable inverse foreground/background mode ( Esc-[7m )
+: inv ( -- ) escc 7 .# [char] m emit ;
+
+\ Disable inverse foreground/background mode ( Esc-[27m )
+: -inv ( -- ) escc 27 .# [char] m emit ;
___
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: r280933 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Wed Apr  1 01:14:19 2015
New Revision: 280933
URL: https://svnweb.freebsd.org/changeset/base/280933

Log:
  Move beastie to logo-*.4th; brands to brand-*.4th
  
  Suggested by: jkh, alfred
  MFC after:3 days
  X-MFC-to: stable/10

Added:
  head/sys/boot/forth/brand-fbsd.4th   (contents, props changed)
  head/sys/boot/forth/logo-beastie.4th   (contents, props changed)
  head/sys/boot/forth/logo-beastiebw.4th   (contents, props changed)
  head/sys/boot/forth/logo-fbsdbw.4th   (contents, props changed)
  head/sys/boot/forth/logo-orb.4th   (contents, props changed)
  head/sys/boot/forth/logo-orbbw.4th   (contents, props changed)
Modified:
  head/sys/boot/forth/beastie.4th
  head/sys/boot/forth/brand.4th
  head/sys/boot/forth/version.4th

Modified: head/sys/boot/forth/beastie.4th
==
--- head/sys/boot/forth/beastie.4th Wed Apr  1 01:08:01 2015
(r280932)
+++ head/sys/boot/forth/beastie.4th Wed Apr  1 01:14:19 2015
(r280933)
@@ -37,157 +37,13 @@ variable logoY
 46 logoX !
 4  logoY !
 
-: beastie-logo ( x y -- ) \ color BSD mascot (19 rows x 34 columns)
-
-2dup at-xy ."   ,," 1+
-2dup at-xy ."  /()`" 1+
-2dup at-xy ."  \ \___   / |" 1+
-2dup at-xy ."  /- _  `-/  '" 1+
-2dup at-xy ." (/\/ \ \   /\" 1+
-2dup at-xy ." / /   | `\" 1+
-2dup at-xy ." O O   ) /|" 1+
-2dup at-xy ." `-^--'`< '" 1+
-2dup at-xy ."(_.)  _  )   /" 1+
-2dup at-xy ." `.___/`/" 1+
-2dup at-xy ."   `-' /" 1+
-2dup at-xy ."  <. __ / __   \" 1+
-2dup at-xy ."  <|O)))==) \) /|" 1+
-2dup at-xy ."  <'`--' `.__,' \" 1+
-2dup at-xy ."   ||" 1+
-2dup at-xy ."\   /   /\" 1+
-2dup at-xy ."   __( (_  / \__/" 1+
-2dup at-xy ." ,'  ,-'   |" 1+
- at-xy ." `--{__)"
-
-   \ Put the cursor back at the bottom
-   0 25 at-xy
-;
-
-: beastiebw-logo ( x y -- ) \ B/W BSD mascot (19 rows x 34 columns)
-
-   2dup at-xy ."   ,," 1+
-   2dup at-xy ."  /()`" 1+
-   2dup at-xy ."  \ \___   / |" 1+
-   2dup at-xy ."  /- _  `-/  '" 1+
-   2dup at-xy ." (/\/ \ \   /\" 1+
-   2dup at-xy ." / /   | `\" 1+
-   2dup at-xy ." O O   ) /|" 1+
-   2dup at-xy ." `-^--'`< '" 1+
-   2dup at-xy ."(_.)  _  )   /" 1+
-   2dup at-xy ." `.___/`/" 1+
-   2dup at-xy ."   `-' /" 1+
-   2dup at-xy ."  <. __ / __   \" 1+
-   2dup at-xy ."  <|O)))==) \) /|" 1+
-   2dup at-xy ."  <'`--' `.__,' \" 1+
-   2dup at-xy ."   ||" 1+
-   2dup at-xy ."\   /   /\" 1+
-   2dup at-xy ."   __( (_  / \__/" 1+
-   2dup at-xy ." ,'  ,-'   |" 1+
-at-xy ." `--{__)"
-
-   \ Put the cursor back at the bottom
-   0 25 at-xy
-;
-
-: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns)
-
-   \ We used to use the beastie himself as our default... until the
-   \ eventual complaint derided his reign of the advanced boot-menu.
-   \ 
-   \ This is the replacement of beastie to satiate the haters of our
-   \ beloved helper-daemon (ready to track down and spear bugs with
-   \ his trident and sporty sneakers; see above).
-   \ 
-   \ Since we merely just changed the default and not the default-
-   \ location, below is an adjustment to the passed-in coordinates,
-   \ forever influenced by the proper location of beastie himself
-   \ kept as the default loader_logo_x/loader_logo_y values.
-   \ 
-   5 + swap 6 + swap
-
-   2dup at-xy ."  __" 1+
-   2dup at-xy ." |  | __ ___  ___ " 1+
-   2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+
-   2dup at-xy ." |  __|| | |  __/  __/" 1+
-   2dup at-xy ." | |   | | |||" 1+
-   2dup at-xy ." |_|   |_|  \___|\___|" 1+
-   2dup at-xy ."     _ _" 1+
-   2dup at-xy ." |  _ \ / |  __ \" 1+
-   2dup at-xy ." | |_) | (___ | |  | |" 1+
-   2dup at-xy ." |  _ < \___ \| |  | |" 1+
-   2dup at-xy ." | |_) |) | |__| |" 1+
-   2dup at-xy ." | |  |  |" 1+
-at-xy ." |/|_/|_/"
-
-   \ Put the cursor back at the bottom
-   0 25 at-xy
-;
-
-: orb-logo ( x y -- ) \ color Orb mascot (15 rows x 30 columns)
-
-   3 + \ beastie adjustment (see `fbsdbw-logo' comments above)
-
-   2dup at-xy ."  ```   

svn commit: r280932 - in head/contrib/elftoolchain: addr2line common cxxfilt elfcopy libdwarf libelf libelftc nm readelf size strings

2015-03-31 Thread Ed Maste
Author: emaste
Date: Wed Apr  1 01:08:01 2015
New Revision: 280932
URL: https://svnweb.freebsd.org/changeset/base/280932

Log:
  Update elftoolchain to upstream revision 3179
  
  Some notable changes:
  - libdwarf: Fixed DWARF4 line section
  - elfcopy: Implement --localize-hidden
  - nm: handle object name referenced by DW_AT_specification
  - elfcopy: Add --strip-dwo and --extract-dwo options for split DWARF
  - readelf: add remaining arm64 dynamic relocation names
  - nm: Avoid integer overflow in value comparison
  
  Relnotes: Yes
  Sponsored by: The FreeBSD Foundation

Modified:
  head/contrib/elftoolchain/addr2line/addr2line.c
  head/contrib/elftoolchain/common/_elftc.h
  head/contrib/elftoolchain/common/elfdefinitions.h
  head/contrib/elftoolchain/common/native-elf-format
  head/contrib/elftoolchain/cxxfilt/cxxfilt.c
  head/contrib/elftoolchain/elfcopy/archive.c
  head/contrib/elftoolchain/elfcopy/ascii.c
  head/contrib/elftoolchain/elfcopy/binary.c
  head/contrib/elftoolchain/elfcopy/elfcopy.1
  head/contrib/elftoolchain/elfcopy/elfcopy.h
  head/contrib/elftoolchain/elfcopy/main.c
  head/contrib/elftoolchain/elfcopy/sections.c
  head/contrib/elftoolchain/elfcopy/segments.c
  head/contrib/elftoolchain/elfcopy/symbols.c
  head/contrib/elftoolchain/libdwarf/_libdwarf.h
  head/contrib/elftoolchain/libdwarf/libdwarf.h
  head/contrib/elftoolchain/libdwarf/libdwarf_lineno.c
  head/contrib/elftoolchain/libelf/_libelf.h
  head/contrib/elftoolchain/libelf/_libelf_config.h
  head/contrib/elftoolchain/libelf/elf_data.c
  head/contrib/elftoolchain/libelf/elf_end.c
  head/contrib/elftoolchain/libelf/elf_errmsg.c
  head/contrib/elftoolchain/libelf/elf_errno.c
  head/contrib/elftoolchain/libelf/elf_fill.c
  head/contrib/elftoolchain/libelf/elf_flag.c
  head/contrib/elftoolchain/libelf/elf_getarhdr.c
  head/contrib/elftoolchain/libelf/elf_getarsym.c
  head/contrib/elftoolchain/libelf/elf_getbase.c
  head/contrib/elftoolchain/libelf/elf_getident.c
  head/contrib/elftoolchain/libelf/elf_hash.c
  head/contrib/elftoolchain/libelf/elf_kind.c
  head/contrib/elftoolchain/libelf/elf_next.c
  head/contrib/elftoolchain/libelf/elf_phnum.c
  head/contrib/elftoolchain/libelf/elf_rand.c
  head/contrib/elftoolchain/libelf/elf_rawfile.c
  head/contrib/elftoolchain/libelf/elf_scn.c
  head/contrib/elftoolchain/libelf/elf_shnum.c
  head/contrib/elftoolchain/libelf/elf_shstrndx.c
  head/contrib/elftoolchain/libelf/elf_version.c
  head/contrib/elftoolchain/libelf/gelf.h
  head/contrib/elftoolchain/libelf/gelf_cap.c
  head/contrib/elftoolchain/libelf/gelf_checksum.c
  head/contrib/elftoolchain/libelf/gelf_dyn.c
  head/contrib/elftoolchain/libelf/gelf_ehdr.c
  head/contrib/elftoolchain/libelf/gelf_fsize.c
  head/contrib/elftoolchain/libelf/gelf_getclass.c
  head/contrib/elftoolchain/libelf/gelf_move.c
  head/contrib/elftoolchain/libelf/gelf_phdr.c
  head/contrib/elftoolchain/libelf/gelf_rel.c
  head/contrib/elftoolchain/libelf/gelf_rela.c
  head/contrib/elftoolchain/libelf/gelf_shdr.c
  head/contrib/elftoolchain/libelf/gelf_sym.c
  head/contrib/elftoolchain/libelf/gelf_syminfo.c
  head/contrib/elftoolchain/libelf/gelf_symshndx.c
  head/contrib/elftoolchain/libelf/gelf_xlate.c
  head/contrib/elftoolchain/libelf/libelf.h
  head/contrib/elftoolchain/libelf/libelf_align.c
  head/contrib/elftoolchain/libelf/libelf_allocate.c
  head/contrib/elftoolchain/libelf/libelf_ar.c
  head/contrib/elftoolchain/libelf/libelf_ar_util.c
  head/contrib/elftoolchain/libelf/libelf_checksum.c
  head/contrib/elftoolchain/libelf/libelf_convert.m4
  head/contrib/elftoolchain/libelf/libelf_data.c
  head/contrib/elftoolchain/libelf/libelf_ehdr.c
  head/contrib/elftoolchain/libelf/libelf_extended.c
  head/contrib/elftoolchain/libelf/libelf_msize.m4
  head/contrib/elftoolchain/libelf/libelf_phdr.c
  head/contrib/elftoolchain/libelf/libelf_shdr.c
  head/contrib/elftoolchain/libelf/libelf_xlate.c
  head/contrib/elftoolchain/libelftc/_libelftc.h
  head/contrib/elftoolchain/libelftc/elftc_bfdtarget.c
  head/contrib/elftoolchain/libelftc/elftc_demangle.c
  head/contrib/elftoolchain/libelftc/libelftc.h
  head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c
  head/contrib/elftoolchain/nm/nm.c
  head/contrib/elftoolchain/readelf/readelf.c
  head/contrib/elftoolchain/size/size.c
  head/contrib/elftoolchain/strings/strings.c
Directory Properties:
  head/contrib/elftoolchain/   (props changed)

Modified: head/contrib/elftoolchain/addr2line/addr2line.c
==
--- head/contrib/elftoolchain/addr2line/addr2line.c Wed Apr  1 00:49:34 
2015(r280931)
+++ head/contrib/elftoolchain/addr2line/addr2line.c Wed Apr  1 01:08:01 
2015(r280932)
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include 
 #include 
 #include 
 #include 
@@ -40,7 +39,7 @@
 
 #include "_elftc.h"
 
-ELFTC_VCSID("$Id: addr2line.c 3148 2015-02-15 18:47:39Z emaste $");
+ELFTC_VCSID("$Id: addr2line.c 3174 2015-03-27 17:13:

svn commit: r280931 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Wed Apr  1 00:49:34 2015
New Revision: 280931
URL: https://svnweb.freebsd.org/changeset/base/280931

Log:
  Comments. No functional change.
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/sys/boot/forth/menu-commands.4th

Modified: head/sys/boot/forth/menu-commands.4th
==
--- head/sys/boot/forth/menu-commands.4th   Wed Apr  1 00:45:47 2015
(r280930)
+++ head/sys/boot/forth/menu-commands.4th   Wed Apr  1 00:49:34 2015
(r280931)
@@ -67,7 +67,7 @@ variable root_state
evaluate
 ;
 
-: altboot ( -- )
+: altboot ( N -- NOTREACHED )
s" boot_single" 2dup getenv -1 <> if
drop ( c-addr/u c-addr -- c-addr/u ) \ unused
unsetenv ( c-addr/u -- )
___
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: r280930 - head/sys/rpc

2015-03-31 Thread Garrett Wollman
Author: wollman
Date: Wed Apr  1 00:45:47 2015
New Revision: 280930
URL: https://svnweb.freebsd.org/changeset/base/280930

Log:
  Fix overflow bugs in and remove obsolete limit from kernel RPC
  implementation.
  
  The kernel RPC code, which is responsible for the low-level scheduling
  of incoming NFS requests, contains a throttling mechanism that
  prevents too much kernel memory from being tied up by NFS requests
  that are being serviced.  When the throttle is engaged, the RPC layer
  stops servicing incoming NFS sockets, resulting ultimately in
  backpressure on the clients (if they're using TCP).  However, this is
  a very heavy-handed mechanism as it prevents all clients from making
  any requests, regardless of how heavy or light they are.  (Thus, when
  engaged, the throttle often prevents clients from even mounting the
  filesystem.)  The throttle mechanism applies specifically to requests
  that have been received by the RPC layer (from a TCP or UDP socket)
  and are queued waiting to be serviced by one of the nfsd threads; it
  does not limit the amount of backlog in the socket buffers.
  
  The original implementation limited the total bytes of queued requests
  to the minimum of a quarter of (nmbclusters * MCLBYTES) and 45 MiB.
  The former limit seems reasonable, since requests queued in the socket
  buffers and replies being constructed to the requests in progress will
  all require some amount of network memory, but the 45 MiB limit is
  plainly ridiculous for modern memory sizes: when running 256 service
  threads on a busy server, 45 MiB would result in just a single
  maximum-sized NFS3PROC_WRITE queued per thread before throttling.
  
  Removing this limit exposed integer-overflow bugs in the original
  computation, and related bugs in the routines that actually account
  for the amount of traffic enqueued for service threads.  The old
  implementation also attempted to reduce accounting overhead by
  batching updates until each queue is fully drained, but this is prone
  to livelock, resulting in repeated accumulate-throttle-drain cycles on
  a busy server.  Various data types are changed to long or unsigned
  long; explicit 64-bit types are not used due to the unavailability of
  64-bit atomics on many 32-bit platforms, but those platforms also
  cannot support nmbclusters large enough to cause overflow.
  
  This code (in a 10.1 kernel) is presently running on production NFS
  servers at CSAIL.
  
  Summary of this revision:
  * Removes 45 MiB limit on requests queued for nfsd service threads
  * Fixes integer-overflow and signedness bugs
  * Avoids unnecessary throttling by not deferring accounting for
completed requests
  
  Differential Revision:https://reviews.freebsd.org/D2165
  Reviewed by:  rmacklem, mav
  MFC after:30 days
  Relnotes: yes
  Sponsored by: MIT Computer Science & Artificial Intelligence Laboratory

Modified:
  head/sys/rpc/svc.c
  head/sys/rpc/svc.h

Modified: head/sys/rpc/svc.c
==
--- head/sys/rpc/svc.c  Wed Apr  1 00:15:31 2015(r280929)
+++ head/sys/rpc/svc.c  Wed Apr  1 00:45:47 2015(r280930)
@@ -73,7 +73,7 @@ static struct svc_callout *svc_find(SVCP
 char *);
 static void svc_new_thread(SVCGROUP *grp);
 static void xprt_unregister_locked(SVCXPRT *xprt);
-static void svc_change_space_used(SVCPOOL *pool, int delta);
+static void svc_change_space_used(SVCPOOL *pool, long delta);
 static bool_t svc_request_space_available(SVCPOOL *pool);
 
 /* ***  SVCXPRT related stuff  */
@@ -113,13 +113,14 @@ svcpool_create(const char *name, struct 
}
 
/*
-* Don't use more than a quarter of mbuf clusters or more than
-* 45Mb buffering requests.
+* Don't use more than a quarter of mbuf clusters.  Nota bene:
+* nmbclusters is an int, but nmbclusters*MCLBYTES may overflow
+* on LP64 architectures, so cast to u_long to avoid undefined
+* behavior.  (ILP32 architectures cannot have nmbclusters
+* large enough to overflow for other reasons.)
 */
-   pool->sp_space_high = nmbclusters * MCLBYTES / 4;
-   if (pool->sp_space_high > 45 << 20)
-   pool->sp_space_high = 45 << 20;
-   pool->sp_space_low = 2 * pool->sp_space_high / 3;
+   pool->sp_space_high = (u_long)nmbclusters * MCLBYTES / 4;
+   pool->sp_space_low = (pool->sp_space_high / 3) * 2;
 
sysctl_ctx_init(&pool->sp_sysctl);
if (sysctl_base) {
@@ -139,24 +140,24 @@ svcpool_create(const char *name, struct 
"groups", CTLFLAG_RD, &pool->sp_groupcount, 0,
"Number of thread groups");
 
-   SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO,
+   SYSCTL_ADD_ULONG(&pool->sp_sysctl, sysctl_base, OID_AUTO,
"request_space_used", CTLFLAG_RD,
-   &pool->sp_space_used, 

Re: svn commit: r280915 - head/contrib/ntp/ntpd

2015-03-31 Thread NGie Cooper
On Tue, Mar 31, 2015 at 5:13 PM, Cy Schubert  wrote:
> In message  om>
> , NGie Cooper writes:
>> On Tue, Mar 31, 2015 at 12:35 PM, Cy Schubert  wrote:
>> > Author: cy
>> > Date: Tue Mar 31 19:35:32 2015
>> > New Revision: 280915
>> > URL: https://svnweb.freebsd.org/changeset/base/280915
>> >
>> > Log:
>> >   Fix build.
>> >
>> > Modified:
>> >   head/contrib/ntp/ntpd/ntp_parser.y
>>
>> That fixed it -- thanks :)!
>>
>
> Strangely I had no such issues locally. Having to put spaces around curly
> braces would appear to work around a bug. Is this normal for YACC?

Not sure, but it might be an issue surrounding the build environment
with Jenkins and Yacc, yes...
___
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: r280929 - in head: lib/libvmmapi sys/amd64/include sys/amd64/vmm

2015-03-31 Thread Tycho Nightingale
Author: tychon
Date: Wed Apr  1 00:15:31 2015
New Revision: 280929
URL: https://svnweb.freebsd.org/changeset/base/280929

Log:
  Fix "MOVS" instruction memory to MMIO emulation.  Currently updates to
  %rdi, %rsi, etc are inadvertently bypassed along with the check to
  see if the instruction needs to be repeated per the 'rep' prefix.
  
  Add "MOVS" instruction support for the 'MMIO to MMIO' case.
  
  Reviewed by:  neel

Modified:
  head/lib/libvmmapi/vmmapi.c
  head/lib/libvmmapi/vmmapi.h
  head/sys/amd64/include/vmm_instruction_emul.h
  head/sys/amd64/vmm/vmm.c
  head/sys/amd64/vmm/vmm_dev.c
  head/sys/amd64/vmm/vmm_instruction_emul.c

Modified: head/lib/libvmmapi/vmmapi.c
==
--- head/lib/libvmmapi/vmmapi.c Wed Apr  1 00:00:17 2015(r280928)
+++ head/lib/libvmmapi/vmmapi.c Wed Apr  1 00:15:31 2015(r280929)
@@ -979,6 +979,18 @@ gla2gpa(struct vmctx *ctx, int vcpu, str
return (error);
 }
 
+int
+vm_gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging,
+uint64_t gla, int prot, uint64_t *gpa)
+{
+   int error, fault;
+
+   error = gla2gpa(ctx, vcpu, paging, gla, prot, &fault, gpa);
+   if (fault)
+   error = fault;
+   return (error);
+}
+
 #ifndef min
 #definemin(a,b)(((a) < (b)) ? (a) : (b))
 #endif

Modified: head/lib/libvmmapi/vmmapi.h
==
--- head/lib/libvmmapi/vmmapi.h Wed Apr  1 00:00:17 2015(r280928)
+++ head/lib/libvmmapi/vmmapi.h Wed Apr  1 00:15:31 2015(r280929)
@@ -63,6 +63,8 @@ int   vm_get_memory_seg(struct vmctx *ctx,
 intvm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s);
 void   *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len);
 intvm_get_gpa_pmap(struct vmctx *, uint64_t gpa, uint64_t *pte, int *num);
+intvm_gla2gpa(struct vmctx *, int vcpuid, struct vm_guest_paging *paging,
+  uint64_t gla, int prot, uint64_t *gpa);
 uint32_t vm_get_lowmem_limit(struct vmctx *ctx);
 void   vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit);
 void   vm_set_memflags(struct vmctx *ctx, int flags);

Modified: head/sys/amd64/include/vmm_instruction_emul.h
==
--- head/sys/amd64/include/vmm_instruction_emul.h   Wed Apr  1 00:00:17 
2015(r280928)
+++ head/sys/amd64/include/vmm_instruction_emul.h   Wed Apr  1 00:15:31 
2015(r280929)
@@ -90,7 +90,7 @@ int vmm_fetch_instruction(struct vm *vm,
  * Returns 1 if an exception was injected into the guest.
  * Returns -1 otherwise.
  */
-int vmm_gla2gpa(struct vm *vm, int vcpuid, struct vm_guest_paging *paging,
+int vm_gla2gpa(struct vm *vm, int vcpuid, struct vm_guest_paging *paging,
 uint64_t gla, int prot, uint64_t *gpa);
 
 void vie_init(struct vie *vie, const char *inst_bytes, int inst_length);

Modified: head/sys/amd64/vmm/vmm.c
==
--- head/sys/amd64/vmm/vmm.cWed Apr  1 00:00:17 2015(r280928)
+++ head/sys/amd64/vmm/vmm.cWed Apr  1 00:15:31 2015(r280929)
@@ -2332,7 +2332,7 @@ vm_copy_setup(struct vm *vm, int vcpuid,
remaining = len;
while (remaining > 0) {
KASSERT(nused < num_copyinfo, ("insufficient vm_copyinfo"));
-   error = vmm_gla2gpa(vm, vcpuid, paging, gla, prot, &gpa);
+   error = vm_gla2gpa(vm, vcpuid, paging, gla, prot, &gpa);
if (error)
return (error);
off = gpa & PAGE_MASK;

Modified: head/sys/amd64/vmm/vmm_dev.c
==
--- head/sys/amd64/vmm/vmm_dev.cWed Apr  1 00:00:17 2015
(r280928)
+++ head/sys/amd64/vmm/vmm_dev.cWed Apr  1 00:15:31 2015
(r280929)
@@ -440,10 +440,10 @@ vmmdev_ioctl(struct cdev *cdev, u_long c
CTASSERT(PROT_WRITE == VM_PROT_WRITE);
CTASSERT(PROT_EXEC == VM_PROT_EXECUTE);
gg = (struct vm_gla2gpa *)data;
-   error = vmm_gla2gpa(sc->vm, gg->vcpuid, &gg->paging, gg->gla,
+   error = vm_gla2gpa(sc->vm, gg->vcpuid, &gg->paging, gg->gla,
gg->prot, &gg->gpa);
KASSERT(error == 0 || error == 1 || error == -1,
-   ("%s: vmm_gla2gpa unknown error %d", __func__, error));
+   ("%s: vm_gla2gpa unknown error %d", __func__, error));
if (error >= 0) {
/*
 * error = 0: the translation was successful

Modified: head/sys/amd64/vmm/vmm_instruction_emul.c
==
--- head/sys/amd64/vmm/vmm_instruction_emul.c   Wed Apr  1 00:00:17 2015
(r280928)
+++ head/sys/a

Re: svn commit: r280915 - head/contrib/ntp/ntpd

2015-03-31 Thread Cy Schubert
In message 
, NGie Cooper writes:
> On Tue, Mar 31, 2015 at 12:35 PM, Cy Schubert  wrote:
> > Author: cy
> > Date: Tue Mar 31 19:35:32 2015
> > New Revision: 280915
> > URL: https://svnweb.freebsd.org/changeset/base/280915
> >
> > Log:
> >   Fix build.
> >
> > Modified:
> >   head/contrib/ntp/ntpd/ntp_parser.y
> 
> That fixed it -- thanks :)!
> 

Strangely I had no such issues locally. Having to put spaces around curly 
braces would appear to work around a bug. Is this normal for YACC?


-- 
Cheers,
Cy Schubert  or 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
 


___
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: r280928 - head/release

2015-03-31 Thread Colin Percival
Author: cperciva
Date: Wed Apr  1 00:00:17 2015
New Revision: 280928
URL: https://svnweb.freebsd.org/changeset/base/280928

Log:
  Add code for creating an EC2 AMI.

Added:
  head/release/Makefile.ec2   (contents, props changed)
Modified:
  head/release/Makefile.vm

Added: head/release/Makefile.ec2
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/Makefile.ec2   Wed Apr  1 00:00:17 2015(r280928)
@@ -0,0 +1,44 @@
+#
+# $FreeBSD$
+#
+#
+# Makefile for creating an EC2 AMI from a disk image.
+#
+
+.if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE"
+AMINAMESUFFIX!=date +-%Y-%m-%d
+.endif
+.if defined(EC2PUBLIC)
+PUBLISH=   --public
+.endif
+
+ec2ami: cw-ec2
+.if !exists(/usr/local/bin/bsdec2-image-upload)
+   @echo "--"
+   @echo ">>> Creating EC2 AMIs requires bsdec2-image-upload"
+   @echo "--"
+   @false
+.endif
+.if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE})
+   @echo "--"
+   @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation"
+   @echo "--"
+   @false
+.endif
+.if !defined(AWSREGION)
+   @echo "--"
+   @echo ">>> AWSREGION must be specified EC2 AMI creation"
+   @echo "--"
+   @false
+.endif
+.if !defined(AWSBUCKET)
+   @echo "--"
+   @echo ">>> AWSBUCKET must be specified for EC2 AMI creation"
+   @echo "--"
+   @false
+.endif
+   /usr/local/bin/bsdec2-image-upload ${PUBLISH}   \
+   ${.OBJDIR}/ec2.raw  \
+   "${TYPE} ${REVISION}-${BRANCH}${AMINAMESUFFIX}" \
+   "${TYPE} ${REVISION}-${BRANCH}" \
+   ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE}

Modified: head/release/Makefile.vm
==
--- head/release/Makefile.vmTue Mar 31 23:39:34 2015(r280927)
+++ head/release/Makefile.vmWed Apr  1 00:00:17 2015(r280928)
@@ -152,3 +152,5 @@ cloudware-install:
 .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE)
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDINSTALL}
 .endif
+
+.include "${.CURDIR}/Makefile.ec2"
___
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: r280915 - head/contrib/ntp/ntpd

2015-03-31 Thread NGie Cooper
On Tue, Mar 31, 2015 at 12:35 PM, Cy Schubert  wrote:
> Author: cy
> Date: Tue Mar 31 19:35:32 2015
> New Revision: 280915
> URL: https://svnweb.freebsd.org/changeset/base/280915
>
> Log:
>   Fix build.
>
> Modified:
>   head/contrib/ntp/ntpd/ntp_parser.y

That fixed it -- thanks :)!
___
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: r280926 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Tue Mar 31 23:09:54 2015
New Revision: 280926
URL: https://svnweb.freebsd.org/changeset/base/280926

Log:
  Whitespace and cleanup. No functional change(s).
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/sys/boot/forth/screen.4th

Modified: head/sys/boot/forth/screen.4th
==
--- head/sys/boot/forth/screen.4th  Tue Mar 31 23:00:48 2015
(r280925)
+++ head/sys/boot/forth/screen.4th  Tue Mar 31 23:09:54 2015
(r280926)
@@ -27,34 +27,26 @@
 
 marker task-screen.4th
 
-: escc ( -- )  \ emit Esc-[
-   91 27 emit emit
-;
-
-: ho   ( -- )  \ Home cursor
-   escc 72 emit\ Esc-[H
-;
-
-: cld  ( -- )  \ Clear from current position to end of display
-   escc 74 emit\ Esc-[J
-;
-
-: clear( -- )  \ clear screen
-   ho cld
-;
-
-: at-xy( x y -- )  \ move cursor to x rows, y cols (1-based coords)
-   escc .# 59 emit .# 72 emit  \ Esc-[%d;%dH
-;
-
-: fg   ( x -- )\ Set foreground color
-   escc 3 .# .# 109 emit   \ Esc-[3%dm
-;
-
-: bg   ( x -- )\ Set background color
-   escc 4 .# .# 109 emit   \ Esc-[4%dm
-;
-
-: me   ( -- )  \ Mode end (clear attributes)
-   escc 109 emit
-;
+\ emit Esc-[
+: escc ( -- ) 27 emit [char] [ emit ;
+
+\ Home cursor ( Esc-[H )
+: ho ( -- ) escc [char] H emit ;
+
+\ Clear from current position to end of display ( Esc-[J )
+: cld ( -- ) escc [char] J emit ;
+
+\ clear screen
+: clear ( -- ) ho cld ;
+
+\ move cursor to x rows, y cols (1-based coords) ( Esc-[%d;%dH )
+: at-xy ( x y -- ) escc .# [char] ; emit .# [char] H emit ;
+
+\ Set foreground color ( Esc-[3%dm )
+: fg ( x -- ) escc 3 .# .# [char] m emit ;
+
+\ Set background color ( Esc-[4%dm )
+: bg ( x -- ) escc 4 .# .# [char] m emit ;
+
+\ Mode end (clear attributes)
+: me ( -- ) escc [char] m emit ;
___
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: r280925 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Tue Mar 31 23:00:48 2015
New Revision: 280925
URL: https://svnweb.freebsd.org/changeset/base/280925

Log:
  Optimize bootmsg to use fg/bg/me from screen.4th
  NB: screen.4th is included by way of check-password.4th
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/sys/boot/forth/loader.4th

Modified: head/sys/boot/forth/loader.4th
==
--- head/sys/boot/forth/loader.4th  Tue Mar 31 22:32:35 2015
(r280924)
+++ head/sys/boot/forth/loader.4th  Tue Mar 31 23:00:48 2015
(r280925)
@@ -43,15 +43,16 @@ s" arch-i386" environment? [if] [if]
 include /boot/support.4th
 include /boot/color.4th
 include /boot/delay.4th
+include /boot/check-password.4th
 
 only forth also support-functions also builtins definitions
 
 : bootmsg ( -- )
-  loader_color? if
-." Booting..." cr
-  else
-." Booting..." cr
-  then
+  loader_color? dup ( -- bool bool )
+  if 7 fg 4 bg then
+  ." Booting..."
+  if me then
+  cr
 ;
 
 : try-menu-unset
@@ -128,8 +129,6 @@ builtin: boot-conf
 
 only forth definitions also support-functions
 
-include /boot/check-password.4th
-
 \ * start
 \
 \   Initializes support.4th global variables, sets loader_conf_files,
___
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: r280924 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Tue Mar 31 22:32:35 2015
New Revision: 280924
URL: https://svnweb.freebsd.org/changeset/base/280924

Log:
  Comments. No functional change(s).
  
  MFC after:3 days
  X-MFC-to: stable/10

Modified:
  head/sys/boot/forth/beastie.4th
  head/sys/boot/forth/brand.4th
  head/sys/boot/forth/check-password.4th
  head/sys/boot/forth/frames.4th
  head/sys/boot/forth/loader.4th
  head/sys/boot/forth/menu.4th
  head/sys/boot/forth/pcibios.4th
  head/sys/boot/forth/pnp.4th
  head/sys/boot/forth/screen.4th
  head/sys/boot/forth/support.4th
  head/sys/boot/forth/version.4th

Modified: head/sys/boot/forth/beastie.4th
==
--- head/sys/boot/forth/beastie.4th Tue Mar 31 22:10:40 2015
(r280923)
+++ head/sys/boot/forth/beastie.4th Tue Mar 31 22:32:35 2015
(r280924)
@@ -1,4 +1,4 @@
-\ Copyright (c) 2003 Scott Long 
+\ Copyright (c) 2003 Scott Long 
 \ Copyright (c) 2003 Aleksander Fafula 
 \ Copyright (c) 2006-2015 Devin Teske 
 \ All rights reserved.

Modified: head/sys/boot/forth/brand.4th
==
--- head/sys/boot/forth/brand.4th   Tue Mar 31 22:10:40 2015
(r280923)
+++ head/sys/boot/forth/brand.4th   Tue Mar 31 22:32:35 2015
(r280924)
@@ -29,7 +29,7 @@ marker task-brand.4th
 variable brandX
 variable brandY
 
-\ Initialize logo placement
+\ Initialize brand placement to defaults
 2 brandX !
 1 brandY !
 
@@ -61,7 +61,7 @@ variable brandY
 \ NOTE: Setting `loader_brand' to an undefined value (such as "none") will
 \   prevent any brand from being drawn.
 \ 
-: draw-brand ( -- )
+: draw-brand ( -- ) \ at (loader_brand_x,loader_brand_y), else (2,1)
 
s" loader_brand_x" getenv dup -1 <> if
?number 1 = if brandX ! then

Modified: head/sys/boot/forth/check-password.4th
==
--- head/sys/boot/forth/check-password.4th  Tue Mar 31 22:10:40 2015
(r280923)
+++ head/sys/boot/forth/check-password.4th  Tue Mar 31 22:32:35 2015
(r280924)
@@ -146,8 +146,8 @@ variable readlen \ input len
s" password" getenv dup readmax > if drop readmax then
begin
s" Password: " read ( prompt -- )
-   2dup readval readlen @ compare 0= if
-   2drop exit \ Correct password
+   2dup readval readlen @ compare 0= if \ Correct password?
+   2drop exit
then
3000 ms ." loader: incorrect password" 10 emit
again

Modified: head/sys/boot/forth/frames.4th
==
--- head/sys/boot/forth/frames.4th  Tue Mar 31 22:10:40 2015
(r280923)
+++ head/sys/boot/forth/frames.4th  Tue Mar 31 22:32:35 2015
(r280924)
@@ -1,9 +1,34 @@
-\ Words implementing frame drawing
-\ XXX Filled boxes are left as an exercise for the reader... ;-/
+\ Copyright (c) 2003 Scott Long 
+\ Copyright (c) 2012-2015 Devin Teske 
+\ 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$
 
 marker task-frames.4th
 
+\ XXX Filled boxes are left as an exercise for the reader... ;-/
+
 variable h_el
 variable v_el
 variable lt_el

Modified: head/sys/boot/forth/loader.4th
==
--- head/sys/boot/forth/loader.4th  Tue Mar 31 22:10:40 2015
(r280923)
+++ head/sys/boot/forth/loader.4th  Tue Mar 31 22:32:35 2015
(r280924)
@@ -1,4 +1,5 @@
-\ Copyright (c) 1999 Daniel C. Sobral 
+\ Copyright (c)

svn commit: r280923 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Tue Mar 31 22:10:40 2015
New Revision: 280923
URL: https://svnweb.freebsd.org/changeset/base/280923

Log:
  Whitespace. No functional change(s).
  
  MFC after:3 days
  MFH:  stable/10

Modified:
  head/sys/boot/forth/beastie.4th
  head/sys/boot/forth/brand.4th

Modified: head/sys/boot/forth/beastie.4th
==
--- head/sys/boot/forth/beastie.4th Tue Mar 31 21:46:44 2015
(r280922)
+++ head/sys/boot/forth/beastie.4th Tue Mar 31 22:10:40 2015
(r280923)
@@ -1,6 +1,6 @@
 \ Copyright (c) 2003 Scott Long 
 \ Copyright (c) 2003 Aleksander Fafula 
-\ Copyright (c) 2006-2013 Devin Teske 
+\ Copyright (c) 2006-2015 Devin Teske 
 \ All rights reserved.
 \ 
 \ Redistribution and use in source and binary forms, with or without
@@ -193,14 +193,10 @@ variable logoY
 
s" loader_logo_x" getenv dup -1 <> if
?number 1 = if logoX ! then
-   else
-   drop
-   then
+   else drop then
s" loader_logo_y" getenv dup -1 <> if
?number 1 = if logoY ! then
-   else
-   drop
-   then
+   else drop then
 
s" loader_logo" getenv dup -1 <> if
dup 5 + allocate if ENOMEM throw then
@@ -247,8 +243,7 @@ variable logoY
s" set beastie_disable=YES" evaluate
then
else drop then
-   s" beastie_disable" getenv
-   dup -1 <> if
+   s" beastie_disable" getenv dup -1 <> if
s" YES" compare-insensitive 0= if
any_conf_read? if
load_xen_throw
@@ -257,12 +252,9 @@ variable logoY
then
exit \ to autoboot (default)
then
-   else
-   drop
-   then
+   else drop then
 
-   s" loader_delay" getenv
-   -1 = if
+   s" loader_delay" getenv -1 = if
s" include /boot/menu.rc" evaluate
else
drop

Modified: head/sys/boot/forth/brand.4th
==
--- head/sys/boot/forth/brand.4th   Tue Mar 31 21:46:44 2015
(r280922)
+++ head/sys/boot/forth/brand.4th   Tue Mar 31 22:10:40 2015
(r280923)
@@ -1,4 +1,4 @@
-\ Copyright (c) 2006-2011 Devin Teske 
+\ Copyright (c) 2006-2015 Devin Teske 
 \ All rights reserved.
 \ 
 \ Redistribution and use in source and binary forms, with or without
@@ -64,20 +64,11 @@ variable brandY
 : draw-brand ( -- )
 
s" loader_brand_x" getenv dup -1 <> if
-   ?number 1 = if
-   brandX !
-   then
-   else
-   drop
-   then
-
+   ?number 1 = if brandX ! then
+   else drop then
s" loader_brand_y" getenv dup -1 <> if
-   ?number 1 = if
-   brandY !
-   then
-   else
-   drop
-   then
+   ?number 1 = if brandY ! then
+   else drop then
 
s" loader_brand" getenv dup -1 = if
brandX @ brandY @ fbsd-logo
___
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: r280922 - head/sys/boot/forth

2015-03-31 Thread Devin Teske
Author: dteske
Date: Tue Mar 31 21:46:44 2015
New Revision: 280922
URL: https://svnweb.freebsd.org/changeset/base/280922

Log:
  Change contents of the exec variable in loader.conf to be friendly to both
  Ficl/Forth and Lua. No visible change for Forth while enabling Lua support.
  
  Submitted by: rpaulo

Modified:
  head/sys/boot/forth/loader.conf

Modified: head/sys/boot/forth/loader.conf
==
--- head/sys/boot/forth/loader.conf Tue Mar 31 21:34:42 2015
(r280921)
+++ head/sys/boot/forth/loader.conf Tue Mar 31 21:46:44 2015
(r280922)
@@ -12,7 +12,7 @@
 ###  Basic configuration options  
 ##
 
-exec=".( Loading /boot/defaults/loader.conf ) cr"
+exec="echo Loading /boot/defaults/loader.conf"
 
 kernel="kernel"# /boot sub-directory containing kernel and 
modules
 bootfile="kernel"  # Kernel name (possibly absolute path)
___
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: r280921 - head/usr.sbin/bsdconfig/share

2015-03-31 Thread Devin Teske
Author: dteske
Date: Tue Mar 31 21:34:42 2015
New Revision: 280921
URL: https://svnweb.freebsd.org/changeset/base/280921

Log:
  Fix typo in a comment.
  
  MFC after:3 days
  X-MFC-to: stable/10 stable/9

Modified:
  head/usr.sbin/bsdconfig/share/geom.subr

Modified: head/usr.sbin/bsdconfig/share/geom.subr
==
--- head/usr.sbin/bsdconfig/share/geom.subr Tue Mar 31 20:59:37 2015
(r280920)
+++ head/usr.sbin/bsdconfig/share/geom.subr Tue Mar 31 21:34:42 2015
(r280921)
@@ -409,7 +409,7 @@ f_geom_parent()
  MAIN
 
 #
-# Parse GEOM configuration unless requeted otherwise
+# Parse GEOM configuration unless requested otherwise
 #
 f_dprintf "%s: GEOM_SELF_SCAN_ALL=[%s]" geom.subr "$GEOM_SELF_SCAN_ALL"
 case "$GEOM_SELF_SCAN_ALL" in
___
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: r280920 - head/bin/sh/tests/expansion

2015-03-31 Thread Jilles Tjoelker
Author: jilles
Date: Tue Mar 31 20:59:37 2015
New Revision: 280920
URL: https://svnweb.freebsd.org/changeset/base/280920

Log:
  sh: Add more tests for exotic IFS splitting.

Added:
  head/bin/sh/tests/expansion/ifs6.0   (contents, props changed)
  head/bin/sh/tests/expansion/ifs7.0   (contents, props changed)
Modified:
  head/bin/sh/tests/expansion/Makefile

Modified: head/bin/sh/tests/expansion/Makefile
==
--- head/bin/sh/tests/expansion/MakefileTue Mar 31 20:51:01 2015
(r280919)
+++ head/bin/sh/tests/expansion/MakefileTue Mar 31 20:59:37 2015
(r280920)
@@ -49,6 +49,8 @@ FILES+=   ifs2.0
 FILES+=ifs3.0
 FILES+=ifs4.0
 FILES+=ifs5.0
+FILES+=ifs6.0
+FILES+=ifs7.0
 FILES+=length1.0
 FILES+=length2.0
 FILES+=length3.0

Added: head/bin/sh/tests/expansion/ifs6.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/expansion/ifs6.0  Tue Mar 31 20:59:37 2015
(r280920)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+IFS=': '
+x=': :'
+set -- $x
+[ "$#|$1|$2|$3" = "2|||" ]

Added: head/bin/sh/tests/expansion/ifs7.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/expansion/ifs7.0  Tue Mar 31 20:59:37 2015
(r280920)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+IFS=2
+set -- $((123))
+[ "$#|$1|$2|$3" = "2|1|3|" ]
___
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: r280919 - head/lib/libc/gen

2015-03-31 Thread Jilles Tjoelker
Author: jilles
Date: Tue Mar 31 20:51:01 2015
New Revision: 280919
URL: https://svnweb.freebsd.org/changeset/base/280919

Log:
  wordexp: Explicitly pass along IFS.
  
  Per Austin group issue #884, sh should not import IFS from the environment
  but always set it to $' \t\n'. For wordexp(), however, it is documented and
  useful for it to use IFS from the environment.
  
  Since sh currently imports IFS from the environment, this change has no
  functional effect.
  
  MFC after:1 week

Modified:
  head/lib/libc/gen/wordexp.c

Modified: head/lib/libc/gen/wordexp.c
==
--- head/lib/libc/gen/wordexp.c Tue Mar 31 20:03:04 2015(r280918)
+++ head/lib/libc/gen/wordexp.c Tue Mar 31 20:51:01 2015(r280919)
@@ -118,8 +118,10 @@ we_askshell(const char *words, wordexp_t
char *nstrings; /* Temporary for realloc() */
char **nwv; /* Temporary for realloc() */
sigset_t newsigblock, oldsigblock;
+   const char *ifs;
 
serrno = errno;
+   ifs = getenv("IFS");
 
if (pipe2(pdes, O_CLOEXEC) < 0)
return (WRDE_NOSPACE);  /* XXX */
@@ -145,7 +147,8 @@ we_askshell(const char *words, wordexp_t
_fcntl(pdes[1], F_SETFD, 0)) < 0)
_exit(1);
execl(_PATH_BSHELL, "sh", flags & WRDE_UNDEF ? "-u" : "+u",
-   "-c", "eval \"$1\";eval \"wordexp $2\"", "",
+   "-c", "IFS=$1;eval \"$2\";eval \"wordexp $3\"", "",
+   ifs != NULL ? ifs : " \t\n",
flags & WRDE_SHOWERR ? "" : "exec 2>/dev/null", words,
(char *)NULL);
_exit(1);
___
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: r280918 - vendor/elftoolchain/elftoolchain-r3179

2015-03-31 Thread Ed Maste
Author: emaste
Date: Tue Mar 31 20:03:04 2015
New Revision: 280918
URL: https://svnweb.freebsd.org/changeset/base/280918

Log:
  Tag elftoolchain-r3179

Added:
  vendor/elftoolchain/elftoolchain-r3179/
 - copied from r280917, vendor/elftoolchain/dist/
___
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: r280917 - in vendor/elftoolchain/dist: . addr2line ar brandelf common cxxfilt elfcopy elfdump findtextrel ld libdwarf libelf libelftc nm readelf size strings test/libelf/tset/common tes...

2015-03-31 Thread Ed Maste
Author: emaste
Date: Tue Mar 31 20:01:37 2015
New Revision: 280917
URL: https://svnweb.freebsd.org/changeset/base/280917

Log:
  Import ELF toolchain rev 3179
  
  From http://svn.code.sf.net/p/elftoolchain/code

Modified:
  vendor/elftoolchain/dist/INSTALL
  vendor/elftoolchain/dist/addr2line/addr2line.c
  vendor/elftoolchain/dist/ar/acplex.l
  vendor/elftoolchain/dist/ar/acpyacc.y
  vendor/elftoolchain/dist/ar/ar.c
  vendor/elftoolchain/dist/ar/read.c
  vendor/elftoolchain/dist/ar/util.c
  vendor/elftoolchain/dist/ar/write.c
  vendor/elftoolchain/dist/brandelf/brandelf.c
  vendor/elftoolchain/dist/common/_elftc.h
  vendor/elftoolchain/dist/common/elfdefinitions.h
  vendor/elftoolchain/dist/common/native-elf-format
  vendor/elftoolchain/dist/cxxfilt/cxxfilt.c
  vendor/elftoolchain/dist/elfcopy/archive.c
  vendor/elftoolchain/dist/elfcopy/ascii.c
  vendor/elftoolchain/dist/elfcopy/binary.c
  vendor/elftoolchain/dist/elfcopy/elfcopy.1
  vendor/elftoolchain/dist/elfcopy/elfcopy.h
  vendor/elftoolchain/dist/elfcopy/main.c
  vendor/elftoolchain/dist/elfcopy/sections.c
  vendor/elftoolchain/dist/elfcopy/segments.c
  vendor/elftoolchain/dist/elfcopy/symbols.c
  vendor/elftoolchain/dist/elfdump/elfdump.c
  vendor/elftoolchain/dist/findtextrel/findtextrel.c
  vendor/elftoolchain/dist/ld/ld.h
  vendor/elftoolchain/dist/libdwarf/_libdwarf.h
  vendor/elftoolchain/dist/libdwarf/libdwarf.h
  vendor/elftoolchain/dist/libdwarf/libdwarf_lineno.c
  vendor/elftoolchain/dist/libelf/_libelf.h
  vendor/elftoolchain/dist/libelf/_libelf_config.h
  vendor/elftoolchain/dist/libelf/elf_data.c
  vendor/elftoolchain/dist/libelf/elf_end.c
  vendor/elftoolchain/dist/libelf/elf_errmsg.c
  vendor/elftoolchain/dist/libelf/elf_errno.c
  vendor/elftoolchain/dist/libelf/elf_fill.c
  vendor/elftoolchain/dist/libelf/elf_flag.c
  vendor/elftoolchain/dist/libelf/elf_getarhdr.c
  vendor/elftoolchain/dist/libelf/elf_getarsym.c
  vendor/elftoolchain/dist/libelf/elf_getbase.c
  vendor/elftoolchain/dist/libelf/elf_getident.c
  vendor/elftoolchain/dist/libelf/elf_hash.c
  vendor/elftoolchain/dist/libelf/elf_kind.c
  vendor/elftoolchain/dist/libelf/elf_next.c
  vendor/elftoolchain/dist/libelf/elf_phnum.c
  vendor/elftoolchain/dist/libelf/elf_rand.c
  vendor/elftoolchain/dist/libelf/elf_rawfile.c
  vendor/elftoolchain/dist/libelf/elf_scn.c
  vendor/elftoolchain/dist/libelf/elf_shnum.c
  vendor/elftoolchain/dist/libelf/elf_shstrndx.c
  vendor/elftoolchain/dist/libelf/elf_version.c
  vendor/elftoolchain/dist/libelf/gelf.h
  vendor/elftoolchain/dist/libelf/gelf_cap.c
  vendor/elftoolchain/dist/libelf/gelf_checksum.c
  vendor/elftoolchain/dist/libelf/gelf_dyn.c
  vendor/elftoolchain/dist/libelf/gelf_ehdr.c
  vendor/elftoolchain/dist/libelf/gelf_fsize.c
  vendor/elftoolchain/dist/libelf/gelf_getclass.c
  vendor/elftoolchain/dist/libelf/gelf_move.c
  vendor/elftoolchain/dist/libelf/gelf_phdr.c
  vendor/elftoolchain/dist/libelf/gelf_rel.c
  vendor/elftoolchain/dist/libelf/gelf_rela.c
  vendor/elftoolchain/dist/libelf/gelf_shdr.c
  vendor/elftoolchain/dist/libelf/gelf_sym.c
  vendor/elftoolchain/dist/libelf/gelf_syminfo.c
  vendor/elftoolchain/dist/libelf/gelf_symshndx.c
  vendor/elftoolchain/dist/libelf/gelf_xlate.c
  vendor/elftoolchain/dist/libelf/libelf.h
  vendor/elftoolchain/dist/libelf/libelf_align.c
  vendor/elftoolchain/dist/libelf/libelf_allocate.c
  vendor/elftoolchain/dist/libelf/libelf_ar.c
  vendor/elftoolchain/dist/libelf/libelf_ar_util.c
  vendor/elftoolchain/dist/libelf/libelf_checksum.c
  vendor/elftoolchain/dist/libelf/libelf_convert.m4
  vendor/elftoolchain/dist/libelf/libelf_data.c
  vendor/elftoolchain/dist/libelf/libelf_ehdr.c
  vendor/elftoolchain/dist/libelf/libelf_extended.c
  vendor/elftoolchain/dist/libelf/libelf_msize.m4
  vendor/elftoolchain/dist/libelf/libelf_phdr.c
  vendor/elftoolchain/dist/libelf/libelf_shdr.c
  vendor/elftoolchain/dist/libelf/libelf_xlate.c
  vendor/elftoolchain/dist/libelftc/_libelftc.h
  vendor/elftoolchain/dist/libelftc/elftc_bfdtarget.c
  vendor/elftoolchain/dist/libelftc/elftc_demangle.c
  vendor/elftoolchain/dist/libelftc/libelftc.h
  vendor/elftoolchain/dist/libelftc/libelftc_bfdtarget.c
  vendor/elftoolchain/dist/nm/nm.c
  vendor/elftoolchain/dist/readelf/readelf.c
  vendor/elftoolchain/dist/size/size.c
  vendor/elftoolchain/dist/strings/strings.c
  vendor/elftoolchain/dist/test/libelf/tset/common/ehdr_template.m4
  vendor/elftoolchain/dist/test/libelf/tset/common/gelf_ehdr_template.h
  vendor/elftoolchain/dist/test/libelf/tset/common/phdr_template.c
  vendor/elftoolchain/dist/test/libelf/tset/common/xlate_template.c
  vendor/elftoolchain/dist/test/libelf/tset/elf32_getehdr/ehdr.m4
  vendor/elftoolchain/dist/test/libelf/tset/elf32_getphdr/phdr.m4
  vendor/elftoolchain/dist/test/libelf/tset/elf32_newehdr/ehdr.m4
  vendor/elftoolchain/dist/test/libelf/tset/elf64_getehdr/ehdr.m4
  vendor/elftoolchain/dist/test/libelf/tset/elf64_getphdr/phdr.m4
  vendor/elftoolchain/dist/test/libelf/tset/elf64_newehdr/ehdr

svn commit: r280916 - head/etc

2015-03-31 Thread Xin LI
Author: delphij
Date: Tue Mar 31 19:56:46 2015
New Revision: 280916
URL: https://svnweb.freebsd.org/changeset/base/280916

Log:
  Add limited to the default restrictions.
  
  X-MFC-with:   r280849

Modified:
  head/etc/ntp.conf

Modified: head/etc/ntp.conf
==
--- head/etc/ntp.conf   Tue Mar 31 19:35:32 2015(r280915)
+++ head/etc/ntp.conf   Tue Mar 31 19:56:46 2015(r280916)
@@ -43,8 +43,8 @@ server 2.freebsd.pool.ntp.org iburst
 # See http://support.ntp.org/bin/view/Support/AccessRestrictions
 # for more information.
 #
-restrict default kod nomodify notrap nopeer noquery
-restrict -6 default kod nomodify notrap nopeer noquery
+restrict default limited kod nomodify notrap nopeer noquery
+restrict -6 default limited kod nomodify notrap nopeer noquery
 #
 # Alternatively, the following rules would block all unauthorized access.
 #
___
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: r280849 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf contrib/ntp/html contrib/ntp/html/build contrib/ntp/html/drivers contri

2015-03-31 Thread Cy Schubert
In message 
, NGie Cooper writes:
> On Mon, Mar 30, 2015 at 6:30 AM, Cy Schubert  wrote:
> > Author: cy
> > Date: Mon Mar 30 13:30:15 2015
> > New Revision: 280849
> > URL: https://svnweb.freebsd.org/changeset/base/280849
> >
> > Log:
> >   MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
> >
> >   Thanks to roberto for providing pointers to wedge this into HEAD.
> >
> >   Approved by:  roberto
> 
> This change broke the build. Please fix :(.
> 

IIRC this is the fix.

Index: ntp_parser.y
===
--- ntp_parser.y(revision 280914)
+++ ntp_parser.y(revision 280915)
@@ -8,8 +8,8 @@
  * Copyright (c) 2006
  */
 
-%parse-param {struct FILE_INFO *ip_file}
-%lex-param {struct FILE_INFO *ip_file}
+%parse-param { struct FILE_INFO *ip_file }
+%lex-param { struct FILE_INFO *ip_file }
 
 %{
   #ifdef HAVE_CONFIG_H



-- 
Cheers,
Cy Schubert  or 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
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: r280915 - head/contrib/ntp/ntpd

2015-03-31 Thread Cy Schubert
Author: cy
Date: Tue Mar 31 19:35:32 2015
New Revision: 280915
URL: https://svnweb.freebsd.org/changeset/base/280915

Log:
  Fix build.

Modified:
  head/contrib/ntp/ntpd/ntp_parser.y

Modified: head/contrib/ntp/ntpd/ntp_parser.y
==
--- head/contrib/ntp/ntpd/ntp_parser.y  Tue Mar 31 19:12:13 2015
(r280914)
+++ head/contrib/ntp/ntpd/ntp_parser.y  Tue Mar 31 19:35:32 2015
(r280915)
@@ -8,8 +8,8 @@
  * Copyright (c) 2006
  */
 
-%parse-param {struct FILE_INFO *ip_file}
-%lex-param {struct FILE_INFO *ip_file}
+%parse-param { struct FILE_INFO *ip_file }
+%lex-param { struct FILE_INFO *ip_file }
 
 %{
   #ifdef HAVE_CONFIG_H
___
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: r280914 - head/sbin/md5

2015-03-31 Thread Xin LI
Author: delphij
Date: Tue Mar 31 19:12:13 2015
New Revision: 280914
URL: https://svnweb.freebsd.org/changeset/base/280914

Log:
  Constify.
  
  Suggested by: rdivacky
  MFC after:2 weeks

Modified:
  head/sbin/md5/md5.c

Modified: head/sbin/md5/md5.c
==
--- head/sbin/md5/md5.c Tue Mar 31 19:07:28 2015(r280913)
+++ head/sbin/md5/md5.c Tue Mar 31 19:12:13 2015(r280914)
@@ -70,11 +70,11 @@ typedef struct Algorithm_t {
 } Algorithm_t;
 
 static void MD5_Update(MD5_CTX *, const unsigned char *, size_t);
-static void MDString(Algorithm_t *, const char *);
-static void MDTimeTrial(Algorithm_t *);
-static void MDTestSuite(Algorithm_t *);
-static void MDFilter(Algorithm_t *, int);
-static void usage(Algorithm_t *);
+static void MDString(const Algorithm_t *, const char *);
+static void MDTimeTrial(const Algorithm_t *);
+static void MDTestSuite(const Algorithm_t *);
+static void MDFilter(const Algorithm_t *, int);
+static void usage(const Algorithm_t *);
 
 typedef union {
MD5_CTX md5;
@@ -91,7 +91,7 @@ typedef union {
 
 /* algorithm function table */
 
-static struct Algorithm_t Algorithm[] = {
+static const struct Algorithm_t Algorithm[] = {
{ "md5", "MD5", &MD5TestOutput, (DIGEST_Init*)&MD5Init,
(DIGEST_Update*)&MD5_Update, (DIGEST_End*)&MD5End,
&MD5Data, &MD5File },
@@ -216,7 +216,7 @@ main(int argc, char *argv[])
  * Digests a string and prints the result.
  */
 static void
-MDString(Algorithm_t *alg, const char *string)
+MDString(const Algorithm_t *alg, const char *string)
 {
size_t len = strlen(string);
char buf[HEX_DIGEST_LENGTH];
@@ -240,7 +240,7 @@ MDString(Algorithm_t *alg, const char *s
  * Measures the time to digest TEST_BLOCK_COUNT TEST_BLOCK_LEN-byte blocks.
  */
 static void
-MDTimeTrial(Algorithm_t *alg)
+MDTimeTrial(const Algorithm_t *alg)
 {
DIGEST_CTX context;
struct rusage before, after;
@@ -350,7 +350,7 @@ const char *RIPEMD160_TestOutput[MDTESTC
 };
 
 static void
-MDTestSuite(Algorithm_t *alg)
+MDTestSuite(const Algorithm_t *alg)
 {
int i;
char buffer[HEX_DIGEST_LENGTH];
@@ -370,7 +370,7 @@ MDTestSuite(Algorithm_t *alg)
  * Digests the standard input and prints the result.
  */
 static void
-MDFilter(Algorithm_t *alg, int tee)
+MDFilter(const Algorithm_t *alg, int tee)
 {
DIGEST_CTX context;
unsigned int len;
@@ -387,7 +387,7 @@ MDFilter(Algorithm_t *alg, int tee)
 }
 
 static void
-usage(Algorithm_t *alg)
+usage(const Algorithm_t *alg)
 {
 
fprintf(stderr, "usage: %s [-pqrtx] [-c string] [-s string] [files 
...]\n", alg->progname);
___
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: r280913 - head/lib/msun/aarch64

2015-03-31 Thread Andrew Turner
Author: andrew
Date: Tue Mar 31 19:07:28 2015
New Revision: 280913
URL: https://svnweb.freebsd.org/changeset/base/280913

Log:
  Add the fe* symbols to libm for arm64.
  
  Sponsored by: The FreeBSD Foundation

Added:
  head/lib/msun/aarch64/fenv.c   (contents, props changed)

Added: head/lib/msun/aarch64/fenv.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/msun/aarch64/fenv.cTue Mar 31 19:07:28 2015
(r280913)
@@ -0,0 +1,56 @@
+/*-
+ * Copyright (c) 2004 David Schultz 
+ * Copyright (c) 2013 Andrew Turner 
+ * 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$
+ */
+
+#define__fenv_static
+#include "fenv.h"
+
+/*
+ * Hopefully the system ID byte is immutable, so it's valid to use
+ * this as a default environment.
+ */
+const fenv_t __fe_dfl_env = 0;
+
+#ifdef __GNUC_GNU_INLINE__
+#error "This file must be compiled with C99 'inline' semantics"
+#endif
+
+extern inline int feclearexcept(int __excepts);
+extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts);
+extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
+extern inline int feraiseexcept(int __excepts);
+extern inline int fetestexcept(int __excepts);
+extern inline int fegetround(void);
+extern inline int fesetround(int __round);
+extern inline int fegetenv(fenv_t *__envp);
+extern inline int feholdexcept(fenv_t *__envp);
+extern inline int fesetenv(const fenv_t *__envp);
+extern inline int feupdateenv(const fenv_t *__envp);
+extern inline int feenableexcept(int __mask);
+extern inline int fedisableexcept(int __mask);
+extern inline int fegetexcept(void);
___
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: r280849 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf contrib/ntp/html contrib/ntp/html/build contrib/ntp/html/drivers contrib/n

2015-03-31 Thread NGie Cooper
On Mon, Mar 30, 2015 at 6:30 AM, Cy Schubert  wrote:
> Author: cy
> Date: Mon Mar 30 13:30:15 2015
> New Revision: 280849
> URL: https://svnweb.freebsd.org/changeset/base/280849
>
> Log:
>   MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
>
>   Thanks to roberto for providing pointers to wedge this into HEAD.
>
>   Approved by:  roberto

This change broke the build. Please fix :(.
___
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: r280279 - head/sys/sys

2015-03-31 Thread Konstantin Belousov
On Tue, Mar 31, 2015 at 03:49:28PM +1100, Bruce Evans wrote:
> It looks a bit overengineered to me.  A bit like my function pointers
> for the bcopy() family on i386.  bcopy() is a bulk operation, so in
> theory you can do it much faster by selecting the best available
> version at runtime.  In practice, the gains were not large and are
> too machine-dependent to maintain.  It is even harder to get large
> gains and maintain them by selecting individual instructions at runtime.
> 
Yes, it is similar to bcopy.  The difference in motivation is that the
IFUNCs are for features, not for speed.  The existing patch already
demostrates this WRT self-snoop and different methods of saving FPU
state.

___
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: r280866 - in head/sys: amd64/amd64 i386/i386

2015-03-31 Thread Konstantin Belousov
On Tue, Mar 31, 2015 at 12:51:04PM -0400, John Baldwin wrote:
> Also, I believe that the 100 millisecond timer referred to in step 14 above is
> a timeout on the entire AP-enumeration process and is the timer waited for in
> step 16.  It also seems that the BIOS uses broadcast (all-but-self) IPIs,
> whereas FreeBSD uses targeted (wake up a single AP at a time) IPIs.
Yes, I also noted that when I tried to understand why x2APIC fails in AP
startup sequence.

> 
> I don't really know if we need to increase the delays or not.  I have no idea
> what Intel's source for those numbers in the two documents are.  I don't think
> I've ever seen a rationale for why they were chosen.
It might beia time to run BIST + some sloppiness for the actual initialization
code.  Intel claims

9.1.2 Processor Built-In Self-Test (BIST)

The overhead for performing a BIST varies between processor families.
For example, the BIST takes approximately 30 million processor clock
periods to execute on the Pentium 4 processor. This clock count is
model-specific; Intel reserves the right to change the number of periods
for any Intel 64 or IA-32 processor, without notification.

> 
> BTW, Linux seems to use the equivalent of 100 milliseconds for the
> lapic_ipi_wait() stage before doing the other delays (see
> native_safe_apic_wait_icr_idle() for the non-X2APIC case).

My main observation is that we allow almost twice as much time for AP
to start in the xAPIC mode vs. x2APIC.  But increasing the delays did
not helped the machines where it fails.
___
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: r280866 - in head/sys: amd64/amd64 i386/i386

2015-03-31 Thread John Baldwin
On Tuesday, March 31, 2015 03:38:50 AM Konstantin Belousov wrote:
> But apparently, that did not helped, and it seems that there are
> sporadic reports of Linux having similar issues with x2APIC on similar
> mobile SandyBridge, which are proof-less charged to BIOS bugs.
> 
> Mostly, my question is, should we increase DELAYS() in addition to
> lapic_ipi_wait() timeouts ?

Hmm, those delays also come from the MP 1.4 spec.  The INIT delay
is already quite long (10 ms).  The STARTUP delays are more a matter
of how long our mpboot code takes to get to the point of incrementing
mp_ncpus from my understanding.  In the MP spec the delays are only
mentioned in the psuedo-code in B.4, not in the text:

BSP sends AP an INIT IPI
BSP DELAYs (10mSec)
If (APIC_VERSION is not an 82489DX) {
BSP sends AP a STARTUP IPI
BSP DELAYs (200μSEC)
BSP sends AP a STARTUP IPI
BSP DELAYs (200μSEC)
}
BSP verifies synchronization with executing AP

Example B-1. Universal Start-up Algorithm

Hmm, the SDM also mentions similar delays in Vol3 8.4.4 (Feb 2014
version):

8.4.4.1 Typical BSP Initialization Sequence

...

14. Performs the following operation to set up the BSP to detect the presence
of APs in the system and the number of processors:

— Sets the value of the COUNT variable to 1.

— Starts a timer (set for an approximate interval of 100 milliseconds).
  In the AP BIOS initialization code, the AP will increment the COUNT
  variable to indicate its presence.  When the timer expires, the BSP
  checks the value of the COUNT variable.  If the timer expires and the
  COUNT variable has not been incremented, no APs are present or some
  error has occurred.

15. Broadcasts an INIT-SIPI-SIPI IPI sequence to the APs to wake them up and
initialize them:

  MOV ESI, ICR_LOW; Load address of ICR low dword into ESI.
  MOV EAX, 000C4500H; Load ICR encoding for broadcast INIT IPI
  ; to all APs into EAX.
  MOV [ESI], EAX; Broadcast INIT IPI to all APs
  ; 10-millisecond delay loop.
  MOV EAX, 000C46XXH; Load ICR encoding for broadcast SIPI IP
  ; to all APs into EAX, where xx is the vector computed in step 10.
  MOV [ESI], EAX; Broadcast SIPI IPI to all APs
  ; 200-microsecond delay loop
  MOV [ESI], EAX; Broadcast second SIPI IPI to all APs
  ; 200-microsecond delay loop

16. Waits for the timer interrupt.

17. Reads and evaluates the COUNT variable and establishes a processor count.

...

Note that this algorithm specifically refers to BIOS startup and not OS
startup.  I can't find any clear mention in the SDM of what the OS is supposed
to do to bootstrap APs.  One bread crumb is that 8.4.3 it implies that the BIOS
should leave APs in a state that requires an INIT during OS bootstrap which
implies that OS's have to use INIT as well:

9. While the BSP is executing operating-system boot-strap and start-up code,
   the APs remain in the halted state. In this state they will respond only to
   INITs, NMIs, and SMIs. They will also respond to snoops and to assertions
   of the STPCLK# pin.

Also, I believe that the 100 millisecond timer referred to in step 14 above is
a timeout on the entire AP-enumeration process and is the timer waited for in
step 16.  It also seems that the BIOS uses broadcast (all-but-self) IPIs,
whereas FreeBSD uses targeted (wake up a single AP at a time) IPIs.

I don't really know if we need to increase the delays or not.  I have no idea
what Intel's source for those numbers in the two documents are.  I don't think
I've ever seen a rationale for why they were chosen.

BTW, Linux seems to use the equivalent of 100 milliseconds for the
lapic_ipi_wait() stage before doing the other delays (see
native_safe_apic_wait_icr_idle() for the non-X2APIC case).

-- 
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: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys

2015-03-31 Thread Julian Elischer

On 4/1/15 12:01 AM, Eric van Gyzen wrote:

Now as to the

-1 -> NOCPU

This is like pulling on a string on your sweater.. the only sensible solution 
that
I could come up with after chatting with Lawrence is to add
#include 
to everyone that uses the callout.h and does not have it already… (putting it 
into callout.h does not work) .. sigh..

Now for this cosmetic change I end up with the following changes (and as yet I 
have
not built LINT or universe so there may be more).. I have spent about 2 hours 
on this
so far and I can at least build a kernel with the change for amd64 :-0

Here is what has to change, do you really think that this is worth it?

Note I did not look into moving NOCPU in proc.h it says it means no CPU is 
present
which is sort of the meaning we want.. I am not sure if the define could be 
moved .. but
that too may be yet another string...

Is this worth it, or do you have another idea on how best to do this???

Ugh. :(  I guess leave it at -1 for now.

If you leave it as -1, you might add a /* NOCPU */ comment, for the sake of
grep.  (This could be a lost cause, for all I know, but it can't hurt.)


Another alternative would be to
move NOCPU to  (at least for the kernel) if bde@ would allow it.
I don't think changing all those files is appropriate.

(Also,  seems like an odd place for NOCPU now, it should really be
in  if not param.h.  I understand why it was first added in proc.h,
but it is now used in many more places than just td_oncpu.)

+1
move it.. I think I may have added it for td_oncpu but I'm not going 
to look it up.


Eric





___
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: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys

2015-03-31 Thread Julian Elischer

On 3/31/15 8:26 AM, Randall Stewart wrote:


On Mar 30, 2015, at 9:16 AM, John Baldwin > wrote:



On Saturday, March 28, 2015 12:50:24 PM Randall Stewart wrote:

Author: rrs
Date: Sat Mar 28 12:50:24 2015
New Revision: 280785
URL: https://svnweb.freebsd.org/changeset/base/280785

Log:
 Change the callout to supply -1 to indicate we are not changing
 CPU, also add protection against invalid CPU's as well as
 split c_flags and c_iflags so that if a user plays with the active
 flag (the one expected to be played with by callers in MPSAFE) 
without
 a lock, it won't adversely affect the callout system by causing a 
corrupt
 list. This also means that all callers need to use the macros and 
*not*

 play with the falgs directly (like netgraph used to).

 Differential Revision: htts://reviews.freebsd.org/D1894
 Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky
  tested by hiren and netflix.
 Sponsored by:Netflix Inc.


Please use NOCPU rather than -1 directly for the CPU field when not
moving a callout.



John:

I have made *all* of your suggested changes, adopting the comments and
moving migration to kern_timeout.c.. thanks..

Now as to the

-1 -> NOCPU

This is like pulling on a string on your sweater.. the only sensible 
solution that

I could come up with after chatting with Lawrence is to add
#include 
to everyone that uses the callout.h and does not have it already… 
(putting it into callout.h does not work) .. sigh..


Now for this cosmetic change I end up with the following changes 
(and as yet I have
not built LINT or universe so there may be more).. I have spent 
about 2 hours on this

so far and I can at least build a kernel with the change for amd64 :-0

Here is what has to change, do you really think that this is worth it?

Note I did not look into moving NOCPU in proc.h it says it means no 
CPU is present
which is sort of the meaning we want.. I am not sure if the define 
could be moved .. but

that too may be yet another string...


sounds like NOCPU should be defined somewhere else.


Is this worth it, or do you have another idea on how best to do this???

R

--


___
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: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys

2015-03-31 Thread Eric van Gyzen
>> Now as to the 
>>
>> -1 -> NOCPU
>>
>> This is like pulling on a string on your sweater.. the only sensible 
>> solution that
>> I could come up with after chatting with Lawrence is to add 
>> #include 
>> to everyone that uses the callout.h and does not have it already… (putting 
>> it into callout.h does not work) .. sigh..
>>
>> Now for this cosmetic change I end up with the following changes (and as yet 
>> I have
>> not built LINT or universe so there may be more).. I have spent about 2 
>> hours on this
>> so far and I can at least build a kernel with the change for amd64 :-0
>>
>> Here is what has to change, do you really think that this is worth it?
>>
>> Note I did not look into moving NOCPU in proc.h it says it means no CPU is 
>> present
>> which is sort of the meaning we want.. I am not sure if the define could be 
>> moved .. but
>> that too may be yet another string...
>>
>> Is this worth it, or do you have another idea on how best to do this???
> 
> Ugh. :(  I guess leave it at -1 for now.

If you leave it as -1, you might add a /* NOCPU */ comment, for the sake of
grep.  (This could be a lost cause, for all I know, but it can't hurt.)

> Another alternative would be to
> move NOCPU to  (at least for the kernel) if bde@ would allow it.
> I don't think changing all those files is appropriate.
> 
> (Also,  seems like an odd place for NOCPU now, it should really be
> in  if not param.h.  I understand why it was first added in proc.h,
> but it is now used in many more places than just td_oncpu.)

+1

Eric
___
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: r280912 - in stable: 10/sys/kern 9/sys/kern

2015-03-31 Thread John Baldwin
Author: jhb
Date: Tue Mar 31 15:37:24 2015
New Revision: 280912
URL: https://svnweb.freebsd.org/changeset/base/280912

Log:
  MFC 278760:
  Add two new counters for vnode life cycle events:
  - vfs.recycles counts the number of vnodes forcefully recycled to avoid
exceeding kern.maxvnodes.
  - vfs.vnodes_created counts the number of vnodes created by successful
calls to getnewvnode().

Modified:
  stable/9/sys/kern/vfs_subr.c
Directory Properties:
  stable/9/sys/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/kern/vfs_subr.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/sys/kern/vfs_subr.c
==
--- stable/9/sys/kern/vfs_subr.cTue Mar 31 15:03:58 2015
(r280911)
+++ stable/9/sys/kern/vfs_subr.cTue Mar 31 15:37:24 2015
(r280912)
@@ -123,6 +123,10 @@ static unsigned long   numvnodes;
 SYSCTL_ULONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0,
 "Number of vnodes in existence");
 
+static u_long vnodes_created;
+SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created,
+0, "Number of vnodes created by getnewvnode");
+
 /*
  * Conversion tables for conversion from vnode types to inode formats
  * and back.
@@ -157,6 +161,10 @@ static int vlru_allow_cache_src;
 SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW,
 &vlru_allow_cache_src, 0, "Allow vlru to reclaim source vnode");
 
+static u_long recycles_count;
+SYSCTL_ULONG(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, 0,
+"Number of vnodes recycled to avoid exceding kern.maxvnodes");
+
 /*
  * Various variables used for debugging the new implementation of
  * reassignbuf().
@@ -769,6 +777,7 @@ vlrureclaim(struct mount *mp)
}
KASSERT((vp->v_iflag & VI_DOOMED) == 0,
("VI_DOOMED unexpectedly detected in vlrureclaim()"));
+   atomic_add_long(&recycles_count, 1);
vgonel(vp);
VOP_UNLOCK(vp, 0);
vdropl(vp);
@@ -964,8 +973,10 @@ vtryrecycle(struct vnode *vp)
__func__, vp);
return (EBUSY);
}
-   if ((vp->v_iflag & VI_DOOMED) == 0)
+   if ((vp->v_iflag & VI_DOOMED) == 0) {
+   atomic_add_long(&recycles_count, 1);
vgonel(vp);
+   }
VOP_UNLOCK(vp, LK_INTERLOCK);
vn_finished_write(vnmp);
return (0);
@@ -1069,6 +1080,7 @@ getnewvnode(const char *tag, struct moun
atomic_add_long(&numvnodes, 1);
mtx_unlock(&vnode_free_list_mtx);
 alloc:
+   atomic_add_long(&vnodes_created, 1);
vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO);
/*
 * Setup locks.
___
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: r280912 - in stable: 10/sys/kern 9/sys/kern

2015-03-31 Thread John Baldwin
Author: jhb
Date: Tue Mar 31 15:37:24 2015
New Revision: 280912
URL: https://svnweb.freebsd.org/changeset/base/280912

Log:
  MFC 278760:
  Add two new counters for vnode life cycle events:
  - vfs.recycles counts the number of vnodes forcefully recycled to avoid
exceeding kern.maxvnodes.
  - vfs.vnodes_created counts the number of vnodes created by successful
calls to getnewvnode().

Modified:
  stable/10/sys/kern/vfs_subr.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/sys/kern/vfs_subr.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/10/sys/kern/vfs_subr.c
==
--- stable/10/sys/kern/vfs_subr.c   Tue Mar 31 15:03:58 2015
(r280911)
+++ stable/10/sys/kern/vfs_subr.c   Tue Mar 31 15:37:24 2015
(r280912)
@@ -122,6 +122,10 @@ static unsigned long   numvnodes;
 SYSCTL_ULONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0,
 "Number of vnodes in existence");
 
+static u_long vnodes_created;
+SYSCTL_ULONG(_vfs, OID_AUTO, vnodes_created, CTLFLAG_RD, &vnodes_created,
+0, "Number of vnodes created by getnewvnode");
+
 /*
  * Conversion tables for conversion from vnode types to inode formats
  * and back.
@@ -156,6 +160,10 @@ static int vlru_allow_cache_src;
 SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW,
 &vlru_allow_cache_src, 0, "Allow vlru to reclaim source vnode");
 
+static u_long recycles_count;
+SYSCTL_ULONG(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, 0,
+"Number of vnodes recycled to avoid exceding kern.maxvnodes");
+
 /*
  * Various variables used for debugging the new implementation of
  * reassignbuf().
@@ -788,6 +796,7 @@ vlrureclaim(struct mount *mp)
}
KASSERT((vp->v_iflag & VI_DOOMED) == 0,
("VI_DOOMED unexpectedly detected in vlrureclaim()"));
+   atomic_add_long(&recycles_count, 1);
vgonel(vp);
VOP_UNLOCK(vp, 0);
vdropl(vp);
@@ -988,8 +997,10 @@ vtryrecycle(struct vnode *vp)
__func__, vp);
return (EBUSY);
}
-   if ((vp->v_iflag & VI_DOOMED) == 0)
+   if ((vp->v_iflag & VI_DOOMED) == 0) {
+   atomic_add_long(&recycles_count, 1);
vgonel(vp);
+   }
VOP_UNLOCK(vp, LK_INTERLOCK);
vn_finished_write(vnmp);
return (0);
@@ -1093,6 +1104,7 @@ getnewvnode(const char *tag, struct moun
atomic_add_long(&numvnodes, 1);
mtx_unlock(&vnode_free_list_mtx);
 alloc:
+   atomic_add_long(&vnodes_created, 1);
vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO);
/*
 * Setup locks.
___
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: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys

2015-03-31 Thread John Baldwin
On Monday, March 30, 2015 06:26:25 PM Randall Stewart wrote:
> 
> On Mar 30, 2015, at 9:16 AM, John Baldwin  wrote:
> 
> > On Saturday, March 28, 2015 12:50:24 PM Randall Stewart wrote:
> >> Author: rrs
> >> Date: Sat Mar 28 12:50:24 2015
> >> New Revision: 280785
> >> URL: https://svnweb.freebsd.org/changeset/base/280785
> >> 
> >> Log:
> >>  Change the callout to supply -1 to indicate we are not changing
> >>  CPU, also add protection against invalid CPU's as well as
> >>  split c_flags and c_iflags so that if a user plays with the active
> >>  flag (the one expected to be played with by callers in MPSAFE) without
> >>  a lock, it won't adversely affect the callout system by causing a corrupt
> >>  list. This also means that all callers need to use the macros and *not*
> >>  play with the falgs directly (like netgraph used to).
> >> 
> >>  Differential Revision: htts://reviews.freebsd.org/D1894
> >>  Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky
> >>   tested by hiren and netflix.
> >>  Sponsored by: Netflix Inc.
> > 
> > Please use NOCPU rather than -1 directly for the CPU field when not
> > moving a callout.
> > 
> 
> John:
> 
> I have made *all* of your suggested changes, adopting the comments and
> moving migration to kern_timeout.c.. thanks..
> 
> Now as to the 
> 
> -1 -> NOCPU
> 
> This is like pulling on a string on your sweater.. the only sensible solution 
> that
> I could come up with after chatting with Lawrence is to add 
> #include 
> to everyone that uses the callout.h and does not have it already… (putting it 
> into callout.h does not work) .. sigh..
> 
> Now for this cosmetic change I end up with the following changes (and as yet 
> I have
> not built LINT or universe so there may be more).. I have spent about 2 hours 
> on this
> so far and I can at least build a kernel with the change for amd64 :-0
> 
> Here is what has to change, do you really think that this is worth it?
> 
> Note I did not look into moving NOCPU in proc.h it says it means no CPU is 
> present
> which is sort of the meaning we want.. I am not sure if the define could be 
> moved .. but
> that too may be yet another string...
> 
> Is this worth it, or do you have another idea on how best to do this???

Ugh. :(  I guess leave it at -1 for now.  Another alternative would be to
move NOCPU to  (at least for the kernel) if bde@ would allow it.
I don't think changing all those files is appropriate.

(Also,  seems like an odd place for NOCPU now, it should really be
in  if not param.h.  I understand why it was first added in proc.h,
but it is now used in many more places than just td_oncpu.)

-- 
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: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys

2015-03-31 Thread John Baldwin
On Monday, March 30, 2015 04:21:03 PM Randall Stewart wrote:
> John:
> 
> As I just said, Warner and I feel we can get by with making the int -> 
> short/short so
> we preserver the KPI and at the same time achieve the objective ..
> 
> My big concern was no intel platforms but Warner gave me a green light there 
> ;-)

Technically this still breaks the KBI (in that existing drivers using
callout_pending(), callout_active(), and callout_deactivate() will not
do the correct thing).  OTOH, you can't preserve that and still fix the
race (well, unless you do locking in callout_deactivate() which you
might consider for an MFC even if you didn't do it in HEAD if the KBI
breakage is severe enough).

-- 
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: r280911 - in head/usr.bin: col column

2015-03-31 Thread Kevin Lo
Author: kevlo
Date: Tue Mar 31 15:03:58 2015
New Revision: 280911
URL: https://svnweb.freebsd.org/changeset/base/280911

Log:
  Remove bogus cast.

Modified:
  head/usr.bin/col/col.c
  head/usr.bin/column/column.c

Modified: head/usr.bin/col/col.c
==
--- head/usr.bin/col/col.c  Tue Mar 31 14:41:29 2015(r280910)
+++ head/usr.bin/col/col.c  Tue Mar 31 15:03:58 2015(r280911)
@@ -290,7 +290,7 @@ main(int argc, char **argv)
need = l->l_lsize ? l->l_lsize * 2 : 90;
if ((l->l_line = realloc(l->l_line,
(unsigned)need * sizeof(CHAR))) == NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
l->l_lsize = need;
}
c = &l->l_line[l->l_line_len++];
@@ -410,13 +410,13 @@ flush_line(LINE *l)
sorted_size = l->l_lsize;
if ((sorted = realloc(sorted,
(unsigned)sizeof(CHAR) * sorted_size)) == NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
}
if (l->l_max_col >= count_size) {
count_size = l->l_max_col + 1;
if ((count = realloc(count,
(unsigned)sizeof(int) * count_size)) == NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
}
memset(count, 0, sizeof(int) * l->l_max_col + 1);
for (i = nchars, c = l->l_line; --i >= 0; c++)
@@ -510,7 +510,7 @@ alloc_line(void)
 
if (!line_freelist) {
if ((l = realloc(NULL, sizeof(LINE) * NALLOC)) == NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
line_freelist = l;
for (i = 1; i < NALLOC; i++, l++)
l->l_next = l + 1;

Modified: head/usr.bin/column/column.c
==
--- head/usr.bin/column/column.cTue Mar 31 14:41:29 2015
(r280910)
+++ head/usr.bin/column/column.cTue Mar 31 15:03:58 2015
(r280911)
@@ -233,11 +233,11 @@ maketbl(void)
wchar_t *last;
 
if ((t = tbl = calloc(entries, sizeof(TBL))) == NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
if ((cols = calloc((maxcols = DEFCOLS), sizeof(*cols))) == NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
if ((lens = calloc(maxcols, sizeof(int))) == NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
for (cnt = 0, lp = list; cnt < entries; ++cnt, ++lp, ++t) {
for (coloff = 0, p = *lp;
(cols[coloff] = wcstok(p, separator, &last));
@@ -253,9 +253,9 @@ maketbl(void)
maxcols += DEFCOLS;
}
if ((t->list = calloc(coloff, sizeof(*t->list))) == NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
if ((t->len = calloc(coloff, sizeof(int))) == NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
for (t->cols = coloff; --coloff >= 0;) {
t->list[coloff] = cols[coloff];
t->len[coloff] = width(cols[coloff]);
@@ -284,7 +284,7 @@ input(FILE *fp)
if (!list)
if ((list = calloc((maxentry = DEFNUM), sizeof(*list))) ==
NULL)
-   err(1, (char *)NULL);
+   err(1, NULL);
while (fgetws(buf, MAXLINELEN, fp)) {
for (p = buf; *p && iswspace(*p); ++p);
if (!*p)
___
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: r280910 - head/sys/netpfil/ipfw

2015-03-31 Thread Andrey V. Elsukov
Author: ae
Date: Tue Mar 31 14:41:29 2015
New Revision: 280910
URL: https://svnweb.freebsd.org/changeset/base/280910

Log:
  The offset variable has been cleared all bits except IP6F_OFF_MASK.
  Use ip6f_mf variable instead of checking its bits.

Modified:
  head/sys/netpfil/ipfw/ip_fw_log.c

Modified: head/sys/netpfil/ipfw/ip_fw_log.c
==
--- head/sys/netpfil/ipfw/ip_fw_log.c   Tue Mar 31 13:37:32 2015
(r280909)
+++ head/sys/netpfil/ipfw/ip_fw_log.c   Tue Mar 31 14:41:29 2015
(r280910)
@@ -525,7 +525,7 @@ ipfw_log(struct ip_fw_chain *chain, stru
 
 #ifdef INET6
if (IS_IP6_FLOW_ID(&(args->f_id))) {
-   if (offset & (IP6F_OFF_MASK | IP6F_MORE_FRAG))
+   if (offset || ip6f_mf)
snprintf(SNPARGS(fragment, 0),
" (frag %08x:%d@%d%s)",
args->f_id.extra,
___
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: r280909 - head/contrib/gcc

2015-03-31 Thread Ed Maste
Author: emaste
Date: Tue Mar 31 13:37:32 2015
New Revision: 280909
URL: https://svnweb.freebsd.org/changeset/base/280909

Log:
  unwind-d2 build workaround for arm64
  
  The __builtin_init_dwarf_reg_size_table function is unimplemented in
  clang 3.6 for AArch64. Comment it out for now and replace it with
  a message and abort.
  
  Tracked in upstream LLVM PR 22997
  https://llvm.org/bugs/show_bug.cgi?id=22997
  
  Submitted by: andrew

Modified:
  head/contrib/gcc/unwind-dw2.c

Modified: head/contrib/gcc/unwind-dw2.c
==
--- head/contrib/gcc/unwind-dw2.c   Tue Mar 31 12:53:07 2015
(r280908)
+++ head/contrib/gcc/unwind-dw2.c   Tue Mar 31 13:37:32 2015
(r280909)
@@ -1393,7 +1393,16 @@ uw_advance_context (struct _Unwind_Conte
 static inline void
 init_dwarf_reg_size_table (void)
 {
+/*
+ * ARM64TODO: http://llvm.org/pr22997
+ * llvm 3.6 doesn't support __builtin_init_dwarf_reg_size_table on AArch64.
+ */
+#ifdef __aarch64__
+  printf("Unimplemented: init_dwarf_reg_size_table\n");
+  abort();
+#else
   __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table);
+#endif
 }
 
 static void
___
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: r280908 - head/libexec/rtld-elf/aarch64

2015-03-31 Thread Ed Maste
Author: emaste
Date: Tue Mar 31 12:53:07 2015
New Revision: 280908
URL: https://svnweb.freebsd.org/changeset/base/280908

Log:
  Correct copyright typo

Modified:
  head/libexec/rtld-elf/aarch64/reloc.c

Modified: head/libexec/rtld-elf/aarch64/reloc.c
==
--- head/libexec/rtld-elf/aarch64/reloc.c   Tue Mar 31 11:59:57 2015
(r280907)
+++ head/libexec/rtld-elf/aarch64/reloc.c   Tue Mar 31 12:53:07 2015
(r280908)
@@ -1,5 +1,5 @@
 /*-
- * Copytight (c) 2014-2015 The FreeBSD Foundation
+ * Copyright (c) 2014-2015 The FreeBSD Foundation
  * All rights reserved.
  *
  * Portions of this software were developed by Andrew Turner
___
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: r280907 - head/sys/arm/conf

2015-03-31 Thread Ganbold Tsagaankhuu
Author: ganbold
Date: Tue Mar 31 11:59:57 2015
New Revision: 280907
URL: https://svnweb.freebsd.org/changeset/base/280907

Log:
  Add kernel config files for Hardkernel Odroid-C1 and Visson ATV-102 devices.
  
  Submitted by:   John Wehle
  Approved by:stas (mentor)

Added:
  head/sys/arm/conf/ODROIDC1   (contents, props changed)
  head/sys/arm/conf/VSATV102   (contents, props changed)

Added: head/sys/arm/conf/ODROIDC1
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/conf/ODROIDC1  Tue Mar 31 11:59:57 2015(r280907)
@@ -0,0 +1,133 @@
+# ODROIDC1 -- Custom configuration for the HardKernel ODROID-C1 SBC
+#
+# For more information on this file, please read the handbook section on
+# Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+ident  ODROIDC1
+
+include"../amlogic/aml8726/std.odroidc1"
+
+optionsHZ=100
+optionsSCHED_ULE   # ULE scheduler
+optionsPREEMPTION  # Enable kernel thread 
preemption
+optionsINET# InterNETworking
+optionsINET6   # IPv6 communications protocols
+optionsFFS # Berkeley Fast Filesystem
+optionsSOFTUPDATES # Enable FFS soft updates 
support
+optionsUFS_ACL # Support for access control 
lists
+optionsUFS_DIRHASH # Improve performance on big 
directories
+optionsPROCFS  # Process filesystem (requires 
PSEUDOFS)
+optionsPSEUDOFS# Pseudo-filesystem framework
+optionsGEOM_PART_BSD   # BSD partition scheme
+optionsGEOM_PART_MBR   # MBR partition scheme
+optionsSCSI_DELAY=5000 # Delay (in ms) before probing 
SCSI
+optionsKTRACE  # ktrace(1) support
+optionsSYSVSHM # SYSV-style shared memory
+optionsSYSVMSG # SYSV-style message queues
+optionsSYSVSEM # SYSV-style semaphores
+options_KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time 
extensions
+optionsPRINTF_BUFR_SIZE=128# Prevent printf output being 
interspersed.
+optionsKBD_INSTALL_CDEV# install a CDEV entry in /dev
+optionsLINUX_BOOT_ABI
+optionsVFP # vfp/neon
+
+# Debugging
+makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
+optionsALT_BREAK_TO_DEBUGGER
+#options   VERBOSE_SYSINIT # Enable verbose sysinit messages
+optionsBOOTVERBOSE=1
+optionsKDB
+optionsDDB # Enable the kernel debugger
+optionsINVARIANTS  # Enable calls of extra sanity 
checking
+optionsINVARIANT_SUPPORT   # Extra sanity checks of 
internal structures, required by INVARIANTS
+optionsWITNESS # Enable checks to detect 
deadlocks and cycles
+optionsWITNESS_SKIPSPIN# Don't run witness on 
spinlocks for speed
+#options   DIAGNOSTIC
+
+# NFS support
+#options   NFSCL   # New Network Filesystem Client
+#options   NFSLOCKD# Network Lock Manager
+#options   NFS_ROOT# NFS usable as /, requires NFSCL
+
+# NFS root from boopt/dhcp
+#options   BOOTP
+#options   BOOTP_NFSROOT
+#options   BOOTP_COMPAT
+#options   BOOTP_NFSV3
+#options   BOOTP_WIRED_TO=axe0
+
+# MMC/SD/SDIO card slot support
+device mmc # mmc/sd bus
+device mmcsd   # mmc/sd flash cards
+
+# Boot device is 2nd slice on MMC/SD card
+optionsROOTDEVNAME=\"ufs:mmcsd0s2\"
+
+# GPIO
+device gpio
+device gpioled
+
+# I2C support
+device iicbus
+device iicbb
+device iic
+
+# vt is the default console driver, resembling an SCO console
+device vt
+#devicekbdmux
+
+# Serial (COM) ports
+device uart# Generic UART driver
+
+# Pseudo devic

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

2015-03-31 Thread Ganbold Tsagaankhuu
Author: ganbold
Date: Tue Mar 31 11:55:56 2015
New Revision: 280906
URL: https://svnweb.freebsd.org/changeset/base/280906

Log:
  Add device tree files for Hardkernel Odroid-C1 and Visson ATV-102 devices.
  
  Submitted by: John Wehle
  Approved by:  stas (mentor)

Added:
  head/sys/boot/fdt/dts/arm/odroidc1.dts   (contents, props changed)
  head/sys/boot/fdt/dts/arm/vsatv102-m6.dts   (contents, props changed)

Added: head/sys/boot/fdt/dts/arm/odroidc1.dts
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/fdt/dts/arm/odroidc1.dts  Tue Mar 31 11:55:56 2015
(r280906)
@@ -0,0 +1,497 @@
+/*-
+ * Copyright (c) 2015 John Wehle 
+ * 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$
+ */
+
+/*
+ * The ordering of certain devices is significant (e.g. usb depends on
+ * usb-phy which depends on gpio, also the timer should appear early on
+ * to provide a reasonably accurate DELAY implementation).
+ *
+ * Both usb-phys devices must be configured to prevent the usb controller
+ * from hanging during initialization.
+ */
+
+/dts-v1/;
+
+/memreserve/ 0x790 0x0060; /* 6MB frame buffer */
+
+/ {
+   model = "hardkernel,odroid-c1";
+   compatible = "hardkernel,odroid-c1", "amlogic,s805";
+
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   interrupt-parent = <&gic>;
+
+   aliases {
+   soc = &soc;
+   screen = &screen;
+   uart0 = &uart0;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   cpu@0 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a5";
+   reg = <0x0>;
+   };
+
+   cpu@1 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a5";
+   reg = <0x1>;
+   };
+
+   cpu@2 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a5";
+   reg = <0x2>;
+   };
+
+   cpu@3 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a5";
+   reg = <0x3>;
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0x0 0x4000>; /* 1GB RAM */
+   };
+
+   soc: soc@c000 {
+   device_type = "soc";
+   compatible = "simple-bus";
+   bus-frequency = <0>;
+
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   ranges = <0x0 0xc000 0x1a10>;
+
+   gic: gic@4301000 {
+   device_type = "interrupt-controller";
+   compatible = "arm,gic";
+   reg = <0x4301000 0x1000>, // distributer registers
+ <0x4300100 0x0100>; // CPU if registers
+
+   interrupt-controller;
+   #interrupt-cells = <1>;
+   };
+
+   scu: scu@430 {
+   compatible = "arm,cortex-a5-scu";
+   reg = <0x430 0x1000>;
+   };
+
+   cpuconfig: cpuconfig@1901ff80 {
+   compatible = "amlogic,aml8726-cpuconfig";
+   reg = <0x1901ff80 16>;
+   };
+
+   pl310@420 {
+   compatible = "arm,pl310";
+   reg = <0x420 0x1000>;
+ 

svn commit: r280905 - in head/sys: arm/amlogic arm/amlogic/aml8726 arm/arm conf dev/mmc

2015-03-31 Thread Ganbold Tsagaankhuu
Author: ganbold
Date: Tue Mar 31 11:50:46 2015
New Revision: 280905
URL: https://svnweb.freebsd.org/changeset/base/280905

Log:
  Add necessary changes to support various Amlogic SoC devices
  specially aml8726-m6 and aml8726-m8b SoC based devices.
  aml8726-m6 SoC exist in devices such as Visson ATV-102.
  Hardkernel ODROID-C1 board has aml8726-m8b SoC.
  
  The following support is included:
Basic machdep code
SMP
Interrupt controller
Clock control driver (aka gate)
Pinctrl
Timer
Real time clock
UART
GPIO
I2C
SD controller
SDXC controller
USB
Watchdog
Random number generator
PLL / Clock frequency measurement
Frame buffer
  
  Submitted by:   John Wehle
  Approved by:stas (mentor)

Added:
  head/sys/arm/amlogic/
  head/sys/arm/amlogic/aml8726/
  head/sys/arm/amlogic/aml8726/aml8726_ccm.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_ccm.h   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_clkmsr.h   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_fb.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_fb.h   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_gpio.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_i2c.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_identsoc.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_l2cache.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_machdep.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_machdep.h   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_mmc.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_mmc.h   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_mp.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_pic.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_pinctrl.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_pinctrl.h   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_rng.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_rtc.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.h   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_soc.h   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_timer.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_uart.h   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_uart_console.c   (contents, props 
changed)
  head/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/aml8726_wdt.c   (contents, props changed)
  head/sys/arm/amlogic/aml8726/files.aml8726   (contents, props changed)
  head/sys/arm/amlogic/aml8726/files.smp   (contents, props changed)
  head/sys/arm/amlogic/aml8726/std.aml8726   (contents, props changed)
  head/sys/arm/amlogic/aml8726/std.odroidc1   (contents, props changed)
  head/sys/arm/amlogic/aml8726/std.vsatv102-m6   (contents, props changed)
  head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c   (contents, props changed)
Modified:
  head/sys/arm/arm/gic.c
  head/sys/conf/options.arm
  head/sys/dev/mmc/mmc.c

Added: head/sys/arm/amlogic/aml8726/aml8726_ccm.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/amlogic/aml8726/aml8726_ccm.c  Tue Mar 31 11:50:46 2015
(r280905)
@@ -0,0 +1,231 @@
+/*-
+ * Copyright 2015 John Wehle 
+ * 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 NEGL

Re: svn commit: r280759 - head/sys/netinet

2015-03-31 Thread Emeric POUPON
I tested it on a 4 core system:
- I still can't see any duplicated id in my tests, so this is good.
- as already discussed before, I don't see any performance impact

So for me it is good!

Emeric

- Mail original -
De: "Gleb Smirnoff" 
À: "Emeric POUPON" 
Cc: "Slawa Olhovchenkov" , "Hans Petter Selasky" 
, "Adrian Chadd" , 
src-committ...@freebsd.org, "Ian Lepore" , 
svn-src-all@freebsd.org, svn-src-h...@freebsd.org, "Fabien Thomas" 

Envoyé: Mardi 31 Mars 2015 00:38:36
Objet: Re: svn commit: r280759 - head/sys/netinet

On Mon, Mar 30, 2015 at 06:20:45PM +0200, Emeric POUPON wrote:
E> Yes, sure!
E> 
E> I will test it tomorrow and tell you the results.
E> However, keep in mind I did not see any performance impact with the previous 
patch.

I created a patch that enables RFC6864 and per-CPU ip_id for those packets,
that do not qualify for being atomic.

It is here: https://reviews.freebsd.org/D2177

-- 
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: r280904 - head/sys/netinet

2015-03-31 Thread Julien Charbon
Author: jch
Date: Tue Mar 31 10:17:13 2015
New Revision: 280904
URL: https://svnweb.freebsd.org/changeset/base/280904

Log:
  Use appropriate timeout_t* instead of void* in tcp_timer_activate()
  
  Suggested by: imp
  Differential Revision:https://reviews.freebsd.org/D2154
  Reviewed by:  imp, jhb
  Approved by:  jhb

Modified:
  head/sys/netinet/tcp_timer.c

Modified: head/sys/netinet/tcp_timer.c
==
--- head/sys/netinet/tcp_timer.cTue Mar 31 09:51:19 2015
(r280903)
+++ head/sys/netinet/tcp_timer.cTue Mar 31 10:17:13 2015
(r280904)
@@ -853,7 +853,7 @@ void
 tcp_timer_activate(struct tcpcb *tp, int timer_type, u_int delta)
 {
struct callout *t_callout;
-   void *f_callout;
+   timeout_t *f_callout;
struct inpcb *inp = tp->t_inpcb;
int cpu = inp_to_cpuid(inp);
 
___
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: r280903 - in head/libexec/rtld-elf: . aarch64

2015-03-31 Thread Andrew Turner
Author: andrew
Date: Tue Mar 31 09:51:19 2015
New Revision: 280903
URL: https://svnweb.freebsd.org/changeset/base/280903

Log:
  Add the arm64 code to the runtime linker. It's not able to be built as we
  still need libc_pic for a few things, but this is expected to be ready
  soon.
  
  Differential Revision:https://reviews.freebsd.org/D2136
  Reviewed by:  kib
  Sponsored by: The FreeBSD Foundation

Added:
  head/libexec/rtld-elf/aarch64/
  head/libexec/rtld-elf/aarch64/reloc.c   (contents, props changed)
  head/libexec/rtld-elf/aarch64/rtld_machdep.h   (contents, props changed)
  head/libexec/rtld-elf/aarch64/rtld_start.S   (contents, props changed)
Modified:
  head/libexec/rtld-elf/rtld.c

Added: head/libexec/rtld-elf/aarch64/reloc.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/libexec/rtld-elf/aarch64/reloc.c   Tue Mar 31 09:51:19 2015
(r280903)
@@ -0,0 +1,317 @@
+/*-
+ * Copytight (c) 2014-2015 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Andrew Turner
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+
+#include "debug.h"
+#include "rtld.h"
+#include "rtld_printf.h"
+
+/*
+ * It is possible for the compiler to emit relocations for unaligned data.
+ * We handle this situation with these inlines.
+ */
+#defineRELOC_ALIGNED_P(x) \
+   (((uintptr_t)(x) & (sizeof(void *) - 1)) == 0)
+
+/*
+ * This is not the correct prototype, but we only need it for
+ * a function pointer to a simple asm function.
+ */
+void *_rtld_tlsdesc(void *);
+void _exit(int);
+
+void
+init_pltgot(Obj_Entry *obj)
+{
+
+   if (obj->pltgot != NULL) {
+   obj->pltgot[1] = (Elf_Addr) obj;
+   obj->pltgot[2] = (Elf_Addr) &_rtld_bind_start;
+   }
+}
+
+int
+do_copy_relocations(Obj_Entry *dstobj)
+{
+   const Obj_Entry *srcobj, *defobj;
+   const Elf_Rela *relalim;
+   const Elf_Rela *rela;
+   const Elf_Sym *srcsym;
+   const Elf_Sym *dstsym;
+   const void *srcaddr;
+   const char *name;
+   void *dstaddr;
+   SymLook req;
+   size_t size;
+   int res;
+
+   /*
+* COPY relocs are invalid outside of the main program
+*/
+   assert(dstobj->mainprog);
+
+   relalim = (const Elf_Rela *)((char *)dstobj->rela +
+   dstobj->relasize);
+   for (rela = dstobj->rela; rela < relalim; rela++) {
+   if (ELF_R_TYPE(rela->r_info) != R_AARCH64_COPY)
+   continue;
+
+   dstaddr = (void *)(dstobj->relocbase + rela->r_offset);
+   dstsym = dstobj->symtab + ELF_R_SYM(rela->r_info);
+   name = dstobj->strtab + dstsym->st_name;
+   size = dstsym->st_size;
+
+   symlook_init(&req, name);
+   req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info));
+   req.flags = SYMLOOK_EARLY;
+
+   for (srcobj = dstobj->next; srcobj != NULL;
+srcobj = srcobj->next) {
+   res = symlook_obj(&req, srcobj);
+   if (res == 0) {
+   srcsym = req.sym_out;
+   defobj = req.defobj_out;
+   break;
+   }
+   }
+   if (srcobj == NULL) {
+   _rtld_error(
+"Undefined symbol \"%s\" referenced from COPY relocation in %s",
+   name, dstobj->path);
+   ret

svn commit: r280902 - svnadmin/conf

2015-03-31 Thread Stanislav Sedov
Author: stas
Date: Tue Mar 31 08:44:46 2015
New Revision: 280902
URL: https://svnweb.freebsd.org/changeset/base/280902

Log:
  Release ganbold from mentorship.
  
  He won't have to wait patiently for my approvals anymore.

Modified:
  svnadmin/conf/mentors

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Tue Mar 31 08:05:29 2015(r280901)
+++ svnadmin/conf/mentors   Tue Mar 31 08:44:46 2015(r280902)
@@ -17,7 +17,6 @@ carl  jimharris
 cherry gibbs
 erignn Co-mentor: thompsa
 erjgnn Co-mentor: jfv
-ganboldstas
 jahkib
 jceel  wkoszek Co-mentor: cognet
 jchjhb
___
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: r280901 - stable/10/sys/dev/sfxge

2015-03-31 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Mar 31 08:05:29 2015
New Revision: 280901
URL: https://svnweb.freebsd.org/changeset/base/280901

Log:
  MFC: r280807
  
  sfxge: fix bug in TSO when a DMA segment has both header and data
  
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/sfxge_tx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/sfxge_tx.c
==
--- stable/10/sys/dev/sfxge/sfxge_tx.c  Tue Mar 31 08:00:20 2015
(r280900)
+++ stable/10/sys/dev/sfxge/sfxge_tx.c  Tue Mar 31 08:05:29 2015
(r280901)
@@ -1024,7 +1024,7 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq
KASSERT(n_dma_seg, ("no payload found in TSO packet"));
++dma_seg;
}
-   tso.in_len = dma_seg->ds_len + (tso.header_len - skipped);
+   tso.in_len = dma_seg->ds_len - (tso.header_len - skipped);
tso.dma_addr = dma_seg->ds_addr + (tso.header_len - skipped);
 
id = txq->added & txq->ptr_mask;
___
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: r280900 - stable/10/sys/conf

2015-03-31 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Mar 31 08:00:20 2015
New Revision: 280900
URL: https://svnweb.freebsd.org/changeset/base/280900

Log:
  MFC: 279268
  
  sfxge: add to config files
  
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/conf/files
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/files
==
--- stable/10/sys/conf/filesTue Mar 31 07:27:29 2015(r280899)
+++ stable/10/sys/conf/filesTue Mar 31 08:00:20 2015(r280900)
@@ -2120,6 +2120,37 @@ dev/sdhci/sdhci.coptional sdhci
 dev/sdhci/sdhci_if.m   optional sdhci
 dev/sdhci/sdhci_pci.c  optional sdhci pci
 dev/sf/if_sf.c optional sf pci
+dev/sfxge/common/efx_bootcfg.c optional sfxge pci
+dev/sfxge/common/efx_ev.c  optional sfxge pci
+dev/sfxge/common/efx_filter.c  optional sfxge pci
+dev/sfxge/common/efx_intr.coptional sfxge pci
+dev/sfxge/common/efx_mac.c optional sfxge pci
+dev/sfxge/common/efx_mcdi.coptional sfxge pci
+dev/sfxge/common/efx_mon.c optional sfxge pci
+dev/sfxge/common/efx_nic.c optional sfxge pci
+dev/sfxge/common/efx_nvram.c   optional sfxge pci
+dev/sfxge/common/efx_phy.c optional sfxge pci
+dev/sfxge/common/efx_port.coptional sfxge pci
+dev/sfxge/common/efx_rx.c  optional sfxge pci
+dev/sfxge/common/efx_sram.coptional sfxge pci
+dev/sfxge/common/efx_tx.c  optional sfxge pci
+dev/sfxge/common/efx_vpd.c optional sfxge pci
+dev/sfxge/common/efx_wol.c optional sfxge pci
+dev/sfxge/common/siena_mac.c   optional sfxge pci
+dev/sfxge/common/siena_mon.c   optional sfxge pci
+dev/sfxge/common/siena_nic.c   optional sfxge pci
+dev/sfxge/common/siena_nvram.c optional sfxge pci
+dev/sfxge/common/siena_phy.c   optional sfxge pci
+dev/sfxge/common/siena_sram.c  optional sfxge pci
+dev/sfxge/common/siena_vpd.c   optional sfxge pci
+dev/sfxge/sfxge.c  optional sfxge pci
+dev/sfxge/sfxge_dma.c  optional sfxge pci
+dev/sfxge/sfxge_ev.c   optional sfxge pci
+dev/sfxge/sfxge_intr.c optional sfxge pci
+dev/sfxge/sfxge_mcdi.c optional sfxge pci
+dev/sfxge/sfxge_port.c optional sfxge pci
+dev/sfxge/sfxge_rx.c   optional sfxge pci
+dev/sfxge/sfxge_tx.c   optional sfxge pci
 dev/sge/if_sge.c   optional sge pci
 dev/si/si.coptional si
 dev/si/si2_z280.c  optional si
___
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: r280899 - in stable/9/sys/cam: ata scsi

2015-03-31 Thread Alexander Motin
Author: mav
Date: Tue Mar 31 07:27:29 2015
New Revision: 280899
URL: https://svnweb.freebsd.org/changeset/base/280899

Log:
  MFC r280172: Improve ATA and SCSI versions printing.
  
  There is no "SCSI-6" and "ATA-9", but there is "SPC-4" and "ACS-2".

Modified:
  stable/9/sys/cam/ata/ata_all.c
  stable/9/sys/cam/scsi/scsi_all.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cam/ata/ata_all.c
==
--- stable/9/sys/cam/ata/ata_all.c  Tue Mar 31 07:26:39 2015
(r280898)
+++ stable/9/sys/cam/ata/ata_all.c  Tue Mar 31 07:27:29 2015
(r280899)
@@ -272,28 +272,38 @@ ata_res_sbuf(struct ccb_ataio *ataio, st
 void
 ata_print_ident(struct ata_params *ident_data)
 {
-   char product[48], revision[16];
+   const char *proto;
+   char product[48], revision[16], ata[12], sata[12];
 
cam_strvis(product, ident_data->model, sizeof(ident_data->model),
   sizeof(product));
cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision),
   sizeof(revision));
-   printf("<%s %s> %s-%d",
-   product, revision,
-   (ident_data->config == ATA_PROTO_CFA) ? "CFA" :
-   (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA",
-   ata_version(ident_data->version_major));
+   proto = (ident_data->config == ATA_PROTO_CFA) ? "CFA" :
+   (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA";
+   if (ata_version(ident_data->version_major) == 0) {
+   snprintf(ata, sizeof(ata), "%s", proto);
+   } else if (ata_version(ident_data->version_major) <= 7) {
+   snprintf(ata, sizeof(ata), "%s-%d", proto,
+   ata_version(ident_data->version_major));
+   } else if (ata_version(ident_data->version_major) == 8) {
+   snprintf(ata, sizeof(ata), "%s8-ACS", proto);
+   } else {
+   snprintf(ata, sizeof(ata), "ACS-%d %s",
+   ata_version(ident_data->version_major) - 7, proto);
+   }
if (ident_data->satacapabilities && ident_data->satacapabilities != 
0x) {
if (ident_data->satacapabilities & ATA_SATA_GEN3)
-   printf(" SATA 3.x");
+   snprintf(sata, sizeof(sata), " SATA 3.x");
else if (ident_data->satacapabilities & ATA_SATA_GEN2)
-   printf(" SATA 2.x");
+   snprintf(sata, sizeof(sata), " SATA 2.x");
else if (ident_data->satacapabilities & ATA_SATA_GEN1)
-   printf(" SATA 1.x");
+   snprintf(sata, sizeof(sata), " SATA 1.x");
else
-   printf(" SATA");
-   }
-   printf(" device\n");
+   snprintf(sata, sizeof(sata), " SATA");
+   } else
+   sata[0] = 0;
+   printf("<%s %s> %s%s device\n", product, revision, ata, sata);
 }
 
 void

Modified: stable/9/sys/cam/scsi/scsi_all.c
==
--- stable/9/sys/cam/scsi/scsi_all.cTue Mar 31 07:26:39 2015
(r280898)
+++ stable/9/sys/cam/scsi/scsi_all.cTue Mar 31 07:27:29 2015
(r280899)
@@ -5146,7 +5146,7 @@ scsi_print_inquiry(struct scsi_inquiry_d
 {
u_int8_t type;
char *dtype, *qtype;
-   char vendor[16], product[48], revision[16], rstr[4];
+   char vendor[16], product[48], revision[16], rstr[12];
 
type = SID_TYPE(inq_data);
 
@@ -5154,7 +5154,7 @@ scsi_print_inquiry(struct scsi_inquiry_d
 * Figure out basic device type and qualifier.
 */
if (SID_QUAL_IS_VENDOR_UNIQUE(inq_data)) {
-   qtype = "(vendor-unique qualifier)";
+   qtype = " (vendor-unique qualifier)";
} else {
switch (SID_QUAL(inq_data)) {
case SID_QUAL_LU_CONNECTED:
@@ -5162,15 +5162,15 @@ scsi_print_inquiry(struct scsi_inquiry_d
break;
 
case SID_QUAL_LU_OFFLINE:
-   qtype = "(offline)";
+   qtype = " (offline)";
break;
 
case SID_QUAL_RSVD:
-   qtype = "(reserved qualifier)";
+   qtype = " (reserved qualifier)";
break;
default:
case SID_QUAL_BAD_LU:
-   qtype = "(LUN not supported)";
+   qtype = " (LUN not supported)";
break;
}
}
@@ -5239,11 +5239,16 @@ scsi_print_inquiry(struct scsi_inquiry_d
cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision),
   sizeof(revision));
 
-   if (SID_ANSI_REV(inq_data) == SCSI_REV_CCS)
-   bcopy("CCS", rstr, 4);
-   else

svn commit: r280898 - in stable/10/sys/cam: ata scsi

2015-03-31 Thread Alexander Motin
Author: mav
Date: Tue Mar 31 07:26:39 2015
New Revision: 280898
URL: https://svnweb.freebsd.org/changeset/base/280898

Log:
  MFC r280172: Improve ATA and SCSI versions printing.
  
  There is no "SCSI-6" and "ATA-9", but there is "SPC-4" and "ACS-2".

Modified:
  stable/10/sys/cam/ata/ata_all.c
  stable/10/sys/cam/scsi/scsi_all.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ata/ata_all.c
==
--- stable/10/sys/cam/ata/ata_all.c Tue Mar 31 07:22:53 2015
(r280897)
+++ stable/10/sys/cam/ata/ata_all.c Tue Mar 31 07:26:39 2015
(r280898)
@@ -275,28 +275,38 @@ ata_res_sbuf(struct ccb_ataio *ataio, st
 void
 ata_print_ident(struct ata_params *ident_data)
 {
-   char product[48], revision[16];
+   const char *proto;
+   char product[48], revision[16], ata[12], sata[12];
 
cam_strvis(product, ident_data->model, sizeof(ident_data->model),
   sizeof(product));
cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision),
   sizeof(revision));
-   printf("<%s %s> %s-%d",
-   product, revision,
-   (ident_data->config == ATA_PROTO_CFA) ? "CFA" :
-   (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA",
-   ata_version(ident_data->version_major));
+   proto = (ident_data->config == ATA_PROTO_CFA) ? "CFA" :
+   (ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA";
+   if (ata_version(ident_data->version_major) == 0) {
+   snprintf(ata, sizeof(ata), "%s", proto);
+   } else if (ata_version(ident_data->version_major) <= 7) {
+   snprintf(ata, sizeof(ata), "%s-%d", proto,
+   ata_version(ident_data->version_major));
+   } else if (ata_version(ident_data->version_major) == 8) {
+   snprintf(ata, sizeof(ata), "%s8-ACS", proto);
+   } else {
+   snprintf(ata, sizeof(ata), "ACS-%d %s",
+   ata_version(ident_data->version_major) - 7, proto);
+   }
if (ident_data->satacapabilities && ident_data->satacapabilities != 
0x) {
if (ident_data->satacapabilities & ATA_SATA_GEN3)
-   printf(" SATA 3.x");
+   snprintf(sata, sizeof(sata), " SATA 3.x");
else if (ident_data->satacapabilities & ATA_SATA_GEN2)
-   printf(" SATA 2.x");
+   snprintf(sata, sizeof(sata), " SATA 2.x");
else if (ident_data->satacapabilities & ATA_SATA_GEN1)
-   printf(" SATA 1.x");
+   snprintf(sata, sizeof(sata), " SATA 1.x");
else
-   printf(" SATA");
-   }
-   printf(" device\n");
+   snprintf(sata, sizeof(sata), " SATA");
+   } else
+   sata[0] = 0;
+   printf("<%s %s> %s%s device\n", product, revision, ata, sata);
 }
 
 void

Modified: stable/10/sys/cam/scsi/scsi_all.c
==
--- stable/10/sys/cam/scsi/scsi_all.c   Tue Mar 31 07:22:53 2015
(r280897)
+++ stable/10/sys/cam/scsi/scsi_all.c   Tue Mar 31 07:26:39 2015
(r280898)
@@ -5149,7 +5149,7 @@ scsi_print_inquiry(struct scsi_inquiry_d
 {
u_int8_t type;
char *dtype, *qtype;
-   char vendor[16], product[48], revision[16], rstr[4];
+   char vendor[16], product[48], revision[16], rstr[12];
 
type = SID_TYPE(inq_data);
 
@@ -5157,7 +5157,7 @@ scsi_print_inquiry(struct scsi_inquiry_d
 * Figure out basic device type and qualifier.
 */
if (SID_QUAL_IS_VENDOR_UNIQUE(inq_data)) {
-   qtype = "(vendor-unique qualifier)";
+   qtype = " (vendor-unique qualifier)";
} else {
switch (SID_QUAL(inq_data)) {
case SID_QUAL_LU_CONNECTED:
@@ -5165,15 +5165,15 @@ scsi_print_inquiry(struct scsi_inquiry_d
break;
 
case SID_QUAL_LU_OFFLINE:
-   qtype = "(offline)";
+   qtype = " (offline)";
break;
 
case SID_QUAL_RSVD:
-   qtype = "(reserved qualifier)";
+   qtype = " (reserved qualifier)";
break;
default:
case SID_QUAL_BAD_LU:
-   qtype = "(LUN not supported)";
+   qtype = " (LUN not supported)";
break;
}
}
@@ -5242,11 +5242,16 @@ scsi_print_inquiry(struct scsi_inquiry_d
cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision),
   sizeof(revision));
 
-   if (SID_ANSI_REV(inq_data) == SCSI_REV_CCS)
-   bcopy("CCS", rstr, 4);
-   else
-   snprintf(rstr

svn commit: r280897 - stable/9/sbin/camcontrol

2015-03-31 Thread Alexander Motin
Author: mav
Date: Tue Mar 31 07:22:53 2015
New Revision: 280897
URL: https://svnweb.freebsd.org/changeset/base/280897

Log:
  MFC r280166:
  Make ATA power management commands to work on SCSI HBAs via PASS THROUGH.

Modified:
  stable/9/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sbin/   (props changed)
  stable/9/sbin/camcontrol/   (props changed)

Modified: stable/9/sbin/camcontrol/camcontrol.c
==
--- stable/9/sbin/camcontrol/camcontrol.c   Tue Mar 31 07:21:53 2015
(r280896)
+++ stable/9/sbin/camcontrol/camcontrol.c   Tue Mar 31 07:22:53 2015
(r280897)
@@ -7707,39 +7707,21 @@ atapm(struct cam_device *device, int arg
else
sc = 253;
 
-   cam_fill_ataio(&ccb->ataio,
- retry_count,
- NULL,
- /*flags*/CAM_DIR_NONE,
- MSG_SIMPLE_Q_TAG,
- /*data_ptr*/NULL,
- /*dxfer_len*/0,
- timeout ? timeout : 30 * 1000);
-   ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, sc);
-
-   /* Disable freezing the device queue */
-   ccb->ccb_h.flags |= CAM_DEV_QFRZDIS;
-
-   if (arglist & CAM_ARG_ERR_RECOVER)
-   ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER;
-
-   if (cam_send_ccb(device, ccb) < 0) {
-   warn("error sending command");
-
-   if (arglist & CAM_ARG_VERBOSE)
-   cam_error_print(device, ccb, CAM_ESF_ALL,
-   CAM_EPF_ALL, stderr);
+   retval = ata_do_28bit_cmd(device,
+   ccb,
+   /*retries*/retry_count,
+   /*flags*/CAM_DIR_NONE,
+   /*protocol*/AP_PROTO_NON_DATA,
+   /*tag_action*/MSG_SIMPLE_Q_TAG,
+   /*command*/cmd,
+   /*features*/0,
+   /*lba*/0,
+   /*sector_count*/sc,
+   /*data_ptr*/NULL,
+   /*dxfer_len*/0,
+   /*timeout*/timeout ? timeout : 30 * 1000,
+   /*quiet*/1);
 
-   retval = 1;
-   goto bailout;
-   }
-
-   if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
-   cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr);
-   retval = 1;
-   goto bailout;
-   }
-bailout:
cam_freeccb(ccb);
return (retval);
 }
___
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: r280896 - stable/10/sbin/camcontrol

2015-03-31 Thread Alexander Motin
Author: mav
Date: Tue Mar 31 07:21:53 2015
New Revision: 280896
URL: https://svnweb.freebsd.org/changeset/base/280896

Log:
  MFC r280166:
  Make ATA power management commands to work on SCSI HBAs via PASS THROUGH.

Modified:
  stable/10/sbin/camcontrol/camcontrol.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/camcontrol/camcontrol.c
==
--- stable/10/sbin/camcontrol/camcontrol.c  Tue Mar 31 06:51:13 2015
(r280895)
+++ stable/10/sbin/camcontrol/camcontrol.c  Tue Mar 31 07:21:53 2015
(r280896)
@@ -7968,39 +7968,21 @@ atapm(struct cam_device *device, int arg
else
sc = 253;
 
-   cam_fill_ataio(&ccb->ataio,
- retry_count,
- NULL,
- /*flags*/CAM_DIR_NONE,
- MSG_SIMPLE_Q_TAG,
- /*data_ptr*/NULL,
- /*dxfer_len*/0,
- timeout ? timeout : 30 * 1000);
-   ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, sc);
-
-   /* Disable freezing the device queue */
-   ccb->ccb_h.flags |= CAM_DEV_QFRZDIS;
-
-   if (arglist & CAM_ARG_ERR_RECOVER)
-   ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER;
-
-   if (cam_send_ccb(device, ccb) < 0) {
-   warn("error sending command");
-
-   if (arglist & CAM_ARG_VERBOSE)
-   cam_error_print(device, ccb, CAM_ESF_ALL,
-   CAM_EPF_ALL, stderr);
-
-   retval = 1;
-   goto bailout;
-   }
+   retval = ata_do_28bit_cmd(device,
+   ccb,
+   /*retries*/retry_count,
+   /*flags*/CAM_DIR_NONE,
+   /*protocol*/AP_PROTO_NON_DATA,
+   /*tag_action*/MSG_SIMPLE_Q_TAG,
+   /*command*/cmd,
+   /*features*/0,
+   /*lba*/0,
+   /*sector_count*/sc,
+   /*data_ptr*/NULL,
+   /*dxfer_len*/0,
+   /*timeout*/timeout ? timeout : 30 * 1000,
+   /*quiet*/1);
 
-   if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
-   cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr);
-   retval = 1;
-   goto bailout;
-   }
-bailout:
cam_freeccb(ccb);
return (retval);
 }
___
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"