CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed Mar 18 06:42:02 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: ehci.c Log Message: No need to touch ux_done in ehci_device_{fs_,}isoc_start To generate a diff of this commit: cvs rdiff -u -r1.234.2.43 -r1.234.2.44 src/sys/dev/usb/ehci.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/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.234.2.43 src/sys/dev/usb/ehci.c:1.234.2.44 --- src/sys/dev/usb/ehci.c:1.234.2.43 Tue Mar 17 20:56:39 2015 +++ src/sys/dev/usb/ehci.c Wed Mar 18 06:42:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.234.2.43 2015/03/17 20:56:39 skrll Exp $ */ +/* $NetBSD: ehci.c,v 1.234.2.44 2015/03/18 06:42:02 skrll Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.43 2015/03/17 20:56:39 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.44 2015/03/18 06:42:02 skrll Exp $"); #include "ohci.h" #include "uhci.h" @@ -4345,7 +4345,6 @@ ehci_device_fs_isoc_start(usbd_xfer_hand ehci_add_intr_list(sc, exfer); xfer->ux_status = USBD_IN_PROGRESS; - xfer->ux_done = 0; mutex_exit(&sc->sc_lock); @@ -4675,7 +4674,6 @@ ehci_device_isoc_start(usbd_xfer_handle ehci_add_intr_list(sc, exfer); xfer->ux_status = USBD_IN_PROGRESS; - xfer->ux_done = 0; mutex_exit(&sc->sc_lock); if (sc->sc_bus.ub_usepolling) {
CVS commit: src/sys
Module Name:src Committed By: msaitoh Date: Wed Mar 18 05:54:14 UTC 2015 Modified Files: src/sys/arch/x86/pci: ichlpcib.c src/sys/dev/pci: ichsmb.c pucdata.c Log Message: Add 9 Series support. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/x86/pci/ichlpcib.c cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/ichsmb.c cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/pucdata.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/pci/ichlpcib.c diff -u src/sys/arch/x86/pci/ichlpcib.c:1.46 src/sys/arch/x86/pci/ichlpcib.c:1.47 --- src/sys/arch/x86/pci/ichlpcib.c:1.46 Tue Jan 13 08:57:02 2015 +++ src/sys/arch/x86/pci/ichlpcib.c Wed Mar 18 05:54:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ichlpcib.c,v 1.46 2015/01/13 08:57:02 msaitoh Exp $ */ +/* $NetBSD: ichlpcib.c,v 1.47 2015/03/18 05:54:14 msaitoh Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.46 2015/01/13 08:57:02 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.47 2015/03/18 05:54:14 msaitoh Exp $"); #include #include @@ -257,6 +257,8 @@ static struct lpcib_device { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_Q87_LPC, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_QM87_LPC, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_B85_LPC, 1, 0 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_H97_LPC, 1, 0 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_Z97_LPC, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C222_LPC, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C224_LPC, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C226_LPC, 1, 0 }, Index: src/sys/dev/pci/ichsmb.c diff -u src/sys/dev/pci/ichsmb.c:1.38 src/sys/dev/pci/ichsmb.c:1.39 --- src/sys/dev/pci/ichsmb.c:1.38 Mon Dec 15 13:16:42 2014 +++ src/sys/dev/pci/ichsmb.c Wed Mar 18 05:54:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ichsmb.c,v 1.38 2014/12/15 13:16:42 msaitoh Exp $ */ +/* $NetBSD: ichsmb.c,v 1.39 2015/03/18 05:54:14 msaitoh Exp $ */ /* $OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $ */ /* @@ -22,7 +22,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.38 2014/12/15 13:16:42 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.39 2015/03/18 05:54:14 msaitoh Exp $"); #include #include @@ -110,6 +110,7 @@ ichsmb_match(device_t parent, cfdata_t m case PCI_PRODUCT_INTEL_6SERIES_SMB: case PCI_PRODUCT_INTEL_7SERIES_SMB: case PCI_PRODUCT_INTEL_8SERIES_SMB: + case PCI_PRODUCT_INTEL_9SERIES_SMB: case PCI_PRODUCT_INTEL_CORE4G_M_SMB: case PCI_PRODUCT_INTEL_BAYTRAIL_PCU_SMB: case PCI_PRODUCT_INTEL_C600_SMBUS: Index: src/sys/dev/pci/pucdata.c diff -u src/sys/dev/pci/pucdata.c:1.93 src/sys/dev/pci/pucdata.c:1.94 --- src/sys/dev/pci/pucdata.c:1.93 Thu Feb 6 15:51:02 2014 +++ src/sys/dev/pci/pucdata.c Wed Mar 18 05:54:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pucdata.c,v 1.93 2014/02/06 15:51:02 msaitoh Exp $ */ +/* $NetBSD: pucdata.c,v 1.94 2015/03/18 05:54:14 msaitoh Exp $ */ /* * Copyright (c) 1998, 1999 Christopher G. Demetriou. All rights reserved. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.93 2014/02/06 15:51:02 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.94 2015/03/18 05:54:14 msaitoh Exp $"); #include #include @@ -1893,6 +1893,15 @@ const struct puc_device_description puc_ }, }, + /* Intel 9 Series KT */ + { "Intel 9 Series KT", + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_9SERIES_KT, 0, 0 }, + { 0x, 0x, 0, 0 }, + { + { PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ }, + }, + }, + /* Intel C600/X79 Series KT */ { "Intel C600/X79 Series KT", { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C600_KT, 0, 0 },
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Mar 18 05:43:49 UTC 2015 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some Intel 9 series devices. To generate a diff of this commit: cvs rdiff -u -r1.1216 -r1.1217 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1216 src/sys/dev/pci/pcidevs:1.1217 --- src/sys/dev/pci/pcidevs:1.1216 Wed Mar 4 11:31:58 2015 +++ src/sys/dev/pci/pcidevs Wed Mar 18 05:43:49 2015 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1216 2015/03/04 11:31:58 knakahara Exp $ +$NetBSD: pcidevs,v 1.1217 2015/03/18 05:43:49 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -3885,8 +3885,34 @@ product INTEL C222_LPC 0x8c52 C222 LPC product INTEL C224_LPC 0x8c54 C224 LPC product INTEL C226_LPC 0x8c56 C226 LPC product INTEL H81_LPC 0x8c5c H81 LPC +product INTEL 9SERIES_SATA 0x8c80 9 Series SATA Controller +product INTEL 9SERIES_SATA_AHCI 0x8c82 9 Series SATA Controller (AHCI) +product INTEL 9SERIES_SATA_RAID 0x8c84 9 Series SATA Controller (RAID) +product INTEL 9SERIES_SATA_RAID_SR 0x8c86 9 Series SATA Controller (RAID) + Smart Response +product INTEL 9SERIES_SATA_2 0x8c88 9 Series SATA Controller +product INTEL 9SERIES_SATA_RAID1 0x8c8e 9 Series SATA Controller (RAID1) +product INTEL 9SERIES_PCIE_1 0x8c90 9 Series PCIE +product INTEL 9SERIES_PCIE_2 0x8c92 9 Series PCIE +product INTEL 9SERIES_PCIE_3 0x8c94 9 Series PCIE +product INTEL 9SERIES_PCIE_4 0x8c96 9 Series PCIE +product INTEL 9SERIES_PCIE_5 0x8c98 9 Series PCIE +product INTEL 9SERIES_PCIE_6 0x8c9a 9 Series PCIE +product INTEL 9SERIES_PCIE_7 0x8c9c 9 Series PCIE +product INTEL 9SERIES_PCIE_8 0x8c9e 9 Series PCIE +product INTEL 9SERIES_HDA 0x8ca0 9 Series HD Audio +product INTEL 9SERIES_SMB 0x8ca2 9 Series SMBus Controller +product INTEL 9SERIES_THERM 0x8ca4 9 Series Thermal +product INTEL 9SERIES_EHCI_1 0x8ca6 9 Series USB EHCI +product INTEL 9SERIES_EHCI_2 0x8cad 9 Series USB EHCI product INTEL 9SERIES_XHCI 0x8cb1 9 Series USB xHCI +product INTEL 9SERIES_LAN 0x8cb3 9 Series LAN product INTEL 9SERIES_MEI_1 0x8cba 9 Series MEI Controller +product INTEL 9SERIES_MEI_2 0x8cbb 9 Series MEI Controller +product INTEL 9SERIES_IDE_R 0x8cbc 9 Series IDE-R +product INTEL 9SERIES_KT 0x8cbd 9 Series KT +product INTEL 9SERIES_LPC_ES 0x8cc2 9 Series Full Featured ES LPC +product INTEL Z97_LPC 0x8cc4 Z97 LPC +product INTEL H97_LPC 0x8cc6 H97 LPC product INTEL CORE4G_M_AHCI 0x9c03 Core 4G (mobile) SATA Controller (AHCI) product INTEL CORE4G_M_RAID_1 0x9c05 Core 4G (mobile) SATA Controller (RAID) product INTEL CORE4G_M_RAID_2 0x9c07 Core 4G (mobile) SATA Controller (RAID) Premium
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Wed Mar 18 04:43:41 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: 542, 614, and 618 To generate a diff of this commit: cvs rdiff -u -r1.1.2.230 -r1.1.2.231 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.230 src/doc/CHANGES-7.0:1.1.2.231 --- src/doc/CHANGES-7.0:1.1.2.230 Tue Mar 17 19:00:42 2015 +++ src/doc/CHANGES-7.0 Wed Mar 18 04:43:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.230 2015/03/17 19:00:42 snj Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.231 2015/03/18 04:43:41 snj Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -18620,3 +18620,48 @@ xsrc/xfree/xc/lib/font/bitmap/bdfread.c (bdfReadCharacters: ensure metrics fit into xCharInfo struct) [mrg, ticket #620] +etc/etc.amd64/Makefile.inc patch +etc/etc.i386/Makefile.inc patch +sys/arch/amd64/conf/ALLpatch +sys/arch/amd64/conf/DRMKMS delete +sys/arch/amd64/conf/GENERIC patch +sys/arch/amd64/conf/INSTALL patch +sys/arch/amd64/conf/NO_DRM delete +sys/arch/i386/conf/ALLpatch +sys/arch/i386/conf/DRMKMS delete +sys/arch/i386/conf/GENERIC patch +sys/arch/i386/conf/INSTALL patch +sys/arch/i386/conf/NO_DRM delete +usr.sbin/sysinst/arch/amd64/md.h patch +usr.sbin/sysinst/arch/i386/md.h patch +usr.sbin/sysinst/arch/i386/msg.md.de patch +usr.sbin/sysinst/arch/i386/msg.md.en patch +usr.sbin/sysinst/arch/i386/msg.md.es patch +usr.sbin/sysinst/arch/i386/msg.md.fr patch +usr.sbin/sysinst/arch/i386/msg.md.pl patch + + + - Enable intel and radeon DRM/KMS drivers in GENERIC + - Disable all of the old DRM drivers in GENERIC + - Remove the separate DRMKMS kernel + [christos, ticket #542] + +sys/dev/pci/if_wm.c1.311-1.313 +sys/dev/pci/if_wmreg.h1.66 + + - Fix a bug that sc_mediatype is evaluated incorrectly. + - Initialize some hardware bits for 8257[1234], 82583, 80003, + ICH* and PCH*. + - Fix a bug that the first access to NVM is failed on 8254[17] + which use SPI EEPROM. Observed on Dell PowerEdge [12]850. + [msaitoh, ticket #614] + +sys/arch/xen/include/evtchn.h 1.23 +sys/arch/xen/xen/evtchn.c 1.71 +sys/arch/xen/xen/pci_intr_machdep.c 1.17 + + Properly implemement pci_intr_disestablish(9), so that interrupt + handlers stop being called when the device has been detached. + PR port-xen/47720. + [bouyer, ticket #618] +
CVS commit: [netbsd-7] src/sys/arch/xen
Module Name:src Committed By: snj Date: Wed Mar 18 04:42:11 UTC 2015 Modified Files: src/sys/arch/xen/include [netbsd-7]: evtchn.h src/sys/arch/xen/xen [netbsd-7]: evtchn.c pci_intr_machdep.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #618): sys/arch/xen/include/evtchn.h: revision 1.23 sys/arch/xen/xen/evtchn.c: revision 1.71 sys/arch/xen/xen/pci_intr_machdep.c: revision 1.17 Properly implemement pci_intr_disestablish(9), so that interrupt handlers stop being called when the device has been detached. Should fix PR port-xen/47720 (which turns out to not be related to raidframe). While there fix possible races in event_remove_handler() and pirq_establish(). To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.22.12.1 src/sys/arch/xen/include/evtchn.h cvs rdiff -u -r1.70 -r1.70.4.1 src/sys/arch/xen/xen/evtchn.c cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/arch/xen/xen/pci_intr_machdep.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/xen/include/evtchn.h diff -u src/sys/arch/xen/include/evtchn.h:1.22 src/sys/arch/xen/include/evtchn.h:1.22.12.1 --- src/sys/arch/xen/include/evtchn.h:1.22 Sat Jan 12 17:39:46 2013 +++ src/sys/arch/xen/include/evtchn.h Wed Mar 18 04:42:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: evtchn.h,v 1.22 2013/01/12 17:39:46 bouyer Exp $ */ +/* $NetBSD: evtchn.h,v 1.22.12.1 2015/03/18 04:42:11 snj Exp $ */ /* * @@ -67,5 +67,6 @@ struct pintrhand { struct pintrhand *pirq_establish(int, int, int (*)(void *), void *, int, const char *); +void pirq_disestablish(struct pintrhand *); #endif /* _XEN_EVENTS_H_ */ Index: src/sys/arch/xen/xen/evtchn.c diff -u src/sys/arch/xen/xen/evtchn.c:1.70 src/sys/arch/xen/xen/evtchn.c:1.70.4.1 --- src/sys/arch/xen/xen/evtchn.c:1.70 Tue Dec 3 20:51:00 2013 +++ src/sys/arch/xen/xen/evtchn.c Wed Mar 18 04:42:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: evtchn.c,v 1.70 2013/12/03 20:51:00 bouyer Exp $ */ +/* $NetBSD: evtchn.c,v 1.70.4.1 2015/03/18 04:42:11 snj Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -54,7 +54,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.70 2013/12/03 20:51:00 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.70.4.1 2015/03/18 04:42:11 snj Exp $"); #include "opt_xen.h" #include "isa.h" @@ -550,16 +550,16 @@ pirq_establish(int pirq, int evtch, int return NULL; } - if (event_set_handler(evtch, pirq_interrupt, ih, level, evname) != 0) { - kmem_free(ih, sizeof(struct pintrhand)); - return NULL; - } - ih->pirq = pirq; ih->evtch = evtch; ih->func = func; ih->arg = arg; + if (event_set_handler(evtch, pirq_interrupt, ih, level, evname) != 0) { + kmem_free(ih, sizeof(struct pintrhand)); + return NULL; + } + physdev_op.cmd = PHYSDEVOP_IRQ_STATUS_QUERY; physdev_op.u.irq_status_query.irq = pirq; if (HYPERVISOR_physdev_op(&physdev_op) < 0) @@ -575,6 +575,17 @@ pirq_establish(int pirq, int evtch, int return ih; } +void +pirq_disestablish(struct pintrhand *ih) +{ + int error = event_remove_handler(ih->evtch, pirq_interrupt, ih); + if (error) { + printf("pirq_disestablish(%p): %d\n", ih, error); + return; + } + kmem_free(ih, sizeof(struct pintrhand)); +} + int pirq_interrupt(void *arg) { @@ -772,7 +783,6 @@ event_remove_handler(int evtch, int (*fu } ci = ih->ih_cpu; *ihp = ih->ih_evt_next; - mutex_spin_exit(&evtlock[evtch]); ipls = ci->ci_isources[ih->ih_level]; for (ihp = &ipls->ipl_handlers, ih = ipls->ipl_handlers; @@ -784,6 +794,7 @@ event_remove_handler(int evtch, int (*fu if (ih == NULL) panic("event_remove_handler"); *ihp = ih->ih_ipl_next; + mutex_spin_exit(&evtlock[evtch]); kmem_free(ih, sizeof (struct intrhand)); if (evts->ev_handlers == NULL) { xen_atomic_clear_bit(&ci->ci_evtmask[0], evtch); Index: src/sys/arch/xen/xen/pci_intr_machdep.c diff -u src/sys/arch/xen/xen/pci_intr_machdep.c:1.16 src/sys/arch/xen/xen/pci_intr_machdep.c:1.16.4.1 --- src/sys/arch/xen/xen/pci_intr_machdep.c:1.16 Sat Mar 29 19:28:30 2014 +++ src/sys/arch/xen/xen/pci_intr_machdep.c Wed Mar 18 04:42:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_intr_machdep.c,v 1.16 2014/03/29 19:28:30 christos Exp $ */ +/* $NetBSD: pci_intr_machdep.c,v 1.16.4.1 2015/03/18 04:42:11 snj Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.16 2014/03/29 19:28:30 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.16.4.1 2015/03/18 04:42:11 snj Exp $"); #include #include @@ -221,4 +221,5 @@ pci_intr_establish(pci_chipset_tag_t pci void pci_intr_disestablish(pci_chipset_tag_t pcitag, void *cookie) { + pirq_disestablish(cookie); }
CVS commit: [netbsd-7] src/sys/dev/pci
Module Name:src Committed By: snj Date: Wed Mar 18 04:39:15 UTC 2015 Modified Files: src/sys/dev/pci [netbsd-7]: if_wm.c if_wmreg.h Log Message: Pull up following revision(s) (requested by msaitoh in ticket #614): sys/dev/pci/if_wm.c: revision 1.311-1.313 sys/dev/pci/if_wmreg.h: revision 1.66 Fix a bug that sc_mediatype is evaluated incorrectly. The real problem might be occured only on fiber and serdes cases. # - Initialize some hardware bits for 8257[1234], 82583, 80003, ICH* and PCH*. Some of them are workaround code. From other *BSDs, Linux and documents. - Add comment. - Fix typo in comment. # Fix a bug that the first access to NVM is failed on 8254[17] which use SPI EEPROM. Observed on Dell PowerEdge [12]850. Thanks Tom Ivar Helbekkmo for debugging. To generate a diff of this commit: cvs rdiff -u -r1.289.2.3 -r1.289.2.4 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.60.2.1 -r1.60.2.2 src/sys/dev/pci/if_wmreg.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/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.289.2.3 src/sys/dev/pci/if_wm.c:1.289.2.4 --- src/sys/dev/pci/if_wm.c:1.289.2.3 Wed Feb 4 06:48:13 2015 +++ src/sys/dev/pci/if_wm.c Wed Mar 18 04:39:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.289.2.3 2015/02/04 06:48:13 snj Exp $ */ +/* $NetBSD: if_wm.c,v 1.289.2.4 2015/03/18 04:39:15 snj Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.289.2.3 2015/02/04 06:48:13 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.289.2.4 2015/03/18 04:39:15 snj Exp $"); #include #include @@ -277,6 +277,10 @@ struct wm_softc { int sc_rev; /* MAC revision */ wm_phy_type sc_phytype; /* PHY type */ uint32_t sc_mediatype; /* Media type (Copper, Fiber, SERDES)*/ +#define WM_MEDIATYPE_UNKNOWN 0x00 +#define WM_MEDIATYPE_FIBER 0x01 +#define WM_MEDIATYPE_COPPER 0x02 +#define WM_MEDIATYPE_SERDES 0x03 /* Internal SERDES */ int sc_funcid; /* unit number of the chip (0 to 3) */ int sc_flags; /* flags; see below */ int sc_if_flags; /* last if_flags */ @@ -557,6 +561,7 @@ static void wm_set_pcie_completion_timeo static void wm_get_auto_rd_done(struct wm_softc *); static void wm_lan_init_done(struct wm_softc *); static void wm_get_cfg_done(struct wm_softc *); +static void wm_initialize_hardware_bits(struct wm_softc *); static void wm_reset(struct wm_softc *); static int wm_add_rxbuf(struct wm_softc *, int); static void wm_rxdrain(struct wm_softc *); @@ -723,10 +728,10 @@ static const struct wm_product { const char *wmp_name; wm_chip_type wmp_type; uint32_t wmp_flags; -#define WMP_F_UNKNOWN 0x00 -#define WMP_F_FIBER 0x01 -#define WMP_F_COPPER 0x02 -#define WMP_F_SERDES 0x03 /* Internal SERDES */ +#define WMP_F_UNKNOWN WM_MEDIATYPE_UNKNOWN +#define WMP_F_FIBER WM_MEDIATYPE_FIBER +#define WMP_F_COPPER WM_MEDIATYPE_COPPER +#define WMP_F_SERDES WM_MEDIATYPE_SERDES #define WMP_MEDIATYPE(x) ((x) & 0x03) } wm_products[] = { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82542, @@ -1739,6 +1744,7 @@ wm_attach(device_t parent, device_t self case WM_T_82541_2: case WM_T_82547: case WM_T_82547_2: + sc->sc_flags |= WM_F_LOCK_EECD; reg = CSR_READ(sc, WMREG_EECD); if (reg & EECD_EE_TYPE) { /* SPI */ @@ -1754,7 +1760,6 @@ wm_attach(device_t parent, device_t self sc->sc_nvm_addrbits = 6; } } - sc->sc_flags |= WM_F_LOCK_EECD; break; case WM_T_82571: case WM_T_82572: @@ -2106,10 +2111,10 @@ wm_attach(device_t parent, device_t self wm_gmii_mediainit(sc, wmp->wmp_product); } else if (sc->sc_type < WM_T_82543 || (CSR_READ(sc, WMREG_STATUS) & STATUS_TBIMODE) != 0) { - if (sc->sc_mediatype & WMP_F_COPPER) { + if (sc->sc_mediatype == WM_MEDIATYPE_COPPER) { aprint_error_dev(sc->sc_dev, "WARNING: TBIMODE set on 1000BASE-T product!\n"); - sc->sc_mediatype = WMP_F_FIBER; + sc->sc_mediatype = WM_MEDIATYPE_FIBER; } wm_tbi_mediainit(sc); } else { @@ -2126,45 +2131,45 @@ wm_attach(device_t parent, device_t self switch (link_mode) { case CTRL_EXT_LINK_MODE_1000KX: aprint_verbose_dev(sc->sc_dev, "1000KX\n"); -sc->sc_mediatype = WMP_F_SERDES; +sc->sc_mediatype = WM_MEDIATYPE_SERDES; break; case CTRL_EXT_LINK_MODE_SGMII: if (wm_sgmii_uses_mdio(sc)) { aprint_verbose_dev(sc->sc_dev, "SGMII(MDIO)\n"); sc->sc_flags |= WM_F_SGMII; - sc->sc_mediatype = WMP_F_COPPER; + sc->sc_mediatype = WM_MEDIATYPE_COPPER; break; } aprint_verbose_dev(sc->sc_dev, "SGMII(I2C)\n"); /*FALLTHROUGH*/ case CTRL_EXT_LINK_MODE_PCIE_SERDES: sc->sc_mediatype = wm_sfp_get_media_type(sc); -if (sc->sc_mediatype == WMP_F_UNKNOWN) { +if (sc->sc_mediatype == WM_MEDIATYPE_UNKNOWN) { if (link_mode == CTRL_EXT_LINK
CVS commit: [netbsd-7] src
Module Name:src Committed By: snj Date: Wed Mar 18 03:57:16 UTC 2015 Modified Files: src/etc/etc.amd64 [netbsd-7]: Makefile.inc src/etc/etc.i386 [netbsd-7]: Makefile.inc src/sys/arch/amd64/conf [netbsd-7]: ALL GENERIC INSTALL src/sys/arch/i386/conf [netbsd-7]: ALL GENERIC INSTALL src/usr.sbin/sysinst/arch/amd64 [netbsd-7]: md.h src/usr.sbin/sysinst/arch/i386 [netbsd-7]: md.h msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl Removed Files: src/sys/arch/amd64/conf [netbsd-7]: DRMKMS NO_DRM src/sys/arch/i386/conf [netbsd-7]: DRMKMS NO_DRM Log Message: Apply patch (requested by christos in ticket #542): - Enable intel and radeon DRM/KMS drivers in GENERIC - Disable all of the old DRM drivers in GENERIC - Remove the separate DRMKMS kernel To generate a diff of this commit: cvs rdiff -u -r1.14.12.2 -r1.14.12.3 src/etc/etc.amd64/Makefile.inc cvs rdiff -u -r1.67.12.2 -r1.67.12.3 src/etc/etc.i386/Makefile.inc cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.8 -r0 src/sys/arch/amd64/conf/DRMKMS cvs rdiff -u -r1.392.2.5 -r1.392.2.6 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.89.8.1 -r1.89.8.2 src/sys/arch/amd64/conf/INSTALL cvs rdiff -u -r1.2.8.1 -r0 src/sys/arch/amd64/conf/NO_DRM cvs rdiff -u -r1.380.2.1 -r1.380.2.2 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.6 -r0 src/sys/arch/i386/conf/DRMKMS cvs rdiff -u -r1.1107.2.5 -r1.1107.2.6 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.330.30.1 -r1.330.30.2 src/sys/arch/i386/conf/INSTALL cvs rdiff -u -r1.1.8.1 -r0 src/sys/arch/i386/conf/NO_DRM cvs rdiff -u -r1.1.4.1 -r1.1.4.2 src/usr.sbin/sysinst/arch/amd64/md.h cvs rdiff -u -r1.1.4.1 -r1.1.4.2 src/usr.sbin/sysinst/arch/i386/md.h \ src/usr.sbin/sysinst/arch/i386/msg.md.de \ src/usr.sbin/sysinst/arch/i386/msg.md.en \ src/usr.sbin/sysinst/arch/i386/msg.md.es \ src/usr.sbin/sysinst/arch/i386/msg.md.fr \ src/usr.sbin/sysinst/arch/i386/msg.md.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.amd64/Makefile.inc diff -u src/etc/etc.amd64/Makefile.inc:1.14.12.2 src/etc/etc.amd64/Makefile.inc:1.14.12.3 --- src/etc/etc.amd64/Makefile.inc:1.14.12.2 Fri Feb 27 09:23:02 2015 +++ src/etc/etc.amd64/Makefile.inc Wed Mar 18 03:57:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.14.12.2 2015/02/27 09:23:02 martin Exp $ +# $NetBSD: Makefile.inc,v 1.14.12.3 2015/03/18 03:57:15 snj Exp $ # # etc.amd64/Makefile.inc -- amd64-specific etc Makefile targets # @@ -8,7 +8,6 @@ KERNEL_SETS= GENERIC KERNEL_SETS+= XEN3_DOM0 XEN3_DOMU -KERNEL_SETS+= DRMKMS # KERNEL_SETS+= GENERIC_USERMODE BUILD_KERNELS= INSTALL INSTALL_XEN3_DOMU Index: src/etc/etc.i386/Makefile.inc diff -u src/etc/etc.i386/Makefile.inc:1.67.12.2 src/etc/etc.i386/Makefile.inc:1.67.12.3 --- src/etc/etc.i386/Makefile.inc:1.67.12.2 Mon Mar 9 09:06:04 2015 +++ src/etc/etc.i386/Makefile.inc Wed Mar 18 03:57:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.67.12.2 2015/03/09 09:06:04 snj Exp $ +# $NetBSD: Makefile.inc,v 1.67.12.3 2015/03/18 03:57:15 snj Exp $ # # etc.i386/Makefile.inc -- i386-specific etc Makefile targets # @@ -8,7 +8,6 @@ KERNEL_SETS= GENERIC KERNEL_SETS+= MONOLITHIC -KERNEL_SETS+= DRMKMS KERNEL_SETS+= LEGACY KERNEL_SETS+= XEN3_DOM0 KERNEL_SETS+= XEN3_DOMU Index: src/sys/arch/amd64/conf/ALL diff -u src/sys/arch/amd64/conf/ALL:1.13.2.1 src/sys/arch/amd64/conf/ALL:1.13.2.2 --- src/sys/arch/amd64/conf/ALL:1.13.2.1 Tue Nov 18 19:05:28 2014 +++ src/sys/arch/amd64/conf/ALL Wed Mar 18 03:57:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.13.2.1 2014/11/18 19:05:28 snj Exp $ +# $NetBSD: ALL,v 1.13.2.2 2015/03/18 03:57:15 snj Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.13.2.1 $" +#ident "ALL-$Revision: 1.13.2.2 $" maxusers 64 # estimated number of users @@ -509,17 +509,27 @@ voodoofb* at pci? dev ? function ? wcfb* at pci? dev ? function ? wsdisplay* at wsemuldisplaydev? -# DRI driver -i915drm* at drm? # Intel i915, i945 DRM driver -mach64drm* at drm? # mach64 (3D Rage Pro, Rage) DRM driver -mgadrm* at drm? # Matrox G[24]00, G[45]50 DRM driver -r128drm* at drm? # ATI Rage 128 DRM driver -radeondrm* at drm? # ATI Radeon DRM driver -savagedrm* at drm? # S3 Savage DRM driver -sisdrm* at drm? # SiS DRM driver -tdfxdrm* at drm? # 3dfx (voodoo) DRM driver -vboxdrm* at drm? # VirtualBox DRM driver -viadrm* at drm? # VIA UniChrome DRM driver +# DRI legacy drivers +#i915drm* at drm? # Intel i915, i945 DRM driver +#mach64drm* at drm? # mach64 (3D Rage Pro, Rage) DRM driver +#mgadrm* at drm? # Matrox G[24]00, G[45]50 DRM driver +#r128drm* at drm? # ATI Rage 128 DRM driver +#
CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon
Module Name:src Committed By: christos Date: Wed Mar 18 02:57:13 UTC 2015 Modified Files: src/sys/external/bsd/drm2/dist/drm/radeon: radeon_display.c Log Message: Hack against the blank console problem: Leave the CLUT alone on ancient cards. At least this leaves us with a semi working console (red and blue are flipped). Leave an example of what seems to be happening but disable it because colors are better than 444 bit greyscale. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.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/external/bsd/drm2/dist/drm/radeon/radeon_display.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.2 Wed Jul 16 16:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c Tue Mar 17 22:57:13 2015 @@ -181,12 +181,36 @@ static void legacy_crtc_load_lut(struct dac2_cntl |= RADEON_DAC2_PALETTE_ACC_CTL; WREG32(RADEON_DAC_CNTL2, dac2_cntl); - WREG8(RADEON_PALETTE_INDEX, 0); - for (i = 0; i < 256; i++) { - WREG32(RADEON_PALETTE_30_DATA, - (radeon_crtc->lut_r[i] << 20) | - (radeon_crtc->lut_g[i] << 10) | - (radeon_crtc->lut_b[i] << 0)); + /* + * At least the RV100 [vendor 1002 product 515e (rev. 0x02)] + * has an old style palette + */ + if (ASIC_IS_RV100(rdev)) { +#ifdef notyet + /* + * Leave CLUT alone for now. The code below gives us a + * nice 444 grayscale, but we are not in true color mode + * anymore and I don't have any docs how to do this right. + */ + WREG8(RADEON_PALETTE_INDEX, 0); + for (i = 0; i < 256; i++) { +#define R(x) (radeon_crtc->lut_r[i] >> 2) +#define G(x) (radeon_crtc->lut_g[i] >> 2) +#define B(x) (radeon_crtc->lut_b[i] >> 2) + WREG32(RADEON_PALETTE_DATA, ((R(i) << 16) +| (G(i) << 8) | B(i)) << 4); + } +#else + printf("%s: unknown DAC, can't set lookup table\n", __func__); +#endif + } else { + WREG8(RADEON_PALETTE_INDEX, 0); + for (i = 0; i < 256; i++) { + WREG32(RADEON_PALETTE_30_DATA, + (radeon_crtc->lut_r[i] << 20) | + (radeon_crtc->lut_g[i] << 10) | + (radeon_crtc->lut_b[i] << 0)); + } } }
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: snj Date: Wed Mar 18 02:05:05 UTC 2015 Modified Files: src/sys/arch/i386/conf: GENERIC Log Message: fix commented out nouveaufb To generate a diff of this commit: cvs rdiff -u -r1.1120 -r1.1121 src/sys/arch/i386/conf/GENERIC 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/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1120 src/sys/arch/i386/conf/GENERIC:1.1121 --- src/sys/arch/i386/conf/GENERIC:1.1120 Sat Mar 7 07:28:37 2015 +++ src/sys/arch/i386/conf/GENERIC Wed Mar 18 02:05:05 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1120 2015/03/07 07:28:37 mrg Exp $ +# $NetBSD: GENERIC,v 1.1121 2015/03/18 02:05:05 snj Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1120 $" +#ident "GENERIC-$Revision: 1.1121 $" maxusers 64 # estimated number of users @@ -577,7 +577,7 @@ radeon* at pci? dev ? function ? radeondrmkmsfb* at radeonfbbus? #nouveau* at pci? dev ? function ? -#nouveaufb* at nouveaufbbus +#nouveaufb* at nouveaufbbus? # Serial Devices
CVS commit: src/sys/arch/arm/vfp
Module Name:src Committed By: matt Date: Tue Mar 17 22:34:10 UTC 2015 Modified Files: src/sys/arch/arm/vfp: vfp_init.c Log Message: Don't try to catch undefined VFP instructions if we own the the FPU. Let them raise SIGILL. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/arm/vfp/vfp_init.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/vfp/vfp_init.c diff -u src/sys/arch/arm/vfp/vfp_init.c:1.43 src/sys/arch/arm/vfp/vfp_init.c:1.44 --- src/sys/arch/arm/vfp/vfp_init.c:1.43 Tue Mar 17 17:20:55 2015 +++ src/sys/arch/arm/vfp/vfp_init.c Tue Mar 17 22:34:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vfp_init.c,v 1.43 2015/03/17 17:20:55 matt Exp $ */ +/* $NetBSD: vfp_init.c,v 1.44 2015/03/17 22:34:10 matt Exp $ */ /* * Copyright (c) 2008 ARM Ltd @@ -402,6 +402,10 @@ vfp_handler(u_int address, u_int insn, t if (!vfp_fpscr_handler(address, insn, frame, fault_code)) return 1; + /* if we already own the FPU, raise SIGILL */ + if (curcpu()->ci_pcu_curlwp[PCU_FPU] == curlwp) + return 0; + /* * Make sure we own the FP. */
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Tue Mar 17 22:29:40 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_cpufreq.c amlogic_var.h files.amlogic src/sys/arch/evbarm/amlogic: amlogic_machdep.c src/sys/arch/evbarm/conf: ODROID-C1 Log Message: Add CPUFREQ option to set boot CPU frequency. ODROID-C1 is advertised as quad-core 1.5GHz but boots up at 1.2GHz; add CPUFREQ=1512 to config and make sure to set the correct speed before attaching CPUs. The speed can still be scaled down with machdep.cpu sysctls. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/amlogic_cpufreq.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/amlogic/amlogic_var.h \ src/sys/arch/arm/amlogic/files.amlogic cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/amlogic/amlogic_machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/conf/ODROID-C1 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/amlogic/amlogic_cpufreq.c diff -u src/sys/arch/arm/amlogic/amlogic_cpufreq.c:1.1 src/sys/arch/arm/amlogic/amlogic_cpufreq.c:1.2 --- src/sys/arch/arm/amlogic/amlogic_cpufreq.c:1.1 Thu Mar 5 23:43:53 2015 +++ src/sys/arch/arm/amlogic/amlogic_cpufreq.c Tue Mar 17 22:29:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_cpufreq.c,v 1.1 2015/03/05 23:43:53 jmcneill Exp $ */ +/* $NetBSD: amlogic_cpufreq.c,v 1.2 2015/03/17 22:29:40 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -28,8 +28,10 @@ #include "locators.h" +#include "opt_amlogic.h" + #include -__KERNEL_RCSID(0, "$NetBSD: amlogic_cpufreq.c,v 1.1 2015/03/05 23:43:53 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_cpufreq.c,v 1.2 2015/03/17 22:29:40 jmcneill Exp $"); #include #include @@ -73,6 +75,20 @@ static size_t meson8b_cpu_get_available( AMLOGIC_CBUS_OFFSET + (x), (v)) void +amlogic_cpufreq_bootstrap(void) +{ + cpufreq_set_rate = &meson8b_cpu_set_rate; + cpufreq_get_rate = &meson8b_cpu_get_rate; + cpufreq_get_available = &meson8b_cpu_get_available; + +#ifdef CPUFREQ + if (cpufreq_set_rate(CPUFREQ) == 0) { + amlogic_cpufreq_cb(NULL, NULL); + } +#endif +} + +void amlogic_cpufreq_init(void) { const struct sysctlnode *node, *cpunode, *freqnode; @@ -80,10 +96,6 @@ amlogic_cpufreq_init(void) size_t nfreq; int error; - cpufreq_set_rate = &meson8b_cpu_set_rate; - cpufreq_get_rate = &meson8b_cpu_get_rate; - cpufreq_get_available = &meson8b_cpu_get_available; - nfreq = cpufreq_get_available(availfreq, AMLOGIC_CPUFREQ_MAX); if (nfreq == 0) return; @@ -259,7 +271,9 @@ meson8b_cpu_set_rate(u_int rate) CBUS_WRITE(HHI_SYS_PLL_CNTL_REG, cntl); - a9tmr_update_freq(amlogic_get_rate_a9periph()); + if (!cold) { + a9tmr_update_freq(amlogic_get_rate_a9periph()); + } return 0; } Index: src/sys/arch/arm/amlogic/amlogic_var.h diff -u src/sys/arch/arm/amlogic/amlogic_var.h:1.6 src/sys/arch/arm/amlogic/amlogic_var.h:1.7 --- src/sys/arch/arm/amlogic/amlogic_var.h:1.6 Sun Mar 8 12:44:55 2015 +++ src/sys/arch/arm/amlogic/amlogic_var.h Tue Mar 17 22:29:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_var.h,v 1.6 2015/03/08 12:44:55 jmcneill Exp $ */ +/* $NetBSD: amlogic_var.h,v 1.7 2015/03/17 22:29:40 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -56,6 +56,7 @@ extern struct arm32_bus_dma_tag amlogic_ void amlogic_bootstrap(void); +void amlogic_cpufreq_bootstrap(void); void amlogic_cpufreq_init(void); void amlogic_usbphy_init(int); Index: src/sys/arch/arm/amlogic/files.amlogic diff -u src/sys/arch/arm/amlogic/files.amlogic:1.6 src/sys/arch/arm/amlogic/files.amlogic:1.7 --- src/sys/arch/arm/amlogic/files.amlogic:1.6 Sat Mar 7 21:34:25 2015 +++ src/sys/arch/arm/amlogic/files.amlogic Tue Mar 17 22:29:40 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.amlogic,v 1.6 2015/03/07 21:34:25 jmcneill Exp $ +# $NetBSD: files.amlogic,v 1.7 2015/03/17 22:29:40 jmcneill Exp $ # # Configuration info for Amlogic ARM Peripherals # @@ -51,3 +51,6 @@ defparam opt_amlogic.h CONMODE # Memory parameters defparam opt_amlogic.h MEMSIZE + +# CPU parameters +defparam opt_amlogic.h CPUFREQ Index: src/sys/arch/evbarm/amlogic/amlogic_machdep.c diff -u src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.15 src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.16 --- src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.15 Sun Mar 8 11:22:05 2015 +++ src/sys/arch/evbarm/amlogic/amlogic_machdep.c Tue Mar 17 22:29:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_machdep.c,v 1.15 2015/03/08 11:22:05 jmcneill Exp $ */ +/* $NetBSD: amlogic_machdep.c,v 1.16 2015/03/17 22:29:40 jmcneill Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.15 2015/03/08 11:22:05 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.16 2015/03/17 22:29:40 jmcneill Ex
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Mar 17 20:56:39 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: ehci.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.234.2.42 -r1.234.2.43 src/sys/dev/usb/ehci.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/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.234.2.42 src/sys/dev/usb/ehci.c:1.234.2.43 --- src/sys/dev/usb/ehci.c:1.234.2.42 Mon Mar 16 21:21:46 2015 +++ src/sys/dev/usb/ehci.c Tue Mar 17 20:56:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.234.2.42 2015/03/16 21:21:46 skrll Exp $ */ +/* $NetBSD: ehci.c,v 1.234.2.43 2015/03/17 20:56:39 skrll Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.42 2015/03/16 21:21:46 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.43 2015/03/17 20:56:39 skrll Exp $"); #include "ohci.h" #include "uhci.h" @@ -4304,8 +4304,10 @@ ehci_device_fs_isoc_start(usbd_xfer_hand sitd->sitd.sitd_next = sc->sc_flist[frindex]; if (sitd->sitd.sitd_next == 0) - /* FIXME: frindex table gets initialized to NULL - * or EHCI_NULL? */ + /* + * FIXME: frindex table gets initialized to NULL + * or EHCI_NULL? + */ sitd->sitd.sitd_next = EHCI_NULL; usb_syncmem(&sitd->dma,
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 19:38:43 UTC 2015 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1268 To generate a diff of this commit: cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.33 src/doc/CHANGES-6.0.7:1.1.2.34 --- src/doc/CHANGES-6.0.7:1.1.2.33 Tue Mar 17 18:38:37 2015 +++ src/doc/CHANGES-6.0.7 Tue Mar 17 19:38:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.33 2015/03/17 18:38:37 snj Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.34 2015/03/17 19:38:43 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -4397,3 +4397,46 @@ xsrc/xfree/xc/lib/font/bitmap/bdfread.c (bdfReadCharacters: ensure metrics fit into xCharInfo struct) [mrg, ticket #1280] +external/zlib/pigz/bin/pigz/Makefileup to 1.8 +external/zlib/pigz/dist/Makefileup to 1.1.1.2 +external/zlib/pigz/dist/README up to 1.1.1.2 +external/zlib/pigz/dist/pigz.1 up to 1.5 +external/zlib/pigz/dist/pigz.c up to 1.2 +external/zlib/pigz/dist/pigz.pdfup to 1.1.1.2 +external/zlib/pigz/dist/pigz.ps delete +external/zlib/pigz/dist/pigz.spec up to 1.1.1.2 +external/zlib/pigz/dist/yarn.c up to 1.1.1.2 +external/zlib/pigz/dist/yarn.h up to 1.1.1.2 +external/zlib/pigz/dist/zopfli/CONTRIBUTORS up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/COPYING up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/README up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/blocksplitter.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/blocksplitter.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/cache.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/cache.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/deflate.cup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/deflate.hup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/gzip_container.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/gzip_container.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/hash.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/hash.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/katajainen.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/katajainen.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/lz77.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/lz77.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/makefile up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/squeeze.cup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/squeeze.hup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/tree.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/tree.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/util.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/util.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zlib_container.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zlib_container.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zopfli.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zopfli_bin.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zopfli_lib.c up to 1.1.1.1 + + sync pigz with HEAD. + [mrg, ticket #1268] +
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 19:38:32 UTC 2015 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1268 To generate a diff of this commit: cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.33 src/doc/CHANGES-6.1.6:1.1.2.34 --- src/doc/CHANGES-6.1.6:1.1.2.33 Tue Mar 17 18:38:59 2015 +++ src/doc/CHANGES-6.1.6 Tue Mar 17 19:38:32 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.33 2015/03/17 18:38:59 snj Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.34 2015/03/17 19:38:32 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -4131,3 +4131,46 @@ xsrc/xfree/xc/lib/font/bitmap/bdfread.c (bdfReadCharacters: ensure metrics fit into xCharInfo struct) [mrg, ticket #1280] +external/zlib/pigz/bin/pigz/Makefileup to 1.8 +external/zlib/pigz/dist/Makefileup to 1.1.1.2 +external/zlib/pigz/dist/README up to 1.1.1.2 +external/zlib/pigz/dist/pigz.1 up to 1.5 +external/zlib/pigz/dist/pigz.c up to 1.2 +external/zlib/pigz/dist/pigz.pdfup to 1.1.1.2 +external/zlib/pigz/dist/pigz.ps delete +external/zlib/pigz/dist/pigz.spec up to 1.1.1.2 +external/zlib/pigz/dist/yarn.c up to 1.1.1.2 +external/zlib/pigz/dist/yarn.h up to 1.1.1.2 +external/zlib/pigz/dist/zopfli/CONTRIBUTORS up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/COPYING up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/README up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/blocksplitter.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/blocksplitter.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/cache.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/cache.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/deflate.cup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/deflate.hup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/gzip_container.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/gzip_container.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/hash.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/hash.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/katajainen.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/katajainen.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/lz77.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/lz77.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/makefile up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/squeeze.cup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/squeeze.hup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/tree.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/tree.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/util.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/util.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zlib_container.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zlib_container.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zopfli.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zopfli_bin.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zopfli_lib.c up to 1.1.1.1 + + sync pigz with HEAD. + [mrg, ticket #1268] +
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 19:39:10 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1268 To generate a diff of this commit: cvs rdiff -u -r1.1.2.202 -r1.1.2.203 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.202 src/doc/CHANGES-6.2:1.1.2.203 --- src/doc/CHANGES-6.2:1.1.2.202 Tue Mar 17 18:38:13 2015 +++ src/doc/CHANGES-6.2 Tue Mar 17 19:39:10 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.202 2015/03/17 18:38:13 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.203 2015/03/17 19:39:10 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -9702,3 +9702,46 @@ xsrc/xfree/xc/lib/font/bitmap/bdfread.c (bdfReadCharacters: ensure metrics fit into xCharInfo struct) [mrg, ticket #1280] +external/zlib/pigz/bin/pigz/Makefileup to 1.8 +external/zlib/pigz/dist/Makefileup to 1.1.1.2 +external/zlib/pigz/dist/README up to 1.1.1.2 +external/zlib/pigz/dist/pigz.1 up to 1.5 +external/zlib/pigz/dist/pigz.c up to 1.2 +external/zlib/pigz/dist/pigz.pdfup to 1.1.1.2 +external/zlib/pigz/dist/pigz.ps delete +external/zlib/pigz/dist/pigz.spec up to 1.1.1.2 +external/zlib/pigz/dist/yarn.c up to 1.1.1.2 +external/zlib/pigz/dist/yarn.h up to 1.1.1.2 +external/zlib/pigz/dist/zopfli/CONTRIBUTORS up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/COPYING up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/README up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/blocksplitter.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/blocksplitter.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/cache.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/cache.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/deflate.cup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/deflate.hup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/gzip_container.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/gzip_container.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/hash.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/hash.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/katajainen.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/katajainen.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/lz77.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/lz77.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/makefile up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/squeeze.cup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/squeeze.hup to 1.1.1.1 +external/zlib/pigz/dist/zopfli/tree.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/tree.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/util.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/util.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zlib_container.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zlib_container.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zopfli.h up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zopfli_bin.c up to 1.1.1.1 +external/zlib/pigz/dist/zopfli/zopfli_lib.c up to 1.1.1.1 + + sync pigz with HEAD. + [mrg, ticket #1268] +
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm
Module Name:src Committed By: martin Date: Tue Mar 17 19:41:43 UTC 2015 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: aesv8-armx.S armv4cpuid.S ghashv8-armx.S sha1-armv4-large.S sha256-armv4.S Log Message: Use .inst for hard coded instructions (instead of .byte and endian dependend represenation) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aesv8-armx.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4cpuid.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ghashv8-armx.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha1-armv4-large.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha256-armv4.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aesv8-armx.S diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aesv8-armx.S:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aesv8-armx.S:1.2 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aesv8-armx.S:1.1 Tue Mar 10 13:28:47 2015 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aesv8-armx.S Tue Mar 17 19:41:42 2015 @@ -48,7 +48,7 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q3},d5 vext.8 q9,q0,q3,#12 vst1.32 {q3},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 + .inst 0xf3f04300 @ aese q10,q0 subs r1,r1,#1 veor q3,q3,q9 @@ -67,7 +67,7 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q3},d5 vext.8 q9,q0,q3,#12 vst1.32 {q3},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 + .inst 0xf3f04300 @ aese q10,q0 veor q3,q3,q9 vext.8 q9,q0,q9,#12 @@ -82,7 +82,7 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q3},d5 vext.8 q9,q0,q3,#12 vst1.32 {q3},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 + .inst 0xf3f04300 @ aese q10,q0 veor q3,q3,q9 vext.8 q9,q0,q9,#12 @@ -109,7 +109,7 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q8},d5 vext.8 q9,q0,q3,#12 vst1.32 {d16},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 + .inst 0xf3f04300 @ aese q10,q0 subs r1,r1,#1 veor q3,q3,q9 @@ -145,7 +145,7 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q8},d5 vext.8 q9,q0,q3,#12 vst1.32 {q8},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 + .inst 0xf3f04300 @ aese q10,q0 subs r1,r1,#1 veor q3,q3,q9 @@ -161,7 +161,7 @@ aes_v8_set_encrypt_key: vdup.32 q10,d7[1] vext.8 q9,q0,q8,#12 - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 + .inst 0xf3f04300 @ aese q10,q0 veor q8,q8,q9 vext.8 q9,q0,q9,#12 @@ -204,15 +204,15 @@ aes_v8_set_decrypt_key: .Loop_imc: vld1.32 {q0},[r2] vld1.32 {q1},[r0] - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 + .inst 0xf3b003c0 @ aesimc q0,q0 + .inst 0xf3b023c2 @ aesimc q1,q1 vst1.32 {q0},[r0],r4 vst1.32 {q1},[r2]! cmp r0,r2 bhi .Loop_imc vld1.32 {q0},[r2] - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 + .inst 0xf3b003c0 @ aesimc q0,q0 vst1.32 {q0},[r0] eor r0,r0,r0 @ return value @@ -230,19 +230,19 @@ aes_v8_encrypt: vld1.32 {q1},[r2]! .Loop_enc: - .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 + .inst 0xf3b04300 @ aese q2,q0 vld1.32 {q0},[r2]! - .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 + .inst 0xf3b04384 @ aesmc q2,q2 subs r3,r3,#2 - .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 + .inst 0xf3b04302 @ aese q2,q1 vld1.32 {q1},[r2]! - .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 + .inst 0xf3b04384 @ aesmc q2,q2 bgt .Loop_enc - .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 + .inst 0xf3b04300 @ aese q2,q0 vld1.32 {q0},[r2] - .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 - .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 + .inst 0xf3b04384 @ aesmc q2,q2 + .inst 0xf3b04302 @ aese q2,q1 veor q2,q2,q0 vst1.8 {q2},[r1] @@ -259,19 +259,19 @@ aes_v8_decrypt: vld1.32 {q1},[r2]! .Loop_dec: - .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 + .inst 0xf3b04340 @ aesd q2,q0 vld1.32 {q0},[r2]! - .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 + .inst 0xf3b043c4 @ aesimc q2,q2 subs r3,r3,#2 - .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 + .inst 0xf3b04342 @ aesd q2,q1 vld1.32 {q1},[r2]! - .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 + .inst 0xf3b043c4 @ aesimc q2,q2 bgt .Loop_dec - .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 + .inst 0xf3b04340 @ aesd q2,q0 vld1.32 {q0},[r2] - .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 - .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 + .inst 0xf3b043c4 @ aesimc q2,q2 + .inst 0xf3b04342 @ aesd q2,q1 veor q2,q2,q0 vst1.8 {q2},[r1] @@ -315,36 +315,36 @@ aes_v8_cbc_encrypt: beq .Lcbc_enc128 .Loop_cbc_enc: - .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 + .inst 0xf3b00320 @ aese q0,q8 vld1.32 {q8},[r7]! - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + .inst 0xf3b00380 @ aesmc q0,q0 subs r6,r6,#2 - .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 + .inst 0xf3b00322 @ aese q0,q9 vld1.32 {q9},[r7]! - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + .inst 0xf3b003
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto
Module Name:src Committed By: martin Date: Tue Mar 17 19:39:15 UTC 2015 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto: Makefile Log Message: Compile libcrypto with -O3 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/Makefile diff -u src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.8 src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.9 --- src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.8 Thu Jan 16 01:15:32 2014 +++ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile Tue Mar 17 19:39:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2014/01/16 01:15:32 christos Exp $ +# $NetBSD: Makefile,v 1.9 2015/03/17 19:39:15 martin Exp $ # RCSid: # Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp @@ -38,7 +38,7 @@ CRYPTODIST= ${NETBSDSRCDIR}/crypto .include "srcs.inc" - +CFLAGS+=-O3 AFLAGS+=-DELF LIBDPLIBS+= crypt ${NETBSDSRCDIR}/lib/libcrypt
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Mar 17 19:10:12 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: usb_mem.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.65.2.5 -r1.65.2.6 src/sys/dev/usb/usb_mem.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/usb/usb_mem.c diff -u src/sys/dev/usb/usb_mem.c:1.65.2.5 src/sys/dev/usb/usb_mem.c:1.65.2.6 --- src/sys/dev/usb/usb_mem.c:1.65.2.5 Sun Feb 1 12:08:15 2015 +++ src/sys/dev/usb/usb_mem.c Tue Mar 17 19:10:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_mem.c,v 1.65.2.5 2015/02/01 12:08:15 skrll Exp $ */ +/* $NetBSD: usb_mem.c,v 1.65.2.6 2015/03/17 19:10:12 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.65.2.5 2015/02/01 12:08:15 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.65.2.6 2015/03/17 19:10:12 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -257,6 +257,7 @@ usb_block_freemem(usb_dma_block_t *b) usbd_status usb_allocmem(usbd_bus_handle bus, size_t size, size_t align, usb_dma_t *p) { + return usb_allocmem_flags(bus, size, align, p, 0); } @@ -387,10 +388,12 @@ usb_dmaaddr(usb_dma_t *dma, unsigned int return dma->udma_block->map->dm_segs[0].ds_addr + offset; } - /* Search for a bus_segment_t corresponding to this offset. With no + /* + * Search for a bus_segment_t corresponding to this offset. With no * record of the offset in the map to a particular dma_segment_t, we * have to iterate from the start of the list each time. Could be - * improved */ + * improved + */ seg_offs = 0; for (i = 0; i < dma->udma_block->nsegs; i++) { if (seg_offs + dma->udma_block->map->dm_segs[i].ds_len > offset) @@ -407,6 +410,7 @@ usb_dmaaddr(usb_dma_t *dma, unsigned int void usb_syncmem(usb_dma_t *p, bus_addr_t offset, bus_size_t len, int ops) { + bus_dmamap_sync(p->udma_block->tag, p->udma_block->map, p->udma_offs + offset, len, ops); }
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Mar 17 19:02:44 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: usbdi.c Log Message: Spello To generate a diff of this commit: cvs rdiff -u -r1.162.2.19 -r1.162.2.20 src/sys/dev/usb/usbdi.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/usb/usbdi.c diff -u src/sys/dev/usb/usbdi.c:1.162.2.19 src/sys/dev/usb/usbdi.c:1.162.2.20 --- src/sys/dev/usb/usbdi.c:1.162.2.19 Wed Mar 11 07:48:42 2015 +++ src/sys/dev/usb/usbdi.c Tue Mar 17 19:02:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.162.2.19 2015/03/11 07:48:42 skrll Exp $ */ +/* $NetBSD: usbdi.c,v 1.162.2.20 2015/03/17 19:02:44 skrll Exp $ */ /* * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.19 2015/03/11 07:48:42 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.20 2015/03/17 19:02:44 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1208,7 +1208,7 @@ usbd_get_endpoint_descriptor(usbd_interf /* * usbd_ratecheck() can limit the number of error messages that occurs. * When a device is unplugged it may take up to 0.25s for the hub driver - * to notice it. If the driver continuosly tries to do I/O operations + * to notice it. If the driver continuously tries to do I/O operations * this can generate a large number of messages. */ int
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 19:00:43 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: 620 To generate a diff of this commit: cvs rdiff -u -r1.1.2.229 -r1.1.2.230 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.229 src/doc/CHANGES-7.0:1.1.2.230 --- src/doc/CHANGES-7.0:1.1.2.229 Tue Mar 17 17:53:36 2015 +++ src/doc/CHANGES-7.0 Tue Mar 17 19:00:42 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.229 2015/03/17 17:53:36 riz Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.230 2015/03/17 19:00:42 snj Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -18589,3 +18589,34 @@ sys/external/bsd/drm2/include/drm/intel- Additional DRM fixes. [snj, ticket #590] +xsrc/external/mit/libXfont/dist/ChangeLog up to 1.1.1.9 +xsrc/external/mit/libXfont/dist/Makefile.in up to 1.1.1.8 +xsrc/external/mit/libXfont/dist/aclocal.m4 up to 1.1.1.9 +xsrc/external/mit/libXfont/dist/compile up to 1.1.1.2 +xsrc/external/mit/libXfont/dist/config.guess up to 1.1.1.7 +xsrc/external/mit/libXfont/dist/config.sub up to 1.1.1.7 +xsrc/external/mit/libXfont/dist/configure up to 1.1.1.9 +xsrc/external/mit/libXfont/dist/configure.ac up to 1.1.1.9 +xsrc/external/mit/libXfont/dist/depcomp up to 1.1.1.6 +xsrc/external/mit/libXfont/dist/doc/Makefile.in up to 1.1.1.4 +xsrc/external/mit/libXfont/dist/install-sh up to 1.1.1.6 +xsrc/external/mit/libXfont/dist/missing up to 1.1.1.7 +xsrc/external/mit/libXfont/dist/src/FreeType/Makefile.in up to 1.1.1.8 +xsrc/external/mit/libXfont/dist/src/Makefile.in up to 1.1.1.8 +xsrc/external/mit/libXfont/dist/src/bitmap/Makefile.in up to 1.1.1.8 +xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c up to 1.4 +xsrc/external/mit/libXfont/dist/src/builtins/Makefile.in up to 1.1.1.8 +xsrc/external/mit/libXfont/dist/src/fc/Makefile.in up to 1.1.1.8 +xsrc/external/mit/libXfont/dist/src/fc/fslibos.h up to 1.1.1.4 +xsrc/external/mit/libXfont/dist/src/fontfile/Makefile.in up to 1.1.1.8 +xsrc/external/mit/libXfont/dist/src/stubs/Makefile.in up to 1.1.1.8 +xsrc/external/mit/libXfont/dist/src/util/Makefile.in up to 1.1.1.8 +xsrc/external/mit/libXfont/include/config.h 1.7 +xsrc/xfree/xc/lib/font/bitmap/bdfread.c 1.5 + + Fix CVE-2015-1802 (bdfReadProperties: property count needs + range check), CVE-2015-1803 (bdfReadCharacters: bailout if a + char's bitmap cannot be read), and CVE-2015-1804 + (bdfReadCharacters: ensure metrics fit into xCharInfo struct) + [mrg, ticket #620] +
CVS commit: [netbsd-7] xsrc/external/mit/libXfont
Module Name:xsrc Committed By: snj Date: Tue Mar 17 18:57:36 UTC 2015 Modified Files: xsrc/external/mit/libXfont/dist [netbsd-7]: ChangeLog Makefile.in aclocal.m4 compile config.guess config.sub configure configure.ac depcomp install-sh missing xsrc/external/mit/libXfont/dist/doc [netbsd-7]: Makefile.in xsrc/external/mit/libXfont/dist/src [netbsd-7]: Makefile.in xsrc/external/mit/libXfont/dist/src/FreeType [netbsd-7]: Makefile.in xsrc/external/mit/libXfont/dist/src/bitmap [netbsd-7]: Makefile.in bdfread.c xsrc/external/mit/libXfont/dist/src/builtins [netbsd-7]: Makefile.in xsrc/external/mit/libXfont/dist/src/fc [netbsd-7]: Makefile.in fslibos.h xsrc/external/mit/libXfont/dist/src/fontfile [netbsd-7]: Makefile.in xsrc/external/mit/libXfont/dist/src/stubs [netbsd-7]: Makefile.in xsrc/external/mit/libXfont/dist/src/util [netbsd-7]: Makefile.in xsrc/external/mit/libXfont/include [netbsd-7]: config.h Log Message: Pull up following revision(s) (requested by mrg in ticket #620): xsrc/external/mit/libXfont/dist/ChangeLog: up to 1.1.1.9 xsrc/external/mit/libXfont/dist/Makefile.in: up to 1.1.1.8 xsrc/external/mit/libXfont/dist/aclocal.m4: up to 1.1.1.9 xsrc/external/mit/libXfont/dist/compile: up to 1.1.1.2 xsrc/external/mit/libXfont/dist/config.guess: up to 1.1.1.7 xsrc/external/mit/libXfont/dist/config.sub: up to 1.1.1.7 xsrc/external/mit/libXfont/dist/configure: up to 1.1.1.9 xsrc/external/mit/libXfont/dist/configure.ac: up to 1.1.1.9 xsrc/external/mit/libXfont/dist/depcomp: up to 1.1.1.6 xsrc/external/mit/libXfont/dist/doc/Makefile.in: up to 1.1.1.4 xsrc/external/mit/libXfont/dist/install-sh: up to 1.1.1.6 xsrc/external/mit/libXfont/dist/missing: up to 1.1.1.7 xsrc/external/mit/libXfont/dist/src/FreeType/Makefile.in: up to 1.1.1.8 xsrc/external/mit/libXfont/dist/src/Makefile.in: up to 1.1.1.8 xsrc/external/mit/libXfont/dist/src/bitmap/Makefile.in: up to 1.1.1.8 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c: up to 1.4 xsrc/external/mit/libXfont/dist/src/builtins/Makefile.in: up to 1.1.1.8 xsrc/external/mit/libXfont/dist/src/fc/Makefile.in: up to 1.1.1.8 xsrc/external/mit/libXfont/dist/src/fc/fslibos.h: up to 1.1.1.4 xsrc/external/mit/libXfont/dist/src/fontfile/Makefile.in: up to 1.1.1.8 xsrc/external/mit/libXfont/dist/src/stubs/Makefile.in: up to 1.1.1.8 xsrc/external/mit/libXfont/dist/src/util/Makefile.in: up to 1.1.1.8 Update libXfont to 1.5.1. -- regen for libXfont 1.5.1. To generate a diff of this commit: cvs rdiff -u -r1.1.1.7.2.1 -r1.1.1.7.2.2 \ xsrc/external/mit/libXfont/dist/ChangeLog \ xsrc/external/mit/libXfont/dist/aclocal.m4 \ xsrc/external/mit/libXfont/dist/configure \ xsrc/external/mit/libXfont/dist/configure.ac cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \ xsrc/external/mit/libXfont/dist/Makefile.in cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 xsrc/external/mit/libXfont/dist/compile cvs rdiff -u -r1.1.1.5.2.1 -r1.1.1.5.2.2 \ xsrc/external/mit/libXfont/dist/config.guess \ xsrc/external/mit/libXfont/dist/config.sub \ xsrc/external/mit/libXfont/dist/missing cvs rdiff -u -r1.1.1.5 -r1.1.1.5.2.1 xsrc/external/mit/libXfont/dist/depcomp \ xsrc/external/mit/libXfont/dist/install-sh cvs rdiff -u -r1.1.1.2.2.1 -r1.1.1.2.2.2 \ xsrc/external/mit/libXfont/dist/doc/Makefile.in cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \ xsrc/external/mit/libXfont/dist/src/Makefile.in cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \ xsrc/external/mit/libXfont/dist/src/FreeType/Makefile.in cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \ xsrc/external/mit/libXfont/dist/src/bitmap/Makefile.in cvs rdiff -u -r1.3 -r1.3.4.1 \ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \ xsrc/external/mit/libXfont/dist/src/builtins/Makefile.in cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \ xsrc/external/mit/libXfont/dist/src/fc/Makefile.in cvs rdiff -u -r1.1.1.3 -r1.1.1.3.4.1 \ xsrc/external/mit/libXfont/dist/src/fc/fslibos.h cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \ xsrc/external/mit/libXfont/dist/src/fontfile/Makefile.in cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \ xsrc/external/mit/libXfont/dist/src/stubs/Makefile.in cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \ xsrc/external/mit/libXfont/dist/src/util/Makefile.in cvs rdiff -u -r1.5.2.1 -r1.5.2.2 xsrc/external/mit/libXfont/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/ChangeLog diff -u xsrc/external/mit/libXfont/dist/ChangeLog:1.1.1.7.2.1 xsrc/external/mit/libXfont/dist/ChangeLog:1.1.1.7.2.2 --- xsrc/external/mit/libXfont/dist/Change
CVS commit: [netbsd-7] xsrc/xfree/xc/lib/font/bitmap
Module Name:xsrc Committed By: snj Date: Tue Mar 17 18:49:51 UTC 2015 Modified Files: xsrc/xfree/xc/lib/font/bitmap [netbsd-7]: bdfread.c Log Message: Pull up following revision(s) (requested by mrg in ticket #620): xfree/xc/lib/font/bitmap/bdfread.c: revision 1.5 pull across bfdread.c fixes from libXfont 1.5.1, which fixes: - CVE-2015-1802: bdfReadProperties: property count needs range check The bdf parser reads a count for the number of properties defined in a font from the font file, and allocates arrays with entries for each property based on that count. It never checked to see if that count was negative, or large enough to overflow when multiplied by the size of the structures being allocated, and could thus allocate the wrong buffer size, leading to out of bounds writes. - CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read If the bdf parser failed to parse the data for the bitmap for any character, it would proceed with an invalid pointer to the bitmap data and later crash when trying to read the bitmap from that pointer. - CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct The bdf parser read metrics values as 32-bit integers, but stored them into 16-bit integers. Overflows could occur in various operations leading to out-of-bounds memory access. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.4.1 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.4 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.4.4.1 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.4 Tue Jan 7 07:43:47 2014 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Mar 17 18:49:51 2015 @@ -63,8 +63,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@ bdfReadCharacters(FontFilePtr file, Font bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -430,6 +444,14 @@ bdfReadCharacters(FontFilePtr file, Font charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -461,7 +483,10 @@ bdfReadCharacters(FontFilePtr file, Font ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -609,7 +634,9 @@ bdfReadProperties(FontFilePtr file, Font bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } -if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { +if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); }
CVS commit: [netbsd-5-2] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 18:44:37 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: 1953 To generate a diff of this commit: cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/CHANGES-5.2.4 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-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.20 src/doc/CHANGES-5.2.4:1.1.2.21 --- src/doc/CHANGES-5.2.4:1.1.2.20 Mon Mar 16 21:21:50 2015 +++ src/doc/CHANGES-5.2.4 Tue Mar 17 18:44:37 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.20 2015/03/16 21:21:50 bouyer Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.21 2015/03/17 18:44:37 snj Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2556,3 +2556,12 @@ distrib/utils/x_gzip/Makefile patch Sync gzip core with HEAD. [mrg, ticket #1951] +xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c patch +xsrc/xfree/xc/lib/font/bitmap/bdfread.c patch + + Fix CVE-2015-1802 (bdfReadProperties: property count needs + range check), CVE-2015-1803 (bdfReadCharacters: bailout if a + char's bitmap cannot be read), and CVE-2015-1804 + (bdfReadCharacters: ensure metrics fit into xCharInfo struct) + [mrg, ticket #1953] +
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 18:43:10 UTC 2015 Modified Files: src/doc [netbsd-5]: CHANGES-5.3 Log Message: 1953 To generate a diff of this commit: cvs rdiff -u -r1.1.2.103 -r1.1.2.104 src/doc/CHANGES-5.3 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-5.3 diff -u src/doc/CHANGES-5.3:1.1.2.103 src/doc/CHANGES-5.3:1.1.2.104 --- src/doc/CHANGES-5.3:1.1.2.103 Mon Mar 16 21:22:43 2015 +++ src/doc/CHANGES-5.3 Tue Mar 17 18:43:09 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.3,v 1.1.2.103 2015/03/16 21:22:43 bouyer Exp $ +# $NetBSD: CHANGES-5.3,v 1.1.2.104 2015/03/17 18:43:09 snj Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3 release: @@ -3759,3 +3759,12 @@ distrib/utils/x_gzip/Makefile patch Sync gzip core with HEAD. [mrg, ticket #1951] +xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c patch +xsrc/xfree/xc/lib/font/bitmap/bdfread.c patch + + Fix CVE-2015-1802 (bdfReadProperties: property count needs + range check), CVE-2015-1803 (bdfReadCharacters: bailout if a + char's bitmap cannot be read), and CVE-2015-1804 + (bdfReadCharacters: ensure metrics fit into xCharInfo struct) + [mrg, ticket #1953] +
CVS commit: [netbsd-5-2] xsrc
Module Name:xsrc Committed By: snj Date: Tue Mar 17 18:44:15 UTC 2015 Modified Files: xsrc/external/mit/libXfont/dist/src/bitmap [netbsd-5-2]: bdfread.c xsrc/xfree/xc/lib/font/bitmap [netbsd-5-2]: bdfread.c Log Message: Apply patch (requested by mrg in ticket #1953): Fix the following security issues: CVE-2015-1802: bdfReadProperties: property count needs range check The bdf parser reads a count for the number of properties defined in a font from the font file, and allocates arrays with entries for each property based on that count. It never checked to see if that count was negative, or large enough to overflow when multiplied by the size of the structures being allocated, and could thus allocate the wrong buffer size, leading to out of bounds writes. CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read If the bdf parser failed to parse the data for the bitmap for any character, it would proceed with an invalid pointer to the bitmap data and later crash when trying to read the bitmap from that pointer. CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct The bdf parser read metrics values as 32-bit integers, but stored them into 16-bit integers. Overflows could occur in various operations To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1.4.1 -r1.1.1.1.2.1.4.2 \ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.2.12.1 -r1.2.12.2 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.1.4.1 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.1.4.2 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.1.4.1 Tue Jan 7 18:07:21 2014 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Mar 17 18:44:15 2015 @@ -65,8 +65,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@ bdfReadCharacters(FontFilePtr file, Font bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -430,6 +444,14 @@ bdfReadCharacters(FontFilePtr file, Font charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -461,7 +483,10 @@ bdfReadCharacters(FontFilePtr file, Font ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -607,7 +632,9 @@ bdfReadProperties(FontFilePtr file, Font bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } -if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { +if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); } Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.12.1 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.12.2 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.12.1 Tue Jan 7 18:07:21 2014 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Mar 17 18:44:15 2015 @@ -63,8 +63,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# en
CVS commit: [netbsd-5] xsrc
Module Name:xsrc Committed By: snj Date: Tue Mar 17 18:42:34 UTC 2015 Modified Files: xsrc/external/mit/libXfont/dist/src/bitmap [netbsd-5]: bdfread.c xsrc/xfree/xc/lib/font/bitmap [netbsd-5]: bdfread.c Log Message: Apply patch (requested by mrg in ticket #1953): Fix the following security issues: CVE-2015-1802: bdfReadProperties: property count needs range check The bdf parser reads a count for the number of properties defined in a font from the font file, and allocates arrays with entries for each property based on that count. It never checked to see if that count was negative, or large enough to overflow when multiplied by the size of the structures being allocated, and could thus allocate the wrong buffer size, leading to out of bounds writes. CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read If the bdf parser failed to parse the data for the bitmap for any character, it would proceed with an invalid pointer to the bitmap data and later crash when trying to read the bitmap from that pointer. CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct The bdf parser read metrics values as 32-bit integers, but stored them into 16-bit integers. Overflows could occur in various operations To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.2.2.1 -r1.2.2.2 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.2 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.3 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.2 Tue Jan 7 18:07:17 2014 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Mar 17 18:42:34 2015 @@ -65,8 +65,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@ bdfReadCharacters(FontFilePtr file, Font bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -430,6 +444,14 @@ bdfReadCharacters(FontFilePtr file, Font charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -461,7 +483,10 @@ bdfReadCharacters(FontFilePtr file, Font ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -607,7 +632,9 @@ bdfReadProperties(FontFilePtr file, Font bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } -if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { +if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); } Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.2.1 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.2.2 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.2.1 Tue Jan 7 18:07:17 2014 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Mar 17 18:42:34 2015 @@ -63,8 +63,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICE
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 18:43:50 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: 1953 To generate a diff of this commit: cvs rdiff -u -r1.1.2.19 -r1.1.2.20 src/doc/CHANGES-5.1.6 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-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.19 src/doc/CHANGES-5.1.6:1.1.2.20 --- src/doc/CHANGES-5.1.6:1.1.2.19 Mon Mar 16 21:22:17 2015 +++ src/doc/CHANGES-5.1.6 Tue Mar 17 18:43:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.19 2015/03/16 21:22:17 bouyer Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.20 2015/03/17 18:43:50 snj Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2556,3 +2556,12 @@ distrib/utils/x_gzip/Makefile patch Sync gzip core with HEAD. [mrg, ticket #1951] +xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c patch +xsrc/xfree/xc/lib/font/bitmap/bdfread.c patch + + Fix CVE-2015-1802 (bdfReadProperties: property count needs + range check), CVE-2015-1803 (bdfReadCharacters: bailout if a + char's bitmap cannot be read), and CVE-2015-1804 + (bdfReadCharacters: ensure metrics fit into xCharInfo struct) + [mrg, ticket #1953] +
CVS commit: [netbsd-5-1] xsrc
Module Name:xsrc Committed By: snj Date: Tue Mar 17 18:43:29 UTC 2015 Modified Files: xsrc/external/mit/libXfont/dist/src/bitmap [netbsd-5-1]: bdfread.c xsrc/xfree/xc/lib/font/bitmap [netbsd-5-1]: bdfread.c Log Message: Apply patch (requested by mrg in ticket #1953): Fix the following security issues: CVE-2015-1802: bdfReadProperties: property count needs range check The bdf parser reads a count for the number of properties defined in a font from the font file, and allocates arrays with entries for each property based on that count. It never checked to see if that count was negative, or large enough to overflow when multiplied by the size of the structures being allocated, and could thus allocate the wrong buffer size, leading to out of bounds writes. CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read If the bdf parser failed to parse the data for the bitmap for any character, it would proceed with an invalid pointer to the bitmap data and later crash when trying to read the bitmap from that pointer. CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct The bdf parser read metrics values as 32-bit integers, but stored them into 16-bit integers. Overflows could occur in various operations To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1.2.1 -r1.1.1.1.2.1.2.2 \ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.2.6.1 -r1.2.6.2 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.1.2.1 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.1.2.2 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.1.2.1 Tue Jan 7 18:07:27 2014 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Mar 17 18:43:29 2015 @@ -65,8 +65,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@ bdfReadCharacters(FontFilePtr file, Font bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -430,6 +444,14 @@ bdfReadCharacters(FontFilePtr file, Font charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -461,7 +483,10 @@ bdfReadCharacters(FontFilePtr file, Font ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -607,7 +632,9 @@ bdfReadProperties(FontFilePtr file, Font bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } -if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { +if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); } Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.6.1 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.6.2 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.6.1 Tue Jan 7 18:07:27 2014 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Mar 17 18:43:29 2015 @@ -63,8 +63,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 18:38:37 UTC 2015 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1280 To generate a diff of this commit: cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.32 src/doc/CHANGES-6.0.7:1.1.2.33 --- src/doc/CHANGES-6.0.7:1.1.2.32 Thu Mar 5 22:26:53 2015 +++ src/doc/CHANGES-6.0.7 Tue Mar 17 18:38:37 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.32 2015/03/05 22:26:53 riz Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.33 2015/03/17 18:38:37 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -4388,3 +4388,12 @@ distrib/sets/lists/text/mi 1.43 man pages on a system that doesn't have the text set. Fixes PR 49230. [snj, ticket #1263] +xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c patch +xsrc/xfree/xc/lib/font/bitmap/bdfread.c patch + + Fix CVE-2015-1802 (bdfReadProperties: property count needs + range check), CVE-2015-1803 (bdfReadCharacters: bailout if a + char's bitmap cannot be read), and CVE-2015-1804 + (bdfReadCharacters: ensure metrics fit into xCharInfo struct) + [mrg, ticket #1280] +
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 18:38:59 UTC 2015 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1280 To generate a diff of this commit: cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.32 src/doc/CHANGES-6.1.6:1.1.2.33 --- src/doc/CHANGES-6.1.6:1.1.2.32 Thu Mar 5 22:26:20 2015 +++ src/doc/CHANGES-6.1.6 Tue Mar 17 18:38:59 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.32 2015/03/05 22:26:20 riz Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.33 2015/03/17 18:38:59 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -4122,3 +4122,12 @@ distrib/sets/lists/text/mi 1.43 man pages on a system that doesn't have the text set. Fixes PR 49230. [snj, ticket #1263] +xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c patch +xsrc/xfree/xc/lib/font/bitmap/bdfread.c patch + + Fix CVE-2015-1802 (bdfReadProperties: property count needs + range check), CVE-2015-1803 (bdfReadCharacters: bailout if a + char's bitmap cannot be read), and CVE-2015-1804 + (bdfReadCharacters: ensure metrics fit into xCharInfo struct) + [mrg, ticket #1280] +
CVS commit: [netbsd-6-0] xsrc
Module Name:xsrc Committed By: snj Date: Tue Mar 17 18:35:35 UTC 2015 Modified Files: xsrc/external/mit/libXfont/dist/src/bitmap [netbsd-6-0]: bdfread.c xsrc/xfree/xc/lib/font/bitmap [netbsd-6-0]: bdfread.c Log Message: Apply patch (requested by mrg in ticket #1280): Fix the following security issues: CVE-2015-1802: bdfReadProperties: property count needs range check The bdf parser reads a count for the number of properties defined in a font from the font file, and allocates arrays with entries for each property based on that count. It never checked to see if that count was negative, or large enough to overflow when multiplied by the size of the structures being allocated, and could thus allocate the wrong buffer size, leading to out of bounds writes. CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read If the bdf parser failed to parse the data for the bitmap for any character, it would proceed with an invalid pointer to the bitmap data and later crash when trying to read the bitmap from that pointer. CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct The bdf parser read metrics values as 32-bit integers, but stored them into 16-bit integers. Overflows could occur in various operations To generate a diff of this commit: cvs rdiff -u -r1.1.1.2.4.1 -r1.1.1.2.4.2 \ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.2.10.1 -r1.2.10.2 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.2.4.1 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.2.4.2 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.2.4.1 Tue Jan 7 18:02:37 2014 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Mar 17 18:35:35 2015 @@ -65,8 +65,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@ bdfReadCharacters(FontFilePtr file, Font bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -430,6 +444,14 @@ bdfReadCharacters(FontFilePtr file, Font charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -461,7 +483,10 @@ bdfReadCharacters(FontFilePtr file, Font ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -607,7 +632,9 @@ bdfReadProperties(FontFilePtr file, Font bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } -if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { +if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); } Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.10.1 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.10.2 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.10.1 Tue Jan 7 18:02:38 2014 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Mar 17 18:35:35 2015 @@ -63,8 +63,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #defi
CVS commit: xsrc/external/mit/libXfont/include
Module Name:xsrc Committed By: mrg Date: Tue Mar 17 18:36:41 UTC 2015 Modified Files: xsrc/external/mit/libXfont/include: config.h Log Message: regen for libXfont 1.5.1. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/libXfont/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/include/config.h diff -u xsrc/external/mit/libXfont/include/config.h:1.6 xsrc/external/mit/libXfont/include/config.h:1.7 --- xsrc/external/mit/libXfont/include/config.h:1.6 Wed Feb 25 20:00:49 2015 +++ xsrc/external/mit/libXfont/include/config.h Tue Mar 17 18:36:41 2015 @@ -75,7 +75,7 @@ #define PACKAGE_NAME "libXfont" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "libXfont 1.5.0" +#define PACKAGE_STRING "libXfont 1.5.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libXfont" @@ -84,7 +84,7 @@ #undef PACKAGE_URL /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.5.0" +#define PACKAGE_VERSION "1.5.1" /* Major version of this package */ #define PACKAGE_VERSION_MAJOR 1 @@ -93,7 +93,7 @@ #define PACKAGE_VERSION_MINOR 5 /* Patch version of this package */ -#define PACKAGE_VERSION_PATCHLEVEL 0 +#define PACKAGE_VERSION_PATCHLEVEL 1 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -127,7 +127,7 @@ /* Version number of package */ -#define VERSION "1.5.0" +#define VERSION "1.5.1" /* Support bdf format bitmap font files */ #define XFONT_BDFFORMAT 1
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Tue Mar 17 18:38:14 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1280 To generate a diff of this commit: cvs rdiff -u -r1.1.2.201 -r1.1.2.202 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.201 src/doc/CHANGES-6.2:1.1.2.202 --- src/doc/CHANGES-6.2:1.1.2.201 Thu Mar 5 22:27:23 2015 +++ src/doc/CHANGES-6.2 Tue Mar 17 18:38:13 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.201 2015/03/05 22:27:23 riz Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.202 2015/03/17 18:38:13 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -9693,3 +9693,12 @@ distrib/sets/lists/text/mi 1.43 man pages on a system that doesn't have the text set. Fixes PR 49230. [snj, ticket #1263] +xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c patch +xsrc/xfree/xc/lib/font/bitmap/bdfread.c patch + + Fix CVE-2015-1802 (bdfReadProperties: property count needs + range check), CVE-2015-1803 (bdfReadCharacters: bailout if a + char's bitmap cannot be read), and CVE-2015-1804 + (bdfReadCharacters: ensure metrics fit into xCharInfo struct) + [mrg, ticket #1280] +
CVS commit: [netbsd-6-1] xsrc
Module Name:xsrc Committed By: snj Date: Tue Mar 17 18:36:07 UTC 2015 Modified Files: xsrc/external/mit/libXfont/dist/src/bitmap [netbsd-6-1]: bdfread.c xsrc/xfree/xc/lib/font/bitmap [netbsd-6-1]: bdfread.c Log Message: Apply patch (requested by mrg in ticket #1280): Fix the following security issues: CVE-2015-1802: bdfReadProperties: property count needs range check The bdf parser reads a count for the number of properties defined in a font from the font file, and allocates arrays with entries for each property based on that count. It never checked to see if that count was negative, or large enough to overflow when multiplied by the size of the structures being allocated, and could thus allocate the wrong buffer size, leading to out of bounds writes. CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read If the bdf parser failed to parse the data for the bitmap for any character, it would proceed with an invalid pointer to the bitmap data and later crash when trying to read the bitmap from that pointer. CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct The bdf parser read metrics values as 32-bit integers, but stored them into 16-bit integers. Overflows could occur in various operations To generate a diff of this commit: cvs rdiff -u -r1.1.1.2.6.1 -r1.1.1.2.6.2 \ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.2.14.1 -r1.2.14.2 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.2.6.1 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.2.6.2 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.2.6.1 Tue Jan 7 18:02:33 2014 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Mar 17 18:36:07 2015 @@ -65,8 +65,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@ bdfReadCharacters(FontFilePtr file, Font bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -430,6 +444,14 @@ bdfReadCharacters(FontFilePtr file, Font charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -461,7 +483,10 @@ bdfReadCharacters(FontFilePtr file, Font ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -607,7 +632,9 @@ bdfReadProperties(FontFilePtr file, Font bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } -if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { +if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); } Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.14.1 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.14.2 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.14.1 Tue Jan 7 18:02:33 2014 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Mar 17 18:36:07 2015 @@ -63,8 +63,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #defi
CVS commit: [netbsd-6] xsrc
Module Name:xsrc Committed By: snj Date: Tue Mar 17 18:35:09 UTC 2015 Modified Files: xsrc/external/mit/libXfont/dist/src/bitmap [netbsd-6]: bdfread.c xsrc/xfree/xc/lib/font/bitmap [netbsd-6]: bdfread.c Log Message: Apply patch (requested by mrg in ticket #1280): Fix the following security issues: CVE-2015-1802: bdfReadProperties: property count needs range check The bdf parser reads a count for the number of properties defined in a font from the font file, and allocates arrays with entries for each property based on that count. It never checked to see if that count was negative, or large enough to overflow when multiplied by the size of the structures being allocated, and could thus allocate the wrong buffer size, leading to out of bounds writes. CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read If the bdf parser failed to parse the data for the bitmap for any character, it would proceed with an invalid pointer to the bitmap data and later crash when trying to read the bitmap from that pointer. CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct The bdf parser read metrics values as 32-bit integers, but stored them into 16-bit integers. Overflows could occur in various operations To generate a diff of this commit: cvs rdiff -u -r1.1.1.2.2.1 -r1.1.1.2.2.2 \ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.2.8.1 -r1.2.8.2 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.2.2.1 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.2.2.2 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.2.2.1 Tue Jan 7 18:02:29 2014 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Mar 17 18:35:09 2015 @@ -65,8 +65,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@ bdfReadCharacters(FontFilePtr file, Font bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -430,6 +444,14 @@ bdfReadCharacters(FontFilePtr file, Font charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -461,7 +483,10 @@ bdfReadCharacters(FontFilePtr file, Font ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -607,7 +632,9 @@ bdfReadProperties(FontFilePtr file, Font bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } -if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { +if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); } Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.8.1 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.8.2 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.8.1 Tue Jan 7 18:02:29 2014 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Mar 17 18:35:09 2015 @@ -63,8 +63,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICE
CVS commit: xsrc/xfree/xc/lib/font/bitmap
Module Name:xsrc Committed By: mrg Date: Tue Mar 17 18:13:24 UTC 2015 Modified Files: xsrc/xfree/xc/lib/font/bitmap: bdfread.c Log Message: pull across bfdread.c fixes from libXfont 1.5.1, which fixes: CVE-2015-1802: bdfReadProperties: property count needs range check The bdf parser reads a count for the number of properties defined in a font from the font file, and allocates arrays with entries for each property based on that count. It never checked to see if that count was negative, or large enough to overflow when multiplied by the size of the structures being allocated, and could thus allocate the wrong buffer size, leading to out of bounds writes. - CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read If the bdf parser failed to parse the data for the bitmap for any character, it would proceed with an invalid pointer to the bitmap data and later crash when trying to read the bitmap from that pointer. - CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct The bdf parser read metrics values as 32-bit integers, but stored them into 16-bit integers. Overflows could occur in various operations leading to out-of-bounds memory access. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.4 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.5 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.4 Tue Jan 7 07:43:47 2014 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Mar 17 18:13:24 2015 @@ -63,8 +63,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@ bdfReadCharacters(FontFilePtr file, Font bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -430,6 +444,14 @@ bdfReadCharacters(FontFilePtr file, Font charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -461,7 +483,10 @@ bdfReadCharacters(FontFilePtr file, Font ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -609,7 +634,9 @@ bdfReadProperties(FontFilePtr file, Font bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } -if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { +if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); }
CVS commit: xsrc/external/mit/libXfont/dist/src/bitmap
Module Name:xsrc Committed By: mrg Date: Tue Mar 17 18:11:17 UTC 2015 Modified Files: xsrc/external/mit/libXfont/dist/src/bitmap: bdfread.c Log Message: merge Xfont 1.5.1. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.3 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.4 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.3 Tue Jan 7 07:42:25 2014 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Mar 17 18:11:17 2015 @@ -62,8 +62,16 @@ from The Open Group. #if HAVE_STDINT_H #include -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -417,6 +425,12 @@ bdfReadCharacters(FontFilePtr file, Font bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -427,6 +441,14 @@ bdfReadCharacters(FontFilePtr file, Font charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -458,7 +480,10 @@ bdfReadCharacters(FontFilePtr file, Font ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -604,7 +629,9 @@ bdfReadProperties(FontFilePtr file, Font bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } -if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { +if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); }
CVS import: xsrc/external/mit/libXfont/dist
Module Name:xsrc Committed By: mrg Date: Tue Mar 17 18:10:52 UTC 2015 Update of /cvsroot/xsrc/external/mit/libXfont/dist In directory ivanova.netbsd.org:/tmp/cvs-serv1865 Log Message: initial import of libXfont-1.5.1 Status: Vendor Tag: xorg Release Tags: libXfont-1-5-1 U xsrc/external/mit/libXfont/dist/Makefile.am U xsrc/external/mit/libXfont/dist/AUTHORS U xsrc/external/mit/libXfont/dist/compile U xsrc/external/mit/libXfont/dist/README U xsrc/external/mit/libXfont/dist/config.sub U xsrc/external/mit/libXfont/dist/configure.ac U xsrc/external/mit/libXfont/dist/devbook.am U xsrc/external/mit/libXfont/dist/ltmain.sh U xsrc/external/mit/libXfont/dist/Makefile.in U xsrc/external/mit/libXfont/dist/COPYING U xsrc/external/mit/libXfont/dist/configure U xsrc/external/mit/libXfont/dist/missing U xsrc/external/mit/libXfont/dist/depcomp U xsrc/external/mit/libXfont/dist/INSTALL U xsrc/external/mit/libXfont/dist/install-sh U xsrc/external/mit/libXfont/dist/ChangeLog U xsrc/external/mit/libXfont/dist/aclocal.m4 U xsrc/external/mit/libXfont/dist/config.guess U xsrc/external/mit/libXfont/dist/xfont.pc.in U xsrc/external/mit/libXfont/dist/config.h.in U xsrc/external/mit/libXfont/dist/include/X11/fonts/fontutil.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/pcf.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/fontconf.h.in U xsrc/external/mit/libXfont/dist/include/X11/fonts/fontencc.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/fntfilst.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/bdfint.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/fontxlfd.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/fontmisc.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/fntfilio.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/bitmap.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/fontshow.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/bufio.h U xsrc/external/mit/libXfont/dist/include/X11/fonts/fntfil.h U xsrc/external/mit/libXfont/dist/src/Makefile.am U xsrc/external/mit/libXfont/dist/src/Makefile.in U xsrc/external/mit/libXfont/dist/src/dummy.c U xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.h U xsrc/external/mit/libXfont/dist/src/FreeType/Makefile.in U xsrc/external/mit/libXfont/dist/src/FreeType/ft.h U xsrc/external/mit/libXfont/dist/src/FreeType/fttools.c U xsrc/external/mit/libXfont/dist/src/FreeType/xttcap.c U xsrc/external/mit/libXfont/dist/src/FreeType/Makefile.am U xsrc/external/mit/libXfont/dist/src/FreeType/ftenc.c U xsrc/external/mit/libXfont/dist/src/FreeType/xttcap.h U xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c U xsrc/external/mit/libXfont/dist/src/bitmap/bdfutils.c U xsrc/external/mit/libXfont/dist/src/bitmap/bitmap.c U xsrc/external/mit/libXfont/dist/src/bitmap/Makefile.in C xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c U xsrc/external/mit/libXfont/dist/src/bitmap/pcfwrite.c U xsrc/external/mit/libXfont/dist/src/bitmap/snfstr.h U xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c U xsrc/external/mit/libXfont/dist/src/bitmap/Makefile.am U xsrc/external/mit/libXfont/dist/src/bitmap/fontink.c U xsrc/external/mit/libXfont/dist/src/bitmap/bitscale.c U xsrc/external/mit/libXfont/dist/src/bitmap/bitmapfunc.c U xsrc/external/mit/libXfont/dist/src/bitmap/bitmaputil.c U xsrc/external/mit/libXfont/dist/src/bitmap/snfread.c U xsrc/external/mit/libXfont/dist/src/fc/Makefile.in U xsrc/external/mit/libXfont/dist/src/fc/fserve.h U xsrc/external/mit/libXfont/dist/src/fc/Makefile.am U xsrc/external/mit/libXfont/dist/src/fc/fsio.h U xsrc/external/mit/libXfont/dist/src/fc/fstrans.c U xsrc/external/mit/libXfont/dist/src/fc/fsio.c U xsrc/external/mit/libXfont/dist/src/fc/fserve.c U xsrc/external/mit/libXfont/dist/src/fc/fservestr.h U xsrc/external/mit/libXfont/dist/src/fc/fsconvert.c U xsrc/external/mit/libXfont/dist/src/fc/fslibos.h U xsrc/external/mit/libXfont/dist/src/stubs/getnewfntcid.c U xsrc/external/mit/libXfont/dist/src/stubs/cauthgen.c U xsrc/external/mit/libXfont/dist/src/stubs/csignal.c U xsrc/external/mit/libXfont/dist/src/stubs/getcres.c U xsrc/external/mit/libXfont/dist/src/stubs/stubs.h U xsrc/external/mit/libXfont/dist/src/stubs/findoldfnt.c U xsrc/external/mit/libXfont/dist/src/stubs/Makefile.am U xsrc/external/mit/libXfont/dist/src/stubs/rmfshdl.c U xsrc/external/mit/libXfont/dist/src/stubs/getdefptsize.c U xsrc/external/mit/libXfont/dist/src/stubs/gettime.c U xsrc/external/mit/libXfont/dist/src/stubs/regfpefunc.c U xsrc/external/mit/libXfont/dist/src/stubs/Makefile.in U xsrc/external/mit/libXfont/dist/src/stubs/initfshdl.c U xsrc/external/mit/libXfont/dist/src/stubs/delfntcid.c U xsrc/external/mit/libXfont/dist/src/stubs/stubsinit.c U xsrc/external/mit/libXfont/dist/src/stubs/errorf.c U xsrc/external/mit/libXfont/dist/src/stubs/stfntcfnt.c U xsrc/external/mit/libXfont/dist/src/stubs/setfntauth.c U xsrc/external/mit/libXfont/dist/src/stubs/servclient.c U xsrc/external/mit/libXfont/dist/src/builtins
CVS commit: [netbsd-7] src/sys
Module Name:src Committed By: riz Date: Tue Mar 17 17:52:49 UTC 2015 Modified Files: src/sys/dev/pci [netbsd-7]: agp_i810.c agp_i810var.h src/sys/external/bsd/drm2/dist/drm/i915 [netbsd-7]: i915_gem.c src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/clock [netbsd-7]: nouveau_subdev_clock_nv50.c src/sys/external/bsd/drm2/drm [netbsd-7]: drm_drv.c drm_gem_vm.c src/sys/external/bsd/drm2/i915drm [netbsd-7]: intel_gtt.c src/sys/external/bsd/drm2/include/drm [netbsd-7]: intel-gtt.h Log Message: Pull up following revision(s) (requested by snj in ticket #590): sys/external/bsd/drm2/i915drm/intel_gtt.c: revision 1.5 sys/external/bsd/drm2/drm/drm_drv.c: revision 1.15 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: revision 1.28 sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/clock/nouveau_subdev_clock_nv50.c: revision 1.3 sys/dev/pci/agp_i810.c: revision 1.115 sys/dev/pci/agp_i810.c: revision 1.116 sys/external/bsd/drm2/include/drm/intel-gtt.h: revision 1.5 sys/dev/pci/agp_i810.c: revision 1.117 sys/external/bsd/drm2/drm/drm_gem_vm.c: revision 1.6 sys/dev/pci/agp_i810var.h: revision 1.6 Issue a write barrier after updating the GTT. Linux never used to do this...until a month: https://bugs.freedesktop.org/show_bug.cgi?id=88191";>https://bugs.freedesktop.org/show_bug.cgi?id=88191 commit 983d308cb8f602d1920a8c40196eb2ab6cc07bd2 Author: Chris WilsonDate: Mon Jan 26 10:47:10 2015 + agp/intel: Serialise after GTT updates Include for membar_producer. (Why didn't this fail in my build?) Pass cache-related flags through to the GTT on pre-SNB devices. I had assumed for ages this would increase the amount of caching and thereby increase the chance of stale caches leading to rendering glitches. But apparently I was wrong, and failing to pass these through was causing all sorts of problems! Dedup the NetBSD portion of the code (ok Riastradh), no functional change. Don't return events that are too large and leave them in the list. Apply access control to gem mmap. fix gcc is stupid. To generate a diff of this commit: cvs rdiff -u -r1.112.2.1 -r1.112.2.2 src/sys/dev/pci/agp_i810.c cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/dev/pci/agp_i810var.h cvs rdiff -u -r1.14.2.6 -r1.14.2.7 \ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c cvs rdiff -u -r1.1.1.1.4.1 -r1.1.1.1.4.2 \ src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/clock/nouveau_subdev_clock_nv50.c cvs rdiff -u -r1.9.2.3 -r1.9.2.4 src/sys/external/bsd/drm2/drm/drm_drv.c cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/external/bsd/drm2/drm/drm_gem_vm.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/external/bsd/drm2/i915drm/intel_gtt.c cvs rdiff -u -r1.4 -r1.4.2.1 \ src/sys/external/bsd/drm2/include/drm/intel-gtt.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/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.112.2.1 src/sys/dev/pci/agp_i810.c:1.112.2.2 --- src/sys/dev/pci/agp_i810.c:1.112.2.1 Thu Sep 18 10:25:33 2014 +++ src/sys/dev/pci/agp_i810.c Tue Mar 17 17:52:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.112.2.1 2014/09/18 10:25:33 martin Exp $ */ +/* $NetBSD: agp_i810.c,v 1.112.2.2 2015/03/17 17:52:49 riz Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,10 +30,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.112.2.1 2014/09/18 10:25:33 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.112.2.2 2015/03/17 17:52:49 riz Exp $"); #include #include +#include #include #include #include @@ -119,15 +120,23 @@ static struct agp_methods agp_i810_metho }; int -agp_i810_write_gtt_entry(struct agp_i810_softc *isc, off_t off, bus_addr_t v) +agp_i810_write_gtt_entry(struct agp_i810_softc *isc, off_t off, +bus_addr_t addr, int flags) { u_int32_t pte; - /* Bits 11:4 (physical start address extension) should be zero. */ - if ((v & 0xff0) != 0) + /* + * Bits 11:4 (physical start address extension) should be zero. + * Flag bits 3:0 should be zero too. + * + * XXX This should be a kassert -- no reason for this routine + * to allow failure. + */ + if ((addr & 0xfff) != 0) return EINVAL; + KASSERT(flags == (flags & 0x7)); - pte = (u_int32_t)v; + pte = (u_int32_t)addr; /* * We need to massage the pte if bus_addr_t is wider than 32 bits. * The compiler isn't smart enough, hence the casts to uintmax_t. @@ -137,17 +146,17 @@ agp_i810_write_gtt_entry(struct agp_i810 if (isc->chiptype == CHIP_I965 || isc->chiptype == CHIP_G33 || isc->chiptype == CHIP_G4X) { - if (((uintmax_t)v >> 36) != 0) + if (((uintmax_t)addr >> 36) != 0) return EINVAL; - pte |= (v >> 28) & 0xf0; + pte |= (addr >> 28) & 0xf0; } else { - if (((uintmax_t)v >> 32) != 0) +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: riz Date: Tue Mar 17 17:53:36 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket 590. To generate a diff of this commit: cvs rdiff -u -r1.1.2.228 -r1.1.2.229 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.228 src/doc/CHANGES-7.0:1.1.2.229 --- src/doc/CHANGES-7.0:1.1.2.228 Sun Mar 15 23:04:54 2015 +++ src/doc/CHANGES-7.0 Tue Mar 17 17:53:36 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.228 2015/03/15 23:04:54 snj Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.229 2015/03/17 17:53:36 riz Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -18577,3 +18577,15 @@ tests/usr.bin/config/support/conf/Makefi Install it into config(1) test directory to fix tests. [bouyer, ticket #596] +sys/dev/pci/agp_i810.c1.115-1.117 +sys/dev/pci/agp_i810var.h 1.6 +sys/external/bsd/drm2/dist/drm/i915/i915_gem.c 1.28 +sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/clock/nouveau_subdev_clock_nv50.c 1.3 +sys/external/bsd/drm2/drm/drm_drv.c 1.15 +sys/external/bsd/drm2/drm/drm_gem_vm.c 1.6 +sys/external/bsd/drm2/i915drm/intel_gtt.c 1.5 +sys/external/bsd/drm2/include/drm/intel-gtt.h 1.5 + + Additional DRM fixes. + [snj, ticket #590] +
CVS commit: src/sys/arch/arm/vfp
Module Name:src Committed By: matt Date: Tue Mar 17 17:20:55 UTC 2015 Modified Files: src/sys/arch/arm/vfp: vfp_init.c Log Message: If we own the FPU, don't take anymore undefined faults. Instead generate SIGILLs since we obviously don't understand the instruction. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/vfp/vfp_init.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/vfp/vfp_init.c diff -u src/sys/arch/arm/vfp/vfp_init.c:1.42 src/sys/arch/arm/vfp/vfp_init.c:1.43 --- src/sys/arch/arm/vfp/vfp_init.c:1.42 Mon Feb 9 07:55:52 2015 +++ src/sys/arch/arm/vfp/vfp_init.c Tue Mar 17 17:20:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vfp_init.c,v 1.42 2015/02/09 07:55:52 slp Exp $ */ +/* $NetBSD: vfp_init.c,v 1.43 2015/03/17 17:20:55 matt Exp $ */ /* * Copyright (c) 2008 ARM Ltd @@ -376,7 +376,8 @@ vfp_attach(struct cpu_info *ci) install_coproc_handler(VFP_COPROC, vfp_handler); install_coproc_handler(VFP_COPROC2, vfp_handler); #ifdef CPU_CORTEX - install_coproc_handler(CORE_UNKNOWN_HANDLER, neon_handler); + if (cpu_neon_present) + install_coproc_handler(CORE_UNKNOWN_HANDLER, neon_handler); #endif } @@ -399,7 +400,7 @@ vfp_handler(u_int address, u_int insn, t * If we are just changing/fetching FPSCR, don't bother loading it. */ if (!vfp_fpscr_handler(address, insn, frame, fault_code)) - return 0; + return 1; /* * Make sure we own the FP. @@ -468,6 +469,10 @@ neon_handler(u_int address, u_int insn, if (fault_code != FAULT_USER) panic("NEON fault in non-user mode"); + /* if we already own the FPU, raise SIGILL */ + if (curcpu()->ci_pcu_curlwp[PCU_FPU] == curlwp) + return 0; + pcu_load(&arm_vfp_ops); /* Need to restart the faulted instruction. */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: joerg Date: Tue Mar 17 12:20:02 UTC 2015 Modified Files: src/sys/arch/arm/include: fenv.h Log Message: __BEGIN_DECLS and __END_DECLS only exist if sys/cdefs.h was included. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/include/fenv.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/include/fenv.h diff -u src/sys/arch/arm/include/fenv.h:1.2 src/sys/arch/arm/include/fenv.h:1.3 --- src/sys/arch/arm/include/fenv.h:1.2 Wed Jan 29 00:22:09 2014 +++ src/sys/arch/arm/include/fenv.h Tue Mar 17 12:20:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.2 2014/01/29 00:22:09 matt Exp $ */ +/* $NetBSD: fenv.h,v 1.3 2015/03/17 12:20:02 joerg Exp $ */ /* * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995 @@ -8,6 +8,8 @@ #ifndef _ARM_FENV_H_ #define _ARM_FENV_H_ +#include + #ifdef __ARM_PCS_AAPCS64 /* AArch64 split FPSCR into two registers FPCR and FPSR */ typedef struct {
CVS commit: src/sys/ufs
Module Name:src Committed By: hannken Date: Tue Mar 17 09:39:29 UTC 2015 Modified Files: src/sys/ufs/ext2fs: ext2fs_vfsops.c src/sys/ufs/ffs: ffs_alloc.c ffs_extern.h ffs_vfsops.c ffs_wapbl.c src/sys/ufs/mfs: mfs_vfsops.c src/sys/ufs/ufs: ufs_extern.h ufs_vfsops.c ufs_vnops.c ufsmount.h Log Message: Change ffs to use vcache_new: - Change ffs_valloc to return an inode number. - Remove now obsolete UFS operations UFS_VALLOC and UFS_VFREE. - Make ufs_makeinode private to ufs_vnops.c and pass vattr instead of mode. To generate a diff of this commit: cvs rdiff -u -r1.190 -r1.191 src/sys/ufs/ext2fs/ext2fs_vfsops.c cvs rdiff -u -r1.147 -r1.148 src/sys/ufs/ffs/ffs_alloc.c cvs rdiff -u -r1.80 -r1.81 src/sys/ufs/ffs/ffs_extern.h cvs rdiff -u -r1.324 -r1.325 src/sys/ufs/ffs/ffs_vfsops.c cvs rdiff -u -r1.28 -r1.29 src/sys/ufs/ffs/ffs_wapbl.c cvs rdiff -u -r1.109 -r1.110 src/sys/ufs/mfs/mfs_vfsops.c cvs rdiff -u -r1.77 -r1.78 src/sys/ufs/ufs/ufs_extern.h cvs rdiff -u -r1.53 -r1.54 src/sys/ufs/ufs/ufs_vfsops.c cvs rdiff -u -r1.224 -r1.225 src/sys/ufs/ufs/ufs_vnops.c cvs rdiff -u -r1.41 -r1.42 src/sys/ufs/ufs/ufsmount.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/ufs/ext2fs/ext2fs_vfsops.c diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.190 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.191 --- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.190 Mon Feb 23 17:05:58 2015 +++ src/sys/ufs/ext2fs/ext2fs_vfsops.c Tue Mar 17 09:39:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_vfsops.c,v 1.190 2015/02/23 17:05:58 maxv Exp $ */ +/* $NetBSD: ext2fs_vfsops.c,v 1.191 2015/03/17 09:39:29 hannken Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1994 @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.190 2015/02/23 17:05:58 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.191 2015/03/17 09:39:29 hannken Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -156,7 +156,6 @@ static const struct genfs_ops ext2fs_gen static const struct ufs_ops ext2fs_ufsops = { .uo_itimes = ext2fs_itimes, .uo_update = ext2fs_update, - .uo_vfree = ext2fs_vfree, }; /* Fill in the inode uid/gid from ext2 halves. */ Index: src/sys/ufs/ffs/ffs_alloc.c diff -u src/sys/ufs/ffs/ffs_alloc.c:1.147 src/sys/ufs/ffs/ffs_alloc.c:1.148 --- src/sys/ufs/ffs/ffs_alloc.c:1.147 Mon Sep 8 20:52:37 2014 +++ src/sys/ufs/ffs/ffs_alloc.c Tue Mar 17 09:39:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_alloc.c,v 1.147 2014/09/08 20:52:37 joerg Exp $ */ +/* $NetBSD: ffs_alloc.c,v 1.148 2015/03/17 09:39:29 hannken Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_alloc.c,v 1.147 2014/09/08 20:52:37 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_alloc.c,v 1.148 2015/03/17 09:39:29 hannken Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -555,20 +555,16 @@ nospace: * => um_lock not held upon entry or return */ int -ffs_valloc(struct vnode *pvp, int mode, kauth_cred_t cred, -struct vnode **vpp) +ffs_valloc(struct vnode *pvp, int mode, kauth_cred_t cred, ino_t *inop) { struct ufsmount *ump; struct inode *pip; struct fs *fs; - struct inode *ip; - struct timespec ts; ino_t ino, ipref; int cg, error; UFS_WAPBL_JUNLOCK_ASSERT(pvp->v_mount); - *vpp = NULL; pip = VTOI(pvp); fs = pip->i_fs; ump = pip->i_ump; @@ -603,63 +599,15 @@ ffs_valloc(struct vnode *pvp, int mode, if (ino == 0) goto noinodes; UFS_WAPBL_END(pvp->v_mount); - error = VFS_VGET(pvp->v_mount, ino, vpp); - if (error) { - int err; - err = UFS_WAPBL_BEGIN(pvp->v_mount); - if (err == 0) - ffs_vfree(pvp, ino, mode); - if (err == 0) - UFS_WAPBL_END(pvp->v_mount); - return (error); - } - KASSERT((*vpp)->v_type == VNON); - ip = VTOI(*vpp); - if (ip->i_mode) { -#if 0 - printf("mode = 0%o, inum = %d, fs = %s\n", - ip->i_mode, ip->i_number, fs->fs_fsmnt); -#else - printf("dmode %x mode %x dgen %x gen %x\n", - DIP(ip, mode), ip->i_mode, - DIP(ip, gen), ip->i_gen); - printf("size %llx blocks %llx\n", - (long long)DIP(ip, size), (long long)DIP(ip, blocks)); - printf("ino %llu ipref %llu\n", (unsigned long long)ino, - (unsigned long long)ipref); -#if 0 - error = bread(ump->um_devvp, FFS_FSBTODB(fs, ino_to_fsba(fs, ino)), - (int)fs->fs_bsize, NOCRED, 0, &bp); -#endif + *inop = ino; + return 0; -#endif - panic("ffs_valloc: dup alloc"); - } - if (DIP(ip, blocks)) {/* XXX */ - printf("free inode %llu on %s had %" PRId64 " blocks\n", - (unsigned long long)ino, fs->fs_fsmnt, DIP(ip, blocks)); - DIP_ASSIGN(ip, blocks, 0); - } - ip->i_flag &= ~IN_SPACECOUNTED; - ip->i_flags = 0; - DIP_ASSIGN(ip, flags, 0); - /* - * Set up a new generation number for this inode. - */ - ip->i_gen++; - DIP_ASSIGN(ip, gen, ip->i_gen); - if (fs->fs_magic == FS_UFS2_MAGIC)
CVS commit: src/sys
Module Name:src Committed By: hannken Date: Tue Mar 17 09:38:21 UTC 2015 Modified Files: src/sys/kern: vfs_vnode.c src/sys/sys: mount.h param.h vnode.h Log Message: Add new operation "vcache_new()" to allocate and initialise a new vnode/fsnode pair: int vcache_new(struct mount *mp, struct vnode *dvp, struct vattr *vap, kauth_cred_t cred, struct vnode **vpp) where dvp is the (referenced) directory where we want to create the new node, vap passes va_type, va_mode and possibly va_rdev and cred gives the credentials to setup uid/guid. The node returned from vcache_new() is referenced, fully initialised and has link count zero. Welcome to NetBSD 7.99.7 To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/kern/vfs_vnode.c cvs rdiff -u -r1.215 -r1.216 src/sys/sys/mount.h cvs rdiff -u -r1.466 -r1.467 src/sys/sys/param.h cvs rdiff -u -r1.249 -r1.250 src/sys/sys/vnode.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/vfs_vnode.c diff -u src/sys/kern/vfs_vnode.c:1.39 src/sys/kern/vfs_vnode.c:1.40 --- src/sys/kern/vfs_vnode.c:1.39 Fri Oct 3 14:45:38 2014 +++ src/sys/kern/vfs_vnode.c Tue Mar 17 09:38:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_vnode.c,v 1.39 2014/10/03 14:45:38 hannken Exp $ */ +/* $NetBSD: vfs_vnode.c,v 1.40 2015/03/17 09:38:21 hannken Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -116,7 +116,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.39 2014/10/03 14:45:38 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.40 2015/03/17 09:38:21 hannken Exp $"); #define _VFS_VNODE_PRIVATE @@ -1330,6 +1330,82 @@ again: } /* + * Create a new vnode / fs node pair and return it referenced through vpp. + */ +int +vcache_new(struct mount *mp, struct vnode *dvp, struct vattr *vap, +kauth_cred_t cred, struct vnode **vpp) +{ + int error; + uint32_t hash; + struct vnode *vp; + struct vcache_node *new_node; + struct vcache_node *old_node __diagused; + + *vpp = NULL; + + /* Allocate and initialize a new vcache / vnode pair. */ + error = vfs_busy(mp, NULL); + if (error) + return error; + new_node = pool_cache_get(vcache.pool, PR_WAITOK); + new_node->vn_key.vk_mount = mp; + new_node->vn_vnode = NULL; + vp = vnalloc(NULL); + + /* Create and load the fs node. */ + vp->v_iflag |= VI_CHANGING; + error = VFS_NEWVNODE(mp, dvp, vp, vap, cred, + &new_node->vn_key.vk_key_len, &new_node->vn_key.vk_key); + if (error) { + pool_cache_put(vcache.pool, new_node); + KASSERT(vp->v_usecount == 1); + vp->v_usecount = 0; + vnfree(vp); + vfs_unbusy(mp, false, NULL); + KASSERT(*vpp == NULL); + return error; + } + KASSERT(new_node->vn_key.vk_key != NULL); + KASSERT(vp->v_op != NULL); + hash = vcache_hash(&new_node->vn_key); + + /* Wait for previous instance to be reclaimed, then insert new node. */ + mutex_enter(&vcache.lock); + while ((old_node = vcache_hash_lookup(&new_node->vn_key, hash))) { +#ifdef DIAGNOSTIC + if (old_node->vn_vnode != NULL) + mutex_enter(old_node->vn_vnode->v_interlock); + KASSERT(old_node->vn_vnode == NULL || + (old_node->vn_vnode->v_iflag & (VI_XLOCK | VI_CLEAN)) != 0); + if (old_node->vn_vnode != NULL) + mutex_exit(old_node->vn_vnode->v_interlock); +#endif + mutex_exit(&vcache.lock); + kpause("vcache", false, mstohz(20), NULL); + mutex_enter(&vcache.lock); + } + SLIST_INSERT_HEAD(&vcache.hashtab[hash & vcache.hashmask], + new_node, vn_hash); + mutex_exit(&vcache.lock); + vfs_insmntque(vp, mp); + if ((mp->mnt_iflag & IMNT_MPSAFE) != 0) + vp->v_vflag |= VV_MPSAFE; + vfs_unbusy(mp, true, NULL); + + /* Finished loading, finalize node. */ + mutex_enter(&vcache.lock); + new_node->vn_vnode = vp; + mutex_exit(&vcache.lock); + mutex_enter(vp->v_interlock); + vp->v_iflag &= ~VI_CHANGING; + cv_broadcast(&vp->v_cv); + mutex_exit(vp->v_interlock); + *vpp = vp; + return 0; +} + +/* * Prepare key change: lock old and new cache node. * Return an error if the new node already exists. */ Index: src/sys/sys/mount.h diff -u src/sys/sys/mount.h:1.215 src/sys/sys/mount.h:1.216 --- src/sys/sys/mount.h:1.215 Sat Jun 28 22:27:50 2014 +++ src/sys/sys/mount.h Tue Mar 17 09:38:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.215 2014/06/28 22:27:50 dholland Exp $ */ +/* $NetBSD: mount.h,v 1.216 2015/03/17 09:38:21 hannken Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -100,6 +100,7 @@ #ifndef _STANDALONE struct vnode; +struct vattr; /* * Structure per mounted file system. Each mounted file system has an @@ -222,6 +223,9 @@ struct vfsops { int (*vfs_vget) (struct mount *, ino_t, struct vnode **); int (*vfs_loadvnode) (struct mount *, struct vnode *, const void *, size_t, const void **); + int (*vfs_newvnode) (struct mount *, struct vnode *, struct vnode *, +struct vattr *, kauth_cred_t, +size_t *, const void **); int (*vfs_fhtovp) (struc
CVS commit: src/sys/arch/mips/ingenic
Module Name:src Committed By: macallan Date: Tue Mar 17 09:27:09 UTC 2015 Modified Files: src/sys/arch/mips/ingenic: ingenic_dwctwo.c ingenic_ehci.c ingenic_ohci.c Log Message: set root hub vendor IDs To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/ingenic/ingenic_dwctwo.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ingenic/ingenic_ehci.c \ src/sys/arch/mips/ingenic/ingenic_ohci.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/mips/ingenic/ingenic_dwctwo.c diff -u src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.8 src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.9 --- src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.8 Tue Mar 17 07:25:07 2015 +++ src/sys/arch/mips/ingenic/ingenic_dwctwo.c Tue Mar 17 09:27:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ingenic_dwctwo.c,v 1.8 2015/03/17 07:25:07 macallan Exp $ */ +/* $NetBSD: ingenic_dwctwo.c,v 1.9 2015/03/17 09:27:09 macallan Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ingenic_dwctwo.c,v 1.8 2015/03/17 07:25:07 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ingenic_dwctwo.c,v 1.9 2015/03/17 09:27:09 macallan Exp $"); /* * adapted from bcm2835_dwctwo.c @@ -47,9 +47,9 @@ __KERNEL_RCSID(0, "$NetBSD: ingenic_dwct #include #include #include +#include #include - #include #include "dwc2_core.h" @@ -202,6 +202,8 @@ ingenic_dwc2_deferred(device_t self) struct ingenic_dwc2_softc *sc = device_private(self); int error; + sc->sc_dwc2.sc_id_vendor = USB_VENDOR_INGENIC; + strlcpy(sc->sc_dwc2.sc_vendor, "Ingenic", sizeof(sc->sc_dwc2.sc_vendor)); error = dwc2_init(&sc->sc_dwc2); if (error != 0) { aprint_error_dev(self, "couldn't initialize host, error=%d\n", Index: src/sys/arch/mips/ingenic/ingenic_ehci.c diff -u src/sys/arch/mips/ingenic/ingenic_ehci.c:1.2 src/sys/arch/mips/ingenic/ingenic_ehci.c:1.3 --- src/sys/arch/mips/ingenic/ingenic_ehci.c:1.2 Tue Mar 17 07:25:07 2015 +++ src/sys/arch/mips/ingenic/ingenic_ehci.c Tue Mar 17 09:27:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ingenic_ehci.c,v 1.2 2015/03/17 07:25:07 macallan Exp $ */ +/* $NetBSD: ingenic_ehci.c,v 1.3 2015/03/17 09:27:09 macallan Exp $ */ /*- * Copyright (c) 2015 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ingenic_ehci.c,v 1.2 2015/03/17 07:25:07 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ingenic_ehci.c,v 1.3 2015/03/17 09:27:09 macallan Exp $"); #include #include @@ -47,6 +47,8 @@ __KERNEL_RCSID(0, "$NetBSD: ingenic_ehci #include #include +#include + #include "opt_ingenic.h" #include "ohci.h" @@ -131,6 +133,8 @@ ingenic_ehci_attach(device_t parent, dev #else sc->sc_ncomp = 0; #endif + sc->sc_id_vendor = USB_VENDOR_INGENIC; + strlcpy(sc->sc_vendor, "Ingenic", sizeof(sc->sc_vendor)); status = ehci_init(sc); if (status != USBD_NORMAL_COMPLETION) { Index: src/sys/arch/mips/ingenic/ingenic_ohci.c diff -u src/sys/arch/mips/ingenic/ingenic_ohci.c:1.2 src/sys/arch/mips/ingenic/ingenic_ohci.c:1.3 --- src/sys/arch/mips/ingenic/ingenic_ohci.c:1.2 Tue Mar 17 07:25:07 2015 +++ src/sys/arch/mips/ingenic/ingenic_ohci.c Tue Mar 17 09:27:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ingenic_ohci.c,v 1.2 2015/03/17 07:25:07 macallan Exp $ */ +/* $NetBSD: ingenic_ohci.c,v 1.3 2015/03/17 09:27:09 macallan Exp $ */ /*- * Copyright (c) 2015 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ingenic_ohci.c,v 1.2 2015/03/17 07:25:07 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ingenic_ohci.c,v 1.3 2015/03/17 09:27:09 macallan Exp $"); #include #include @@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: ingenic_ohci #include #include #include +#include #include #include @@ -110,9 +111,11 @@ ingenic_ohci_attach(device_t parent, dev goto fail; } - /* we don't handle endianess in bus space */ sc->sc_endian = OHCI_LITTLE_ENDIAN; + sc->sc_id_vendor = USB_VENDOR_INGENIC; + strlcpy(sc->sc_vendor, "Ingenic", sizeof(sc->sc_vendor)); + status = ohci_init(sc); if (status != USBD_NORMAL_COMPLETION) { aprint_error_dev(self, "init failed, error=%d\n", status);
CVS commit: src/sys/arch/mips/ingenic
Module Name:src Committed By: macallan Date: Tue Mar 17 09:26:31 UTC 2015 Modified Files: src/sys/arch/mips/ingenic: apbus.c Log Message: always print the child devices' address, print irq if not -1 and a driver is actually attaching To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/ingenic/apbus.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/mips/ingenic/apbus.c diff -u src/sys/arch/mips/ingenic/apbus.c:1.8 src/sys/arch/mips/ingenic/apbus.c:1.9 --- src/sys/arch/mips/ingenic/apbus.c:1.8 Tue Mar 17 07:25:07 2015 +++ src/sys/arch/mips/ingenic/apbus.c Tue Mar 17 09:26:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: apbus.c,v 1.8 2015/03/17 07:25:07 macallan Exp $ */ +/* $NetBSD: apbus.c,v 1.9 2015/03/17 09:26:31 macallan Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -29,7 +29,7 @@ /* catch-all for on-chip peripherals */ #include -__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.8 2015/03/17 07:25:07 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.9 2015/03/17 09:26:31 macallan Exp $"); #include "locators.h" #define _MIPS_BUS_DMA_PRIVATE @@ -170,11 +170,11 @@ apbus_print(void *aux, const char *pnp) if (pnp) { aprint_normal("%s at %s", aa->aa_name, pnp); - if (aa->aa_addr != -1) - aprint_normal(" addr 0x%" PRIxBUSADDR, aa->aa_addr); - if (aa->aa_irq != -1) - aprint_normal(" irq %d", aa->aa_irq); } + if (aa->aa_addr != -1) + aprint_normal(" addr 0x%" PRIxBUSADDR, aa->aa_addr); + if ((pnp == NULL) && (aa->aa_irq != -1)) + aprint_normal(" irq %d", aa->aa_irq); return (UNCONF); }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: macallan Date: Tue Mar 17 08:14:30 UTC 2015 Modified Files: src/sys/dev/usb: usbdevs Log Message: add Ingenic Semiconductor Ltd. To generate a diff of this commit: cvs rdiff -u -r1.692 -r1.693 src/sys/dev/usb/usbdevs 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/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.692 src/sys/dev/usb/usbdevs:1.693 --- src/sys/dev/usb/usbdevs:1.692 Sun Mar 15 01:37:47 2015 +++ src/sys/dev/usb/usbdevs Tue Mar 17 08:14:30 2015 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.692 2015/03/15 01:37:47 nonaka Exp $ +$NetBSD: usbdevs,v 1.693 2015/03/17 08:14:30 macallan Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -577,6 +577,7 @@ vendor AVERATEC 0x50c2 Averatec vendor SWEEX 0x5173 Sweex vendor ONSPEC2 0x55aa OnSpec Electronic Inc. vendor ZINWELL 0x5a57 Zinwell +vendor INGENIC 0x601a Ingenic Semiconductor Ltd. vendor SITECOM 0x6189 Sitecom vendor SPRINGERDESIGN 0x6400 Springer Design, Inc. vendor ARKMICROCHIPS 0x6547 ArkMicroChips
CVS commit: src/sys/arch/evbmips/conf
Module Name:src Committed By: macallan Date: Tue Mar 17 07:28:18 UTC 2015 Modified Files: src/sys/arch/evbmips/conf: CI20 Log Message: do as arm does and get rid of addresses in kernel config To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbmips/conf/CI20 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/evbmips/conf/CI20 diff -u src/sys/arch/evbmips/conf/CI20:1.10 src/sys/arch/evbmips/conf/CI20:1.11 --- src/sys/arch/evbmips/conf/CI20:1.10 Tue Mar 10 18:20:20 2015 +++ src/sys/arch/evbmips/conf/CI20 Tue Mar 17 07:28:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CI20,v 1.10 2015/03/10 18:20:20 macallan Exp $ +# $NetBSD: CI20,v 1.11 2015/03/17 07:28:18 macallan Exp $ # # MIPS Creator CI20 # @@ -7,7 +7,7 @@ include "arch/evbmips/conf/std.ingenic" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "CI20-$Revision: 1.10 $" +#ident "CI20-$Revision: 1.11 $" maxusers 32 @@ -142,19 +142,19 @@ com* at mainbus? apbus0 at mainbus? # On-board USB -dwctwo* at apbus? addr 0x1350 +dwctwo* at apbus? #options DWC2_DEBUG usb* at dwctwo? -ohci* at apbus? addr 0x134a +ohci* at apbus? usb* at ohci? # this one doesn't work yet -#ehci* at apbus? addr 0x1349 +#ehci* at apbus? #usb* at ehci? # onboard ethernet -dme* at apbus? addr 0x1600 +dme* at apbus? #jzgpio* at apbus? addr ? #gpio* at jzgpio?
CVS commit: src/sys/arch/mips/ingenic
Module Name:src Committed By: macallan Date: Tue Mar 17 07:25:08 UTC 2015 Modified Files: src/sys/arch/mips/ingenic: apbus.c ingenic_dwctwo.c ingenic_ehci.c ingenic_ohci.c ingenic_var.h Log Message: - keep a list of devices, addresses and interrupts in apbus.c - pass irq numbers to devices - reduce magic numbers in device drivers - allow multiple instances of device drivers To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/ingenic/apbus.c \ src/sys/arch/mips/ingenic/ingenic_dwctwo.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/ingenic/ingenic_ehci.c \ src/sys/arch/mips/ingenic/ingenic_ohci.c \ src/sys/arch/mips/ingenic/ingenic_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/mips/ingenic/apbus.c diff -u src/sys/arch/mips/ingenic/apbus.c:1.7 src/sys/arch/mips/ingenic/apbus.c:1.8 --- src/sys/arch/mips/ingenic/apbus.c:1.7 Mon Mar 9 13:24:21 2015 +++ src/sys/arch/mips/ingenic/apbus.c Tue Mar 17 07:25:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: apbus.c,v 1.7 2015/03/09 13:24:21 macallan Exp $ */ +/* $NetBSD: apbus.c,v 1.8 2015/03/17 07:25:07 macallan Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -29,7 +29,7 @@ /* catch-all for on-chip peripherals */ #include -__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.7 2015/03/09 13:24:21 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.8 2015/03/17 07:25:07 macallan Exp $"); #include "locators.h" #define _MIPS_BUS_DMA_PRIVATE @@ -62,14 +62,30 @@ struct mips_bus_dma_tag apbus_dmat = { ._dmatag_ops = _BUS_DMATAG_OPS_INITIALIZER, }; -static const char *apbus_devs[] = { - "dwctwo", - "ohci", - "ehci", - "dme", - "jzgpio", - "jzfb", - NULL +typedef struct apbus_dev { + const char *name; + bus_addr_t addr; + uint32_t irq; +} apbus_dev_t; + +static const apbus_dev_t apbus_devs[] = { + { "dwctwo", JZ_DWC2_BASE, 21}, + { "ohci", JZ_OHCI_BASE,5 }, + { "ehci", JZ_EHCI_BASE, 20}, + { "dme", JZ_DME_BASE,-1}, /* irq via gpio abuse */ + { "jzgpio", JZ_GPIO_A_BASE, 17}, + { "jzgpio", JZ_GPIO_B_BASE, 16}, + { "jzgpio", JZ_GPIO_C_BASE, 15}, + { "jzgpio", JZ_GPIO_D_BASE, 14}, + { "jzgpio", JZ_GPIO_E_BASE, 13}, + { "jzgpio", JZ_GPIO_F_BASE, 12}, + { "jziic", JZ_SMB0_BASE, 60}, + { "jziic", JZ_SMB1_BASE, 59}, + { "jziic", JZ_SMB2_BASE, 58}, + { "jziic", JZ_SMB3_BASE, 57}, + { "jziic", JZ_SMB4_BASE, 56}, + { "jzfb", -1, -1}, + { NULL, -1, -1} }; void @@ -135,10 +151,11 @@ apbus_attach(device_t parent, device_t s printf("JZ_UHCCDR %08x\n", readreg(JZ_UHCCDR)); #endif - for (const char **adv = apbus_devs; *adv != NULL; adv++) { + for (const apbus_dev_t *adv = apbus_devs; adv->name != NULL; adv++) { struct apbus_attach_args aa; - aa.aa_name = *adv; - aa.aa_addr = 0; + aa.aa_name = adv->name; + aa.aa_addr = adv->addr; + aa.aa_irq = adv->irq; aa.aa_dmat = &apbus_dmat; aa.aa_bst = apbus_memt; @@ -151,12 +168,13 @@ apbus_print(void *aux, const char *pnp) { struct apbus_attach_args *aa = aux; - if (pnp) + if (pnp) { aprint_normal("%s at %s", aa->aa_name, pnp); - - if (aa->aa_addr) - aprint_normal(" addr 0x%" PRIxBUSADDR, aa->aa_addr); - + if (aa->aa_addr != -1) + aprint_normal(" addr 0x%" PRIxBUSADDR, aa->aa_addr); + if (aa->aa_irq != -1) + aprint_normal(" irq %d", aa->aa_irq); + } return (UNCONF); } Index: src/sys/arch/mips/ingenic/ingenic_dwctwo.c diff -u src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.7 src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.8 --- src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.7 Tue Mar 10 18:03:17 2015 +++ src/sys/arch/mips/ingenic/ingenic_dwctwo.c Tue Mar 17 07:25:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ingenic_dwctwo.c,v 1.7 2015/03/10 18:03:17 macallan Exp $ */ +/* $NetBSD: ingenic_dwctwo.c,v 1.8 2015/03/17 07:25:07 macallan Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ingenic_dwctwo.c,v 1.7 2015/03/10 18:03:17 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ingenic_dwctwo.c,v 1.8 2015/03/17 07:25:07 macallan Exp $"); /* * adapted from bcm2835_dwctwo.c @@ -176,11 +176,11 @@ ingenic_dwc2_attach(device_t parent, dev delay(1); - sc->sc_ih = evbmips_intr_establish(21, dwc2_intr, &sc->sc_dwc2); + sc->sc_ih = evbmips_intr_establish(aa->aa_irq, dwc2_intr, &sc->sc_dwc2); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt %d\n", - 21); + aa->aa_irq); goto fail; } Index: src/sys/arch/mips/ingenic/ingenic_ehci.c diff -u src/sys/arch/mips/ingenic/ingenic_ehci.c:1.1 src/sys/arch/mips/ingenic/ingenic_ehci.c:1.2 --- src/sys/arch/mips/ingenic/ingenic_ehci.c:1.1 Sun Mar 8 17:14:27 2015 +++ src/sys/arch/mips/ingenic/ingenic_ehci.c Tue Mar 17 07:25:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ingenic_ehci.c,v 1.1 2015/03/08 17:14:27 macallan Exp $ */ +/* $NetBSD: ingenic_ehc
CVS commit: src/sys/arch/mips/ingenic
Module Name:src Committed By: macallan Date: Tue Mar 17 07:22:40 UTC 2015 Modified Files: src/sys/arch/mips/ingenic: ingenic_regs.h Log Message: add SMBus base addresses To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/ingenic/ingenic_regs.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/mips/ingenic/ingenic_regs.h diff -u src/sys/arch/mips/ingenic/ingenic_regs.h:1.9 src/sys/arch/mips/ingenic/ingenic_regs.h:1.10 --- src/sys/arch/mips/ingenic/ingenic_regs.h:1.9 Tue Mar 10 18:02:16 2015 +++ src/sys/arch/mips/ingenic/ingenic_regs.h Tue Mar 17 07:22:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ingenic_regs.h,v 1.9 2015/03/10 18:02:16 macallan Exp $ */ +/* $NetBSD: ingenic_regs.h,v 1.10 2015/03/17 07:22:40 macallan Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -372,4 +372,12 @@ gpio_as_intr_level(uint32_t g, int pin) writereg(reg + JZ_GPIO_FLAGC, mask); /* clear it */ writereg(reg + JZ_GPIO_MASKC, mask); /* enable it */ } + +/* I2C / SMBus */ +#define JZ_SMB0_BASE 0x1005 +#define JZ_SMB1_BASE 0x10051000 +#define JZ_SMB2_BASE 0x10052000 +#define JZ_SMB3_BASE 0x10053000 +#define JZ_SMB4_BASE 0x10054000 + #endif /* INGENIC_REGS_H */