CVS commit: src/sys/dev/marvell
Module Name:src Committed By: kiyohara Date: Wed Jul 18 09:18:30 UTC 2012 Modified Files: src/sys/dev/marvell: mvsata_mv.c Log Message: Add 88F6282. tested only OpenBlockS A6. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/marvell/mvsata_mv.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/marvell/mvsata_mv.c diff -u src/sys/dev/marvell/mvsata_mv.c:1.3 src/sys/dev/marvell/mvsata_mv.c:1.4 --- src/sys/dev/marvell/mvsata_mv.c:1.3 Sat Oct 30 05:46:12 2010 +++ src/sys/dev/marvell/mvsata_mv.c Wed Jul 18 09:18:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsata_mv.c,v 1.3 2010/10/30 05:46:12 kiyohara Exp $ */ +/* $NetBSD: mvsata_mv.c,v 1.4 2012/07/18 09:18:30 kiyohara Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mvsata_mv.c,v 1.3 2010/10/30 05:46:12 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: mvsata_mv.c,v 1.4 2012/07/18 09:18:30 kiyohara Exp $); #include sys/param.h #include sys/bus.h @@ -93,6 +93,7 @@ struct mvsata_product mvsata_products[] /* Kirkwood */ { PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F6192, 1, 2, gen2e, 0 }, { PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F6281, 1, 2, gen2e, 0 }, + { PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88F6282, 1, 2, gen2e, 0 }, /* Discovery Innovation */ { PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_MV78100, 1, 2, gen2e, 0 },
CVS commit: src/sys/dev/marvell
Module Name:src Committed By: kiyohara Date: Wed Jul 18 09:21:37 UTC 2012 Modified Files: src/sys/dev/marvell: if_mvgbe.c Log Message: Add 88F6282. tested only OpenBlockS A6. Also fix irq 11 to 15. irq of 2nd NIC is 15. Remove white-space. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/marvell/if_mvgbe.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/marvell/if_mvgbe.c diff -u src/sys/dev/marvell/if_mvgbe.c:1.16 src/sys/dev/marvell/if_mvgbe.c:1.17 --- src/sys/dev/marvell/if_mvgbe.c:1.16 Thu Feb 2 19:43:04 2012 +++ src/sys/dev/marvell/if_mvgbe.c Wed Jul 18 09:21:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mvgbe.c,v 1.16 2012/02/02 19:43:04 tls Exp $ */ +/* $NetBSD: if_mvgbe.c,v 1.17 2012/07/18 09:21:37 kiyohara Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_mvgbe.c,v 1.16 2012/02/02 19:43:04 tls Exp $); +__KERNEL_RCSID(0, $NetBSD: if_mvgbe.c,v 1.17 2012/07/18 09:21:37 kiyohara Exp $); #include sys/param.h #include sys/bus.h @@ -299,9 +299,11 @@ struct mvgbe_port { { MARVELL_KIRKWOOD_88F6180, 0, 1, { 11 }, FLAGS_FIX_TQTB }, { MARVELL_KIRKWOOD_88F6192, 0, 1, { 11 }, FLAGS_FIX_TQTB }, - { MARVELL_KIRKWOOD_88F6192, 1, 1, { 14 }, FLAGS_FIX_TQTB }, + { MARVELL_KIRKWOOD_88F6192, 1, 1, { 15 }, FLAGS_FIX_TQTB }, { MARVELL_KIRKWOOD_88F6281, 0, 1, { 11 }, FLAGS_FIX_TQTB }, { MARVELL_KIRKWOOD_88F6281, 1, 1, { 15 }, FLAGS_FIX_TQTB }, + { MARVELL_KIRKWOOD_88F6282, 0, 1, { 11 }, FLAGS_FIX_TQTB }, + { MARVELL_KIRKWOOD_88F6282, 1, 1, { 15 }, FLAGS_FIX_TQTB }, { MARVELL_MV78XX0_MV78100, 0, 1, { 40 }, FLAGS_FIX_TQTB }, { MARVELL_MV78XX0_MV78100, 1, 1, { 44 }, FLAGS_FIX_TQTB }, @@ -357,7 +359,7 @@ mvgbec_attach(device_t parent, device_t if (mvgbec0 == NULL) mvgbec0 = self; - + phyaddr = 0; MVGBE_WRITE(sc, MVGBE_PHYADDR, phyaddr);
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Wed Jul 18 09:45:58 UTC 2012 Modified Files: src/sys/arch/arm/marvell: mvsocvar.h Log Message: Add tags for PEX1 of Kirkwood. Remove unneccesary white-space. Reorder function prototypes. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/marvell/mvsocvar.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/marvell/mvsocvar.h diff -u src/sys/arch/arm/marvell/mvsocvar.h:1.2 src/sys/arch/arm/marvell/mvsocvar.h:1.3 --- src/sys/arch/arm/marvell/mvsocvar.h:1.2 Fri Jul 1 20:30:21 2011 +++ src/sys/arch/arm/marvell/mvsocvar.h Wed Jul 18 09:45:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsocvar.h,v 1.2 2011/07/01 20:30:21 dyoung Exp $ */ +/* $NetBSD: mvsocvar.h,v 1.3 2012/07/18 09:45:58 kiyohara Exp $ */ /* * Copyright (c) 2007, 2010 KIYOHARA Takashi * All rights reserved. @@ -54,7 +54,7 @@ extern struct arm32_bus_dma_tag mvsoc_bu void mvsoc_bootstrap(bus_addr_t); uint16_t mvsoc_model(void); uint8_t mvsoc_rev(void); -void * mvsoc_bridge_intr_establish(int, int, int (*)(void *), void *); +void *mvsoc_bridge_intr_establish(int, int, int (*)(void *), void *); #include dev/marvell/marvellvar.h @@ -76,6 +76,8 @@ enum mvsoc_tags { KIRKWOOD_TAG_PEX_MEM, KIRKWOOD_TAG_PEX_IO, + KIRKWOOD_TAG_PEX1_MEM, + KIRKWOOD_TAG_PEX1_IO, KIRKWOOD_TAG_NAND, KIRKWOOD_TAG_SPI, KIRKWOOD_TAG_BOOTROM, @@ -83,10 +85,10 @@ enum mvsoc_tags { }; int mvsoc_target(int, uint32_t *, uint32_t *, uint32_t *, uint32_t *); -void orion_getclks(bus_addr_t); void orion_intr_bootstrap(void); +void orion_getclks(bus_addr_t); -void kirkwood_getclks(bus_addr_t); void kirkwood_intr_bootstrap(void); +void kirkwood_getclks(bus_addr_t); #endif /* _MVSOCVAR_H_ */
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Wed Jul 18 09:51:24 UTC 2012 Modified Files: src/sys/arch/arm/marvell: kirkwoodreg.h Log Message: Add attributes, irqs and base-address for PEX1. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/marvell/kirkwoodreg.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/marvell/kirkwoodreg.h diff -u src/sys/arch/arm/marvell/kirkwoodreg.h:1.1 src/sys/arch/arm/marvell/kirkwoodreg.h:1.2 --- src/sys/arch/arm/marvell/kirkwoodreg.h:1.1 Sun Oct 3 05:49:24 2010 +++ src/sys/arch/arm/marvell/kirkwoodreg.h Wed Jul 18 09:51:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kirkwoodreg.h,v 1.1 2010/10/03 05:49:24 kiyohara Exp $ */ +/* $NetBSD: kirkwoodreg.h,v 1.2 2012/07/18 09:51:23 kiyohara Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -60,6 +60,8 @@ #define KIRKWOOD_ATTR_BOOTROM 0x1d #define KIRKWOOD_ATTR_PEX_MEM 0xe8 #define KIRKWOOD_ATTR_PEX_IO 0xe0 +#define KIRKWOOD_ATTR_PEX1_MEM 0xd8 +#define KIRKWOOD_ATTR_PEX1_IO 0xd0 #define KIRKWOOD_ATTR_CRYPT 0x00 #define KIRKWOOD_IRQ_HIGH 0 /* High interrupt */ @@ -71,6 +73,7 @@ #define KIRKWOOD_IRQ_XOR1CHAN0 7 /* Xor 1 Channel0 */ #define KIRKWOOD_IRQ_XOR1CHAN1 8 /* Xor 1 Channel1 */ #define KIRKWOOD_IRQ_PEX0INT 9 /* PCI Express port0 INT A-D */ +#define KIRKWOOD_IRQ_PEX1INT 10 /* PCI Express port1 INT A-D */ #define KIRKWOOD_IRQ_GBE0SUM 11 /* GbE0 summary */ #define KIRKWOOD_IRQ_GBE0RX 12 /* GbE0 receive interrupt */ #define KIRKWOOD_IRQ_GBE0TX 13 /* GbE0 transmit interrupt */ @@ -101,6 +104,7 @@ #define KIRKWOOD_IRQ_XOR0ERR 42 /* XOR0 error */ #define KIRKWOOD_IRQ_XOR1ERR 43 /* XOR1 error */ #define KIRKWOOD_IRQ_PEX0ERR 44 /* PCI Express0 error */ +#define KIRKWOOD_IRQ_PEX1ERR 45 /* PCI Express1 error */ #define KIRKWOOD_IRQ_GBE0ERR 46 /* GbE port0 error */ #define KIRKWOOD_IRQ_GBE1ERR 47 /* GbE port1 error */ #define KIRKWOOD_IRQ_USBERR 48 /* USB error */ @@ -158,6 +162,11 @@ /* + * PCI-Express Interface Registers + */ +#define KIRKWOOD_PEX1_BASE (MVSOC_PEX_BASE + 0x4000) + +/* * Cryptographic Engine and Security Accelerator Registers */ #define KIRKWOOD_CESA_BASE (KIRKWOOD_UNITID2PHYS(CRYPT)) /* 0x3 */
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Wed Jul 18 09:56:49 UTC 2012 Modified Files: src/sys/arch/arm/marvell: mvsoc_space.c Log Message: Add bus-space-tags for PEX1 of Kirkwood. But not test. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/marvell/mvsoc_space.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/mvsoc_space.c diff -u src/sys/arch/arm/marvell/mvsoc_space.c:1.3 src/sys/arch/arm/marvell/mvsoc_space.c:1.4 --- src/sys/arch/arm/marvell/mvsoc_space.c:1.3 Sun Jul 15 20:53:50 2012 +++ src/sys/arch/arm/marvell/mvsoc_space.c Wed Jul 18 09:56:49 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoc_space.c,v 1.3 2012/07/15 20:53:50 matt Exp $ */ +/* $NetBSD: mvsoc_space.c,v 1.4 2012/07/18 09:56:49 kiyohara Exp $ */ /* * Copyright (c) 2007 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mvsoc_space.c,v 1.3 2012/07/15 20:53:50 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: mvsoc_space.c,v 1.4 2012/07/18 09:56:49 kiyohara Exp $); #include opt_mvsoc.h #include mvpex.h @@ -195,6 +195,18 @@ struct bus_space kirkwood_pex_io_bs_tag MVSOC_BUS_SPACE_NORMAL_FUNCS, #endif }; +struct bus_space kirkwood_pex1_mem_bs_tag = { + /* cookie */ + (void *)KIRKWOOD_TAG_PEX1_MEM, + + MVSOC_BUS_SPACE_DEFAULT_FUNCS +}; +struct bus_space kirkwood_pex1_io_bs_tag = { + /* cookie */ + (void *)KIRKWOOD_TAG_PEX1_IO, + + MVSOC_BUS_SPACE_DEFAULT_FUNCS +}; #endif #endif
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Wed Jul 18 10:04:20 UTC 2012 Modified Files: src/sys/arch/arm/marvell: kirkwood.c Log Message: Fix always check high. macro KIRKWOOD_IRQ_* means bit number. HIGH is bit0. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/marvell/kirkwood.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/kirkwood.c diff -u src/sys/arch/arm/marvell/kirkwood.c:1.4 src/sys/arch/arm/marvell/kirkwood.c:1.5 --- src/sys/arch/arm/marvell/kirkwood.c:1.4 Tue May 24 17:45:49 2011 +++ src/sys/arch/arm/marvell/kirkwood.c Wed Jul 18 10:04:20 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kirkwood.c,v 1.4 2011/05/24 17:45:49 matt Exp $ */ +/* $NetBSD: kirkwood.c,v 1.5 2012/07/18 10:04:20 kiyohara Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kirkwood.c,v 1.4 2011/05/24 17:45:49 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: kirkwood.c,v 1.5 2012/07/18 10:04:20 kiyohara Exp $); #define _INTR_PRIVATE @@ -188,7 +188,7 @@ kirkwood_find_pending_irqs(void) if (pendinglow != 0) ipl |= pic_mark_pending_sources(kirkwood_pic, 0, pendinglow); - if ((causelow KIRKWOOD_IRQ_HIGH) == KIRKWOOD_IRQ_HIGH) { + if ((causelow (1 KIRKWOOD_IRQ_HIGH)) == (1 KIRKWOOD_IRQ_HIGH)) { uint32_t causehigh = read_mlmbreg(KIRKWOOD_MLMB_MICHR); uint32_t pendinghigh = read_mlmbreg(KIRKWOOD_MLMB_MIRQIMHR); pendinghigh = causehigh;
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Wed Jul 18 10:07:34 UTC 2012 Modified Files: src/sys/arch/arm/marvell: kirkwood.c Log Message: Add 88F6282. Also fix/add some clock parameters. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/marvell/kirkwood.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/kirkwood.c diff -u src/sys/arch/arm/marvell/kirkwood.c:1.5 src/sys/arch/arm/marvell/kirkwood.c:1.6 --- src/sys/arch/arm/marvell/kirkwood.c:1.5 Wed Jul 18 10:04:20 2012 +++ src/sys/arch/arm/marvell/kirkwood.c Wed Jul 18 10:07:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kirkwood.c,v 1.5 2012/07/18 10:04:20 kiyohara Exp $ */ +/* $NetBSD: kirkwood.c,v 1.6 2012/07/18 10:07:34 kiyohara Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kirkwood.c,v 1.5 2012/07/18 10:04:20 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: kirkwood.c,v 1.6 2012/07/18 10:07:34 kiyohara Exp $); #define _INTR_PRIVATE @@ -114,6 +114,7 @@ kirkwood_intr_bootstrap(void) case MARVELL_KIRKWOOD_88F6180: gpp_npins = 30; break; case MARVELL_KIRKWOOD_88F6192: gpp_npins = 36; break; case MARVELL_KIRKWOOD_88F6281: gpp_npins = 50; break; + case MARVELL_KIRKWOOD_88F6282: gpp_npins = 50; break; } gpp_irqbase = 96; /* Main Low(32) + High(32) + Bridge(32) */ #endif @@ -211,7 +212,8 @@ kirkwood_getclks(bus_addr_t iobase) #define MHz * 1000 * 1000 model = mvsoc_model(); - if (model == MARVELL_KIRKWOOD_88F6281) + if (model == MARVELL_KIRKWOOD_88F6281 || + model == MARVELL_KIRKWOOD_88F6282) mvTclk = 200 MHz; else /* 166MHz */ mvTclk = 16667; @@ -228,20 +230,28 @@ kirkwood_getclks(bus_addr_t iobase) mvSysclk = 200 MHz; } else { switch (reg 0x0040001a) { + case 0x0002: mvPclk = 400 MHz; break; case 0x0008: mvPclk = 600 MHz; break; case 0x0048: mvPclk = 800 MHz; break; case 0x004a: mvPclk = 1000 MHz; break; case 0x0012: mvPclk = 1200 MHz; break; - case 0x0018: mvPclk = 1200 MHz; break; - case 0x0002: mvPclk = 1200 MHz; break; + case 0x0018: mvPclk = 1500 MHz; break; + case 0x001a: mvPclk = 1600 MHz; break; + case 0x00400018: mvPclk = 1800 MHz; break; + case 0x0040001a: mvPclk = 2000 MHz; break; default: panic(unknown mvPclk\n); } switch (reg 0x01e0) { + case 0x: mvSysclk = mvPclk * 1 / 1; break; + case 0x0040: mvSysclk = mvPclk * 1 / 2; break; case 0x0060: mvSysclk = mvPclk * 2 / 5; break; case 0x0080: mvSysclk = mvPclk * 1 / 3; break; case 0x00c0: mvSysclk = mvPclk * 1 / 4; break; + case 0x00e0: mvSysclk = mvPclk * 2 / 9; break; + case 0x0100: mvSysclk = mvPclk * 1 / 5; break; + case 0x0120: mvSysclk = mvPclk * 1 / 6; break; default: panic(unknown mvSysclk\n); }
CVS commit: src/sys/arch/evbarm/marvell
Module Name:src Committed By: kiyohara Date: Wed Jul 18 08:51:42 UTC 2012 Modified Files: src/sys/arch/evbarm/marvell: marvell_machdep.c Log Message: Set default EVBARM_BOARDTYPE is Marvell. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/marvell/marvell_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/evbarm/marvell/marvell_machdep.c diff -u src/sys/arch/evbarm/marvell/marvell_machdep.c:1.7 src/sys/arch/evbarm/marvell/marvell_machdep.c:1.8 --- src/sys/arch/evbarm/marvell/marvell_machdep.c:1.7 Sat Mar 31 02:36:31 2012 +++ src/sys/arch/evbarm/marvell/marvell_machdep.c Wed Jul 18 08:51:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: marvell_machdep.c,v 1.7 2012/03/31 02:36:31 tsutsui Exp $ */ +/* $NetBSD: marvell_machdep.c,v 1.8 2012/07/18 08:51:42 kiyohara Exp $ */ /* * Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: marvell_machdep.c,v 1.7 2012/03/31 02:36:31 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: marvell_machdep.c,v 1.8 2012/07/18 08:51:42 kiyohara Exp $); #include opt_evbarm_boardtype.h #include opt_ddb.h @@ -426,6 +426,9 @@ initarm(void *arg) consinit(); /* Talk to the user */ +#ifndef EVBARM_BOARDTYPE +#define EVBARM_BOARDTYPE Marvell +#endif #define BDSTR(s) _BDSTR(s) #define _BDSTR(s) #s printf(\nNetBSD/evbarm ( BDSTR(EVBARM_BOARDTYPE) ) booting ...\n);
CVS commit: src/sys/arch/evbarm/marvell
Module Name:src Committed By: kiyohara Date: Wed Jul 18 10:28:48 UTC 2012 Modified Files: src/sys/arch/evbarm/marvell: marvell_machdep.c Log Message: Support 88F6282. But PEX1 not test. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/marvell/marvell_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/evbarm/marvell/marvell_machdep.c diff -u src/sys/arch/evbarm/marvell/marvell_machdep.c:1.8 src/sys/arch/evbarm/marvell/marvell_machdep.c:1.9 --- src/sys/arch/evbarm/marvell/marvell_machdep.c:1.8 Wed Jul 18 08:51:42 2012 +++ src/sys/arch/evbarm/marvell/marvell_machdep.c Wed Jul 18 10:28:47 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: marvell_machdep.c,v 1.8 2012/07/18 08:51:42 kiyohara Exp $ */ +/* $NetBSD: marvell_machdep.c,v 1.9 2012/07/18 10:28:47 kiyohara Exp $ */ /* * Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: marvell_machdep.c,v 1.8 2012/07/18 08:51:42 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: marvell_machdep.c,v 1.9 2012/07/18 10:28:47 kiyohara Exp $); #include opt_evbarm_boardtype.h #include opt_ddb.h @@ -339,6 +339,7 @@ initarm(void *arg) case MARVELL_KIRKWOOD_88F6180: case MARVELL_KIRKWOOD_88F6192: case MARVELL_KIRKWOOD_88F6281: + case MARVELL_KIRKWOOD_88F6282: kirkwood_intr_bootstrap(); memtag = KIRKWOOD_TAG_PEX_MEM; @@ -914,14 +915,13 @@ marvell_device_register(device_t dev, vo #endif #ifdef KIRKWOOD extern struct bus_space - kirkwood_pex_io_bs_tag, kirkwood_pex_mem_bs_tag; + kirkwood_pex_io_bs_tag, kirkwood_pex_mem_bs_tag, + kirkwood_pex1_io_bs_tag, kirkwood_pex1_mem_bs_tag; #endif extern struct arm32_pci_chipset arm32_mvpex0_chipset; -#ifdef ORION +#if defined(ORION) || defined(KIRKWOOD) extern struct arm32_pci_chipset arm32_mvpex1_chipset; -#endif -#ifdef ORION struct marvell_attach_args *mva = aux; #endif struct bus_space *mvpex_io_bs_tag, *mvpex_mem_bs_tag; @@ -954,6 +954,18 @@ marvell_device_register(device_t dev, vo #endif #ifdef KIRKWOOD + case MARVELL_KIRKWOOD_88F6282: + if (mva-mva_offset != MVSOC_PEX_BASE) { +mvpex_io_bs_tag = kirkwood_pex1_io_bs_tag; +mvpex_mem_bs_tag = kirkwood_pex1_mem_bs_tag; +arm32_mvpex_chipset = arm32_mvpex1_chipset; +iotag = KIRKWOOD_TAG_PEX1_IO; +memtag = KIRKWOOD_TAG_PEX1_MEM; +break; + } + + /* FALLTHROUGH */ + case MARVELL_KIRKWOOD_88F6180: case MARVELL_KIRKWOOD_88F6192: case MARVELL_KIRKWOOD_88F6281:
CVS commit: xsrc/external/mit/libXt/dist/man
Module Name:xsrc Committed By: wiz Date: Wed Jul 18 14:34:03 UTC 2012 Modified Files: xsrc/external/mit/libXt/dist/man: XtAppCreateShell.man Log Message: Revert incorrect change to upstream (replacement works fine, don't hardcode wrong value) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man 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/libXt/dist/man/XtAppCreateShell.man diff -u xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man:1.3 xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man:1.4 --- xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man:1.3 Sun Nov 21 05:52:58 2010 +++ xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man Wed Jul 18 14:34:03 2012 @@ -172,7 +172,7 @@ Note that the widget returned by has the \s-1WM_COMMAND\s+1 property set for session managers (see Chapter 4). .SH SEE ALSO -XtCreateWidget(3Xt) +XtCreateWidget(__libmansuffix__) .br \fI\*(xT\fP .br
CVS commit: xsrc/external/mit/libXmu/dist/src
Module Name:xsrc Committed By: wiz Date: Wed Jul 18 14:58:49 UTC 2012 Modified Files: xsrc/external/mit/libXmu/dist/src: CmapAlloc.c Log Message: Use upstream version of DEBUG compile fix instead of local patch. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libXmu/dist/src/CmapAlloc.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/libXmu/dist/src/CmapAlloc.c diff -u xsrc/external/mit/libXmu/dist/src/CmapAlloc.c:1.3 xsrc/external/mit/libXmu/dist/src/CmapAlloc.c:1.4 --- xsrc/external/mit/libXmu/dist/src/CmapAlloc.c:1.3 Sun Nov 21 05:52:57 2010 +++ xsrc/external/mit/libXmu/dist/src/CmapAlloc.c Wed Jul 18 14:58:49 2012 @@ -330,11 +330,8 @@ icbrt_with_guess(int a, int guess) icbrt_loopcount++; #endif delta = (guess - a/(guess*guess))/3; -#ifdef DEBUG -#ifdef _X_ROOT_STATS - printf(pass %d: , icbrt_loopcount); -#endif - printf(guess=%d, delta=%d\n, guess, delta); +#if defined(DEBUG) defined(_X_ROOT_STATS) + printf(pass %d: guess=%d, delta=%d\n, icbrt_loopcount, guess, delta); #endif guess -= delta; } while (delta != 0);
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Wed Jul 18 16:44:53 UTC 2012 Modified Files: src/sys/arch/powerpc/include: trap.h Log Message: Define the MPC8XX traps To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/include/trap.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/powerpc/include/trap.h diff -u src/sys/arch/powerpc/include/trap.h:1.11 src/sys/arch/powerpc/include/trap.h:1.12 --- src/sys/arch/powerpc/include/trap.h:1.11 Sat May 24 21:39:01 2008 +++ src/sys/arch/powerpc/include/trap.h Wed Jul 18 16:44:52 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.h,v 1.11 2008/05/24 21:39:01 phx Exp $ */ +/* $NetBSD: trap.h,v 1.12 2012/07/18 16:44:52 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -76,6 +76,15 @@ #define EXC_ITMISS 0x1200 /* Instruction TLB Miss */ #define EXC_DEBUG 0x2000 /* Debug trap */ +/* The following are only available on mpc8xx */ +#define EXC_SWEMUL 0x1000 /* Software Emulation */ +#define EXC_ITMISS_8XX 0x1100 /* Instruction TLB Miss */ +#define EXC_DTMISS_8XX 0x1200 /* Data TLB Miss */ +#define EXC_ITERROR 0x1300 /* Instruction TLB Error */ +#define EXC_DTERROR 0x1400 /* Data TLB Error */ +#define EXC_DBREAK 0x1c00 /* data breakpoint */ +#define EXC_IBREAK 0x1d00 /* instructin breakpoint */ + /* The following are only present on 64 bit PPC implementations */ #define EXC_DSEG 0x380 #define EXC_ISEG 0x480
CVS commit: src/sys/arch/powerpc/booke
Module Name:src Committed By: matt Date: Wed Jul 18 16:45:35 UTC 2012 Modified Files: src/sys/arch/powerpc/booke: e500_intr.c Log Message: Add two missing interrupt sources for P1025. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/booke/e500_intr.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/powerpc/booke/e500_intr.c diff -u src/sys/arch/powerpc/booke/e500_intr.c:1.19 src/sys/arch/powerpc/booke/e500_intr.c:1.20 --- src/sys/arch/powerpc/booke/e500_intr.c:1.19 Sun Jul 15 08:44:56 2012 +++ src/sys/arch/powerpc/booke/e500_intr.c Wed Jul 18 16:45:33 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: e500_intr.c,v 1.19 2012/07/15 08:44:56 matt Exp $ */ +/* $NetBSD: e500_intr.c,v 1.20 2012/07/18 16:45:33 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -39,7 +39,7 @@ #define __INTR_PRIVATE #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: e500_intr.c,v 1.19 2012/07/15 08:44:56 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: e500_intr.c,v 1.20 2012/07/18 16:45:33 matt Exp $); #include sys/param.h #include sys/proc.h @@ -333,6 +333,8 @@ const struct e500_intr_name p1025_onchip { ISOURCE_ETSEC3_G1_TX, etsec3-g1-tx }, { ISOURCE_ETSEC3_G1_RX, etsec3-g1-rx }, { ISOURCE_ETSEC3_G1_ERR, etsec3-g1-error }, + { ISOURCE_QEB_MUECC, qeb-low }, + { ISOURCE_QEB_HIGH, qeb-crit }, { ISOURCE_DMA2_CHAN1, dma2-chan1 }, { ISOURCE_DMA2_CHAN2, dma2-chan2 }, { ISOURCE_DMA2_CHAN3, dma2-chan3 },
CVS commit: src/sys/arch/powerpc/powerpc
Module Name:src Committed By: matt Date: Wed Jul 18 16:56:51 UTC 2012 Modified Files: src/sys/arch/powerpc/powerpc: trap_subr.S Log Message: Add conditionals so this should work for the MPC8XX SoCs. Turn on PSL_RI in interrupts. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/powerpc/powerpc/trap_subr.S 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/powerpc/powerpc/trap_subr.S diff -u src/sys/arch/powerpc/powerpc/trap_subr.S:1.73 src/sys/arch/powerpc/powerpc/trap_subr.S:1.74 --- src/sys/arch/powerpc/powerpc/trap_subr.S:1.73 Wed Feb 1 05:25:58 2012 +++ src/sys/arch/powerpc/powerpc/trap_subr.S Wed Jul 18 16:56:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: trap_subr.S,v 1.73 2012/02/01 05:25:58 matt Exp $ */ +/* $NetBSD: trap_subr.S,v 1.74 2012/07/18 16:56:51 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -79,6 +79,14 @@ ldreg t0,_C_LABEL(kernel_pmap_)+PM_STEG@l(t0); \ mtasr t0 +#elif defined(PPC_MPC8XX) + +/* + * PPC_MPC8XX don't have SRs to load + */ +#define RESTORE_USER_SRS(t0,t1) +#define RESTORE_KERN_SRS(t0,t1) + #else /* not OEA64 */ /* @@ -216,6 +224,7 @@ _C_LABEL(alitrap): #endif _C_LABEL(alisize) = .-_C_LABEL(alitrap) +#if !defined(PPC_MPC8XX) /* * Similar to the above for DSI * Has to handle BAT spills @@ -232,10 +241,11 @@ _C_LABEL(dsitrap): streg %r31,(CI_DISISAVE+CPUSAVE_R31)(%r1) /* save r31 */ mfsprg1 %r1 mfcr %r29 /* save CR */ - mfxer %r30 /* save XER */ - mtsprg2 %r30 /* in SPRG2 */ mfsrr1 %r31 /* test kernel mode */ mtcr %r31 +#if !defined(PPC_MPC8XX) + mfxer %r30 /* save XER */ + mtsprg2 %r30 /* in SPRG2 */ bt MSR_PR,1f /* branch if PSL_PR is set */ mfdar %r31 /* get fault address */ rlwinm %r31,%r31,3+(32-BAT_ADDR_SHIFT),BAT_ADDR_SHIFT-3,28 @@ -296,6 +306,7 @@ dsitrap_fix_dbat7: mfsprg1 %r1 RFI/* return to trapped code */ 1: +#endif /* !PPC_MPC8XX */ mflr %r28 /* save LR */ mtsprg1 %r1 /* save SP */ #if defined(DISTANT_KERNEL) @@ -307,6 +318,7 @@ dsitrap_fix_dbat7: bla disitrap #endif _C_LABEL(dsisize) = .-_C_LABEL(dsitrap) +#endif /* !PPC_MPC8XX */ #if defined(PPC_OEA601) /* @@ -444,7 +456,7 @@ _C_LABEL(decrint): #endif _C_LABEL(decrsize) = .-_C_LABEL(decrint) -#if !defined(PPC_OEA64) +#if !defined(PPC_OEA64) !defined(PPC_MPC8XX) /* * Now the tlb software load for 603 processors: * (Code essentially from the 603e User Manual, Chapter 5, but @@ -648,7 +660,7 @@ _C_LABEL(tlbdsmiss): ba EXC_DSI #endif _C_LABEL(tlbdsmsize) = .-_C_LABEL(tlbdsmiss) -#endif /* !defined(PPC_OEA64) */ +#endif /* !PPC_OEA64 !PPC_MPC8XX */ #if defined(DDB) || defined(KGDB) /* @@ -1112,6 +1124,9 @@ _C_LABEL(sctrapexit): streg %r4,FRAME_CTR(%r1); \ streg %r11,FRAME_SRR0(%r1); \ streg %r12,FRAME_SRR1(%r1); \ + mfmsr %r30; \ + ori %r30,%r30,PSL_RI; /* turn on recovery interrupt */\ + mtmsr %r30; \ SAVE_VRSAVE(%r1,%r6); \ SAVE_MQ(%r1,%r7) @@ -1337,5 +1352,7 @@ _C_LABEL(trapend): * All OEA have FPUs so include this too. Some OEA have AltiVec so include * that too. */ +#if !defined(PPC_MPC8XX) #include powerpc/powerpc/fpu_subr.S #include powerpc/oea/altivec_subr.S +#endif
CVS commit: src/sys/arch/evbppc/conf
Module Name:src Committed By: matt Date: Wed Jul 18 16:58:15 UTC 2012 Modified Files: src/sys/arch/evbppc/conf: INSTALL_TWRP1025.MP Log Message: Fix two typos To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbppc/conf/INSTALL_TWRP1025.MP 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/evbppc/conf/INSTALL_TWRP1025.MP diff -u src/sys/arch/evbppc/conf/INSTALL_TWRP1025.MP:1.1 src/sys/arch/evbppc/conf/INSTALL_TWRP1025.MP:1.2 --- src/sys/arch/evbppc/conf/INSTALL_TWRP1025.MP:1.1 Sun Jul 15 08:44:56 2012 +++ src/sys/arch/evbppc/conf/INSTALL_TWRP1025.MP Wed Jul 18 16:58:15 2012 @@ -1,8 +1,8 @@ -# $NetBSD: INSTALL_TWRP1025.MP,v 1.1 2012/07/15 08:44:56 matt Exp $ +# $NetBSD: INSTALL_TWRP1025.MP,v 1.2 2012/07/18 16:58:15 matt Exp $ -include arch/evbppc/conf/TWRP1205.MP +include arch/evbppc/conf/TWRP1025.MP -#ident INSTALL_TWRP1205.MP-$Revision: 1.1 $ +#ident INSTALL_TWRP1025.MP-$Revision: 1.2 $ include arch/evbppc/conf/INSTALL.inc
CVS commit: src/sys/arch/evbppc/conf
Module Name:src Committed By: matt Date: Wed Jul 18 16:59:41 UTC 2012 Modified Files: src/sys/arch/evbppc/conf: TWRP1025 Log Message: Add gpt/dkwedge support. Cleanup a few options sptab problems To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbppc/conf/TWRP1025 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/evbppc/conf/TWRP1025 diff -u src/sys/arch/evbppc/conf/TWRP1025:1.2 src/sys/arch/evbppc/conf/TWRP1025:1.3 --- src/sys/arch/evbppc/conf/TWRP1025:1.2 Tue Jul 17 01:36:12 2012 +++ src/sys/arch/evbppc/conf/TWRP1025 Wed Jul 18 16:59:41 2012 @@ -1,4 +1,4 @@ -# $NetBSD: TWRP1025,v 1.2 2012/07/17 01:36:12 matt Exp $ +# $NetBSD: TWRP1025,v 1.3 2012/07/18 16:59:41 matt Exp $ # # TWRP1025 -- everything that's currently supported # @@ -7,7 +7,7 @@ include arch/evbppc/conf/std.mpc85xx options INCLUDE_CONFIG_FILE # embed config file in kernel binary -ident TWRP1025-$Revision: 1.2 $ +ident TWRP1025-$Revision: 1.3 $ maxusers 32 @@ -32,7 +32,7 @@ options SYSVSEM # System V semaphores options SYSVSHM # System V shared memory options USERCONF # userconf(4) support -#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) +#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Diagnostic/debugging support options @@ -62,7 +62,11 @@ options COMPAT_50 # NetBSD 5.0 compatib options COMPAT_43 # and 4.3BSD #options COMPAT_386BSD_MBRPART # recognize old partition ID #options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. -options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. +options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. + +# Wedge support +options DKWEDGE_AUTODISCOVER # Automatically add dk(4) instances +options DKWEDGE_METHOD_GPT # Supports GPT partitions as wedges # File systems file-system FFS # UFS @@ -165,7 +169,7 @@ e500wdog* at cpunode? # Watchdog timer ddrc* at cpunode? duart* at cpunode? com* at duart? port ? -options CONSADDR=DUART1_BASE +options CONSADDR=DUART1_BASE tsec0 at cpunode? instance 1 flags 0x003 # Enhanced 3-Speed Ethernet Controller tsec1 at cpunode? instance 3 flags 0x102 # Enhanced 3-Speed Ethernet Controller
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Wed Jul 18 17:12:39 UTC 2012 Modified Files: src/lib/libedit: chared.c Log Message: From Kamil Dudka: fix crash of el_insertstr() on incomplete multi-byte To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/lib/libedit/chared.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libedit/chared.c diff -u src/lib/libedit/chared.c:1.36 src/lib/libedit/chared.c:1.37 --- src/lib/libedit/chared.c:1.36 Sun Oct 23 13:37:55 2011 +++ src/lib/libedit/chared.c Wed Jul 18 13:12:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: chared.c,v 1.36 2011/10/23 17:37:55 christos Exp $ */ +/* $NetBSD: chared.c,v 1.37 2012/07/18 17:12:39 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)chared.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: chared.c,v 1.36 2011/10/23 17:37:55 christos Exp $); +__RCSID($NetBSD: chared.c,v 1.37 2012/07/18 17:12:39 christos Exp $); #endif #endif /* not lint not SCCSID */ @@ -612,7 +612,7 @@ FUN(el,insertstr)(EditLine *el, const Ch { size_t len; - if ((len = Strlen(s)) == 0) + if (s == NULL || (len = Strlen(s)) == 0) return -1; if (el-el_line.lastchar + len = el-el_line.limit) { if (!ch_enlargebufs(el, len))
CVS commit: src/sys/arch/powerpc/powerpc
Module Name:src Committed By: matt Date: Wed Jul 18 17:41:59 UTC 2012 Modified Files: src/sys/arch/powerpc/powerpc: bus_space.c Log Message: Fix some boundary conditions (fence post errors). To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/powerpc/powerpc/bus_space.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/powerpc/powerpc/bus_space.c diff -u src/sys/arch/powerpc/powerpc/bus_space.c:1.33 src/sys/arch/powerpc/powerpc/bus_space.c:1.34 --- src/sys/arch/powerpc/powerpc/bus_space.c:1.33 Thu Jul 5 03:02:53 2012 +++ src/sys/arch/powerpc/powerpc/bus_space.c Wed Jul 18 17:41:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.c,v 1.33 2012/07/05 03:02:53 kiyohara Exp $ */ +/* $NetBSD: bus_space.c,v 1.34 2012/07/18 17:41:59 matt Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.33 2012/07/05 03:02:53 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.34 2012/07/18 17:41:59 matt Exp $); #define _POWERPC_BUS_SPACE_PRIVATE @@ -400,7 +400,7 @@ bus_space_init(struct powerpc_bus_space { if (t-pbs_extent == NULL extent_name != NULL) { t-pbs_extent = extent_create(extent_name, t-pbs_base, - t-pbs_limit-1, storage, storage_size, + t-pbs_limit, storage, storage_size, EX_NOCOALESCE|EX_NOWAIT); if (t-pbs_extent == NULL) return ENOMEM; @@ -525,7 +525,7 @@ memio_map(bus_space_tag_t t, bus_addr_t size = _BUS_SPACE_STRIDE(t, size); bpa = _BUS_SPACE_STRIDE(t, bpa); - if (t-pbs_limit != 0 bpa + size t-pbs_limit) { + if (t-pbs_limit != 0 bpa + size - 1 t-pbs_limit) { #ifdef DEBUG printf(bus_space_map(%p[%x:%x], %#x, %#x) failed: EINVAL\n, t, t-pbs_base, t-pbs_limit, bpa, size); @@ -709,7 +709,7 @@ memio_alloc(bus_space_tag_t t, bus_addr_ if (t-pbs_extent == NULL) return ENOMEM; - if (t-pbs_limit != 0 rstart + size t-pbs_limit) { + if (t-pbs_limit != 0 rstart + size - 1 t-pbs_limit) { #ifdef DEBUG printf(%s(%p[%x:%x], %#x, %#x) failed: EINVAL\n, __func__, t, t-pbs_base, t-pbs_limit, rstart, size);
CVS commit: src/sys/arch/powerpc/booke
Module Name:src Committed By: matt Date: Wed Jul 18 18:29:22 UTC 2012 Modified Files: src/sys/arch/powerpc/booke: e500_tlb.c Log Message: Fix some SHIFTOUT to SHIFTIN Add a lookup of tlb1 by pa. fix comparisions of xtlb entries by using masks. (since xtlb can looked up by pa va and va may not equal pa). To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/booke/e500_tlb.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/powerpc/booke/e500_tlb.c diff -u src/sys/arch/powerpc/booke/e500_tlb.c:1.8 src/sys/arch/powerpc/booke/e500_tlb.c:1.9 --- src/sys/arch/powerpc/booke/e500_tlb.c:1.8 Thu Mar 29 15:48:20 2012 +++ src/sys/arch/powerpc/booke/e500_tlb.c Wed Jul 18 18:29:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: e500_tlb.c,v 1.8 2012/03/29 15:48:20 matt Exp $ */ +/* $NetBSD: e500_tlb.c,v 1.9 2012/07/18 18:29:22 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -38,7 +38,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: e500_tlb.c,v 1.8 2012/03/29 15:48:20 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: e500_tlb.c,v 1.9 2012/07/18 18:29:22 matt Exp $); #include sys/param.h @@ -318,7 +318,7 @@ e500_alloc_tlb1_entry(void) const u_int slot = tlb1-tlb1_freelist[--tlb1-tlb1_numfree]; KASSERT((tlb1-tlb1_entries[slot].e_hwtlb.hwtlb_mas1 MAS1_V) == 0); tlb1-tlb1_entries[slot].e_hwtlb.hwtlb_mas0 = - MAS0_TLBSEL_TLB1 | __SHIFTOUT(slot, MAS0_ESEL); + MAS0_TLBSEL_TLB1 | __SHIFTIN(slot, MAS0_ESEL); return (int)slot; } @@ -644,7 +644,7 @@ e500_tlb_walk(void *ctx, bool (*func)(vo } static struct e500_xtlb * -e500_tlb_lookup_xtlb(vaddr_t va, u_int *slotp) +e500_tlb_lookup_xtlb_pa(vaddr_t pa, u_int *slotp) { struct e500_tlb1 * const tlb1 = e500_tlb1; struct e500_xtlb *xtlb = tlb1-tlb1_entries; @@ -653,9 +653,31 @@ e500_tlb_lookup_xtlb(vaddr_t va, u_int * * See if we have a TLB entry for the pa. */ for (u_int i = 0; i tlb1-tlb1_numentries; i++, xtlb++) { + psize_t mask = ~(xtlb-e_tlb.tlb_size - 1); + if ((xtlb-e_hwtlb.hwtlb_mas1 MAS1_V) + ((pa ^ xtlb-e_tlb.tlb_pte) mask) == 0) { + if (slotp != NULL) +*slotp = i; + return xtlb; + } + } + + return NULL; +} + +static struct e500_xtlb * +e500_tlb_lookup_xtlb(vaddr_t va, u_int *slotp) +{ + struct e500_tlb1 * const tlb1 = e500_tlb1; + struct e500_xtlb *xtlb = tlb1-tlb1_entries; + + /* + * See if we have a TLB entry for the va. + */ + for (u_int i = 0; i tlb1-tlb1_numentries; i++, xtlb++) { + vsize_t mask = ~(xtlb-e_tlb.tlb_size - 1); if ((xtlb-e_hwtlb.hwtlb_mas1 MAS1_V) - xtlb-e_tlb.tlb_va = va - va xtlb-e_tlb.tlb_va + xtlb-e_tlb.tlb_size) { + ((va ^ xtlb-e_tlb.tlb_va) mask) == 0) { if (slotp != NULL) *slotp = i; return xtlb; @@ -675,9 +697,10 @@ e500_tlb_lookup_xtlb2(vaddr_t va, vsize_ * See if we have a TLB entry for the pa. */ for (u_int i = 0; i tlb1-tlb1_numentries; i++, xtlb++) { + vsize_t mask = ~(xtlb-e_tlb.tlb_size - 1); if ((xtlb-e_hwtlb.hwtlb_mas1 MAS1_V) - xtlb-e_tlb.tlb_va va + len - va xtlb-e_tlb.tlb_va + xtlb-e_tlb.tlb_size) { + ((va ^ xtlb-e_tlb.tlb_va) mask) == 0 + (((va + len - 1) ^ va) mask) == 0) { return xtlb; } } @@ -688,7 +711,7 @@ e500_tlb_lookup_xtlb2(vaddr_t va, vsize_ static void * e500_tlb_mapiodev(paddr_t pa, psize_t len, bool prefetchable) { - struct e500_xtlb * const xtlb = e500_tlb_lookup_xtlb(pa, NULL); + struct e500_xtlb * const xtlb = e500_tlb_lookup_xtlb_pa(pa, NULL); /* * See if we have a TLB entry for the pa. If completely falls within @@ -696,7 +719,6 @@ e500_tlb_mapiodev(paddr_t pa, psize_t le * is not cacheable. */ if (xtlb - pa + len = xtlb-e_tlb.tlb_va + xtlb-e_tlb.tlb_size (prefetchable || (xtlb-e_tlb.tlb_pte PTE_WIG) == (PTE_I|PTE_G))) { xtlb-e_refcnt++; @@ -726,13 +748,12 @@ e500_tlb_ioreserve(vaddr_t va, vsize_t l KASSERT(len = PAGE_SIZE); KASSERT((len (len - 1)) == 0); KASSERT((va (len - 1)) == 0); - KASSERT((pte (len - 1)) == 0); + KASSERT(((pte PTE_RPN_MASK) (len - 1)) == 0); if ((xtlb = e500_tlb_lookup_xtlb2(va, len)) != NULL) { - if (va xtlb-e_tlb.tlb_va - || xtlb-e_tlb.tlb_va + xtlb-e_tlb.tlb_size va + len - || va - xtlb-e_tlb.tlb_va != pte - xtlb-e_tlb.tlb_pte) - return EBUSY; + psize_t mask = ~(xtlb-e_tlb.tlb_size - 1); + KASSERT(len = xtlb-e_tlb.tlb_size); + KASSERT((pte mask) == (xtlb-e_tlb.tlb_pte mask)); xtlb-e_refcnt++; return 0; } @@ -748,7 +769,7 @@ e500_tlb_ioreserve(vaddr_t va, vsize_t l xtlb-e_tlb.tlb_asid = KERNEL_PID; xtlb-e_hwtlb = tlb_to_hwtlb(xtlb-e_tlb); - xtlb-e_hwtlb.hwtlb_mas0 |= __SHIFTOUT(slot, MAS0_ESEL); + xtlb-e_hwtlb.hwtlb_mas0 |= __SHIFTIN(slot, MAS0_ESEL); hwtlb_write(xtlb-e_hwtlb, true); return 0; } @@ -950,7 +971,7 @@ e500_tlb_init(vaddr_t endkernel,
CVS commit: src/sys/arch/powerpc/booke
Module Name:src Committed By: matt Date: Wed Jul 18 18:50:46 UTC 2012 Modified Files: src/sys/arch/powerpc/booke: e500_tlb.c Log Message: Don't assume 1:1 PA:VA mapping To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/e500_tlb.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/powerpc/booke/e500_tlb.c diff -u src/sys/arch/powerpc/booke/e500_tlb.c:1.9 src/sys/arch/powerpc/booke/e500_tlb.c:1.10 --- src/sys/arch/powerpc/booke/e500_tlb.c:1.9 Wed Jul 18 18:29:22 2012 +++ src/sys/arch/powerpc/booke/e500_tlb.c Wed Jul 18 18:50:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: e500_tlb.c,v 1.9 2012/07/18 18:29:22 matt Exp $ */ +/* $NetBSD: e500_tlb.c,v 1.10 2012/07/18 18:50:46 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -38,7 +38,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: e500_tlb.c,v 1.9 2012/07/18 18:29:22 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: e500_tlb.c,v 1.10 2012/07/18 18:50:46 matt Exp $); #include sys/param.h @@ -722,7 +722,8 @@ e500_tlb_mapiodev(paddr_t pa, psize_t le (prefetchable || (xtlb-e_tlb.tlb_pte PTE_WIG) == (PTE_I|PTE_G))) { xtlb-e_refcnt++; - return (void *) pa; + return (void *) (xtlb-e_tlb.tlb_va + + pa - (xtlb-e_tlb.tlb_pte PTE_RPN_MASK)); } return NULL; }
CVS commit: src/sys/arch/powerpc/booke
Module Name:src Committed By: matt Date: Wed Jul 18 18:51:59 UTC 2012 Modified Files: src/sys/arch/powerpc/booke: booke_machdep.c Log Message: If allocating lots of VA space for an io device, try to 'reserve' the space so that the TLB might be able to create a large TLB entry to map it all. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/booke/booke_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/powerpc/booke/booke_machdep.c diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.14 src/sys/arch/powerpc/booke/booke_machdep.c:1.15 --- src/sys/arch/powerpc/booke/booke_machdep.c:1.14 Thu Jun 30 00:52:58 2011 +++ src/sys/arch/powerpc/booke/booke_machdep.c Wed Jul 18 18:51:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: booke_machdep.c,v 1.14 2011/06/30 00:52:58 matt Exp $ */ +/* $NetBSD: booke_machdep.c,v 1.15 2012/07/18 18:51:59 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -38,7 +38,7 @@ #define _POWERPC_BUS_DMA_PRIVATE #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: booke_machdep.c,v 1.14 2011/06/30 00:52:58 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: booke_machdep.c,v 1.15 2012/07/18 18:51:59 matt Exp $); #include opt_modular.h @@ -329,13 +329,45 @@ mapiodev(paddr_t pa, psize_t len, bool p panic(mapiodev: no TLB entry reserved for %llx+%llx, (long long)pa, (long long)len); + const paddr_t orig_pa = pa; + const psize_t orig_len = len; + vsize_t align = 0; pa = trunc_page(pa); len = round_page(off + len); - vaddr_t va = uvm_km_alloc(kernel_map, len, 0, UVM_KMF_VAONLY); + /* + * If we are allocating a large amount (= 1MB) try to get an + * aligned VA region for it so try to do a large mapping for it. + */ + if ((len (len - 1)) == 0 len = 0x10) + align = len; + + vaddr_t va = uvm_km_alloc(kernel_map, len, align, UVM_KMF_VAONLY); + if (va == 0 align 0) { + /* + * Large aligned request failed. Let's just get anything. + */ + align = 0; + va = uvm_km_alloc(kernel_map, len, align, UVM_KMF_VAONLY); + } if (va == 0) return NULL; + if (align) { + /* + * Now try to map that via one big TLB entry. + */ + pt_entry_t pte = pte_make_kenter_pa(pa, NULL, + VM_PROT_READ|VM_PROT_WRITE, + prefetchable ? 0 : PMAP_NOCACHE); + if (!tlb_ioreserve(va, len, pte)) { + void * const p0 = tlb_mapiodev(orig_pa, orig_len, + prefetchable); + KASSERT(p0 != NULL); + return p0; + } + } + for (va += len, pa += len; len 0; len -= PAGE_SIZE) { va -= PAGE_SIZE; pa -= PAGE_SIZE;
CVS commit: src/sys/arch/powerpc/booke
Module Name:src Committed By: matt Date: Wed Jul 18 18:55:27 UTC 2012 Removed Files: src/sys/arch/powerpc/booke: copyinstr.c copyoutstr.c Log Message: These are not used so nuke 'em. To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 src/sys/arch/powerpc/booke/copyinstr.c \ src/sys/arch/powerpc/booke/copyoutstr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/booke/dev
Module Name:src Committed By: matt Date: Wed Jul 18 19:01:50 UTC 2012 Modified Files: src/sys/arch/powerpc/booke/dev: pq3cfi.c Log Message: Map NOR as PREFETCHABLE. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/booke/dev/pq3cfi.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/powerpc/booke/dev/pq3cfi.c diff -u src/sys/arch/powerpc/booke/dev/pq3cfi.c:1.4 src/sys/arch/powerpc/booke/dev/pq3cfi.c:1.5 --- src/sys/arch/powerpc/booke/dev/pq3cfi.c:1.4 Sat Aug 6 05:48:01 2011 +++ src/sys/arch/powerpc/booke/dev/pq3cfi.c Wed Jul 18 19:01:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3cfi.c,v 1.4 2011/08/06 05:48:01 cliff Exp $ */ +/* $NetBSD: pq3cfi.c,v 1.5 2012/07/18 19:01:50 matt Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pq3cfi.c,v 1.4 2011/08/06 05:48:01 cliff Exp $); +__KERNEL_RCSID(0, $NetBSD: pq3cfi.c,v 1.5 2012/07/18 19:01:50 matt Exp $); #include sys/param.h #include sys/systm.h @@ -148,7 +148,7 @@ pq3cfi_attach(device_t parent, device_t cfi_print(self, sc-sc_cfi); error = bus_space_map(sc-sc_cfi.cfi_bst, sc-sc_addr, sc-sc_size, - 0, sc-sc_cfi.cfi_bsh); + BUS_SPACE_MAP_PREFETCHABLE, sc-sc_cfi.cfi_bsh); if (error != 0) { aprint_error_dev(self, could not map error %d\n, error); return;
CVS commit: src/sys/arch
Module Name:src Committed By: matt Date: Wed Jul 18 19:38:26 UTC 2012 Modified Files: src/sys/arch/evbppc/mpc85xx: machdep.c src/sys/arch/powerpc/booke/pci: pq3pci.c src/sys/arch/powerpc/include/booke: e500reg.h Log Message: Add P1025 support to the PCI truth tables. P1025 only has two PCIe ports, not 3. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbppc/mpc85xx/machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/booke/pci/pq3pci.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/include/booke/e500reg.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/evbppc/mpc85xx/machdep.c diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.26 src/sys/arch/evbppc/mpc85xx/machdep.c:1.27 --- src/sys/arch/evbppc/mpc85xx/machdep.c:1.26 Tue Jul 17 01:36:12 2012 +++ src/sys/arch/evbppc/mpc85xx/machdep.c Wed Jul 18 19:38:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.26 2012/07/17 01:36:12 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.27 2012/07/18 19:38:26 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -364,11 +364,12 @@ static const struct cpunode_locators mpc 1 + ilog2(DEVDISR_PCIE2), { SVR_MPC8572v1 16, SVR_P2020v2 16, SVR_P1025v1 16 } }, +#endif +#if defined(MPC8572) || defined(P2020) { pcie, PCIE3_MPC8572_BASE, PCI_SIZE, 3, 1, { ISOURCE_PCIEX3_MPC8572 }, 1 + ilog2(DEVDISR_PCIE3), - { SVR_MPC8572v1 16, SVR_P2020v2 16, - SVR_P1025v1 16 } }, + { SVR_MPC8572v1 16, SVR_P2020v2 16, } }, #endif #if defined(MPC8536) || defined(P1025) || defined(P2020) { ehci, USB1_BASE, USB_SIZE, 1, @@ -1422,15 +1423,16 @@ cpu_startup(void) case SVR_MPC8544v1 16: case SVR_MPC8572v1 16: case SVR_P1016v1 16: - case SVR_P1025v1 16: case SVR_P2010v2 16: case SVR_P2020v2 16: - mpc85xx_pci_setup(pcie1-interrupt-map, 0x001800, IST_LEVEL, - 0, 1, 2, 3); - mpc85xx_pci_setup(pcie2-interrupt-map, 0x001800, IST_LEVEL, - 4, 5, 6, 7); mpc85xx_pci_setup(pcie3-interrupt-map, 0x001800, IST_LEVEL, 8, 9, 10, 11); + /* FALLTHROUGH */ + case SVR_P1025v1 16: + mpc85xx_pci_setup(pcie2-interrupt-map, 0x001800, IST_LEVEL, + 4, 5, 6, 7); + mpc85xx_pci_setup(pcie1-interrupt-map, 0x001800, IST_LEVEL, + 0, 1, 2, 3); break; #endif } Index: src/sys/arch/powerpc/booke/pci/pq3pci.c diff -u src/sys/arch/powerpc/booke/pci/pq3pci.c:1.12 src/sys/arch/powerpc/booke/pci/pq3pci.c:1.13 --- src/sys/arch/powerpc/booke/pci/pq3pci.c:1.12 Fri Jan 27 18:52:59 2012 +++ src/sys/arch/powerpc/booke/pci/pq3pci.c Wed Jul 18 19:38:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3pci.c,v 1.12 2012/01/27 18:52:59 para Exp $ */ +/* $NetBSD: pq3pci.c,v 1.13 2012/07/18 19:38:26 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -44,7 +44,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pq3pci.c,v 1.12 2012/01/27 18:52:59 para Exp $); +__KERNEL_RCSID(0, $NetBSD: pq3pci.c,v 1.13 2012/07/18 19:38:26 matt Exp $); #include sys/param.h #include sys/device.h @@ -87,6 +87,11 @@ __KERNEL_RCSID(0, $NetBSD: pq3pci.c,v 1 __SHIFTIN(field##_##P20x0##_##value, PORDEVSR_##field), result), \ TRUTH_ENCODE(SVR_P2010v2, inst, PORDEVSR_##field, \ __SHIFTIN(field##_##P20x0##_##value, PORDEVSR_##field), result) +#define PORDEVSR_P1025_TRUTH_ENCODE(inst, field, value, result) \ +TRUTH_ENCODE(SVR_P1025v1, inst, PORDEVSR_##field, \ + __SHIFTIN(field##_##P20x0##_##value, PORDEVSR_##field), result), \ +TRUTH_ENCODE(SVR_P1016v1, inst, PORDEVSR_##field, \ + __SHIFTIN(field##_##P20x0##_##value, PORDEVSR_##field), result) #define PORDEVSR_TRUTH_ENCODE(svr, inst, field, value, result) \ TRUTH_ENCODE(svr, inst, PORDEVSR_##field, \ @@ -157,6 +162,15 @@ const struct e500_truthtab pq3pci_pcie_l PORDEVSR_P20x0_TRUTH_ENCODE(3, IOSEL, PCIE12_X1_3_X2, 2), PORDEVSR_P20x0_TRUTH_ENCODE(3, IOSEL, PCIE13_X2, 2), #endif + +#ifdef P1025 +PORDEVSR_P1025_TRUTH_ENCODE(1, IOSEL, PCIE1_X1, 1), +PORDEVSR_P1025_TRUTH_ENCODE(1, IOSEL, PCIE1_X4, 4), +PORDEVSR_P1025_TRUTH_ENCODE(1, IOSEL, PCIE12_X1_SGMII23, 1), +PORDEVSR_P1025_TRUTH_ENCODE(1, IOSEL, PCIE1_X2_SGMII23, 2), + +PORDEVSR_P1025_TRUTH_ENCODE(2, IOSEL, PCIE12_X1_SGMII23, 1), +#endif }; static const struct e500_truthtab pq3pci_pci_pcix[] = { Index: src/sys/arch/powerpc/include/booke/e500reg.h diff -u src/sys/arch/powerpc/include/booke/e500reg.h:1.12 src/sys/arch/powerpc/include/booke/e500reg.h:1.13 --- src/sys/arch/powerpc/include/booke/e500reg.h:1.12 Tue Jul 17 01:36:13 2012 +++ src/sys/arch/powerpc/include/booke/e500reg.h Wed Jul 18 19:38:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: e500reg.h,v 1.12 2012/07/17 01:36:13 matt Exp $ */ +/* $NetBSD: e500reg.h,v 1.13 2012/07/18 19:38:26 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All
CVS commit: src/sys/arch/evbppc/conf
Module Name:src Committed By: matt Date: Wed Jul 18 19:39:54 UTC 2012 Modified Files: src/sys/arch/evbppc/conf: TWRP1025 Log Message: This has a 64MB NOR, not 16MB. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbppc/conf/TWRP1025 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/evbppc/conf/TWRP1025 diff -u src/sys/arch/evbppc/conf/TWRP1025:1.3 src/sys/arch/evbppc/conf/TWRP1025:1.4 --- src/sys/arch/evbppc/conf/TWRP1025:1.3 Wed Jul 18 16:59:41 2012 +++ src/sys/arch/evbppc/conf/TWRP1025 Wed Jul 18 19:39:54 2012 @@ -1,4 +1,4 @@ -# $NetBSD: TWRP1025,v 1.3 2012/07/18 16:59:41 matt Exp $ +# $NetBSD: TWRP1025,v 1.4 2012/07/18 19:39:54 matt Exp $ # # TWRP1025 -- everything that's currently supported # @@ -7,7 +7,7 @@ include arch/evbppc/conf/std.mpc85xx options INCLUDE_CONFIG_FILE # embed config file in kernel binary -ident TWRP1025-$Revision: 1.3 $ +ident TWRP1025-$Revision: 1.4 $ maxusers 32 @@ -162,7 +162,7 @@ obio0 at cpunode? # On-chip Peripheral #options NOR_VERBOSE cfi0 at obio0 cs 0 nor* at cfi? -flash* at nor? offset 0 size 0x100 +flash* at nor? offset 0 size 0x400 e500wdog* at cpunode? # Watchdog timer
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Wed Jul 18 20:09:19 UTC 2012 Modified Files: src/sys/arch/arm/arm: cpufunc_asm_arm11.S Log Message: Typo in comment To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm/cpufunc_asm_arm11.S 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/arm/cpufunc_asm_arm11.S diff -u src/sys/arch/arm/arm/cpufunc_asm_arm11.S:1.7 src/sys/arch/arm/arm/cpufunc_asm_arm11.S:1.8 --- src/sys/arch/arm/arm/cpufunc_asm_arm11.S:1.7 Thu May 10 11:47:09 2012 +++ src/sys/arch/arm/arm/cpufunc_asm_arm11.S Wed Jul 18 20:09:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc_asm_arm11.S,v 1.7 2012/05/10 11:47:09 skrll Exp $ */ +/* $NetBSD: cpufunc_asm_arm11.S,v 1.8 2012/07/18 20:09:19 skrll Exp $ */ /* * Copyright (c) 2002, 2005 ARM Limited @@ -75,7 +75,7 @@ ENTRY(arm11_tlb_flushI_SE) /* * Context switch. * - * These are the CPU-specific parts of the context switcher cpu_switch() + * These are the CPU-specific parts of the context switcher cpu_switchto() * These functions actually perform the TTB reload. */ ENTRY(arm11_context_switch)
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Wed Jul 18 20:30:07 UTC 2012 Modified Files: src/sys/kern: sys_sig.c Log Message: From Roger Pau Monne: kill(2) called for a zombie process should return 0, according to: http://pubs.opengroup.org/onlinepubs/9699919799/functions/kill.html To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/kern/sys_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_sig.c diff -u src/sys/kern/sys_sig.c:1.37 src/sys/kern/sys_sig.c:1.38 --- src/sys/kern/sys_sig.c:1.37 Sun Feb 19 16:06:57 2012 +++ src/sys/kern/sys_sig.c Wed Jul 18 16:30:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_sig.c,v 1.37 2012/02/19 21:06:57 rmind Exp $ */ +/* $NetBSD: sys_sig.c,v 1.38 2012/07/18 20:30:07 christos Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_sig.c,v 1.37 2012/02/19 21:06:57 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_sig.c,v 1.38 2012/07/18 20:30:07 christos Exp $); #include sys/param.h #include sys/kernel.h @@ -240,10 +240,11 @@ kill1(struct lwp *l, pid_t pid, ksiginfo if (pid 0) { /* kill single process */ mutex_enter(proc_lock); - p = proc_find(pid); - if (p == NULL) { + p = proc_find_raw(pid); + if (p == NULL || (p-p_stat != SACTIVE p-p_stat != SSTOP)) { mutex_exit(proc_lock); - return ESRCH; + /* IEEE Std 1003.1-2001: return success for zombies */ + return p ? 0 : ESRCH; } mutex_enter(p-p_lock); error = kauth_authorize_process(l-l_cred,
CVS commit: src/sys/arch/powerpc/include/booke
Module Name:src Committed By: matt Date: Wed Jul 18 20:46:36 UTC 2012 Modified Files: src/sys/arch/powerpc/include/booke: spr.h Log Message: Add some more PVRs and SVRs To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/booke/spr.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/powerpc/include/booke/spr.h diff -u src/sys/arch/powerpc/include/booke/spr.h:1.9 src/sys/arch/powerpc/include/booke/spr.h:1.10 --- src/sys/arch/powerpc/include/booke/spr.h:1.9 Sun Jul 15 08:44:57 2012 +++ src/sys/arch/powerpc/include/booke/spr.h Wed Jul 18 20:46:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: spr.h,v 1.9 2012/07/15 08:44:57 matt Exp $ */ +/* $NetBSD: spr.h,v 1.10 2012/07/18 20:46:36 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -39,6 +39,8 @@ #define PVR_MPCe500 0x8020 #define PVR_MPCe500v2 0x8021 +#define PVR_MPCe500mc 0x8023 +#define PVR_MPCe5500 0x8024 /* 64-bit */ #define SVR_MPC8548v1 0x80310010 #define SVR_MPC8548v1plus 0x80310011 @@ -68,10 +70,12 @@ #define SVR_P1011v2 0x80e50020 #define SVR_P1012v2 0x80e50120 #define SVR_P1013v2 0x80e70020 +#define SVR_P1015v1 0x80e50210 #define SVR_P1016v1 0x80e50310 #define SVR_P1020v2 0x80e40020 #define SVR_P1021v2 0x80e40120 #define SVR_P1022v2 0x80e60020 +#define SVR_P1024v2 0x80e40210 #define SVR_P1025v1 0x80e40310 #define SVR_SECURITY_P(svr) (((svr) 0x0008) != 0) @@ -79,12 +83,13 @@ #define SVR_P2040v1 0x82100010 /* e500mc */ #define SVR_P2041v1 0x82100110 /* e500mc */ +#define SVR_P3041v1 0x82110310 /* e500mc */ + #define SVR_P4080v1 0x8210 /* e500mc */ #define SVR_P4040v1 0x82000110 /* e500mc */ #define SVR_P5010v1 0x82210010 /* e5500 */ #define SVR_P5020v1 0x82200010 /* e5500 */ -#define SVR_P5010v1 0x82210010 /* e5500 */ /* * Special Purpose Register declarations.
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pgoyette Date: Wed Jul 18 20:50:40 UTC 2012 Modified Files: src/sys/dev/sysmon: sysmon_envsys_events.c Log Message: Release the mutex before taking a quick exit. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/dev/sysmon/sysmon_envsys_events.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/sysmon/sysmon_envsys_events.c diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.101 src/sys/dev/sysmon/sysmon_envsys_events.c:1.102 --- src/sys/dev/sysmon/sysmon_envsys_events.c:1.101 Mon Jul 16 13:55:01 2012 +++ src/sys/dev/sysmon/sysmon_envsys_events.c Wed Jul 18 20:50:40 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_events.c,v 1.101 2012/07/16 13:55:01 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_events.c,v 1.102 2012/07/18 20:50:40 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.101 2012/07/16 13:55:01 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.102 2012/07/18 20:50:40 pgoyette Exp $); #include sys/param.h #include sys/types.h @@ -186,8 +186,10 @@ sme_event_register(prop_dictionary_t sdi } break; } - if (crittype == PENVSYS_EVENT_NULL see != NULL) + if (crittype == PENVSYS_EVENT_NULL see != NULL) { + mutex_exit(sme-sme_mtx); return EEXIST; + } if (see == NULL) { /*
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: joerg Date: Wed Jul 18 21:55:05 UTC 2012 Modified Files: src/sys/arch/x86/x86: powernow.c Log Message: Remove unused variable. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/powernow.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/powernow.c diff -u src/sys/arch/x86/x86/powernow.c:1.5 src/sys/arch/x86/x86/powernow.c:1.6 --- src/sys/arch/x86/x86/powernow.c:1.5 Sat Jun 2 21:36:42 2012 +++ src/sys/arch/x86/x86/powernow.c Wed Jul 18 21:55:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: powernow.c,v 1.5 2012/06/02 21:36:42 dsl Exp $ */ +/* $NetBSD: powernow.c,v 1.6 2012/07/18 21:55:05 joerg Exp $ */ /* $OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */ /*- @@ -57,7 +57,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: powernow.c,v 1.5 2012/06/02 21:36:42 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: powernow.c,v 1.6 2012/07/18 21:55:05 joerg Exp $); #include sys/param.h #include sys/device.h @@ -667,7 +667,7 @@ powernow_k8_init(device_t self) struct powernow_softc *sc = device_private(self); uint32_t i, maxfid, maxvid; uint64_t status; - int len, rv; + int rv; char tmp[6]; sc-sc_state = kmem_alloc(sizeof(*sc-sc_state), KM_SLEEP); @@ -706,7 +706,7 @@ powernow_k8_init(device_t self) sc-sc_state-state_table[i].fid, sc-sc_state-state_table[i].vid)); - len += snprintf(tmp, sizeof(tmp), %d%s, + snprintf(tmp, sizeof(tmp), %d%s, sc-sc_state-state_table[i].freq, i sc-sc_state-n_states - 1 ? : );
CVS commit: src/lib/libc/ssp
Module Name:src Committed By: christos Date: Wed Jul 18 22:22:26 UTC 2012 Modified Files: src/lib/libc/ssp: __builtin_object_size.3 Log Message: Explain what's going on with fortify being disabled when the optimizer is off: http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00174.html To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/ssp/__builtin_object_size.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/ssp/__builtin_object_size.3 diff -u src/lib/libc/ssp/__builtin_object_size.3:1.8 src/lib/libc/ssp/__builtin_object_size.3:1.9 --- src/lib/libc/ssp/__builtin_object_size.3:1.8 Sun Dec 19 04:33:52 2010 +++ src/lib/libc/ssp/__builtin_object_size.3 Wed Jul 18 18:22:26 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: __builtin_object_size.3,v 1.8 2010/12/19 09:33:52 jruoho Exp $ +.\ $NetBSD: __builtin_object_size.3,v 1.9 2012/07/18 22:22:26 christos Exp $ .\ .\ Copyright (c) 2007 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -28,7 +28,7 @@ .\ POSSIBILITY OF SUCH DAMAGE. .\ .\ -.Dd December 19, 2010 +.Dd July 18, 2012 .Dt __BUILTIN_OBJECT_SIZE 3 .Os .Sh NAME @@ -88,3 +88,14 @@ appeared in .Tn GCC 4.1 . .Sh CAVEATS This is a non-standard, compiler-specific extension. +.Pp +Note that currently the object size calculation pass is only done at -O1 +or above, meaning that this function always returns -1 when the optimizer +is off. +.Pp +There are some discussions about always doing the object size pass, but +the issue is that without the optimization pass data sizes are not going +to be correct. +.Pp +For that reason currently code fortification (size-checked replacement +functions) is disabled when optimization is off.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: rkujawa Date: Wed Jul 18 23:30:14 UTC 2012 Modified Files: src/sys/dev/pci: files.pci Added Files: src/sys/dev/pci: tdvfb.c tdvfbreg.h tdvfbvar.h Log Message: Add 3Dfx Voodoo2 driver. Still needs some cleanup and prettyfying, but hey it works. To generate a diff of this commit: cvs rdiff -u -r1.357 -r1.358 src/sys/dev/pci/files.pci cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/tdvfb.c src/sys/dev/pci/tdvfbreg.h \ src/sys/dev/pci/tdvfbvar.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/files.pci diff -u src/sys/dev/pci/files.pci:1.357 src/sys/dev/pci/files.pci:1.358 --- src/sys/dev/pci/files.pci:1.357 Thu Apr 19 17:50:51 2012 +++ src/sys/dev/pci/files.pci Wed Jul 18 23:30:13 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.357 2012/04/19 17:50:51 bouyer Exp $ +# $NetBSD: files.pci,v 1.358 2012/07/18 23:30:13 rkujawa Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -1112,3 +1112,9 @@ file dev/pci/if_vioif.c vioif device lynxfb: wsemuldisplaydev, rasops16 attach lynxfb at pci file dev/pci/lynxfb.c lynxfb needs-flag + +# 3Dfx Voodoo Graphics +defflag opt_tdvfb.h TDVFB_CONSOLE +device tdvfb: wsemuldisplaydev, rasops8, vcons, videomode +attach tdvfb at pci +file dev/pci/tdvfb.c tdvfb Added files: Index: src/sys/dev/pci/tdvfb.c diff -u /dev/null src/sys/dev/pci/tdvfb.c:1.1 --- /dev/null Wed Jul 18 23:30:14 2012 +++ src/sys/dev/pci/tdvfb.c Wed Jul 18 23:30:14 2012 @@ -0,0 +1,753 @@ +/* $NetBSD: tdvfb.c,v 1.1 2012/07/18 23:30:14 rkujawa Exp $ */ + +/* + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Radoslaw Kujawa. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * A console driver for 3Dfx Voodoo2 (CVG). + * + * 3Dfx Glide 2.x source code, Linux driver by Ghozlane Toumi, and + * Voodoo2 Graphics Engine for 3D Game Acceleration document were used as + * reference. wscons attachment code based mostly on genfb by Michael + * Lorenz. + * + * This driver currently only support boards with ICS GENDAC (which seems to + * be most popular, however at least two different DACs were used with CVG). + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: tdvfb.c,v 1.1 2012/07/18 23:30:14 rkujawa Exp $); + +#include sys/param.h +#include sys/systm.h +#include sys/kernel.h +#include sys/device.h +#include sys/endian.h + +#include dev/pci/pcivar.h +#include dev/pci/pcireg.h +#include dev/pci/pcidevs.h +#include dev/pci/pciio.h + +#include dev/pci/tdvfbreg.h +#include dev/pci/tdvfbvar.h + +#include dev/videomode/videomode.h + +#include opt_wsemul.h +#include opt_tdvfb.h + +#define MAXLOOP 4096 + +static int tdvfb_match(device_t, cfdata_t, void *); +static void tdvfb_attach(device_t, device_t, void *); + +static uint32_t tdvfb_cvg_read(struct tdvfb_softc *sc, uint32_t reg); +static void tdvfb_cvg_write(struct tdvfb_softc *sc, uint32_t reg, + uint32_t val); +static void tdvfb_cvg_set(struct tdvfb_softc *sc, uint32_t reg, + uint32_t bits); +static void tdvfb_cvg_unset(struct tdvfb_softc *sc, uint32_t reg, + uint32_t bits); +static uint8_t tdvfb_cvg_dac_read(struct tdvfb_softc *sc, uint32_t reg); +void tdvfb_cvg_dac_write(struct tdvfb_softc *sc, uint32_t reg, + uint32_t val); +static void tdvfb_wait(struct tdvfb_softc *sc); + +static bool tdvfb_init(struct tdvfb_softc *sc); +static void tdvfb_fbiinit_defaults(struct tdvfb_softc *sc); +static size_t tdvfb_mem_size(struct tdvfb_softc *sc); + +static bool
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Wed Jul 18 23:33:26 UTC 2012 Modified Files: src/doc: CHANGES Log Message: Note tdvfb(4). To generate a diff of this commit: cvs rdiff -u -r1.1718 -r1.1719 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.1718 src/doc/CHANGES:1.1719 --- src/doc/CHANGES:1.1718 Sun Jul 15 18:38:44 2012 +++ src/doc/CHANGES Wed Jul 18 23:33:26 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1718 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1719 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -82,3 +82,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0: dhcpcd(8): Import dhcpcd-5.6.1 [roy 20120712] kernel: Add support for sensors to provide entropy to rnd(4) [pgoyette 20120715] + tdvfb(4): Add 3Dfx Voodoo2 driver. [rkujawa 20120719]
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Jul 19 02:40:09 UTC 2012 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add XGI Technology's devices. To generate a diff of this commit: cvs rdiff -u -r1.1119 -r1.1120 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.1119 src/sys/dev/pci/pcidevs:1.1120 --- src/sys/dev/pci/pcidevs:1.1119 Thu Jul 12 09:29:31 2012 +++ src/sys/dev/pci/pcidevs Thu Jul 19 02:40:08 2012 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1119 2012/07/12 09:29:31 kiyohara Exp $ +$NetBSD: pcidevs,v 1.1120 2012/07/19 02:40:08 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -619,6 +619,7 @@ vendor LINKSYS2 0x17fe Linksys vendor RALINK 0x1814 Ralink Technologies vendor RMI 0x182e Raza Microelectronics Inc. (NetLogic) vendor BBELEC 0x1896 B B Electronics +vendor XGI 0x18ca XGI Technology vendor RENESAS 0x1912 Renesas Technologies vendor FREESCALE 0x1957 Freescale Semiconductor vendor ATTANSIC 0x1969 Attansic Technologies @@ -4886,6 +4887,13 @@ product WORKBIT NPATA32_KME 0xf02c NPAT /* XenSource products */ product XENSOURCE XENPLATFORM 0x0001 Xen Platform Device +/* XGI Technology products */ +product XGI VOLARI_Z7 0x0020 Volari Z7/Z9/Z9s +product XGI VOLARI_Z9M 0x0021 Volari Z9m +product XGI VOLARI_Z11 0x0027 Volari Z11/Z11M +product XGI VOLARI_V3XT 0x0040 Volari V3XT/V5/V8 +product XGI VOLARI_XP10 0x0047 Volari XP10 + /* Xircom products */ /* is the `-3' here just indicating revision 3, or is it really part of the device name? */