CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: mlelstv Date: Sun May 10 22:21:38 UTC 2015 Modified Files: src/sys/arch/x86/x86: x86_autoconf.c Log Message: Don't report EINVAL errors when searching the bootwedge, this error is most likely the result of reading beyond the end of the wrong disk. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/x86/x86/x86_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/x86_autoconf.c diff -u src/sys/arch/x86/x86/x86_autoconf.c:1.73 src/sys/arch/x86/x86/x86_autoconf.c:1.74 --- src/sys/arch/x86/x86/x86_autoconf.c:1.73 Sun May 10 22:18:58 2015 +++ src/sys/arch/x86/x86/x86_autoconf.c Sun May 10 22:21:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: x86_autoconf.c,v 1.73 2015/05/10 22:18:58 mlelstv Exp $ */ +/* $NetBSD: x86_autoconf.c,v 1.74 2015/05/10 22:21:38 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.73 2015/05/10 22:18:58 mlelstv Exp $); +__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.74 2015/05/10 22:21:38 mlelstv Exp $); #include sys/param.h #include sys/systm.h @@ -235,9 +235,11 @@ match_bootwedge(device_t dv, struct btin sizeof(bf), blk * DEV_BSIZE, UIO_SYSSPACE, 0, NOCRED, NULL, NULL); if (error) { - printf(%s: unable to read block % PRId64 - of dev %s (%d)\n, __func__, - blk, device_xname(dv), error); + if (error != EINVAL) { +aprint_error(%s: unable to read block % +PRId64 of dev %s (%d)\n, __func__, +blk, device_xname(dv), error); + } goto closeout; } MD5Update(ctx, bf, sizeof(bf));
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun May 10 23:50:21 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: files.tegra tegra_car.c tegra_carreg.h tegra_intr.h tegra_io.c tegra_reg.h tegra_var.h Added Files: src/sys/arch/arm/nvidia: tegra_i2c.c tegra_i2creg.h Log Message: Tegra I2C driver To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/nvidia/files.tegra \ src/sys/arch/arm/nvidia/tegra_car.c src/sys/arch/arm/nvidia/tegra_reg.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/nvidia/tegra_carreg.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_i2c.c \ src/sys/arch/arm/nvidia/tegra_i2creg.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_intr.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/nvidia/tegra_io.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/nvidia/tegra_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/nvidia/files.tegra diff -u src/sys/arch/arm/nvidia/files.tegra:1.8 src/sys/arch/arm/nvidia/files.tegra:1.9 --- src/sys/arch/arm/nvidia/files.tegra:1.8 Thu May 7 23:55:11 2015 +++ src/sys/arch/arm/nvidia/files.tegra Sun May 10 23:50:21 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.tegra,v 1.8 2015/05/07 23:55:11 jmcneill Exp $ +# $NetBSD: files.tegra,v 1.9 2015/05/10 23:50:21 jmcneill Exp $ # # Configuration info for NVIDIA Tegra ARM Peripherals # @@ -50,6 +50,11 @@ file arch/arm/nvidia/tegra_mpio.c tegra attach com at tegraio with tegra_com file arch/arm/nvidia/tegra_com.c tegra_com needs-flag +# I2C +device tegrai2c: i2cbus, i2cexec +attach tegrai2c at tegraio with tegra_i2c +file arch/arm/nvidia/tegra_i2c.c tegra_i2c + # RTC device tegrartc attach tegrartc at tegraio with tegra_rtc Index: src/sys/arch/arm/nvidia/tegra_car.c diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.8 src/sys/arch/arm/nvidia/tegra_car.c:1.9 --- src/sys/arch/arm/nvidia/tegra_car.c:1.8 Sun May 10 15:31:48 2015 +++ src/sys/arch/arm/nvidia/tegra_car.c Sun May 10 23:50:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_car.c,v 1.8 2015/05/10 15:31:48 jmcneill Exp $ */ +/* $NetBSD: tegra_car.c,v 1.9 2015/05/10 23:50:21 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.8 2015/05/10 15:31:48 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.9 2015/05/10 23:50:21 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -437,3 +437,70 @@ tegra_car_periph_sata_enable(void) bus_space_write_4(bst, bsh, CAR_RST_DEV_W_CLR_REG, CAR_DEV_W_SATACOLD); bus_space_write_4(bst, bsh, CAR_RST_DEV_V_CLR_REG, CAR_DEV_V_SATA); } + +int +tegra_car_periph_i2c_enable(u_int port, u_int rate) +{ + bus_space_tag_t bst; + bus_space_handle_t bsh; + bus_size_t rst_reg, enb_reg, clksrc_reg; + uint32_t dev_bit; + + tegra_car_get_bs(bst, bsh); + + switch (port) { + case 0: + rst_reg = CAR_RST_DEV_L_SET_REG; + enb_reg = CAR_CLK_ENB_L_SET_REG; + dev_bit = CAR_DEV_L_I2C1; + clksrc_reg = CAR_CLKSRC_I2C1_REG; + break; + case 1: + rst_reg = CAR_RST_DEV_H_SET_REG; + enb_reg = CAR_CLK_ENB_H_SET_REG; + dev_bit = CAR_DEV_H_I2C2; + clksrc_reg = CAR_CLKSRC_I2C2_REG; + break; + case 2: + rst_reg = CAR_RST_DEV_U_SET_REG; + enb_reg = CAR_CLK_ENB_U_SET_REG; + dev_bit = CAR_DEV_U_I2C3; + clksrc_reg = CAR_CLKSRC_I2C3_REG; + break; + case 3: + rst_reg = CAR_RST_DEV_V_SET_REG; + enb_reg = CAR_CLK_ENB_V_SET_REG; + dev_bit = CAR_DEV_V_I2C4; + clksrc_reg = CAR_CLKSRC_I2C4_REG; + break; + case 4: + rst_reg = CAR_RST_DEV_H_SET_REG; + enb_reg = CAR_CLK_ENB_V_SET_REG; + dev_bit = CAR_DEV_H_I2C5; + clksrc_reg = CAR_CLKSRC_I2C5_REG; + break; + case 5: + rst_reg = CAR_RST_DEV_X_SET_REG; + enb_reg = CAR_CLK_ENB_X_SET_REG; + dev_bit = CAR_DEV_X_I2C6; + clksrc_reg = CAR_CLKSRC_I2C6_REG; + break; + default: + return EINVAL; + } + + /* Enter reset, enable clock */ + bus_space_write_4(bst, bsh, rst_reg, dev_bit); + bus_space_write_4(bst, bsh, enb_reg, dev_bit); + + /* Set clock source to PLLP */ + const u_int div = howmany(tegra_car_pllp0_rate() / 1000, rate / 1000); + bus_space_write_4(bst, bsh, clksrc_reg, + __SHIFTIN(CAR_CLKSRC_I2C_SRC_PLLP_OUT0, CAR_CLKSRC_I2C_SRC) | + __SHIFTIN(div - 1, CAR_CLKSRC_I2C_DIV)); + + /* Leave reset */ + bus_space_write_4(bst, bsh, rst_reg+4, dev_bit); + + return 0; +} Index: src/sys/arch/arm/nvidia/tegra_reg.h diff -u src/sys/arch/arm/nvidia/tegra_reg.h:1.8 src/sys/arch/arm/nvidia/tegra_reg.h:1.9 --- src/sys/arch/arm/nvidia/tegra_reg.h:1.8 Thu May 7 23:55:11 2015 +++ src/sys/arch/arm/nvidia/tegra_reg.h Sun May 10 23:50:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_reg.h,v 1.8 2015/05/07 23:55:11 jmcneill Exp $ */ +/* $NetBSD: tegra_reg.h,v 1.9 2015/05/10 23:50:21 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -78,6 +78,18 @@
CVS commit: [netbsd-7] src/external/bsd/wpa/dist/src
Module Name:src Committed By: msaitoh Date: Mon May 11 04:51:51 UTC 2015 Modified Files: src/external/bsd/wpa/dist/src/ap [netbsd-7]: wmm.c src/external/bsd/wpa/dist/src/eap_peer [netbsd-7]: eap_pwd.c src/external/bsd/wpa/dist/src/eap_server [netbsd-7]: eap_server_pwd.c src/external/bsd/wpa/dist/src/wps [netbsd-7]: httpread.c Log Message: Pull up following revision(s) (requested by christos in ticket #749): external/bsd/wpa/dist/src/ap/wmm.c: revision 1.2 external/bsd/wpa/dist/src/wps/httpread.c: revision 1.2 external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c: revision 1.2-1.3 external/bsd/wpa/dist/src/eap_peer/eap_pwd.c: revision 1.2-1.4 - strtoul() return value may end up overflowing the int h-chunk_size and resulting in a negative value to be stored as the chunk_size. This could result in the following memcpy operation using a very large length argument which would result in a buffer overflow and segmentation fault. This could have been used to cause a denial service by any device that has been authorized for network access (either wireless or wired). This would affect both the WPS UPnP functionality in a WPS AP (hostapd with upnp_iface parameter set in the configuration) and WPS ER (wpa_supplicant with WPS_ER_START control interface command used). Validate the parsed chunk length value to avoid this. In addition to rejecting negative values, we can also reject chunk size that would be larger than the maximum configured body length. Thanks to Kostya Kortchinsky of Google security team for discovering and reporting this issue. - The length of the WMM Action frame was not properly validated and the length of the information elements (int left) could end up being negative. This would result in reading significantly past the stack buffer while parsing the IEs in ieee802_11_parse_elems() and while doing so, resulting in segmentation fault. This can result in an invalid frame being used for a denial of service attack (hostapd process killed) against an AP with a driver that uses hostapd for management frame processing (e.g., all mac80211-based drivers). Thanks to Kostya Kortchinsky of Google security team for discovering and reporting this issue. - The length of the received Commit and Confirm message payloads was not checked before reading them. This could result in a buffer read overflow when processing an invalid message. Fix this by verifying that the payload is of expected length before processing it. In addition, enforce correct state transition sequence to make sure there is no unexpected behavior if receiving a Commit/Confirm message before the previous exchanges have been completed. Thanks to Kostya Kortchinsky of Google security team for discovering and reporting this issue. - The remaining number of bytes in the message could be smaller than the Total-Length field size, so the length needs to be explicitly checked prior to reading the field and decrementing the len variable. This could have resulted in the remaining length becoming negative and interpreted as a huge positive integer. In addition, check that there is no already started fragment in progress before allocating a new buffer for reassembling fragments. This avoid a potential memory leak when processing invalid message. - The L (Length) and M (More) flags needs to be cleared before deciding whether the locally generated response requires fragmentation. This fixes an issue where these flags from the server could have been invalid for the following message. In some cases, this could have resulted in triggering the wpabuf security check that would terminate the process due to invalid buffer allocation. To generate a diff of this commit: cvs rdiff -u -r1.1.1.3.4.1 -r1.1.1.3.4.2 \ src/external/bsd/wpa/dist/src/ap/wmm.c cvs rdiff -u -r1.1.1.2.4.1 -r1.1.1.2.4.2 \ src/external/bsd/wpa/dist/src/eap_peer/eap_pwd.c cvs rdiff -u -r1.1.1.2.4.1 -r1.1.1.2.4.2 \ src/external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c cvs rdiff -u -r1.1.1.2.4.1 -r1.1.1.2.4.2 \ src/external/bsd/wpa/dist/src/wps/httpread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/wpa/dist/src/ap/wmm.c diff -u src/external/bsd/wpa/dist/src/ap/wmm.c:1.1.1.3.4.1 src/external/bsd/wpa/dist/src/ap/wmm.c:1.1.1.3.4.2 --- src/external/bsd/wpa/dist/src/ap/wmm.c:1.1.1.3.4.1 Wed Apr 29 20:28:35 2015 +++ src/external/bsd/wpa/dist/src/ap/wmm.c Mon May 11 04:51:51 2015 @@ -274,6 +274,9 @@ void hostapd_wmm_action(struct hostapd_d return; } + if (left 0) + return; /* not a valid WMM Action frame */ + /* extract the tspec info element */ if (ieee802_11_parse_elems(pos, left, elems, 1) == ParseFailed) { hostapd_logger(hapd, mgmt-sa, HOSTAPD_MODULE_IEEE80211, Index:
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Mon May 11 05:43:52 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket 749. To generate a diff of this commit: cvs rdiff -u -r1.1.2.286 -r1.1.2.287 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.286 src/doc/CHANGES-7.0:1.1.2.287 --- src/doc/CHANGES-7.0:1.1.2.286 Mon May 11 03:33:46 2015 +++ src/doc/CHANGES-7.0 Mon May 11 05:43:52 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.286 2015/05/11 03:33:46 msaitoh Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.287 2015/05/11 05:43:52 msaitoh Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -22921,3 +22921,11 @@ sys/dev/pci/hifn7751.c1.60 Defer to a callout in hifn_rng_get. Fixes lock-against-self. [riastradh, ticket #748] + +external/bsd/wpa/dist/src/ap/wmm.c 1.2 +external/bsd/wpa/dist/src/eap_peer/eap_pwd.c 1.2-1.4 +external/bsd/wpa/dist/src/eap_server/eap_server_pwd.c 1.2-1.3 +external/bsd/wpa/dist/src/wps/httpread.c 1.2 + + Fix buffer overflow, DoS attack and memory leak. + [christos, ticket #749]
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Mon May 11 03:33:46 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket 748. To generate a diff of this commit: cvs rdiff -u -r1.1.2.285 -r1.1.2.286 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.285 src/doc/CHANGES-7.0:1.1.2.286 --- src/doc/CHANGES-7.0:1.1.2.285 Sat May 9 13:56:41 2015 +++ src/doc/CHANGES-7.0 Mon May 11 03:33:46 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.285 2015/05/09 13:56:41 msaitoh Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.286 2015/05/11 03:33:46 msaitoh Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -22916,3 +22916,8 @@ usr.sbin/sysinst/menus.mi 1.8 Fix a bug that a loop occured when we select get the distribution. Fixes PR#49440. [martin, ticket #745] + +sys/dev/pci/hifn7751.c1.60 + + Defer to a callout in hifn_rng_get. Fixes lock-against-self. + [riastradh, ticket #748]
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: hsuenaga Date: Mon May 11 05:49:48 UTC 2015 Modified Files: src/sys/arch/arm/marvell: mvsoc.c Log Message: add MARVELL Armada XP MV78260 B0(rev.2) recent OpenBlocks AX3 uses it. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/marvell/mvsoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/mvsoc.c diff -u src/sys/arch/arm/marvell/mvsoc.c:1.19 src/sys/arch/arm/marvell/mvsoc.c:1.20 --- src/sys/arch/arm/marvell/mvsoc.c:1.19 Sun May 3 14:38:09 2015 +++ src/sys/arch/arm/marvell/mvsoc.c Mon May 11 05:49:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoc.c,v 1.19 2015/05/03 14:38:09 hsuenaga Exp $ */ +/* $NetBSD: mvsoc.c,v 1.20 2015/05/11 05:49:48 hsuenaga Exp $ */ /* * Copyright (c) 2007, 2008, 2013, 2014 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mvsoc.c,v 1.19 2015/05/03 14:38:09 hsuenaga Exp $); +__KERNEL_RCSID(0, $NetBSD: mvsoc.c,v 1.20 2015/05/11 05:49:48 hsuenaga Exp $); #include opt_cputypes.h #include opt_mvsoc.h @@ -348,6 +348,7 @@ static struct { { ARMADAXP(MV78160), 1, MV78160, A0, Armada XP }, { ARMADAXP(MV78230), 1, MV78260, A0, Armada XP }, { ARMADAXP(MV78260), 1, MV78260, A0, Armada XP }, + { ARMADAXP(MV78260), 2, MV78260, B0, Armada XP }, { ARMADAXP(MV78460), 1, MV78460, A0, Armada XP }, { ARMADAXP(MV78460), 2, MV78460, B0, Armada XP }, @@ -433,6 +434,7 @@ static struct { { ARMADAXP(MV78160), 1, ddr3_tags }, { ARMADAXP(MV78230), 1, ddr3_tags }, { ARMADAXP(MV78260), 1, ddr3_tags }, + { ARMADAXP(MV78260), 2, ddr3_tags }, { ARMADAXP(MV78460), 1, ddr3_tags }, { ARMADAXP(MV78460), 2, ddr3_tags },
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun May 10 23:56:21 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_car.c Log Message: remove debug printf To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/nvidia/tegra_car.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/nvidia/tegra_car.c diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.9 src/sys/arch/arm/nvidia/tegra_car.c:1.10 --- src/sys/arch/arm/nvidia/tegra_car.c:1.9 Sun May 10 23:50:21 2015 +++ src/sys/arch/arm/nvidia/tegra_car.c Sun May 10 23:56:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_car.c,v 1.9 2015/05/10 23:50:21 jmcneill Exp $ */ +/* $NetBSD: tegra_car.c,v 1.10 2015/05/10 23:56:21 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.9 2015/05/10 23:50:21 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.10 2015/05/10 23:56:21 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -81,7 +81,6 @@ tegra_car_attach(device_t parent, device aprint_naive(\n); aprint_normal(: CAR\n); - printf(CAR_PLLE_BASE_REG = %#x\n, bus_space_read_4(sc-sc_bst, sc-sc_bsh, CAR_PLLE_BASE_REG)); aprint_verbose_dev(self, PLLX = %u Hz\n, tegra_car_pllx_rate()); aprint_verbose_dev(self, PLLC = %u Hz\n, tegra_car_pllc_rate()); aprint_verbose_dev(self, PLLE = %u Hz\n, tegra_car_plle_rate());
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun May 10 23:51:08 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: JETSONTK1 Log Message: add tegrai2c (I2C[12345]) and seeprom on I2C1 To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/JETSONTK1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/JETSONTK1 diff -u src/sys/arch/evbarm/conf/JETSONTK1:1.13 src/sys/arch/evbarm/conf/JETSONTK1:1.14 --- src/sys/arch/evbarm/conf/JETSONTK1:1.13 Sun May 10 13:24:11 2015 +++ src/sys/arch/evbarm/conf/JETSONTK1 Sun May 10 23:51:08 2015 @@ -1,5 +1,5 @@ # -# $NetBSD: JETSONTK1,v 1.13 2015/05/10 13:24:11 jmcneill Exp $ +# $NetBSD: JETSONTK1,v 1.14 2015/05/10 23:51:08 jmcneill Exp $ # # NVIDIA Jetson TK1 - Tegra K1 development kit # https://developer.nvidia.com/jetson-tk1 @@ -67,6 +67,19 @@ ukphy* at mii? phy ? com3 at tegraio? port 3 # UART-D options CONSADDR=0x70006300, CONSPEED=115200 +# I2C +tegrai2c0 at tegraio? port 0 # I2C1 +iic0 at tegrai2c0 +seeprom0 at iic0 addr 0x56 size 256 # Atmel 24C02 serial EEPROM +tegrai2c1 at tegraio? port 1 # I2C2 +iic1 at tegrai2c1 +tegrai2c2 at tegraio? port 2 # I2C3 +iic2 at tegrai2c2 +tegrai2c3 at tegraio? port 3 # I2C4 (HDMI DDC) +iic3 at tegrai2c3 +tegrai2c4 at tegraio? port 4 # I2C5 +iic4 at tegrai2c4 + # RTC tegrartc0 at tegraio? # RTC
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: mlelstv Date: Sun May 10 22:18:58 UTC 2015 Modified Files: src/sys/arch/x86/x86: x86_autoconf.c Log Message: If BTINFO_ROOTDEVICE is set but isn't a device name, then treat it as a root specification. This allows strings like wedge:wedgename. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/arch/x86/x86/x86_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/x86_autoconf.c diff -u src/sys/arch/x86/x86/x86_autoconf.c:1.72 src/sys/arch/x86/x86/x86_autoconf.c:1.73 --- src/sys/arch/x86/x86/x86_autoconf.c:1.72 Sun Sep 21 16:52:26 2014 +++ src/sys/arch/x86/x86/x86_autoconf.c Sun May 10 22:18:58 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: x86_autoconf.c,v 1.72 2014/09/21 16:52:26 christos Exp $ */ +/* $NetBSD: x86_autoconf.c,v 1.73 2015/05/10 22:18:58 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.72 2014/09/21 16:52:26 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.73 2015/05/10 22:18:58 mlelstv Exp $); #include sys/param.h #include sys/systm.h @@ -324,6 +324,7 @@ findroot(void) struct btinfo_biosgeom *big; device_t dv; deviter_t di; + static char bootspecbuf[sizeof(biv-devname)+1]; if (booted_device) return; @@ -365,6 +366,12 @@ findroot(void) deviter_release(di); if (dv != NULL) return; + + if (biv-devname[0] != '\0') { + strlcpy(bootspecbuf, biv-devname, sizeof(bootspecbuf)); + bootspec = bootspecbuf; + return; + } } bid = lookup_bootinfo(BTINFO_BOOTDISK);
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Sun May 10 22:54:06 UTC 2015 Modified Files: src/sys/dev/i2c: at24cxx.c Log Message: Many I2C drivers hold spin locks between iic_acquire_bus / iic_release_bus. Avoid sleeping while owning the I2C bus. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/dev/i2c/at24cxx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/i2c/at24cxx.c diff -u src/sys/dev/i2c/at24cxx.c:1.18 src/sys/dev/i2c/at24cxx.c:1.19 --- src/sys/dev/i2c/at24cxx.c:1.18 Fri Jul 25 08:10:37 2014 +++ src/sys/dev/i2c/at24cxx.c Sun May 10 22:54:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: at24cxx.c,v 1.18 2014/07/25 08:10:37 dholland Exp $ */ +/* $NetBSD: at24cxx.c,v 1.19 2015/05/10 22:54:06 jmcneill Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: at24cxx.c,v 1.18 2014/07/25 08:10:37 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: at24cxx.c,v 1.19 2015/05/10 22:54:06 jmcneill Exp $); #include sys/param.h #include sys/systm.h @@ -262,9 +262,6 @@ seeprom_read(dev_t dev, struct uio *uio, */ while (uio-uio_resid 0 uio-uio_offset sc-sc_size) { - if ((error = iic_acquire_bus(sc-sc_tag, 0)) != 0) - return (error); - a = (int)uio-uio_offset; if (sc-sc_cmdlen == 1) { addr = sc-sc_address + (a 8); @@ -274,6 +271,9 @@ seeprom_read(dev_t dev, struct uio *uio, cmdbuf[0] = AT24CXX_ADDR_HI(a); cmdbuf[1] = AT24CXX_ADDR_LO(a); } + + if ((error = iic_acquire_bus(sc-sc_tag, 0)) != 0) + return (error); if ((error = iic_exec(sc-sc_tag, I2C_OP_READ_WITH_STOP, addr, cmdbuf, sc-sc_cmdlen, ch, 1, 0)) != 0) { @@ -282,11 +282,11 @@ seeprom_read(dev_t dev, struct uio *uio, seeprom_read: byte read failed at 0x%x\n, a); return (error); } + iic_release_bus(sc-sc_tag, 0); + if ((error = uiomove(ch, 1, uio)) != 0) { - iic_release_bus(sc-sc_tag, 0); return (error); } - iic_release_bus(sc-sc_tag, 0); } return (0); @@ -313,9 +313,6 @@ seeprom_write(dev_t dev, struct uio *uio */ while (uio-uio_resid 0 uio-uio_offset sc-sc_size) { - if ((error = iic_acquire_bus(sc-sc_tag, 0)) != 0) - return (error); - a = (int)uio-uio_offset; if (sc-sc_cmdlen == 1) { addr = sc-sc_address + (a 8); @@ -329,6 +326,9 @@ seeprom_write(dev_t dev, struct uio *uio iic_release_bus(sc-sc_tag, 0); return (error); } + + if ((error = iic_acquire_bus(sc-sc_tag, 0)) != 0) + return (error); if ((error = iic_exec(sc-sc_tag, I2C_OP_WRITE_WITH_STOP, addr, cmdbuf, sc-sc_cmdlen, ch, 1, 0)) != 0) { @@ -337,13 +337,12 @@ seeprom_write(dev_t dev, struct uio *uio seeprom_write: byte write failed at 0x%x\n, a); return (error); } + iic_release_bus(sc-sc_tag, 0); /* Wait until the device commits the byte. */ if ((error = seeprom_wait_idle(sc)) != 0) { - iic_release_bus(sc-sc_tag, 0); return (error); } - iic_release_bus(sc-sc_tag, 0); } return (0); @@ -355,6 +354,7 @@ seeprom_wait_idle(struct seeprom_softc * uint8_t cmdbuf[2] = { 0, 0 }; int rv, timeout; u_int8_t dummy; + int error; timeout = (1000 / hz) / AT24CXX_WRITE_CYCLE_MS; if (timeout == 0) @@ -366,8 +366,15 @@ seeprom_wait_idle(struct seeprom_softc * * Read the byte at address 0. This is just a dummy * read to wait for the EEPROM's write cycle to complete. */ - while (iic_exec(sc-sc_tag, I2C_OP_READ_WITH_STOP, sc-sc_address, - cmdbuf, sc-sc_cmdlen, dummy, 1, 0)) { + for (;;) { + if ((error = iic_acquire_bus(sc-sc_tag, 0)) != 0) + return error; + error = iic_exec(sc-sc_tag, I2C_OP_READ_WITH_STOP, + sc-sc_address, cmdbuf, sc-sc_cmdlen, dummy, 1, 0); + iic_release_bus(sc-sc_tag, 0); + if (error == 0) + break; + rv = tsleep(sc, PRIBIO | PCATCH, seepromwr, timeout); if (rv != EWOULDBLOCK) return (rv);
CVS commit: [netbsd-7] src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon May 11 03:14:29 UTC 2015 Modified Files: src/sys/dev/pci [netbsd-7]: hifn7751.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #748): sys/dev/pci/hifn7751.c: revision 1.60 Defer to a callout in hifn_rng_get. Fixes lock-against-self. Still can't call rnd_add_data directly from an rndsource callback. (Still plan to fix this with further rnd rototilling.) XXX pullup netbsd-7 To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.56.2.1 src/sys/dev/pci/hifn7751.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/hifn7751.c diff -u src/sys/dev/pci/hifn7751.c:1.56 src/sys/dev/pci/hifn7751.c:1.56.2.1 --- src/sys/dev/pci/hifn7751.c:1.56 Sun Aug 10 16:44:35 2014 +++ src/sys/dev/pci/hifn7751.c Mon May 11 03:14:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: hifn7751.c,v 1.56 2014/08/10 16:44:35 tls Exp $ */ +/* $NetBSD: hifn7751.c,v 1.56.2.1 2015/05/11 03:14:29 msaitoh Exp $ */ /* $FreeBSD: hifn7751.c,v 1.5.2.7 2003/10/08 23:52:00 sam Exp $ */ /* $OpenBSD: hifn7751.c,v 1.140 2003/08/01 17:55:54 deraadt Exp $ */ @@ -48,7 +48,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hifn7751.c,v 1.56 2014/08/10 16:44:35 tls Exp $); +__KERNEL_RCSID(0, $NetBSD: hifn7751.c,v 1.56.2.1 2015/05/11 03:14:29 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -537,8 +537,7 @@ hifn_rng_get(size_t bytes, void *priv) mutex_enter(sc-sc_mtx); sc-sc_rng_need = bytes; - - hifn_rng_locked(sc); + callout_reset(sc-sc_rngto, 0, hifn_rng, sc); mutex_exit(sc-sc_mtx); }
CVS commit: src/bin/sh
Module Name:src Committed By: joerg Date: Sun May 10 20:30:54 UTC 2015 Modified Files: src/bin/sh: Makefile builtins.def Log Message: Include printf by default even for SMALL builds. It is used e.g. by dhcpcd and as such required by most ramdisk images. Allow turning it off again by TINYPROG. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/bin/sh/Makefile cvs rdiff -u -r1.22 -r1.23 src/bin/sh/builtins.def Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/Makefile diff -u src/bin/sh/Makefile:1.100 src/bin/sh/Makefile:1.101 --- src/bin/sh/Makefile:1.100 Sat Jul 5 23:13:41 2014 +++ src/bin/sh/Makefile Sun May 10 20:30:54 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.100 2014/07/05 23:13:41 dholland Exp $ +# $NetBSD: Makefile,v 1.101 2015/05/10 20:30:54 joerg Exp $ # @(#)Makefile 8.4 (Berkeley) 5/5/95 .include bsd.own.mk @@ -42,6 +42,9 @@ CPPFLAGS+=-DSHELL -I. -I${.CURDIR} .ifdef SMALLPROG CPPFLAGS+=-DSMALL +.endif +.ifdef TINYPROG +CPPFLAGS+=-DTINY .else SRCS+=printf.c .endif Index: src/bin/sh/builtins.def diff -u src/bin/sh/builtins.def:1.22 src/bin/sh/builtins.def:1.23 --- src/bin/sh/builtins.def:1.22 Mon Dec 31 14:10:15 2012 +++ src/bin/sh/builtins.def Sun May 10 20:30:54 2015 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: builtins.def,v 1.22 2012/12/31 14:10:15 dsl Exp $ +# $NetBSD: builtins.def,v 1.23 2015/05/10 20:30:54 joerg Exp $ # # Copyright (c) 1991, 1993 # The Regents of the University of California. All rights reserved. @@ -66,7 +66,7 @@ hashcmd hash jobidcmd jobid jobscmd -u jobs localcmd local -#ifndef SMALL +#ifndef TINY printfcmd printf #endif pwdcmd -u pwd
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: pgoyette Date: Mon May 11 01:05:16 UTC 2015 Modified Files: src/distrib/sets/lists/modules: mi Log Message: Additional commentary for where other duplicate entries might need to be made (amd64-xen, i386-xen, and i386-xen-pae). To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/distrib/sets/lists/modules/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/mi diff -u src/distrib/sets/lists/modules/mi:1.76 src/distrib/sets/lists/modules/mi:1.77 --- src/distrib/sets/lists/modules/mi:1.76 Sun May 10 07:50:31 2015 +++ src/distrib/sets/lists/modules/mi Mon May 11 01:05:16 2015 @@ -1,10 +1,12 @@ -# $NetBSD: mi,v 1.76 2015/05/10 07:50:31 pgoyette Exp $ +# $NetBSD: mi,v 1.77 2015/05/11 01:05:16 pgoyette Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # # IMPORTANT: When you add a module here, you have to add it twice to # md.evbppc as well. evbppc does not use mi, because # powerpc-4xx and powerpc-booke modules are incompatible. +# Additionally, you may have to add it once more in md.amd64 +# (for xen) and twice more for i386 (xen and xen-pae). # Sorry for any inconvenience this may cause, the management. # ./@MODULEDIR@ base-kernel-modules kmod
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun May 10 13:24:12 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: JETSONTK1 Log Message: half-attached sdhc breaks reset for some reason, so disable eMMC until we fix it To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/JETSONTK1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/JETSONTK1 diff -u src/sys/arch/evbarm/conf/JETSONTK1:1.12 src/sys/arch/evbarm/conf/JETSONTK1:1.13 --- src/sys/arch/evbarm/conf/JETSONTK1:1.12 Thu May 7 23:55:31 2015 +++ src/sys/arch/evbarm/conf/JETSONTK1 Sun May 10 13:24:11 2015 @@ -1,5 +1,5 @@ # -# $NetBSD: JETSONTK1,v 1.12 2015/05/07 23:55:31 jmcneill Exp $ +# $NetBSD: JETSONTK1,v 1.13 2015/05/10 13:24:11 jmcneill Exp $ # # NVIDIA Jetson TK1 - Tegra K1 development kit # https://developer.nvidia.com/jetson-tk1 @@ -73,10 +73,10 @@ tegrartc0 at tegraio? # RTC # SDMMC sdhc2 at tegraio? port 2 # SDMMC3 (SD card) sdmmc2 at sdhc2 -sdhc3 at tegraio? port 3 # SDMMC4 (eMMC) -sdmmc3 at sdhc3 +#sdhc3 at tegraio? port 3 # SDMMC4 (eMMC) +#sdmmc3 at sdhc3 -ld0 at sdmmc3 # eMMC +#ld0 at sdmmc3 # eMMC ld1 at sdmmc2 # SD card # SATA
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: pgoyette Date: Sun May 10 07:50:31 UTC 2015 Modified Files: src/distrib/sets/lists/modules: md.amd64 md.evbppc.powerpc md.i386 mi Log Message: Update sets lists for new compat_sysv module. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/modules/md.evbppc.powerpc cvs rdiff -u -r1.64 -r1.65 src/distrib/sets/lists/modules/md.i386 cvs rdiff -u -r1.75 -r1.76 src/distrib/sets/lists/modules/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/md.amd64 diff -u src/distrib/sets/lists/modules/md.amd64:1.59 src/distrib/sets/lists/modules/md.amd64:1.60 --- src/distrib/sets/lists/modules/md.amd64:1.59 Sun May 3 02:55:04 2015 +++ src/distrib/sets/lists/modules/md.amd64 Sun May 10 07:50:31 2015 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.59 2015/05/03 02:55:04 pgoyette Exp $ +# $NetBSD: md.amd64,v 1.60 2015/05/10 07:50:31 pgoyette Exp $ # # NOTE that there are two sets of files here: # @MODULEDIR@ and amd64-xen @@ -236,6 +236,8 @@ ./stand/amd64-xen/@OSRELEASE@/modules/coda5/coda5.kmod base-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/compatbase-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/compat/compat.kmod base-kernel-modules kmod,compatmodules +./stand/amd64-xen/@OSRELEASE@/modules/compat_sysv base-kernel-modules kmod,compatmodules +./stand/amd64-xen/@OSRELEASE@/modules/compat_sysv/compat_sysv.kmod base-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/compat_linux base-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/compat_linux/compat_linux.kmod base-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/compat_linux32 base-kernel-modules kmod,compatmodules Index: src/distrib/sets/lists/modules/md.evbppc.powerpc diff -u src/distrib/sets/lists/modules/md.evbppc.powerpc:1.7 src/distrib/sets/lists/modules/md.evbppc.powerpc:1.8 --- src/distrib/sets/lists/modules/md.evbppc.powerpc:1.7 Thu Apr 23 23:22:39 2015 +++ src/distrib/sets/lists/modules/md.evbppc.powerpc Sun May 10 07:50:31 2015 @@ -1,4 +1,4 @@ -# $NetBSD: md.evbppc.powerpc,v 1.7 2015/04/23 23:22:39 pgoyette Exp $ +# $NetBSD: md.evbppc.powerpc,v 1.8 2015/05/10 07:50:31 pgoyette Exp $ ./stand/powerpc-4xx base-kernel-modules kmod,compatmodules ./stand/powerpc-4xx/@OSRELEASE@ base-kernel-modules kmod,compatmodules ./stand/powerpc-4xx/@OSRELEASE@/modules base-kernel-modules kmod,compatmodules @@ -32,6 +32,8 @@ ./stand/powerpc-4xx/@OSRELEASE@/modules/coda5/coda5.kmod base-kernel-modules kmod,compatmodules ./stand/powerpc-4xx/@OSRELEASE@/modules/compatbase-kernel-modules kmod,compatmodules ./stand/powerpc-4xx/@OSRELEASE@/modules/compat/compat.kmod base-kernel-modules kmod,compatmodules +./stand/powerpc-4xx/@OSRELEASE@/modules/compat_sysv base-kernel-modules kmod,compatmodules +./stand/powerpc-4xx/@OSRELEASE@/modules/compat_sysv/compat_sysv.kmod base-kernel-modules kmod,compatmodules ./stand/powerpc-4xx/@OSRELEASE@/modules/compat_ossaudio base-kernel-modules kmod,compatmodules ./stand/powerpc-4xx/@OSRELEASE@/modules/compat_ossaudio/compat_ossaudio.kmod base-kernel-modules kmod,compatmodules ./stand/powerpc-4xx/@OSRELEASE@/modules/coredump base-kernel-modules kmod,compatmodules @@ -285,6 +287,8 @@ ./stand/powerpc-booke/@OSRELEASE@/modules/coda5/coda5.kmod base-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/compatbase-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/compat/compat.kmod base-kernel-modules kmod,compatmodules +./stand/powerpc-booke/@OSRELEASE@/modules/compat_sysv base-kernel-modules kmod,compatmodules +./stand/powerpc-booke/@OSRELEASE@/modules/compat_sysv/compat_sysv.kmod base-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/compat_ossaudio base-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/compat_ossaudio/compat_ossaudio.kmod base-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/coredumpbase-kernel-modules kmod,compatmodules Index: src/distrib/sets/lists/modules/md.i386 diff -u src/distrib/sets/lists/modules/md.i386:1.64 src/distrib/sets/lists/modules/md.i386:1.65 --- src/distrib/sets/lists/modules/md.i386:1.64 Sun May 3 21:59:23 2015 +++ src/distrib/sets/lists/modules/md.i386 Sun May 10 07:50:31 2015 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.64 2015/05/03 21:59:23 pgoyette Exp $ +# $NetBSD: md.i386,v 1.65 2015/05/10 07:50:31 pgoyette Exp $ # # NOTE that there are three sets of files here: # @MODULEDIR@, i386-xen, and i386pae-xen @@ -262,6 +262,8 @@ ./stand/i386-xen/@OSRELEASE@/modules/coda5/coda5.kmod base-kernel-modules kmod,compatmodules
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sun May 10 09:13:15 UTC 2015 Modified Files: src/usr.sbin/sysinst: Makefile.inc Log Message: Sort DBG vs CPPFLAGS in the DEBUG case, as requested by Christos To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/Makefile.inc diff -u src/usr.sbin/sysinst/Makefile.inc:1.6 src/usr.sbin/sysinst/Makefile.inc:1.7 --- src/usr.sbin/sysinst/Makefile.inc:1.6 Sat May 9 06:15:42 2015 +++ src/usr.sbin/sysinst/Makefile.inc Sun May 10 09:13:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.6 2015/05/09 06:15:42 martin Exp $ +# $NetBSD: Makefile.inc,v 1.7 2015/05/10 09:13:15 martin Exp $ # # Makefile for sysinst @@ -6,10 +6,6 @@ .include ${.CURDIR}/../../../Makefile.inc .endif -.if empty(DBG:M-g) -COPTS += -Os -.endif - PROG= sysinst NOMAN= # defined @@ -60,7 +56,12 @@ CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.C # when compiling with -O0) O0TRACKING= -fvar-tracking-assignments -fvar-tracking .endif -CPPFLAGS+=-DDEBUG -g -O0 ${O0TRACKING} +CPPFLAGS+=-DDEBUG +DBG +=-g -O0 ${O0TRACKING} +.endif + +.if empty(DBG:M-g) +COPTS += -Os .endif .if (!defined(SMALLPROG) || defined(SMALLPROG_INET6)) (${USE_INET6} != no)
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Sun May 10 10:14:03 UTC 2015 Modified Files: src/usr.sbin/sysinst: configmenu.c defs.h disks.c install.c label.c mbr.c menus.mi net.c partman.c upgrade.c util.c src/usr.sbin/sysinst/arch/arc: md.c src/usr.sbin/sysinst/arch/atari: md.c src/usr.sbin/sysinst/arch/cobalt: md.c src/usr.sbin/sysinst/arch/emips: md.c src/usr.sbin/sysinst/arch/evbarm: md.c src/usr.sbin/sysinst/arch/evbarm64: md.c src/usr.sbin/sysinst/arch/hp300: md.c src/usr.sbin/sysinst/arch/i386: md.c src/usr.sbin/sysinst/arch/mac68k: md.c src/usr.sbin/sysinst/arch/mvme68k: md.c src/usr.sbin/sysinst/arch/ofppc: md.c src/usr.sbin/sysinst/arch/prep: md.c src/usr.sbin/sysinst/arch/x68k: md.c Log Message: Backout the previous incorrect fix for PR 49440 and redo it more globaly: get rid of the global yesno, introduce utility functions ask_yesno() and ask_noyes() instead, greatly simplifying a lot of code. Pass in a pointer to the return value to various set source menus. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/configmenu.c \ src/usr.sbin/sysinst/install.c src/usr.sbin/sysinst/upgrade.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/disks.c \ src/usr.sbin/sysinst/menus.mi cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/label.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/mbr.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/sysinst/net.c cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/sysinst/partman.c cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/util.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/arc/md.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/atari/md.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/cobalt/md.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/emips/md.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/evbarm/md.c cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/evbarm64/md.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/hp300/md.c cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/arch/i386/md.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/mac68k/md.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/mvme68k/md.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/ofppc/md.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/prep/md.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/x68k/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/configmenu.c diff -u src/usr.sbin/sysinst/configmenu.c:1.3 src/usr.sbin/sysinst/configmenu.c:1.4 --- src/usr.sbin/sysinst/configmenu.c:1.3 Tue Jan 20 21:51:05 2015 +++ src/usr.sbin/sysinst/configmenu.c Sun May 10 10:14:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: configmenu.c,v 1.3 2015/01/20 21:51:05 snj Exp $ */ +/* $NetBSD: configmenu.c,v 1.4 2015/05/10 10:14:02 martin Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -258,8 +258,7 @@ add_new_user(struct menudesc *menu, void msg_prompt(MSG_addusername, NULL, username, sizeof username -1); if (strlen(username) == 0) return 0; - process_menu(MENU_yesno, deconst(MSG_addusertowheel)); - inwheel = yesno; + inwheel = ask_yesno(deconst(MSG_addusertowheel)); ushell = /bin/csh; process_menu(MENU_usersh, NULL); if (inwheel) @@ -280,8 +279,7 @@ change_root_password(struct menudesc *me configinfo **confp = arg; msg_display(MSG_rootpw); - process_menu(MENU_yesno, NULL); - if (yesno) { + if (ask_yesno(NULL)) { if (run_program(RUN_DISPLAY | RUN_PROGRESS | RUN_CHROOT, passwd -l root) == 0) confp[menu-cursel]-setting = MSG_password_set; @@ -298,11 +296,13 @@ set_binpkg(struct menudesc *menu, void * char additional_pkgs[STRSIZE] = {0}; char pattern[STRSIZE]; int allok = 0; + arg_rv parm; do { - yesno = -1; - process_menu(MENU_binpkg, additional_pkgs); - if (yesno == SET_SKIP) { + parm.rv = -1; + parm.arg = additional_pkgs; + process_menu(MENU_binpkg, parm); + if (parm.rv == SET_SKIP) { confp[menu-cursel]-setting = MSG_abandoned; return 0; } @@ -354,8 +354,7 @@ set_pkgsrc(struct menudesc *menu, void * confp[menu-cursel]-setting = MSG_abandoned; return 0; } - process_menu(MENU_yesno, deconst(MSG_retry_pkgsrc_network)); - if (!yesno) { + if (!ask_yesno(deconst(MSG_retry_pkgsrc_network))) { confp[menu-cursel]-setting = MSG_abandoned; return 1; } Index: src/usr.sbin/sysinst/install.c diff -u src/usr.sbin/sysinst/install.c:1.3 src/usr.sbin/sysinst/install.c:1.4 --- src/usr.sbin/sysinst/install.c:1.3 Fri Jan 2 19:43:13 2015 +++ src/usr.sbin/sysinst/install.c Sun May 10 10:14:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: install.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */ +/* $NetBSD: install.c,v 1.4 2015/05/10 10:14:02 martin Exp $ */ /* * Copyright 1997 Piermont
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun May 10 11:04:59 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_car.c tegra_carreg.h tegra_hdaudio.c tegra_var.h Added Files: src/sys/arch/arm/nvidia: tegra_hdaudioreg.h Log Message: Tegra HD audio support (untested as it is for HDMI output) To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/nvidia/tegra_car.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/nvidia/tegra_carreg.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nvidia/tegra_hdaudio.c cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_hdaudioreg.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/nvidia/tegra_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/nvidia/tegra_car.c diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.6 src/sys/arch/arm/nvidia/tegra_car.c:1.7 --- src/sys/arch/arm/nvidia/tegra_car.c:1.6 Sat May 9 18:56:51 2015 +++ src/sys/arch/arm/nvidia/tegra_car.c Sun May 10 11:04:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_car.c,v 1.6 2015/05/09 18:56:51 jmcneill Exp $ */ +/* $NetBSD: tegra_car.c,v 1.7 2015/05/10 11:04:59 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.6 2015/05/09 18:56:51 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.7 2015/05/10 11:04:59 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -371,3 +371,33 @@ tegra_car_utmip_enable(u_int port) tegra_reg_set_clear(bst, bsh, CAR_UTMIP_PLL_CFG2_REG, 0, bit); } + +void +tegra_car_periph_hda_enable(void) +{ + bus_space_tag_t bst; + bus_space_handle_t bsh; + + tegra_car_get_bs(bst, bsh); + + /* HDA */ + bus_space_write_4(bst, bsh, CAR_RST_DEV_V_SET_REG, CAR_DEV_V_HDA); + bus_space_write_4(bst, bsh, CAR_CLK_ENB_V_SET_REG, CAR_DEV_V_HDA); + bus_space_write_4(bst, bsh, CAR_RST_DEV_V_CLR_REG, CAR_DEV_V_HDA); + + /* HDA2CODEC_2X */ + bus_space_write_4(bst, bsh, CAR_RST_DEV_V_SET_REG, + CAR_DEV_V_HDA2CODEC_2X); + bus_space_write_4(bst, bsh, CAR_CLK_ENB_V_SET_REG, + CAR_DEV_V_HDA2CODEC_2X); + bus_space_write_4(bst, bsh, CAR_RST_DEV_V_CLR_REG, + CAR_DEV_V_HDA2CODEC_2X); + + /* HDA2HDMICODEC */ + bus_space_write_4(bst, bsh, CAR_RST_DEV_W_SET_REG, + CAR_DEV_W_HDA2HDMICODEC); + bus_space_write_4(bst, bsh, CAR_CLK_ENB_W_SET_REG, + CAR_DEV_W_HDA2HDMICODEC); + bus_space_write_4(bst, bsh, CAR_RST_DEV_W_CLR_REG, + CAR_DEV_W_HDA2HDMICODEC); +} Index: src/sys/arch/arm/nvidia/tegra_carreg.h diff -u src/sys/arch/arm/nvidia/tegra_carreg.h:1.7 src/sys/arch/arm/nvidia/tegra_carreg.h:1.8 --- src/sys/arch/arm/nvidia/tegra_carreg.h:1.7 Sat May 9 18:56:51 2015 +++ src/sys/arch/arm/nvidia/tegra_carreg.h Sun May 10 11:04:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_carreg.h,v 1.7 2015/05/09 18:56:51 jmcneill Exp $ */ +/* $NetBSD: tegra_carreg.h,v 1.8 2015/05/10 11:04:59 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -125,6 +125,10 @@ #define CAR_RST_DEV_H_CLR_REG 0x30c #define CAR_RST_DEV_U_SET_REG 0x310 #define CAR_RST_DEV_U_CLR_REG 0x314 +#define CAR_RST_DEV_V_SET_REG 0x430 +#define CAR_RST_DEV_V_CLR_REG 0x434 +#define CAR_RST_DEV_W_SET_REG 0x438 +#define CAR_RST_DEV_W_CLR_REG 0x43c #define CAR_CLK_ENB_L_SET_REG 0x320 #define CAR_CLK_ENB_L_CLR_REG 0x324 @@ -132,6 +136,10 @@ #define CAR_CLK_ENB_H_CLR_REG 0x32c #define CAR_CLK_ENB_U_SET_REG 0x330 #define CAR_CLK_ENB_U_CLR_REG 0x334 +#define CAR_CLK_ENB_V_SET_REG 0x440 +#define CAR_CLK_ENB_V_CLR_REG 0x444 +#define CAR_CLK_ENB_W_SET_REG 0x448 +#define CAR_CLK_ENB_W_CLR_REG 0x44c #define CAR_DEV_L_CACHE2 __BIT(31) #define CAR_DEV_L_I2S0 __BIT(30) @@ -213,6 +221,35 @@ #define CAR_DEV_H_AHBDMA __BIT(1) #define CAR_DEV_H_MEM __BIT(0) +#define CAR_DEV_V_HDA __BIT(29) +#define CAR_DEV_V_SATA __BIT(28) +#define CAR_DEV_V_ACTMON __BIT(23) +#define CAR_DEV_V_ATOMICS __BIT(16) +#define CAR_DEV_V_HDA2CODEC_2X __BIT(15) +#define CAR_DEV_V_DAM2 __BIT(14) +#define CAR_DEV_V_DAM1 __BIT(13) +#define CAR_DEV_V_DAM0 __BIT(12) +#define CAR_DEV_V_APBIF __BIT(11) +#define CAR_DEV_V_AUDIO __BIT(10) +#define CAR_DEV_V_SPI6 __BIT(9) +#define CAR_DEV_V_SPI5 __BIT(8) +#define CAR_DEV_V_I2C4 __BIT(7) +#define CAR_DEV_V_I2S4 __BIT(6) +#define CAR_DEV_V_I2S3 __BIT(5) +#define CAR_DEV_V_MSELECT __BIT(3) +#define CAR_DEV_V_CPULP __BIT(1) +#define CAR_DEV_V_CPUG __BIT(0) + +#define CAR_DEV_W_XUSB_SS __BIT(28) +#define CAR_DEV_W_DVFS __BIT(27) +#define CAR_DEV_W_ADX0 __BIT(26) +#define CAR_DEV_W_AMX0 __BIT(25) +#define CAR_DEV_W_ENTROPY __BIT(21) +#define CAR_DEV_W_XUSB_PADCTL __BIT(14) +#define CAR_DEV_W_CEC __BIT(8) +#define CAR_DEV_W_SATACOLD __BIT(1) +#define CAR_DEV_W_HDA2HDMICODEC __BIT(0) + #define CAR_UTMIP_PLL_CFG0_REG 0x480
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun May 10 11:12:07 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_carreg.h Log Message: correct CAR_PLLX_MISC_REG value To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/nvidia/tegra_carreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/nvidia/tegra_carreg.h diff -u src/sys/arch/arm/nvidia/tegra_carreg.h:1.8 src/sys/arch/arm/nvidia/tegra_carreg.h:1.9 --- src/sys/arch/arm/nvidia/tegra_carreg.h:1.8 Sun May 10 11:04:59 2015 +++ src/sys/arch/arm/nvidia/tegra_carreg.h Sun May 10 11:12:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_carreg.h,v 1.8 2015/05/10 11:04:59 jmcneill Exp $ */ +/* $NetBSD: tegra_carreg.h,v 1.9 2015/05/10 11:12:07 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -87,7 +87,7 @@ #define CAR_PLLX_BASE_DIVN __BITS(15,8) #define CAR_PLLX_BASE_DIVM __BITS(7,0) -#define CAR_PLLX_MISC_REG 0xe8 +#define CAR_PLLX_MISC_REG 0xe4 #define CAR_CLKSRC_UARTA_REG 0x178 #define CAR_CLKSRC_UARTB_REG 0x17c
CVS commit: src/sys/modules/compat_netbsd32
Module Name:src Committed By: matt Date: Sun May 10 06:33:28 UTC 2015 Modified Files: src/sys/modules/compat_netbsd32: Makefile Log Message: mips doesn't do a.out and never has. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/modules/compat_netbsd32/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/compat_netbsd32/Makefile diff -u src/sys/modules/compat_netbsd32/Makefile:1.12 src/sys/modules/compat_netbsd32/Makefile:1.13 --- src/sys/modules/compat_netbsd32/Makefile:1.12 Fri Dec 5 22:22:21 2014 +++ src/sys/modules/compat_netbsd32/Makefile Sun May 10 06:33:28 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2014/12/05 22:22:21 christos Exp $ +# $NetBSD: Makefile,v 1.13 2015/05/10 06:33:28 matt Exp $ .include ../Makefile.inc .include ../Makefile.assym @@ -19,7 +19,7 @@ CPPFLAGS+= -DCOMPAT_30 -DCOMPAT_40 -DCOM CPPFLAGS+= -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80 CPPFLAGS+= -DCOMPAT_43 CPPFLAGS+= -DSYSVSHM -DSYSVSEM -DSYSVMSG -DCOMPAT_NETBSD32 -CPPFLAGS+= -DEXEC_ELF32 -DEXEC_ELF64 -DEXEC_AOUT -DCOMPAT_NOMID +CPPFLAGS+= -DEXEC_ELF32 -DEXEC_ELF64 CPPFLAGS+= -DCOREDUMP -DNTP .PATH: ${S}/compat/netbsd32 @@ -29,7 +29,7 @@ SRCS+= netbsd32_compat_14.c netbsd32_com SRCS+= netbsd32_compat_30.c netbsd32_compat_43.c SRCS+= netbsd32_compat_50.c netbsd32_compat_60.c SRCS+= netbsd32_core.c netbsd32_event.c -SRCS+= netbsd32_exec_aout.c netbsd32_exec_elf32.c +SRCS+= netbsd32_exec_elf32.c SRCS+= netbsd32_execve.c netbsd32_fs.c SRCS+= netbsd32_ioctl.c netbsd32_ipc.c SRCS+= netbsd32_lwp.c netbsd32_netbsd.c @@ -40,6 +40,11 @@ SRCS+= netbsd32_sysctl.c netbsd32_sysent SRCS+= netbsd32_time.c netbsd32_wait.c SRCS+= netbsd32_mod.c +.if ${MACHINE_CPU} != mips ${MACHINE_CPU} != powerpc +CPPFLAGS+= -DEXEC_AOUT -DCOMPAT_NOMID +SRCS+= netbsd32_exec_aout.c +.endif + .if ${MACHINE_ARCH} == x86_64 .PATH: ${S}/arch/amd64/amd64 SRCS+= netbsd32_machdep.c netbsd32_sigcode.S netbsd32_syscall.c
CVS commit: src/sys
Module Name:src Committed By: pgoyette Date: Sun May 10 07:41:16 UTC 2015 Modified Files: src/sys/compat/common: compat_mod.c sysv_ipc_50.c src/sys/kern: files.kern syscalls.master sysv_ipc.c src/sys/modules: Makefile src/sys/modules/compat: Makefile src/sys/sys: ipc.h Added Files: src/sys/compat/common: compat_sysv_mod.c src/sys/modules/compat_sysv: Makefile Log Message: Split the SYSV* compat code out into a separate compat_sysv module. For monolithic kernels, both modules will be compiled as built-ins, while modular environments will be able to load the SYSVSEM, SYSVSHM, and SYSVMSG code independant from the rest of compat. This is a necessary precursor step to making the STD SYSV* code into a separate module. Tested in both monolithic and modular environments with no errors seen. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/compat/common/compat_mod.c cvs rdiff -u -r0 -r1.1 src/sys/compat/common/compat_sysv_mod.c cvs rdiff -u -r1.2 -r1.3 src/sys/compat/common/sysv_ipc_50.c cvs rdiff -u -r1.5 -r1.6 src/sys/kern/files.kern cvs rdiff -u -r1.275 -r1.276 src/sys/kern/syscalls.master cvs rdiff -u -r1.25 -r1.26 src/sys/kern/sysv_ipc.c cvs rdiff -u -r1.151 -r1.152 src/sys/modules/Makefile cvs rdiff -u -r1.11 -r1.12 src/sys/modules/compat/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_sysv/Makefile cvs rdiff -u -r1.33 -r1.34 src/sys/sys/ipc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/compat_mod.c diff -u src/sys/compat/common/compat_mod.c:1.20 src/sys/compat/common/compat_mod.c:1.21 --- src/sys/compat/common/compat_mod.c:1.20 Thu Sep 19 18:50:35 2013 +++ src/sys/compat/common/compat_mod.c Sun May 10 07:41:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_mod.c,v 1.20 2013/09/19 18:50:35 christos Exp $ */ +/* $NetBSD: compat_mod.c,v 1.21 2015/05/10 07:41:15 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.20 2013/09/19 18:50:35 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.21 2015/05/10 07:41:15 pgoyette Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -60,12 +60,15 @@ __KERNEL_RCSID(0, $NetBSD: compat_mod.c #include compat/common/compat_util.h #include compat/common/compat_mod.h +#ifdef _MODULE #if defined(COMPAT_09) || defined(COMPAT_43) || defined(COMPAT_50) static struct sysctllog *compat_clog = NULL; #endif +#endif MODULE(MODULE_CLASS_EXEC, compat, NULL); +#ifdef _MODULE int ttcompat(struct tty *, u_long, void *, int, struct lwp *); #ifdef COMPAT_16 @@ -153,18 +156,6 @@ static const struct syscall_package comp { SYS_compat_13_sigsuspend13, 0, (sy_call_t *)compat_13_sys_sigsuspend }, #endif -#if defined(COMPAT_14) -# if defined(SYSVSEM) - { SYS_compat_14___semctl, 0, (sy_call_t *)compat_14_sys___semctl }, -# endif -# if defined(SYSVMSG) - { SYS_compat_14_msgctl, 0, (sy_call_t *)compat_14_sys_msgctl }, -# endif -# if defined(SYSVSHM) - { SYS_compat_14_shmctl, 0, (sy_call_t *)compat_14_sys_shmctl }, -# endif -#endif - #if defined(COMPAT_16) #if defined(COMPAT_SIGCONTEXT) { SYS_compat_16___sigaction14, 0, (sy_call_t *)compat_16_sys___sigaction14 }, @@ -220,15 +211,6 @@ static const struct syscall_package comp { SYS_compat_50_mq_timedsend, 0, (sy_call_t *)compat_50_sys_mq_timedsend }, { SYS_compat_50_mq_timedreceive, 0, (sy_call_t *)compat_50_sys_mq_timedreceive }, { SYS_compat_50_lutimes, 0, (sy_call_t *)compat_50_sys_lutimes }, -# if defined(SYSVSEM) - { SYS_compat_50_semctl13, 0, (sy_call_t *)compat_50_sys_semctl13 }, -# endif -# if defined(SYSVMSG) - { SYS_compat_50___msgctl13, 0, (sy_call_t *)compat_50_sys___msgctl13 }, -# endif -# if defined(SYSVSHM) - { SYS_compat_50___shmctl13, 0, (sy_call_t *)compat_50_sys___shmctl13 }, -# endif { SYS_compat_50__lwp_park, 0, (sy_call_t *)compat_50_sys__lwp_park }, { SYS_compat_50_kevent, 0, (sy_call_t *)compat_50_sys_kevent }, { SYS_compat_50_pselect, 0, (sy_call_t *)compat_50_sys_pselect }, @@ -248,10 +230,12 @@ static const struct syscall_package comp #endif { 0, 0, NULL }, }; +#endif /* _MODULE */ static int compat_modcmd(modcmd_t cmd, void *arg) { +#ifdef _MODULE #ifdef COMPAT_16 proc_t *p; #endif @@ -342,8 +326,18 @@ compat_modcmd(modcmd_t cmd, void *arg) default: return ENOTTY; } +#else /* _MODULE */ + switch (cmd) { + case MODULE_CMD_INIT: + case MODULE_CMD_FINI: + return 0; + default: + return ENOTTY; + } +#endif } +#ifdef _MODULE void compat_sysctl_init(void) { @@ -364,3 +358,4 @@ compat_sysctl_fini(void) sysctl_teardown(compat_clog); #endif } +#endif Index: src/sys/compat/common/sysv_ipc_50.c diff -u src/sys/compat/common/sysv_ipc_50.c:1.2 src/sys/compat/common/sysv_ipc_50.c:1.3 ---
CVS commit: src/sys
Module Name:src Committed By: pgoyette Date: Sun May 10 08:13:41 UTC 2015 Modified Files: src/sys/kern: init_sysent.c syscalls.c syscalls_autoload.c systrace_args.c src/sys/rump/include/rump: rump_syscalls.h src/sys/rump/librump/rumpkern: rump_syscalls.c src/sys/sys: syscall.h syscallargs.h Log Message: Regen for changes related to separation of compat_sysv syscalls into a separate module. To generate a diff of this commit: cvs rdiff -u -r1.295 -r1.296 src/sys/kern/init_sysent.c cvs rdiff -u -r1.284 -r1.285 src/sys/kern/syscalls.c cvs rdiff -u -r1.2 -r1.3 src/sys/kern/syscalls_autoload.c cvs rdiff -u -r1.4 -r1.5 src/sys/kern/systrace_args.c cvs rdiff -u -r1.85 -r1.86 src/sys/rump/include/rump/rump_syscalls.h cvs rdiff -u -r1.110 -r1.111 src/sys/rump/librump/rumpkern/rump_syscalls.c cvs rdiff -u -r1.279 -r1.280 src/sys/sys/syscall.h cvs rdiff -u -r1.263 -r1.264 src/sys/sys/syscallargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/init_sysent.c diff -u src/sys/kern/init_sysent.c:1.295 src/sys/kern/init_sysent.c:1.296 --- src/sys/kern/init_sysent.c:1.295 Sat May 9 06:06:14 2015 +++ src/sys/kern/init_sysent.c Sun May 10 08:13:41 2015 @@ -1,14 +1,14 @@ -/* $NetBSD: init_sysent.c,v 1.295 2015/05/09 06:06:14 pgoyette Exp $ */ +/* $NetBSD: init_sysent.c,v 1.296 2015/05/10 08:13:41 pgoyette Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.275 2015/05/09 06:04:13 pgoyette Exp + * created from NetBSD: syscalls.master,v 1.276 2015/05/10 07:41:15 pgoyette Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.295 2015/05/09 06:06:14 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.296 2015/05/10 08:13:41 pgoyette Exp $); #include opt_modular.h #include opt_ntp.h Index: src/sys/kern/syscalls.c diff -u src/sys/kern/syscalls.c:1.284 src/sys/kern/syscalls.c:1.285 --- src/sys/kern/syscalls.c:1.284 Sat May 9 06:06:14 2015 +++ src/sys/kern/syscalls.c Sun May 10 08:13:41 2015 @@ -1,14 +1,14 @@ -/* $NetBSD: syscalls.c,v 1.284 2015/05/09 06:06:14 pgoyette Exp $ */ +/* $NetBSD: syscalls.c,v 1.285 2015/05/10 08:13:41 pgoyette Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.275 2015/05/09 06:04:13 pgoyette Exp + * created from NetBSD: syscalls.master,v 1.276 2015/05/10 07:41:15 pgoyette Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.284 2015/05/09 06:06:14 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: syscalls.c,v 1.285 2015/05/10 08:13:41 pgoyette Exp $); #if defined(_KERNEL_OPT) #include opt_modular.h Index: src/sys/kern/syscalls_autoload.c diff -u src/sys/kern/syscalls_autoload.c:1.2 src/sys/kern/syscalls_autoload.c:1.3 --- src/sys/kern/syscalls_autoload.c:1.2 Sat May 9 06:06:14 2015 +++ src/sys/kern/syscalls_autoload.c Sun May 10 08:13:41 2015 @@ -1,14 +1,14 @@ -/* $NetBSD: syscalls_autoload.c,v 1.2 2015/05/09 06:06:14 pgoyette Exp $ */ +/* $NetBSD: syscalls_autoload.c,v 1.3 2015/05/10 08:13:41 pgoyette Exp $ */ /* * System call autoload table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.275 2015/05/09 06:04:13 pgoyette Exp + * created from NetBSD: syscalls.master,v 1.276 2015/05/10 07:41:15 pgoyette Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: syscalls_autoload.c,v 1.2 2015/05/09 06:06:14 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: syscalls_autoload.c,v 1.3 2015/05/10 08:13:41 pgoyette Exp $); static struct { u_int al_code; @@ -78,15 +78,15 @@ static struct { { SYS_compat_09_osetdomainname, compat }, { SYS_compat_09_ouname, compat }, #if !defined(_LP64) - { SYS_compat_10_osemsys, compat }, + { SYS_compat_10_osemsys, compat_sysv }, #else #endif #if !defined(_LP64) - { SYS_compat_10_omsgsys, compat }, + { SYS_compat_10_omsgsys, compat_sysv }, #else #endif #if !defined(_LP64) - { SYS_compat_10_oshmsys, compat }, + { SYS_compat_10_oshmsys, compat_sysv }, #else #endif { SYS_lfs_bmapv, lfs }, @@ -99,9 +99,9 @@ static struct { { SYS_compat_12_getdirentries, compat }, { SYS_compat_50_futimes, compat }, { SYS_afssys, openafs }, - { SYS_compat_14___semctl, compat }, - { SYS_compat_14_msgctl, compat }, - { SYS_compat_14_shmctl, compat }, + { SYS_compat_14___semctl, compat_sysv }, + { SYS_compat_14_msgctl, compat_sysv }, + { SYS_compat_14_shmctl, compat_sysv }, { SYS_compat_50_clock_gettime, compat }, { SYS_compat_50_clock_settime, compat }, { SYS_compat_50_clock_getres, compat }, @@ -139,9 +139,9 @@ static struct { { SYS_compat_30_fhopen, compat }, { SYS_compat_30_fhstat, compat }, {
CVS commit: src/sys/dev/dm
Module Name:src Committed By: christos Date: Sun May 10 14:08:55 UTC 2015 Modified Files: src/sys/dev/dm: dm_ioctl.c Log Message: CID 976256: Help coverity understand that when the list is empty the head is NULL. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/dm/dm_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dm/dm_ioctl.c diff -u src/sys/dev/dm/dm_ioctl.c:1.29 src/sys/dev/dm/dm_ioctl.c:1.30 --- src/sys/dev/dm/dm_ioctl.c:1.29 Thu Oct 2 17:29:44 2014 +++ src/sys/dev/dm/dm_ioctl.c Sun May 10 10:08:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dm_ioctl.c,v 1.29 2014/10/02 21:29:44 justin Exp $ */ +/* $NetBSD: dm_ioctl.c,v 1.30 2015/05/10 14:08:54 christos Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -774,7 +774,7 @@ dm_table_load_ioctl(prop_dictionary_t dm prop_dictionary_get_cstring(target_dict, DM_TABLE_PARAMS, (char **) str); - if (SLIST_EMPTY(tbl)) + if (SLIST_EMPTY(tbl) || last_table == NULL) /* insert this table to head */ SLIST_INSERT_HEAD(tbl, table_en, next); else
CVS commit: src/sys/rump/fs/lib/libsyspuffs
Module Name:src Committed By: christos Date: Sun May 10 14:05:22 UTC 2015 Modified Files: src/sys/rump/fs/lib/libsyspuffs: puffs_rumpglue.c Log Message: PR/975220: Check return of kthread_create To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c diff -u src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c:1.14 src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c:1.15 --- src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c:1.14 Sun May 10 10:00:42 2015 +++ src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c Sun May 10 10:05:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_rumpglue.c,v 1.14 2015/05/10 14:00:42 christos Exp $ */ +/* $NetBSD: puffs_rumpglue.c,v 1.15 2015/05/10 14:05:22 christos Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_rumpglue.c,v 1.14 2015/05/10 14:00:42 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_rumpglue.c,v 1.15 2015/05/10 14:05:22 christos Exp $); #include sys/param.h #include sys/conf.h @@ -197,8 +197,15 @@ rump_syspuffs_glueinit(int fd, int *newf pap-fpfd = curlwp-l_dupfd; pap-fdp = curlwp-l_proc-p_fd; - kthread_create(PRI_NONE, 0, NULL, readthread, pap, NULL, rputter); - kthread_create(PRI_NONE, 0, NULL, writethread, pap, NULL, wputter); + rv = kthread_create(PRI_NONE, 0, NULL, readthread, pap, NULL, + rputter); + if (rv) + return rv; + + rv = kthread_create(PRI_NONE, 0, NULL, writethread, pap, NULL, + wputter); + if (rv) + return rv; *newfd = curlwp-l_dupfd; return 0;
CVS commit: src/sys/rump/fs/lib/libsyspuffs
Module Name:src Committed By: christos Date: Sun May 10 14:00:42 UTC 2015 Modified Files: src/sys/rump/fs/lib/libsyspuffs: puffs_rumpglue.c Log Message: CID 274829: Check error from fd_getfile to avoid NULL deref immediately after. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c diff -u src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c:1.13 src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c:1.14 --- src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c:1.13 Mon Apr 29 20:03:53 2013 +++ src/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c Sun May 10 10:00:42 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_rumpglue.c,v 1.13 2013/04/30 00:03:53 pooka Exp $ */ +/* $NetBSD: puffs_rumpglue.c,v 1.14 2015/05/10 14:00:42 christos Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_rumpglue.c,v 1.13 2013/04/30 00:03:53 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_rumpglue.c,v 1.14 2015/05/10 14:00:42 christos Exp $); #include sys/param.h #include sys/conf.h @@ -85,8 +85,11 @@ readthread(void *arg) off = 0; fp = fd_getfile(pap-fpfd); - error = dofileread(pap-fpfd, fp, buf, BUFSIZE, - off, 0, rv); + if (fp == NULL) + error = EINVAL; + else + error = dofileread(pap-fpfd, fp, buf, BUFSIZE, + off, 0, rv); if (error) { if (error == ENOENT inited == 0) goto retry; @@ -161,8 +164,11 @@ writethread(void *arg) off = 0; rv = 0; fp = fd_getfile(pap-fpfd); - error = dofilewrite(pap-fpfd, fp, buf, phdr-pth_framelen, - off, 0, rv); + if (fp == NULL) + error = EINVAL; + else + error = dofilewrite(pap-fpfd, fp, buf, + phdr-pth_framelen, off, 0, rv); if (error == ENXIO) goto out; KASSERT(rv == phdr-pth_framelen);
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun May 10 15:31:48 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_ahcisata.c tegra_car.c tegra_carreg.h tegra_var.h Log Message: Tegra SATA ungating support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nvidia/tegra_ahcisata.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/nvidia/tegra_car.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/nvidia/tegra_carreg.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/nvidia/tegra_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/nvidia/tegra_ahcisata.c diff -u src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.2 src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.3 --- src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.2 Sun Apr 26 16:41:04 2015 +++ src/sys/arch/arm/nvidia/tegra_ahcisata.c Sun May 10 15:31:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_ahcisata.c,v 1.2 2015/04/26 16:41:04 jmcneill Exp $ */ +/* $NetBSD: tegra_ahcisata.c,v 1.3 2015/05/10 15:31:48 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tegra_ahcisata.c,v 1.2 2015/04/26 16:41:04 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: tegra_ahcisata.c,v 1.3 2015/05/10 15:31:48 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -42,15 +42,22 @@ __KERNEL_RCSID(0, $NetBSD: tegra_ahcisa #include dev/ic/ahcisatavar.h #include arm/nvidia/tegra_var.h +#include arm/nvidia/tegra_ahcisatareg.h + +#define TEGRA_AHCISATA_OFFSET 0x7000 static int tegra_ahcisata_match(device_t, cfdata_t, void *); static void tegra_ahcisata_attach(device_t, device_t, void *); struct tegra_ahcisata_softc { struct ahci_softc sc; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; void *sc_ih; }; +static void tegra_ahcisata_init(struct tegra_ahcisata_softc *); + CFATTACH_DECL_NEW(tegra_ahcisata, sizeof(struct tegra_ahcisata_softc), tegra_ahcisata_match, tegra_ahcisata_attach, NULL, NULL); @@ -67,17 +74,26 @@ tegra_ahcisata_attach(device_t parent, d struct tegraio_attach_args * const tio = aux; const struct tegra_locators * const loc = tio-tio_loc; + sc-sc_bst = tio-tio_bst; + bus_space_subregion(tio-tio_bst, tio-tio_bsh, + loc-loc_offset, loc-loc_size, sc-sc_bsh); + sc-sc.sc_atac.atac_dev = self; sc-sc.sc_dmat = tio-tio_dmat; sc-sc.sc_ahcit = tio-tio_bst; sc-sc.sc_ahcis = loc-loc_size; bus_space_subregion(tio-tio_bst, tio-tio_bsh, - loc-loc_offset, loc-loc_size, sc-sc.sc_ahcih); + loc-loc_offset + TEGRA_AHCISATA_OFFSET, + loc-loc_size - TEGRA_AHCISATA_OFFSET, sc-sc.sc_ahcih); sc-sc.sc_ahci_ports = 1; aprint_naive(\n); aprint_normal(: SATA\n); + tegra_car_periph_sata_enable(); + + tegra_ahcisata_init(sc); + sc-sc_ih = intr_establish(loc-loc_intr, IPL_BIO, IST_LEVEL, ahci_intr, sc-sc); if (sc-sc_ih == NULL) { @@ -89,3 +105,41 @@ tegra_ahcisata_attach(device_t parent, d ahci_attach(sc-sc); } + +static void +tegra_ahcisata_init(struct tegra_ahcisata_softc *sc) +{ + bus_space_tag_t bst = sc-sc_bst; + bus_space_handle_t bsh = sc-sc_bsh; + + /* Enable IFPS device block */ + tegra_reg_set_clear(bst, bsh, TEGRA_SATA_CONFIGURATION_REG, + TEGRA_SATA_CONFIGURATION_EN_FPCI, 0); + + /* Backdoor update the programming interface field and class code */ + tegra_reg_set_clear(bst, bsh, TEGRA_T_SATA0_CFG_SATA_REG, + TEGRA_T_SATA0_CFG_SATA_BACKDOOR_PROG_IF_EN, 0); + bus_space_write_4(bst, bsh, TEGRA_T_SATA0_BKDOOR_CC_REG, + __SHIFTIN(0x1016, TEGRA_T_SATA0_BKDOOR_CC_CLASS_CODE) | + __SHIFTIN(0x1, TEGRA_T_SATA0_BKDOOR_CC_PROG_IF)); + tegra_reg_set_clear(bst, bsh, TEGRA_T_SATA0_CFG_SATA_REG, + 0, TEGRA_T_SATA0_CFG_SATA_BACKDOOR_PROG_IF_EN); + + /* Enable access and bus mastering */ + tegra_reg_set_clear(bst, bsh, TEGRA_T_SATA0_CFG1_REG, + TEGRA_T_SATA0_CFG1_SERR | + TEGRA_T_SATA0_CFG1_BUS_MASTER | + TEGRA_T_SATA0_CFG1_MEM_SPACE | + TEGRA_T_SATA0_CFG1_IO_SPACE, + 0); + + /* MMIO setup */ + bus_space_write_4(bst, bsh, TEGRA_SATA_FPCI_BAR5_REG, + __SHIFTIN(0x1, TEGRA_SATA_FPCI_BAR_START)); + bus_space_write_4(bst, bsh, TEGRA_T_SATA0_CFG9_REG, + __SHIFTIN(0x8000, TEGRA_T_SATA0_CFG9_BASE_ADDRESS)); + + /* Enable interrupts */ + tegra_reg_set_clear(bst, bsh, TEGRA_SATA_INTR_MASK_REG, + TEGRA_SATA_INTR_MASK_IP_INT, 0); +} Index: src/sys/arch/arm/nvidia/tegra_car.c diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.7 src/sys/arch/arm/nvidia/tegra_car.c:1.8 --- src/sys/arch/arm/nvidia/tegra_car.c:1.7 Sun May 10 11:04:59 2015 +++ src/sys/arch/arm/nvidia/tegra_car.c Sun May 10 15:31:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_car.c,v 1.7 2015/05/10 11:04:59 jmcneill Exp $ */ +/* $NetBSD: tegra_car.c,v 1.8 2015/05/10 15:31:48 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill
CVS commit: src/sys/kern
Module Name:src Committed By: rtr Date: Sun May 10 18:55:22 UTC 2015 Modified Files: src/sys/kern: subr_tftproot.c Log Message: mtod mbuf to sockaddr * for so_send(). To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/kern/subr_tftproot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_tftproot.c diff -u src/sys/kern/subr_tftproot.c:1.14 src/sys/kern/subr_tftproot.c:1.15 --- src/sys/kern/subr_tftproot.c:1.14 Fri Mar 27 07:18:11 2015 +++ src/sys/kern/subr_tftproot.c Sun May 10 18:55:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_tftproot.c,v 1.14 2015/03/27 07:18:11 hikaru Exp $ */ +/* $NetBSD: subr_tftproot.c,v 1.15 2015/05/10 18:55:22 rtr Exp $ */ /*- * Copyright (c) 2007 Emmanuel Dreyfus, all rights reserved. @@ -39,7 +39,7 @@ #include opt_md.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_tftproot.c,v 1.14 2015/03/27 07:18:11 hikaru Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_tftproot.c,v 1.15 2015/05/10 18:55:22 rtr Exp $); #include sys/param.h #include sys/types.h @@ -320,7 +320,7 @@ tftproot_getfile(struct tftproot_handle * we do not want to free it ourselves. * Ignore errors, as we already have the whole file. */ - if ((error = (*so-so_send)(so, m_serv, NULL, + if ((error = (*so-so_send)(so, mtod(m_serv, struct sockaddr *), NULL, m_outbuf, NULL, 0, l)) != 0) DPRINTF((%s():%d tftproot: sosend returned %d\n, __func__, __LINE__, error));