svn commit: r265042 - head/share/misc
Author: eadler Date: Mon Apr 28 06:24:37 2014 New Revision: 265042 URL: http://svnweb.freebsd.org/changeset/base/265042 Log: bsd-family-tree: Fix date Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Mon Apr 28 06:12:15 2014 (r265041) +++ head/share/misc/bsd-family-tree Mon Apr 28 06:24:37 2014 (r265042) @@ -635,7 +635,7 @@ FreeBSD 10.02014-01-20 [FBD] NetBSD 6.0.4 2014-01-27 [NBD] NetBSD 6.1.3 2014-01-27 [NBD] DragonFly 3.6.12014-02-22 [DFB] -DragonFly 3.6.22014-03-27 [DFB] +DragonFly 3.6.22014-04-10 [DFB] NetBSD 6.0.5 2014-04-19 [NDB] NetBSD 6.1.4 2014-04-19 [NDB] ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265038 - head/sys/boot/fdt/dts/arm
Author: ganbold Date: Mon Apr 28 05:39:20 2014 New Revision: 265038 URL: http://svnweb.freebsd.org/changeset/base/265038 Log: Move common device tree informations to separate dtsi files for A10 and A20 SoC. Change cubieboard1 and cubieboard2 dts files accordingly. Approved by: stas (mentor) Added: head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi (contents, props changed) head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi (contents, props changed) Modified: head/sys/boot/fdt/dts/arm/cubieboard.dts head/sys/boot/fdt/dts/arm/cubieboard2.dts Modified: head/sys/boot/fdt/dts/arm/cubieboard.dts == --- head/sys/boot/fdt/dts/arm/cubieboard.dtsMon Apr 28 04:20:14 2014 (r265037) +++ head/sys/boot/fdt/dts/arm/cubieboard.dtsMon Apr 28 05:39:20 2014 (r265038) @@ -28,13 +28,10 @@ /dts-v1/; +/include/ "sun4i-a10.dtsi" + / { model = "Cubietech Cubieboard"; - compatible = "cubietech,a10-cubieboard", "allwinner,sun4i-a10"; - #address-cells = <1>; - #size-cells = <1>; - - interrupt-parent = <&AINTC>; memory { device_type = "memory"; @@ -47,96 +44,21 @@ }; SOC: a10 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "simple-bus"; - ranges; - bus-frequency = <0>; - - AINTC: interrupt-controller@01c20400 { - compatible = "allwinner,sun4i-ic"; - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <1>; - reg = < 0x01c20400 0x400 >; - }; - - sramc@01c0 { - compatible = "allwinner,sun4i-sramc"; - #address-cells = <1>; - #size-cells = <1>; - reg = < 0x01c0 0x1000 >; - }; - - ccm@01c2 { - compatible = "allwinner,sun4i-ccm"; - #address-cells = <1>; - #size-cells = <1>; - reg = < 0x01c2 0x400 >; - }; - - timer@01c20c00 { - compatible = "allwinner,sun4i-timer"; - reg = <0x01c20c00 0x90>; - interrupts = < 22 >; - interrupt-parent = <&AINTC>; - clock-frequency = < 2400 >; - }; - - watchdog@01c20c90 { - compatible = "allwinner,sun4i-wdt"; - reg = <0x01c20c90 0x08>; - }; - - - GPIO: gpio@01c20800 { - #gpio-cells = <3>; - compatible = "allwinner,sun4i-gpio"; - gpio-controller; - reg =< 0x01c20800 0x400 >; - interrupts = < 28 >; - interrupt-parent = <&AINTC>; - }; usb1: usb@01c14000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; - reg = <0x01c14000 0x1000>; - interrupts = < 39 >; - interrupt-parent = <&AINTC>; + status = "okay"; }; usb2: usb@01c1c000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; - reg = <0x01c1c000 0x1000>; - interrupts = < 40 >; - interrupt-parent = <&AINTC>; - }; - - sata@01c18000 { - compatible = "allwinner,ahci"; - reg = <0x01c18000 0x1000>; - interrupts = <56>; - interrupt-parent = <&AINTC>; + status = "okay"; }; UART0: serial@01c28000 { status = "okay"; - compatible = "ns16550"; - reg = <0x01c28000 0x400>; - reg-shift = <2>; - interrupts = <1>; - interrupt-parent = <&AINTC>; - current-speed = <115200>; - clock-frequency = < 2400 >; - busy-detect = <1>; - broken-txfifo = <1>; }; emac@01c0b000 { - compatible = "allwinner,sun4i-emac"; - reg = <0x01c0b000 0x1000>; - interrupts = <55>; - interrupt-parent = <&AINTC>; + status = "okay"; }; }; Modified: head/sys/boot/fdt/dts/arm/cubieboard2.dts == --- head/sys/boot
svn commit: r265036 - head/sys/arm/arm
Author: ian Date: Mon Apr 28 02:35:28 2014 New Revision: 265036 URL: http://svnweb.freebsd.org/changeset/base/265036 Log: Don't use multiprocessing-extensions instruction on processors that don't support SMP. Submitted by: loos@ Pointy hat to:me Modified: head/sys/arm/arm/cpufunc_asm_armv7.S Modified: head/sys/arm/arm/cpufunc_asm_armv7.S == --- head/sys/arm/arm/cpufunc_asm_armv7.SSun Apr 27 23:47:38 2014 (r265035) +++ head/sys/arm/arm/cpufunc_asm_armv7.SMon Apr 28 02:35:28 2014 (r265036) @@ -251,7 +251,11 @@ ENTRY(armv7_idcache_wbinv_range) END(armv7_idcache_wbinv_range) ENTRY_NP(armv7_icache_sync_all) +#ifdef SMP mcr p15, 0, r0, c7, c1, 0 /* Invalidate all I cache to PoU Inner Shareable */ +#else + mcr p15, 0, r0, c7, c5, 0 /* Invalidate all I cache to PoU (ICIALLU) */ +#endif isb /* instruction synchronization barrier */ dsb /* data synchronization barrier */ RET ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265035 - in head/sys/arm: arm freescale/imx include ti/omap4
Author: ian Date: Sun Apr 27 23:47:38 2014 New Revision: 265035 URL: http://svnweb.freebsd.org/changeset/base/265035 Log: Move duplicated code to print l2 cache config into the common code. Modified: head/sys/arm/arm/pl310.c head/sys/arm/freescale/imx/imx6_pl310.c head/sys/arm/include/pl310.h head/sys/arm/ti/omap4/omap4_l2cache.c Modified: head/sys/arm/arm/pl310.c == --- head/sys/arm/arm/pl310.cSun Apr 27 23:37:39 2014(r265034) +++ head/sys/arm/arm/pl310.cSun Apr 27 23:47:38 2014(r265035) @@ -84,6 +84,47 @@ static uint32_t g_ways_assoc; static struct pl310_softc *pl310_softc; +void +pl310_print_config(struct pl310_softc *sc) +{ + uint32_t aux, prefetch; + const char *dis = "disabled"; + const char *ena = "enabled"; + + aux = pl310_read4(sc, PL310_AUX_CTRL); + prefetch = pl310_read4(sc, PL310_PREFETCH_CTRL); + + device_printf(sc->sc_dev, "Early BRESP response: %s\n", + (aux & AUX_CTRL_EARLY_BRESP) ? ena : dis); + device_printf(sc->sc_dev, "Instruction prefetch: %s\n", + (aux & AUX_CTRL_INSTR_PREFETCH) ? ena : dis); + device_printf(sc->sc_dev, "Data prefetch: %s\n", + (aux & AUX_CTRL_DATA_PREFETCH) ? ena : dis); + device_printf(sc->sc_dev, "Non-secure interrupt control: %s\n", + (aux & AUX_CTRL_NS_INT_CTRL) ? ena : dis); + device_printf(sc->sc_dev, "Non-secure lockdown: %s\n", + (aux & AUX_CTRL_NS_LOCKDOWN) ? ena : dis); + device_printf(sc->sc_dev, "Share override: %s\n", + (aux & AUX_CTRL_SHARE_OVERRIDE) ? ena : dis); + + device_printf(sc->sc_dev, "Double linefill: %s\n", + (prefetch & PREFETCH_CTRL_DL) ? ena : dis); + device_printf(sc->sc_dev, "Instruction prefetch: %s\n", + (prefetch & PREFETCH_CTRL_INSTR_PREFETCH) ? ena : dis); + device_printf(sc->sc_dev, "Data prefetch: %s\n", + (prefetch & PREFETCH_CTRL_DATA_PREFETCH) ? ena : dis); + device_printf(sc->sc_dev, "Double linefill on WRAP request: %s\n", + (prefetch & PREFETCH_CTRL_DL_ON_WRAP) ? ena : dis); + device_printf(sc->sc_dev, "Prefetch drop: %s\n", + (prefetch & PREFETCH_CTRL_PREFETCH_DROP) ? ena : dis); + device_printf(sc->sc_dev, "Incr double Linefill: %s\n", + (prefetch & PREFETCH_CTRL_INCR_DL) ? ena : dis); + device_printf(sc->sc_dev, "Not same ID on exclusive sequence: %s\n", + (prefetch & PREFETCH_CTRL_NOTSAMEID) ? ena : dis); + device_printf(sc->sc_dev, "Prefetch offset: %d\n", + (prefetch & PREFETCH_CTRL_OFFSET_MASK)); +} + static int pl310_filter(void *arg) { @@ -351,6 +392,8 @@ pl310_attach(device_t dev) /* Enable the L2 cache if disabled */ platform_pl310_write_ctrl(sc, CTRL_ENABLED); device_printf(dev, "L2 Cache enabled\n"); + if (bootverbose) + pl310_print_config(sc); } if (!sc->sc_enabled && (ctrl_value & CTRL_ENABLED)) { Modified: head/sys/arm/freescale/imx/imx6_pl310.c == --- head/sys/arm/freescale/imx/imx6_pl310.c Sun Apr 27 23:37:39 2014 (r265034) +++ head/sys/arm/freescale/imx/imx6_pl310.c Sun Apr 27 23:47:38 2014 (r265035) @@ -44,42 +44,6 @@ __FBSDID("$FreeBSD$"); void platform_pl310_init(struct pl310_softc *sc) { - uint32_t aux, prefetch; - - aux = pl310_read4(sc, PL310_AUX_CTRL); - prefetch = pl310_read4(sc, PL310_PREFETCH_CTRL); - - if (bootverbose) { - device_printf(sc->sc_dev, "Early BRESP response: %s\n", - (aux & AUX_CTRL_EARLY_BRESP) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Instruction prefetch: %s\n", - (aux & AUX_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Data prefetch: %s\n", - (aux & AUX_CTRL_DATA_PREFETCH) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Non-secure interrupt control: %s\n", - (aux & AUX_CTRL_NS_INT_CTRL) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Non-secure lockdown: %s\n", - (aux & AUX_CTRL_NS_LOCKDOWN) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Share override: %s\n", - (aux & AUX_CTRL_SHARE_OVERRIDE) ? "enabled" : "disabled"); - - device_printf(sc->sc_dev, "Double linefil: %s\n", - (prefetch & PREFETCH_CTRL_DL) ? "enabled" : "disabled"); - device_printf(sc->sc_dev, "Instruction prefetch: %s\n", - (prefetch & PREFETCH_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled"); - d
svn commit: r265034 - head/sys/contrib/dev/ath/ath_hal/ar9300
Author: adrian Date: Sun Apr 27 23:37:39 2014 New Revision: 265034 URL: http://svnweb.freebsd.org/changeset/base/265034 Log: Note that the AR9380 and later hardware supports MYBEACON. (Yes, I said AR5416 in the committed code. It's still strictly true.) Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sun Apr 27 23:37:03 2014(r265033) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sun Apr 27 23:37:39 2014(r265034) @@ -2934,6 +2934,10 @@ ar9300_fill_capability_info(struct ath_h p_cap->halRxUsingLnaMixing = AH_TRUE; } +/* + * AR5416 and later NICs support MYBEACON filtering. + */ +p_cap->halRxDoMyBeacon = AH_TRUE; #if ATH_WOW_OFFLOAD if (AR_SREV_JUPITER_20_OR_LATER(ah) || AR_SREV_APHRODITE(ah)) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265032 - head/sys/dev/ath/ath_hal
Author: adrian Date: Sun Apr 27 23:36:44 2014 New Revision: 265032 URL: http://svnweb.freebsd.org/changeset/base/265032 Log: * Add a new capability which returns whether the hardware supports the MYBEACON RX filter (only receive beacons which match the BSSID) or all beacons on the current channel. * Add the relevant RX filter entry for MYBEACON. Tested: * AR5416, STA * AR9285, STA TODO: * once the code is in -HEAD, just make sure that the code which uses it correctly sets BEACON for pre-AR5416 chips. Obtained from:QCA, Linux ath9k Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah.c == --- head/sys/dev/ath/ath_hal/ah.c Sun Apr 27 23:35:05 2014 (r265031) +++ head/sys/dev/ath/ath_hal/ah.c Sun Apr 27 23:36:44 2014 (r265032) @@ -786,6 +786,8 @@ ath_hal_getcapability(struct ath_hal *ah return HAL_OK; case HAL_CAP_RX_LNA_MIXING: /* Hardware uses an RX LNA mixer to map 2 antennas to a 1 stream receiver */ return pCap->halRxUsingLnaMixing ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_DO_MYBEACON: /* Hardware supports filtering my-beacons */ + return pCap->halRxDoMyBeacon ? HAL_OK : HAL_ENOTSUPP; default: return HAL_EINVAL; } Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Sun Apr 27 23:35:05 2014 (r265031) +++ head/sys/dev/ath/ath_hal/ah.h Sun Apr 27 23:36:44 2014 (r265032) @@ -199,6 +199,7 @@ typedef enum { HAL_CAP_SERIALISE_WAR = 245, /* serialise register access on PCI */ HAL_CAP_ENFORCE_TXOP= 246, /* Enforce TXOP if supported */ HAL_CAP_RX_LNA_MIXING = 247, /* RX hardware uses LNA mixing */ + HAL_CAP_DO_MYBEACON = 248, /* Supports HAL_RX_FILTER_MYBEACON */ } HAL_CAPABILITY_TYPE; /* @@ -404,6 +405,7 @@ typedef enum { HAL_RX_FILTER_PROM = 0x0020, /* Promiscuous mode */ HAL_RX_FILTER_PROBEREQ = 0x0080, /* Allow probe request frames */ HAL_RX_FILTER_PHYERR= 0x0100, /* Allow phy errors */ + HAL_RX_FILTER_MYBEACON = 0x0200, /* Filter beacons other than mine */ HAL_RX_FILTER_COMPBAR = 0x0400, /* Allow compressed BAR */ HAL_RX_FILTER_COMP_BA = 0x0800, /* Allow compressed blockack */ HAL_RX_FILTER_PHYRADAR = 0x2000, /* Allow phy radar errors */ Modified: head/sys/dev/ath/ath_hal/ah_internal.h == --- head/sys/dev/ath/ath_hal/ah_internal.h Sun Apr 27 23:35:05 2014 (r265031) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sun Apr 27 23:36:44 2014 (r265032) @@ -280,7 +280,8 @@ typedef struct { halAntDivCombSupportOrg : 1, halRadioRetentionSupport: 1, halSpectralScanSupport : 1, - halRxUsingLnaMixing : 1; + halRxUsingLnaMixing : 1, + halRxDoMyBeacon : 1; uint32_thalWirelessModes; uint16_thalTotalQueues; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265033 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Sun Apr 27 23:37:03 2014 New Revision: 265033 URL: http://svnweb.freebsd.org/changeset/base/265033 Log: Note that the AR5416 and later hardware supports the MYBEACON RX filter. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Apr 27 23:36:44 2014(r265032) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Apr 27 23:37:03 2014(r265033) @@ -1059,6 +1059,11 @@ ar5416FillCapabilityInfo(struct ath_hal if (! AH_PRIVATE(ah)->ah_ispcie) pCap->halSerialiseRegWar = 1; + /* +* AR5416 and later NICs support MYBEACON filtering. +*/ + pCap->halRxDoMyBeacon = AH_TRUE; + return AH_TRUE; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265031 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Sun Apr 27 23:35:05 2014 New Revision: 265031 URL: http://svnweb.freebsd.org/changeset/base/265031 Log: Program the AR_TSFOOR_THRESHOLD register with a default lifted from the QCA HAL. This fires off an interrupt if the TSF from the AP / IBSS peer is wildly out of range. I'll add some code to the ath(4) driver soon which makes use of this. TODO: * verify this didn't break TDMA! Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Sun Apr 27 23:33:37 2014(r265030) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Sun Apr 27 23:35:05 2014(r265031) @@ -197,6 +197,25 @@ ar5416SetStaBeaconTimers(struct ath_hal * beacon jitter; cab timeout is max time to wait for cab * after seeing the last DTIM or MORE CAB bit */ + +/* + * I've bumped these to 30TU for now. + * + * Some APs (AR933x/AR934x?) in 2GHz especially seem to not always + * transmit beacon frames at exactly the right times and with it set + * to 10TU, the NIC starts not waking up at the right times to hear + * these slightly-larger-jitering beacons. It also never recovers + * from that (it doesn't resync? I'm not sure.) + * + * So for now bump this to 30TU. Ideally we'd cap this based on + * the beacon interval so the sum of CAB+BEACON timeouts never + * exceeded the beacon interval. + * + * Now, since we're doing all the math in the ath(4) driver in TU + * rather than TSF, we may be seeing the result of dumb rounding + * errors causing the jitter to actually be a much bigger problem. + * I'll have to investigate that with a fine tooth comb. + */ #define CAB_TIMEOUT_VAL 10 /* in TU */ #define BEACON_TIMEOUT_VAL 10 /* in TU */ #define SLEEP_SLOP 3 /* in TU */ @@ -248,6 +267,13 @@ ar5416SetStaBeaconTimers(struct ath_hal OS_REG_SET_BIT(ah, AR_TIMER_MODE, AR_TIMER_MODE_TBTT | AR_TIMER_MODE_TIM | AR_TIMER_MODE_DTIM); + +#defineHAL_TSFOOR_THRESHOLD0x4240 /* TSF OOR threshold (16k us) */ + + /* TSF out of range threshold */ +// OS_REG_WRITE(ah, AR_TSFOOR_THRESHOLD, bs->bs_tsfoor_threshold); + OS_REG_WRITE(ah, AR_TSFOOR_THRESHOLD, HAL_TSFOOR_THRESHOLD); + HALDEBUG(ah, HAL_DEBUG_BEACON, "%s: next DTIM %d\n", __func__, bs->bs_nextdtim); HALDEBUG(ah, HAL_DEBUG_BEACON, "%s: next beacon %d\n", ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265030 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Sun Apr 27 23:33:37 2014 New Revision: 265030 URL: http://svnweb.freebsd.org/changeset/base/265030 Log: Fix the AR_SLEEP1 and AR_SLEEP2 definitions. Oops! Tested: * AR9285, STA * AR5416, STA Obtained from:QCA, Linux ath9k Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h == --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sun Apr 27 23:31:42 2014 (r265029) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sun Apr 27 23:33:37 2014 (r265030) @@ -476,10 +476,10 @@ /* Sleep control */ #defineAR5416_SLEEP1_ASSUME_DTIM 0x0008 #defineAR5416_SLEEP1_CAB_TIMEOUT 0xFFE0 /* Cab timeout (TU) */ -#defineAR5416_SLEEP1_CAB_TIMEOUT_S 22 +#defineAR5416_SLEEP1_CAB_TIMEOUT_S 21 #defineAR5416_SLEEP2_BEACON_TIMEOUT0xFFE0 /* Beacon timeout (TU)*/ -#defineAR5416_SLEEP2_BEACON_TIMEOUT_S 22 +#defineAR5416_SLEEP2_BEACON_TIMEOUT_S 21 /* Sleep Registers */ #defineAR_SLP32_HALFCLK_LATENCY 0x000F/* rising <-> falling edge */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265029 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Sun Apr 27 23:31:42 2014 New Revision: 265029 URL: http://svnweb.freebsd.org/changeset/base/265029 Log: Do a read-after-write to ensure the interrupt register update is flushed to the hardware. The QCA HAL has a comment noting that if this isn't done, modifications to AR_IMR_S2 before AR_IMR is flushed may produce spurious interrupts. Obtained from:QCA Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Sun Apr 27 22:18:33 2014(r265028) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Sun Apr 27 23:31:42 2014(r265029) @@ -337,6 +337,9 @@ ar5416SetInterrupts(struct ath_hal *ah, /* Write the new IMR and store off our SW copy. */ HALDEBUG(ah, HAL_DEBUG_INTERRUPT, "%s: new IMR 0x%x\n", __func__, mask); OS_REG_WRITE(ah, AR_IMR, mask); + /* Flush write */ + (void) OS_REG_READ(ah, AR_IMR); + mask = OS_REG_READ(ah, AR_IMR_S2) & ~(AR_IMR_S2_TIM | AR_IMR_S2_DTIM | AR_IMR_S2_DTIMSYNC | ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265028 - head/sys/boot/forth
Author: dteske Date: Sun Apr 27 22:18:33 2014 New Revision: 265028 URL: http://svnweb.freebsd.org/changeset/base/265028 Log: Disable the beastie menu for EFI console which doesn't support ANSI codes (so things like `at-xy', `clear', and other commands don't work making it impossible to generate a living menu). Reviewed by: nwhitehorn, emaste Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/beastie.4th.8 head/sys/boot/forth/loader.conf.5 Modified: head/sys/boot/forth/beastie.4th == --- head/sys/boot/forth/beastie.4th Sun Apr 27 21:17:54 2014 (r265027) +++ head/sys/boot/forth/beastie.4th Sun Apr 27 22:18:33 2014 (r265028) @@ -242,6 +242,11 @@ variable logoY ; : beastie-start ( -- ) \ starts the menu + s" console" getenv dup -1 <> if + s" efi" 2swap contains? if + s" set beastie_disable=YES" evaluate + then + else drop then s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if Modified: head/sys/boot/forth/beastie.4th.8 == --- head/sys/boot/forth/beastie.4th.8 Sun Apr 27 21:17:54 2014 (r265027) +++ head/sys/boot/forth/beastie.4th.8 Sun Apr 27 22:18:33 2014 (r265028) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2011 +.Dd April 27, 2014 .Dt BEASTIE.4TH 8 .Os .Sh NAME @@ -119,6 +119,8 @@ Sets the desired row position of the log If set to .Dq YES , the beastie boot menu will be skipped. +The beastie boot menu is always skipped if booting UEFI or running non-x86 +hardware. .It Va loader_delay If set to a number higher than zero, introduces a delay before starting the beastie boot menu. During the delay the user can press either Ctrl-C to skip Modified: head/sys/boot/forth/loader.conf.5 == --- head/sys/boot/forth/loader.conf.5 Sun Apr 27 21:17:54 2014 (r265027) +++ head/sys/boot/forth/loader.conf.5 Sun Apr 27 22:18:33 2014 (r265028) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd October 18, 2013 +.Dd April 27, 2014 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -236,6 +236,8 @@ be displayed. If set to .Dq YES , the beastie boot menu will be skipped. +The beastie boot menu is always skipped if booting UEFI or running non-x86 +hardware. .It Va loader_logo Pq Dq Li orbbw Selects a desired logo in the beastie boot menu. Possible values are: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r265019 - head/sys/net
On 28.04.2014 01:00, Ian Lepore wrote: > On Sun, 2014-04-27 at 17:41 +, Alexander V. Chernikov wrote: >> Author: melifaro >> Date: Sun Apr 27 17:41:18 2014 >> New Revision: 265019 >> URL: http://svnweb.freebsd.org/changeset/base/265019 >> >> Log: >> Improve memory allocation model for rt_msg2() rtsock messages: >>* memory is now allocated as early as possible, without holding locks. >>* sysctl users are now guaranteed to get a response (M_WAITOK buffer >> prealloc). >>* socket users are more likely to use on-stack buffer for replies. >>* standard kernel malloc/free functions are now used instead of radix >> wrappers. >> rt_msg2() has been renamed to rtsock_msg_buffer(). >> >> MFC after: 1 month >> >> Modified: >> head/sys/net/rtsock.c >> >> Modified: head/sys/net/rtsock.c >> [...] > > You're on a roll this weekend. :) I got another uninit-var warning > today -- I worked around it with this, but I'm not sure it's the right > way to fix it: Fixed. Thanks again. It looks like something wrong has happened to my clang setup.. > > revolution > sd sys/net/rtsock.c > Index: sys/net/rtsock.c > === > --- sys/net/rtsock.c (revision 265026) > +++ sys/net/rtsock.c (working copy) > @@ -1132,7 +1132,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rt > rtm = (struct rt_msghdr *)w->w_tmem; > buflen = w->w_tmemsize - len; > cp = (caddr_t)w->w_tmem + len; > - } > + } else > + cp = NULL; > > rtinfo->rti_addrs = 0; > for (i = 0; i < RTAX_MAX; i++) { > > > -- Ian > > > ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265027 - head/sys/net
Author: melifaro Date: Sun Apr 27 21:17:54 2014 New Revision: 265027 URL: http://svnweb.freebsd.org/changeset/base/265027 Log: Fix build Found by: ian Pointyhat to: me Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c == --- head/sys/net/rtsock.c Sun Apr 27 20:36:19 2014(r265026) +++ head/sys/net/rtsock.c Sun Apr 27 21:17:54 2014(r265027) @@ -1082,7 +1082,7 @@ rtsock_msg_buffer(int type, struct rt_ad { int i; int len, buflen = 0, dlen; - caddr_t cp; + caddr_t cp = NULL; struct rt_msghdr *rtm = NULL; #ifdef INET6 struct sockaddr_storage ss; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r265019 - head/sys/net
On Sun, 2014-04-27 at 17:41 +, Alexander V. Chernikov wrote: > Author: melifaro > Date: Sun Apr 27 17:41:18 2014 > New Revision: 265019 > URL: http://svnweb.freebsd.org/changeset/base/265019 > > Log: > Improve memory allocation model for rt_msg2() rtsock messages: >* memory is now allocated as early as possible, without holding locks. >* sysctl users are now guaranteed to get a response (M_WAITOK buffer > prealloc). >* socket users are more likely to use on-stack buffer for replies. >* standard kernel malloc/free functions are now used instead of radix > wrappers. > rt_msg2() has been renamed to rtsock_msg_buffer(). > > MFC after: 1 month > > Modified: > head/sys/net/rtsock.c > > Modified: head/sys/net/rtsock.c > [...] You're on a roll this weekend. :) I got another uninit-var warning today -- I worked around it with this, but I'm not sure it's the right way to fix it: revolution > sd sys/net/rtsock.c Index: sys/net/rtsock.c === --- sys/net/rtsock.c(revision 265026) +++ sys/net/rtsock.c(working copy) @@ -1132,7 +1132,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rt rtm = (struct rt_msghdr *)w->w_tmem; buflen = w->w_tmemsize - len; cp = (caddr_t)w->w_tmem + len; - } + } else + cp = NULL; rtinfo->rti_addrs = 0; for (i = 0; i < RTAX_MAX; i++) { -- Ian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265026 - head/sys/dev/vt/hw/vga
Author: nwhitehorn Date: Sun Apr 27 20:36:19 2014 New Revision: 265026 URL: http://svnweb.freebsd.org/changeset/base/265026 Log: No EFI on i386. This unbreaks the i386 VT kernel build. Modified: head/sys/dev/vt/hw/vga/vga.c Modified: head/sys/dev/vt/hw/vga/vga.c == --- head/sys/dev/vt/hw/vga/vga.cSun Apr 27 20:26:15 2014 (r265025) +++ head/sys/dev/vt/hw/vga/vga.cSun Apr 27 20:36:19 2014 (r265026) @@ -638,7 +638,7 @@ vga_init(struct vt_device *vd) struct vga_softc *sc = vd->vd_softc; int textmode = 0; -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) /* Disable if EFI framebuffer present. Should be handled by priority * logic in vt(9), but this will do for now. XXX */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265025 - head/sys/arm/arm
Author: ian Date: Sun Apr 27 20:26:15 2014 New Revision: 265025 URL: http://svnweb.freebsd.org/changeset/base/265025 Log: Explain why wbinv_all is SMP-safe in this case, and add a missing l2 cache flush. (Either it was missing here, or it isn't needed in the minidump case. Adding it here seems like the safer path to consistancy.) Modified: head/sys/arm/arm/dump_machdep.c Modified: head/sys/arm/arm/dump_machdep.c == --- head/sys/arm/arm/dump_machdep.c Sun Apr 27 20:16:51 2014 (r265024) +++ head/sys/arm/arm/dump_machdep.c Sun Apr 27 20:26:15 2014 (r265025) @@ -174,8 +174,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr printf(" chunk %d: %dMB (%d pages)", seqnr, pgs * PAGE_SIZE / ( 1024*1024), pgs); - /* Make sure we write coherent datas. */ + /* +* Make sure we write coherent data. Note that in the SMP case this +* only operates on the L1 cache of the current CPU, but all other CPUs +* have already been stopped, and their flush/invalidate was done as +* part of stopping. +*/ cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); #ifdef __XSCALE__ xscale_cache_clean_minidata(); #endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265024 - head/sys/arm/arm
Author: ian Date: Sun Apr 27 20:16:51 2014 New Revision: 265024 URL: http://svnweb.freebsd.org/changeset/base/265024 Log: Flush and invalidate caches on each CPU as part of handling IPI_STOP. Flushing the caches is required before doing a panic dump, but ARM doesn't provide a flavor of flush that gets broadcast to other cores. However, all cores except one are stopped before doing a dump, so this works around the lack of a global flush/invalidate by doing it locally on each CPU as part of stopping. Discussed with: cognet@ Modified: head/sys/arm/arm/minidump_machdep.c head/sys/arm/arm/mp_machdep.c Modified: head/sys/arm/arm/minidump_machdep.c == --- head/sys/arm/arm/minidump_machdep.c Sun Apr 27 20:01:59 2014 (r265023) +++ head/sys/arm/arm/minidump_machdep.c Sun Apr 27 20:16:51 2014 (r265024) @@ -210,7 +210,15 @@ minidumpsys(struct dumperinfo *di) int i, k, bit, error; char *addr; - /* Flush cache */ + /* +* Flush caches. Note that in the SMP case this operates only on the +* current CPU's L1 cache. Before we reach this point, code in either +* the system shutdown or kernel debugger has called stop_cpus() to stop +* all cores other than this one. Part of the ARM handling of +* stop_cpus() is to call wbinv_all() on that core's local L1 cache. So +* by time we get to here, all that remains is to flush the L1 for the +* current CPU, then the L2. +*/ cpu_idcache_wbinv_all(); cpu_l2cache_wbinv_all(); Modified: head/sys/arm/arm/mp_machdep.c == --- head/sys/arm/arm/mp_machdep.c Sun Apr 27 20:01:59 2014 (r265023) +++ head/sys/arm/arm/mp_machdep.c Sun Apr 27 20:16:51 2014 (r265024) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -286,6 +287,19 @@ ipi_handler(void *arg) savectx(&stoppcbs[cpu]); + /* +* CPUs are stopped when entering the debugger and at +* system shutdown, both events which can precede a +* panic dump. For the dump to be correct, all caches +* must be flushed and invalidated, but on ARM there's +* no way to broadcast a wbinv_all to other cores. +* Instead, we have each core do the local wbinv_all as +* part of stopping the core. The core requesting the +* stop will do the l2 cache flush after all other cores +* have done their l1 flushes and stopped. +*/ + cpu_idcache_wbinv_all(); + /* Indicate we are stopped */ CPU_SET_ATOMIC(cpu, &stopped_cpus); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265023 - in head/sys/arm: arm include
Author: ian Date: Sun Apr 27 20:01:59 2014 New Revision: 265023 URL: http://svnweb.freebsd.org/changeset/base/265023 Log: There is no difference between IPI_STOP and IPI_STOP_HARD on ARM, so map them both to the same interrupt number like other arches do. Modified: head/sys/arm/arm/mp_machdep.c head/sys/arm/include/smp.h Modified: head/sys/arm/arm/mp_machdep.c == --- head/sys/arm/arm/mp_machdep.c Sun Apr 27 19:00:14 2014 (r265022) +++ head/sys/arm/arm/mp_machdep.c Sun Apr 27 20:01:59 2014 (r265023) @@ -278,7 +278,6 @@ ipi_handler(void *arg) break; case IPI_STOP: - case IPI_STOP_HARD: /* * IPI_STOP_HARD is mapped to IPI_STOP so it is not * necessary to add it in the switch. Modified: head/sys/arm/include/smp.h == --- head/sys/arm/include/smp.h Sun Apr 27 19:00:14 2014(r265022) +++ head/sys/arm/include/smp.h Sun Apr 27 20:01:59 2014(r265023) @@ -10,7 +10,7 @@ #define IPI_PREEMPT2 #define IPI_RENDEZVOUS 3 #define IPI_STOP 4 -#define IPI_STOP_HARD 5 +#define IPI_STOP_HARD 4 #define IPI_HARDCLOCK 6 #define IPI_TLB7 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265020 - head/sys/arm/include
Author: ian Date: Sun Apr 27 18:12:55 2014 New Revision: 265020 URL: http://svnweb.freebsd.org/changeset/base/265020 Log: Remove cpu_idcache_wbinv_all() from kdb_cpu_trap(), it's no longer needed. This was added ca. 2004 for the purpose of ensuring the caches were in the right state after the debugger set a breakpoint. kdb_cpu_sync_icache() was added in 2007 to handle that situation, and now the wbinv_all is actually harmful because the operation isn't broadcast to other cores. Modified: head/sys/arm/include/kdb.h Modified: head/sys/arm/include/kdb.h == --- head/sys/arm/include/kdb.h Sun Apr 27 17:41:18 2014(r265019) +++ head/sys/arm/include/kdb.h Sun Apr 27 18:12:55 2014(r265020) @@ -55,8 +55,6 @@ kdb_cpu_sync_icache(unsigned char *addr, static __inline void kdb_cpu_trap(int type, int code) { - - cpu_idcache_wbinv_all(); } #endif /* _MACHINE_KDB_H_ */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265019 - head/sys/net
Author: melifaro Date: Sun Apr 27 17:41:18 2014 New Revision: 265019 URL: http://svnweb.freebsd.org/changeset/base/265019 Log: Improve memory allocation model for rt_msg2() rtsock messages: * memory is now allocated as early as possible, without holding locks. * sysctl users are now guaranteed to get a response (M_WAITOK buffer prealloc). * socket users are more likely to use on-stack buffer for replies. * standard kernel malloc/free functions are now used instead of radix wrappers. rt_msg2() has been renamed to rtsock_msg_buffer(). MFC after:1 month Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c == --- head/sys/net/rtsock.c Sun Apr 27 16:40:40 2014(r265018) +++ head/sys/net/rtsock.c Sun Apr 27 17:41:18 2014(r265019) @@ -152,8 +152,8 @@ struct walkarg { static voidrts_input(struct mbuf *m); static struct mbuf *rt_msg1(int type, struct rt_addrinfo *rtinfo); -static int rt_msg2(int type, struct rt_addrinfo *rtinfo, - caddr_t cp, struct walkarg *w); +static int rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, + struct walkarg *w, int *plen); static int rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo); static int sysctl_dumpentry(struct radix_node *rn, void *vw); @@ -526,11 +526,13 @@ route_output(struct mbuf *m, struct sock struct sockaddr_in6 *sin6; int i, rti_need_deembed = 0; #endif - int len, error = 0, fibnum; + int alloc_len = 0, len, error = 0, fibnum; struct ifnet *ifp = NULL; union sockaddr_union saun; sa_family_t saf = AF_UNSPEC; struct rawcb *rp = NULL; + struct walkarg w; + char msgbuf[512]; fibnum = so->so_fibnum; @@ -545,15 +547,31 @@ route_output(struct mbuf *m, struct sock len != mtod(m, struct rt_msghdr *)->rtm_msglen) senderr(EINVAL); - R_Malloc(rtm, struct rt_msghdr *, len); - if (rtm == NULL) - senderr(ENOBUFS); + /* +* Most of current messages are in range 200-240 bytes, +* minimize possible failures by using on-stack buffer +* which should fit for most messages. +* However, use stable memory if we need to handle +* something large. +*/ + if (len < sizeof(msgbuf)) { + alloc_len = sizeof(msgbuf); + rtm = (struct rt_msghdr *)msgbuf; + } else { + alloc_len = roundup2(len, 1024); + rtm = malloc(alloc_len, M_TEMP, M_NOWAIT); + if (rtm == NULL) + senderr(ENOBUFS); + } + m_copydata(m, 0, len, (caddr_t)rtm); bzero(&info, sizeof(info)); + bzero(&w, sizeof(w)); if (rtm->rtm_version != RTM_VERSION) { /* Do not touch message since format is unknown */ - Free(rtm); + if ((char *)rtm != msgbuf) + free(rtm, M_TEMP); rtm = NULL; senderr(EPROTONOSUPPORT); } @@ -798,18 +816,26 @@ report: } else if ((ifp = rt->rt_ifp) != NULL) { rtm->rtm_index = ifp->if_index; } - len = rt_msg2(rtm->rtm_type, &info, NULL, NULL); - if (len > rtm->rtm_msglen) { + + /* Check if we need to realloc storage */ + rtsock_msg_buffer(rtm->rtm_type, &info, NULL, &len); + if (len > alloc_len) { struct rt_msghdr *new_rtm; - R_Malloc(new_rtm, struct rt_msghdr *, len); + new_rtm = malloc(len, M_TEMP, M_NOWAIT); if (new_rtm == NULL) { RT_UNLOCK(rt); senderr(ENOBUFS); } bcopy(rtm, new_rtm, rtm->rtm_msglen); - Free(rtm); rtm = new_rtm; + free(rtm, M_TEMP); + rtm = new_rtm; + alloc_len = len; } - (void)rt_msg2(rtm->rtm_type, &info, (caddr_t)rtm, NULL); + + w.w_tmem = (caddr_t)rtm; + w.w_tmemsize = alloc_len; + rtsock_msg_buffer(rtm->rtm_type, &info, &w, &len); + if (rt->rt_flags & RTF_GWFLAG_COMPAT) rtm->rtm_flags = RTF_GATEWAY | (rt->rt_flags & ~RTF_GWFLAG_COMPAT); @@ -833,8 +859,8 @@ flush: */ if ((so->so_options & SO_USELOOPBACK) == 0) { if (V_route_cb.any_count <= 1) { - if (rtm != NULL) - Free(rtm); + if (rtm != NULL && (char *)rtm != msgbuf) + free(rt
svn commit: r265018 - head/release
Author: gjb Date: Sun Apr 27 16:40:40 2014 New Revision: 265018 URL: http://svnweb.freebsd.org/changeset/base/265018 Log: Turn off the full witness trace on console output. On head/, or more specifically, when WITNESS is in the kernel config, the console is spammed excessively with lock order reversal between isofs and devfs. Set debug.witness.trace=0 in the installer sysctl.conf to avoid printing the full KDB stack backtrace. This does not prevent printing the lock order reversal has happened, only lessens the console spam. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile == --- head/release/Makefile Sun Apr 27 16:34:59 2014(r265017) +++ head/release/Makefile Sun Apr 27 16:40:40 2014(r265018) @@ -164,6 +164,7 @@ system: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf release/etc/resolv.conf echo sendmail_enable=\"NONE\" > release/etc/rc.conf echo hostid_enable=\"NO\" >> release/etc/rc.conf + echo debug.witness.trace=0 >> release/etc/sysctl.conf cp ${.CURDIR}/rc.local release/etc touch ${.TARGET} @@ -188,6 +189,7 @@ bootonly: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf bootonly/etc/resolv.conf echo sendmail_enable=\"NONE\" > bootonly/etc/rc.conf echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf + echo debug.witness.trace=0 >> bootonly/etc/sysctl.conf cp ${.CURDIR}/rc.local bootonly/etc dvd: @@ -206,6 +208,7 @@ dvd: ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf + echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc touch ${.TARGET} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265017 - head/release/amd64
Author: nwhitehorn Date: Sun Apr 27 16:34:59 2014 New Revision: 265017 URL: http://svnweb.freebsd.org/changeset/base/265017 Log: loader's GPT support on BIOS does not seem to like the root filesystem being the last filesystem on the disk for some reason when made by this script. Add a vestigial swap partition to allow this to boot with QEMU BIOS. Modified: head/release/amd64/make-uefi-memstick.sh Modified: head/release/amd64/make-uefi-memstick.sh == --- head/release/amd64/make-uefi-memstick.shSun Apr 27 15:58:07 2014 (r265016) +++ head/release/amd64/make-uefi-memstick.shSun Apr 27 16:34:59 2014 (r265017) @@ -36,6 +36,6 @@ if [ $? -ne 0 ]; then fi rm ${1}/etc/fstab -mkimg -s gpt -b ${1}/boot/pmbr -p freebsd-boot:=${1}/boot/gptboot -p efi:=${1}/boot/boot1.efifat -p freebsd-ufs:=${2}.part -o ${2} +mkimg -s gpt -b ${1}/boot/pmbr -p efi:=${1}/boot/boot1.efifat -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} rm ${2}.part ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265016 - head/usr.sbin/bsdinstall/partedit
Author: nwhitehorn Date: Sun Apr 27 15:58:07 2014 New Revision: 265016 URL: http://svnweb.freebsd.org/changeset/base/265016 Log: Finish connecting up installer UEFI support. If the kernel was booted using EFI, set up the disks for an EFI system. If booted from BIOS/CSM, set up for BIOS. Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c == --- head/usr.sbin/bsdinstall/partedit/partedit_x86.cSun Apr 27 15:41:44 2014(r265015) +++ head/usr.sbin/bsdinstall/partedit/partedit_x86.cSun Apr 27 15:58:07 2014(r265016) @@ -32,8 +32,8 @@ #include "partedit.h" -static char platform[255] = "BIOS"; /* XXX once sysctl exists, make this an empty string */ -static const char *platform_sysctl = "hw.platform"; +static char platform[255] = ""; +static const char *platform_sysctl = "machdep.bootmethod"; const char * default_scheme(void) { @@ -82,7 +82,7 @@ bootpart_type(const char *scheme) { if (strlen(platform) == 0) sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); - if (strcmp(platform, "EFI") == 0) + if (strcmp(platform, "UEFI") == 0) return ("efi"); return ("freebsd-boot"); @@ -93,7 +93,7 @@ bootcode_path(const char *part_type) { size_t platlen = sizeof(platform); if (strlen(platform) == 0) sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); - if (strcmp(platform, "EFI") == 0) + if (strcmp(platform, "UEFI") == 0) return (NULL); if (strcmp(part_type, "GPT") == 0) @@ -113,7 +113,7 @@ partcode_path(const char *part_type) { sysctlbyname(platform_sysctl, platform, &platlen, NULL, -1); if (strcmp(part_type, "GPT") == 0) { - if (strcmp(platform, "EFI") == 0) + if (strcmp(platform, "UEFI") == 0) return ("/boot/boot1.efifat"); else return ("/boot/gptboot"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265015 - head/sys/dev/usb/controller
Author: hselasky Date: Sun Apr 27 15:41:44 2014 New Revision: 265015 URL: http://svnweb.freebsd.org/changeset/base/265015 Log: Setting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel LynxPoint USB 3.0 controllers found in MacBookPro 2013's. MFC after:2 days Tested by:Huang Wen Hui Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h head/sys/dev/usb/controller/xhci_pci.c head/sys/dev/usb/controller/xhcireg.h Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Sun Apr 27 15:14:59 2014 (r265014) +++ head/sys/dev/usb/controller/xhci.c Sun Apr 27 15:41:44 2014 (r265015) @@ -495,8 +495,12 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERSTSZ(0), XHCI_ERSTS_SET(temp)); + /* Check if we should use the default IMOD value */ + if (sc->sc_imod_default == 0) + sc->sc_imod_default = XHCI_IMOD_DEFAULT; + /* Setup interrupt rate */ - XWRITE4(sc, runt, XHCI_IMOD(0), XHCI_IMOD_DEFAULT); + XWRITE4(sc, runt, XHCI_IMOD(0), sc->sc_imod_default); usbd_get_page(&sc->sc_hw.root_pc, 0, &buf_res); Modified: head/sys/dev/usb/controller/xhci.h == --- head/sys/dev/usb/controller/xhci.h Sun Apr 27 15:14:59 2014 (r265014) +++ head/sys/dev/usb/controller/xhci.h Sun Apr 27 15:41:44 2014 (r265015) @@ -481,6 +481,7 @@ struct xhci_softc { uint16_tsc_erst_max; uint16_tsc_event_idx; uint16_tsc_command_idx; + uint16_tsc_imod_default; uint8_t sc_event_ccs; uint8_t sc_command_ccs; Modified: head/sys/dev/usb/controller/xhci_pci.c == --- head/sys/dev/usb/controller/xhci_pci.c Sun Apr 27 15:14:59 2014 (r265014) +++ head/sys/dev/usb/controller/xhci_pci.c Sun Apr 27 15:41:44 2014 (r265015) @@ -242,6 +242,7 @@ xhci_pci_attach(device_t self) case 0x1e318086:/* Panther Point */ case 0x8c318086:/* Lynx Point */ sc->sc_port_route = &xhci_pci_port_route; + sc->sc_imod_default = XHCI_IMOD_DEFAULT_LP; break; default: break; Modified: head/sys/dev/usb/controller/xhcireg.h == --- head/sys/dev/usb/controller/xhcireg.h Sun Apr 27 15:14:59 2014 (r265014) +++ head/sys/dev/usb/controller/xhcireg.h Sun Apr 27 15:41:44 2014 (r265015) @@ -166,7 +166,8 @@ #defineXHCI_IMOD_IVAL_SET(x) (((x) & 0x) << 0) /* 250ns unit */ #defineXHCI_IMOD_ICNT_GET(x) (((x) >> 16) & 0x) /* 250ns unit */ #defineXHCI_IMOD_ICNT_SET(x) (((x) & 0x) << 16) /* 250ns unit */ -#defineXHCI_IMOD_DEFAULT 0x01F4U /* 8000 IRQ/second */ +#defineXHCI_IMOD_DEFAULT 0x01F4U /* 8000 IRQs/second */ +#defineXHCI_IMOD_DEFAULT_LP0x03F8U /* 4000 IRQs/second - LynxPoint */ #defineXHCI_ERSTSZ(n) (0x0028 + (0x20 * (n))) /* XHCI event ring segment table size */ #defineXHCI_ERSTS_GET(x) ((x) & 0x) #defineXHCI_ERSTS_SET(x) ((x) & 0x) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r264995 - head/release/amd64
On 26 April 2014 21:06, Nathan Whitehorn wrote: > > One other note here is that this requires newfs_msdos and mdconfig, which is > really ugly. NetBSD's makefs at least seems to support FAT now. If that > actually works, it should be imported and we can get rid of the mdconfig > mess. NetBSD's makefs does support FAT, but relies on a refactored newfs_msdos that splits out the basic functionality for reuse. I started looking into that (and discovered the wrong min/max cluster counts -- r264889), and plan to make that change and then bring over the makefs changes. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265014 - head/sys/amd64/amd64
Author: emaste Date: Sun Apr 27 15:14:59 2014 New Revision: 265014 URL: http://svnweb.freebsd.org/changeset/base/265014 Log: Report boot method (BIOS/UEFI) via sysctl machdep.bootmethod Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Sun Apr 27 13:10:51 2014 (r265013) +++ head/sys/amd64/amd64/machdep.c Sun Apr 27 15:14:59 2014 (r265014) @@ -1526,6 +1526,10 @@ add_efi_map_entries(struct efi_map_heade } } +static char bootmethod[16] = ""; +SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, +"System firmware boot method"); + static void native_parse_memmap(caddr_t kmdp, vm_paddr_t *physmap, int *physmap_idx) { @@ -1550,9 +1554,11 @@ native_parse_memmap(caddr_t kmdp, vm_pad if (efihdr != NULL) { add_efi_map_entries(efihdr, physmap, physmap_idx); + strlcpy(bootmethod, "UEFI", sizeof(bootmethod)); } else { size = *((u_int32_t *)smap - 1); bios_add_smap_entries(smap, size, physmap, physmap_idx); + strlcpy(bootmethod, "BIOS", sizeof(bootmethod)); } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r265012 - in head/sys/dev: gpio ofw
On 04/27/14 05:11, Luiz Otavio O Souza wrote: Author: loos Date: Sun Apr 27 12:11:00 2014 New Revision: 265012 URL: http://svnweb.freebsd.org/changeset/base/265012 Log: Fix the gpio-specifier decoding by respecting the GPIO controller's #gpio-cells property. Add a new ofw_bus method (OFW_BUS_MAP_GPIOS()) that allows the GPIO controller to implement its own mapping to deal with gpio-specifiers, allowing the decoding of gpio-specifiers to be controller specific. The default ofw_bus_map_gpios() decodes the linux standard (#gpio-cells = <2>) and the FreeBSD standard (#gpio-cells = <3>). It pass the gpio-specifier flag field to the children as an ivar variable so they can act upon. Modified: head/sys/dev/gpio/gpiobusvar.h head/sys/dev/gpio/ofw_gpiobus.c head/sys/dev/ofw/ofw_bus.h head/sys/dev/ofw/ofw_bus_if.m Would it be possible to put the routines from ofw_bus* into dev/gpio instead? I'd like to avoid polluting dev/ofw with bus-specific parts as much as possible. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265013 - head/sys/boot/fdt/dts/arm
Author: loos Date: Sun Apr 27 13:10:51 2014 New Revision: 265013 URL: http://svnweb.freebsd.org/changeset/base/265013 Log: Revert r258678. Make the led gpio-specifier match again the #gpio-cells settings from the GPIO controller, which i had broken in r258678. Restore the active-low flag. Modified: head/sys/boot/fdt/dts/arm/rpi.dts Modified: head/sys/boot/fdt/dts/arm/rpi.dts == --- head/sys/boot/fdt/dts/arm/rpi.dts Sun Apr 27 12:11:00 2014 (r265012) +++ head/sys/boot/fdt/dts/arm/rpi.dts Sun Apr 27 13:10:51 2014 (r265013) @@ -316,7 +316,7 @@ ok { label = "ok"; - gpios = <&gpio 16 2 0>; + gpios = <&gpio 16 1>; /* Don't change this - it configures * how the led driver determines if ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265012 - in head/sys/dev: gpio ofw
Author: loos Date: Sun Apr 27 12:11:00 2014 New Revision: 265012 URL: http://svnweb.freebsd.org/changeset/base/265012 Log: Fix the gpio-specifier decoding by respecting the GPIO controller's #gpio-cells property. Add a new ofw_bus method (OFW_BUS_MAP_GPIOS()) that allows the GPIO controller to implement its own mapping to deal with gpio-specifiers, allowing the decoding of gpio-specifiers to be controller specific. The default ofw_bus_map_gpios() decodes the linux standard (#gpio-cells = <2>) and the FreeBSD standard (#gpio-cells = <3>). It pass the gpio-specifier flag field to the children as an ivar variable so they can act upon. Modified: head/sys/dev/gpio/gpiobusvar.h head/sys/dev/gpio/ofw_gpiobus.c head/sys/dev/ofw/ofw_bus.h head/sys/dev/ofw/ofw_bus_if.m Modified: head/sys/dev/gpio/gpiobusvar.h == --- head/sys/dev/gpio/gpiobusvar.h Sun Apr 27 10:43:48 2014 (r265011) +++ head/sys/dev/gpio/gpiobusvar.h Sun Apr 27 12:11:00 2014 (r265012) @@ -60,17 +60,22 @@ struct gpiobus_softc int *sc_pins_mapped; /* mark mapped pins */ }; - struct gpiobus_ivar { uint32_tnpins; /* pins total */ + uint32_t*flags; /* pins flags */ uint32_t*pins; /* pins map */ }; -void gpiobus_print_pins(struct gpiobus_ivar *); #ifdef FDT +struct ofw_gpiobus_devinfo { + struct gpiobus_ivar opd_dinfo; + struct ofw_bus_devinfo opd_obdinfo; +}; + device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif +void gpiobus_print_pins(struct gpiobus_ivar *); extern driver_t gpiobus_driver; Modified: head/sys/dev/gpio/ofw_gpiobus.c == --- head/sys/dev/gpio/ofw_gpiobus.c Sun Apr 27 10:43:48 2014 (r265011) +++ head/sys/dev/gpio/ofw_gpiobus.c Sun Apr 27 12:11:00 2014 (r265012) @@ -47,11 +47,6 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "gpiobus_if.h" -struct ofw_gpiobus_devinfo { - struct gpiobus_ivar opd_dinfo; - struct ofw_bus_devinfo opd_obdinfo; -}; - static int ofw_gpiobus_parse_gpios(struct gpiobus_softc *, struct gpiobus_ivar *, phandle_t); static struct ofw_gpiobus_devinfo *ofw_gpiobus_setup_devinfo(device_t, @@ -83,10 +78,37 @@ ofw_gpiobus_add_fdt_child(device_t bus, } static int +ofw_gpiobus_alloc_ivars(struct gpiobus_ivar *dinfo) +{ + + /* Allocate pins and flags memory. */ + dinfo->pins = malloc(sizeof(uint32_t) * dinfo->npins, M_DEVBUF, + M_NOWAIT | M_ZERO); + if (dinfo->pins == NULL) + return (ENOMEM); + dinfo->flags = malloc(sizeof(uint32_t) * dinfo->npins, M_DEVBUF, + M_NOWAIT | M_ZERO); + if (dinfo->flags == NULL) { + free(dinfo->pins, M_DEVBUF); + return (ENOMEM); + } + + return (0); +} + +static void +ofw_gpiobus_free_ivars(struct gpiobus_ivar *dinfo) +{ + + free(dinfo->flags, M_DEVBUF); + free(dinfo->pins, M_DEVBUF); +} + +static int ofw_gpiobus_parse_gpios(struct gpiobus_softc *sc, struct gpiobus_ivar *dinfo, phandle_t child) { - int i, len; + int cells, i, j, len; pcell_t *gpios; phandle_t gpio; @@ -102,44 +124,81 @@ ofw_gpiobus_parse_gpios(struct gpiobus_s } /* -* Each 'gpios' entry must contain 4 pcells. -* The first one is the GPIO controller phandler. -* Then the last three are the GPIO pin, the GPIO pin direction and -* the GPIO pin flags. +* The gpio-specifier is controller independent, but the first pcell +* has the reference to the GPIO controller phandler. +* One the first pass we count the number of encoded gpio-specifiers. */ - if ((len / sizeof(pcell_t)) % 4) { + i = 0; + len /= sizeof(pcell_t); + while (i < len) { + /* Allow NULL specifiers. */ + if (gpios[i] == 0) { + dinfo->npins++; + i++; + continue; + } + gpio = OF_xref_phandle(gpios[i]); + /* Verify if we're attaching to the correct GPIO controller. */ + if (!OF_hasprop(gpio, "gpio-controller") || + gpio != ofw_bus_get_node(sc->sc_dev)) { + free(gpios, M_DEVBUF); + return (EINVAL); + } + /* Read gpio-cells property for this GPIO controller. */ + if (OF_getencprop(gpio, "#gpio-cells", &cells, + sizeof(cells)) < 0) { + free(gpios, M_DEVBUF); + return (EINVAL); + } + dinfo->npins++; + i += cells + 1; + } + + if (dinfo->npins == 0) { free(gpios,
svn commit: r265011 - head/sys/net
Author: melifaro Date: Sun Apr 27 10:43:48 2014 New Revision: 265011 URL: http://svnweb.freebsd.org/changeset/base/265011 Log: Remove useless zeroing of RTAX_DST on error. Cleanup a bit. MFC after:1 month Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c == --- head/sys/net/rtsock.c Sun Apr 27 10:20:37 2014(r265010) +++ head/sys/net/rtsock.c Sun Apr 27 10:43:48 2014(r265011) @@ -542,32 +542,38 @@ route_output(struct mbuf *m, struct sock panic("route_output"); len = m->m_pkthdr.len; if (len < sizeof(*rtm) || - len != mtod(m, struct rt_msghdr *)->rtm_msglen) { - info.rti_info[RTAX_DST] = NULL; + len != mtod(m, struct rt_msghdr *)->rtm_msglen) senderr(EINVAL); - } + R_Malloc(rtm, struct rt_msghdr *, len); - if (rtm == NULL) { - info.rti_info[RTAX_DST] = NULL; + if (rtm == NULL) senderr(ENOBUFS); - } m_copydata(m, 0, len, (caddr_t)rtm); + bzero(&info, sizeof(info)); + if (rtm->rtm_version != RTM_VERSION) { - info.rti_info[RTAX_DST] = NULL; + /* Do not touch message since format is unknown */ + Free(rtm); + rtm = NULL; senderr(EPROTONOSUPPORT); } + + /* +* Starting from here, it is possible +* to alter original message and insert +* caller PID and error value. +*/ + rtm->rtm_pid = curproc->p_pid; - bzero(&info, sizeof(info)); info.rti_addrs = rtm->rtm_addrs; /* * rt_xaddrs() performs s6_addr[2] := sin6_scope_id for AF_INET6 * link-local address because rtrequest requires addresses with * embedded scope id. */ - if (rt_xaddrs((caddr_t)(rtm + 1), len + (caddr_t)rtm, &info)) { - info.rti_info[RTAX_DST] = NULL; + if (rt_xaddrs((caddr_t)(rtm + 1), len + (caddr_t)rtm, &info)) senderr(EINVAL); - } + info.rti_flags = rtm->rtm_flags; if (info.rti_info[RTAX_DST] == NULL || info.rti_info[RTAX_DST]->sa_family >= AF_MAX || ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265010 - head/sys/net
Author: melifaro Date: Sun Apr 27 10:20:37 2014 New Revision: 265010 URL: http://svnweb.freebsd.org/changeset/base/265010 Log: Cleanup route_output() a bit. MFC after:1 month Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c == --- head/sys/net/rtsock.c Sun Apr 27 09:49:35 2014(r265009) +++ head/sys/net/rtsock.c Sun Apr 27 10:20:37 2014(r265010) @@ -530,6 +530,7 @@ route_output(struct mbuf *m, struct sock struct ifnet *ifp = NULL; union sockaddr_union saun; sa_family_t saf = AF_UNSPEC; + struct rawcb *rp = NULL; fibnum = so->so_fibnum; @@ -819,22 +820,14 @@ report: } flush: - if (rtm) { - if (error) - rtm->rtm_errno = error; - else - rtm->rtm_flags |= RTF_DONE; - } - if (rt) /* XXX can this be true? */ + if (rt != NULL) RTFREE(rt); -{ - struct rawcb *rp = NULL; /* * Check to see if we don't want our own messages. */ if ((so->so_options & SO_USELOOPBACK) == 0) { if (V_route_cb.any_count <= 1) { - if (rtm) + if (rtm != NULL) Free(rtm); m_freem(m); return (error); @@ -842,6 +835,7 @@ flush: /* There is another listener, so construct message */ rp = sotorawcb(so); } + if (rtm != NULL) { #ifdef INET6 if (rti_need_deembed) { @@ -859,6 +853,11 @@ flush: } } #endif + if (error != 0) + rtm->rtm_errno = error; + else + rtm->rtm_flags |= RTF_DONE; + m_copyback(m, 0, rtm->rtm_msglen, (caddr_t)rtm); if (m->m_pkthdr.len < rtm->rtm_msglen) { m_freem(m); @@ -867,7 +866,7 @@ flush: m_adj(m, rtm->rtm_msglen - m->m_pkthdr.len); Free(rtm); } - if (m) { + if (m != NULL) { M_SETFIB(m, fibnum); m->m_flags |= RTS_FILTER_FIB; if (rp) { @@ -882,7 +881,7 @@ flush: } else rt_dispatch(m, saf); } -} + return (error); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r265009 - head/sys/net
Author: melifaro Date: Sun Apr 27 09:49:35 2014 New Revision: 265009 URL: http://svnweb.freebsd.org/changeset/base/265009 Log: Do not delay freeing rtm. Bandaid added in r227061 is not needed since r227061, MFC after:1 month Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c == --- head/sys/net/rtsock.c Sun Apr 27 09:05:34 2014(r265008) +++ head/sys/net/rtsock.c Sun Apr 27 09:49:35 2014(r265009) @@ -842,7 +842,7 @@ flush: /* There is another listener, so construct message */ rp = sotorawcb(so); } - if (rtm) { + if (rtm != NULL) { #ifdef INET6 if (rti_need_deembed) { /* sin6_scope_id is recovered before sending rtm. */ @@ -865,6 +865,7 @@ flush: m = NULL; } else if (m->m_pkthdr.len > rtm->rtm_msglen) m_adj(m, rtm->rtm_msglen - m->m_pkthdr.len); + Free(rtm); } if (m) { M_SETFIB(m, fibnum); @@ -881,9 +882,6 @@ flush: } else rt_dispatch(m, saf); } - /* info.rti_info[RTAX_DST] (used above) can point inside of rtm */ - if (rtm) - Free(rtm); } return (error); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r264997 - head/sys/dev/vt/hw/vga
On Sun, 27 Apr 2014 02:19:53 + (UTC) Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sun Apr 27 02:19:53 2014 > New Revision: 264997 > URL: http://svnweb.freebsd.org/changeset/base/264997 > > Log: > Disable vga if EFI framebuffer present. vt(9) should handle this > internally based on efifb's higher priority, but it doesn't, and this > at least lets us build a kernel that boots on both BIOS and EFI > systems for now. > > Modified: > head/sys/dev/vt/hw/vga/vga.c > > Modified: head/sys/dev/vt/hw/vga/vga.c > == > --- head/sys/dev/vt/hw/vga/vga.c Sun Apr 27 01:15:10 > 2014 (r264996) +++ head/sys/dev/vt/hw/vga/vga.c Sun Apr > 27 02:19:53 2014 (r264997) @@ -45,8 +45,10 @@ __FBSDID > ("$FreeBSD$"); > #if defined(__amd64__) || defined(__i386__) > #include > #include > +#include > #include > #include > +#include > #endif /* __amd64__ || __i386__ */ > > struct vga_softc { > @@ -637,6 +639,19 @@ vga_init(struct vt_device *vd) > int textmode = 0; > > #if defined(__amd64__) || defined(__i386__) > + /* Disable if EFI framebuffer present. Should be handled by > priority > + * logic in vt(9), but this will do for now. XXX */ > + > + caddr_t kmdp, efifb; > + kmdp = preload_search_by_type("elf kernel"); > + if (kmdp == NULL) > + kmdp = preload_search_by_type("elf64 kernel"); > + efifb = preload_search_info(kmdp, MODINFO_METADATA | > MODINFOMD_EFI_FB); > + if (efifb != NULL) > + return (CN_DEAD); > +#endif > + > +#if defined(__amd64__) || defined(__i386__) > sc->vga_fb_tag = X86_BUS_SPACE_MEM; > sc->vga_fb_handle = KERNBASE + VGA_MEM_BASE; > sc->vga_reg_tag = X86_BUS_SPACE_IO; > I have patch for that, but it require testing: http://people.freebsd.org/~ray/newcons/vt_early_select.patch WBW -- Aleksandr Rybalko ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"