CVS commit: src/sbin/dump_lfs
Module Name:src Committed By: dholland Date: Wed Jun 19 06:15:54 UTC 2013 Modified Files: src/sbin/dump_lfs: lfs_inode.c Log Message: Make this build again. hi christos To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sbin/dump_lfs/lfs_inode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/dump_lfs/lfs_inode.c diff -u src/sbin/dump_lfs/lfs_inode.c:1.18 src/sbin/dump_lfs/lfs_inode.c:1.19 --- src/sbin/dump_lfs/lfs_inode.c:1.18 Sat Jun 15 01:26:48 2013 +++ src/sbin/dump_lfs/lfs_inode.c Wed Jun 19 06:15:54 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_inode.c,v 1.18 2013/06/15 01:26:48 christos Exp $ */ +/* $NetBSD: lfs_inode.c,v 1.19 2013/06/19 06:15:54 dholland Exp $ */ /*- * Copyright (c) 1980, 1991, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)main.c 8.6 (Berkeley) 5/1/95; #else -__RCSID($NetBSD: lfs_inode.c,v 1.18 2013/06/15 01:26:48 christos Exp $); +__RCSID($NetBSD: lfs_inode.c,v 1.19 2013/06/19 06:15:54 dholland Exp $); #endif #endif /* not lint */ @@ -95,8 +95,8 @@ fs_read_sblock(char *superblock) #endif quit(bad sblock magic number\n); } - if (fsbtob(sblock, (off_t)sblock-lfs_sboffs[0]) != sboff) { - sboff = fsbtob(sblock, (off_t)sblock-lfs_sboffs[0]); + if (lfs_fsbtob(sblock, (off_t)sblock-lfs_sboffs[0]) != sboff) { + sboff = lfs_fsbtob(sblock, (off_t)sblock-lfs_sboffs[0]); continue; } break; @@ -105,7 +105,7 @@ fs_read_sblock(char *superblock) /* * Read the secondary and take the older of the two */ - rawread(fsbtob(sblock, (off_t)sblock-lfs_sboffs[1]), u.tbuf, + rawread(lfs_fsbtob(sblock, (off_t)sblock-lfs_sboffs[1]), u.tbuf, sizeof(u.tbuf)); #ifdef notyet if (ns) @@ -113,17 +113,17 @@ fs_read_sblock(char *superblock) #endif if (u.lfss.lfs_magic != LFS_MAGIC) { msg(Warning: secondary superblock at 0x% PRIx64 bad magic\n, - fsbtodb(sblock, (off_t)sblock-lfs_sboffs[1])); + LFS_FSBTODB(sblock, (off_t)sblock-lfs_sboffs[1])); } else { if (sblock-lfs_version 1) { if (u.lfss.lfs_serial sblock-lfs_serial) { memcpy(sblock, u.tbuf, sizeof(u.tbuf)); -sboff = fsbtob(sblock, (off_t)sblock-lfs_sboffs[1]); +sboff = lfs_fsbtob(sblock, (off_t)sblock-lfs_sboffs[1]); } } else { if (u.lfss.lfs_otstamp sblock-lfs_otstamp) { memcpy(sblock, u.tbuf, sizeof(u.tbuf)); -sboff = fsbtob(sblock, (off_t)sblock-lfs_sboffs[1]); +sboff = lfs_fsbtob(sblock, (off_t)sblock-lfs_sboffs[1]); } } } @@ -146,7 +146,7 @@ fs_parametrize(void) spcl.c_flags = iswap32(iswap32(spcl.c_flags) | DR_NEWINODEFMT); - ufsi.ufs_dsize = fsbtodb(sblock,sblock-lfs_size); + ufsi.ufs_dsize = LFS_FSBTODB(sblock,sblock-lfs_size); if (sblock-lfs_version == 1) ufsi.ufs_dsize = sblock-lfs_size sblock-lfs_blktodb; ufsi.ufs_bsize = sblock-lfs_bsize; @@ -191,11 +191,11 @@ fs_mapinodes(ino_t maxino, u_int64_t *ta * XXX KS - I know there's a better way to do this. */ #define BASE_SINDIR (ULFS_NDADDR) -#define BASE_DINDIR (ULFS_NDADDR+NINDIR(fs)) -#define BASE_TINDIR (ULFS_NDADDR+NINDIR(fs)+NINDIR(fs)*NINDIR(fs)) +#define BASE_DINDIR (ULFS_NDADDR+LFS_NINDIR(fs)) +#define BASE_TINDIR (ULFS_NDADDR+LFS_NINDIR(fs)+LFS_NINDIR(fs)*LFS_NINDIR(fs)) -#define D_UNITS (NINDIR(fs)) -#define T_UNITS (NINDIR(fs)*NINDIR(fs)) +#define D_UNITS (LFS_NINDIR(fs)) +#define T_UNITS (LFS_NINDIR(fs)*LFS_NINDIR(fs)) static daddr_t lfs_bmap(struct lfs *fs, struct ulfs1_dinode *idinode, daddr_t lbn) @@ -206,7 +206,7 @@ lfs_bmap(struct lfs *fs, struct ulfs1_di up = UNASSIGNED; /* XXXGCC -Wunitialized [sh3] */ - if(lbn 0 lbn lblkno(fs, idinode-di_size)) { + if(lbn 0 lbn lfs_lblkno(fs, idinode-di_size)) { return UNASSIGNED; } /* @@ -232,15 +232,15 @@ lfs_bmap(struct lfs *fs, struct ulfs1_di * Find the immediate parent. This is essentially finding the * residue of modulus, and then rounding accordingly. */ - residue = (lbn-ULFS_NDADDR) % NINDIR(fs); + residue = (lbn-ULFS_NDADDR) % LFS_NINDIR(fs); if(residue == 1) { /* Double indirect. Parent is the triple. */ up = idinode-di_ib[2]; - off = (lbn-2-BASE_TINDIR)/(NINDIR(fs)*NINDIR(fs)); + off = (lbn-2-BASE_TINDIR)/(LFS_NINDIR(fs)*LFS_NINDIR(fs)); if(up == UNASSIGNED || up == LFS_UNUSED_DADDR) return UNASSIGNED; /* printf(lbn %d: parent is the triple\n, -lbn); */ - bread(fsbtodb(sblock, up), bp, sblock-lfs_bsize); + bread(LFS_FSBTODB(sblock, up), bp, sblock-lfs_bsize); /* XXX ondisk32 */ return (daddr_t)((int32_t *)bp)[off]; } else /* residue == 0 */ { @@ -273,7 +273,7 @@ lfs_bmap(struct lfs *fs, struct ulfs1_di up = lfs_bmap(fs,idinode,up); if(up == UNASSIGNED || up == LFS_UNUSED_DADDR) return UNASSIGNED; - bread(fsbtodb(sblock, up), bp, sblock-lfs_bsize); + bread(LFS_FSBTODB(sblock, up), bp, sblock-lfs_bsize); /*
CVS commit: [netbsd-6] src/sys/netinet6
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:29:05 UTC 2013 Modified Files: src/sys/netinet6 [netbsd-6]: ip6_flow.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #895): sys/netinet6/ip6_flow.c: revision 1.21 Clear mbuf's csum_flags in ip6flow_fastforward(). Fixes PR#47849. To generate a diff of this commit: cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/sys/netinet6/ip6_flow.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/netinet6/ip6_flow.c diff -u src/sys/netinet6/ip6_flow.c:1.19.2.1 src/sys/netinet6/ip6_flow.c:1.19.2.2 --- src/sys/netinet6/ip6_flow.c:1.19.2.1 Wed Oct 31 16:07:46 2012 +++ src/sys/netinet6/ip6_flow.c Wed Jun 19 07:29:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_flow.c,v 1.19.2.1 2012/10/31 16:07:46 riz Exp $ */ +/* $NetBSD: ip6_flow.c,v 1.19.2.2 2013/06/19 07:29:05 bouyer Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ip6_flow.c,v 1.19.2.1 2012/10/31 16:07:46 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: ip6_flow.c,v 1.19.2.2 2013/06/19 07:29:05 bouyer Exp $); #include sys/param.h #include sys/systm.h @@ -288,6 +288,11 @@ ip6flow_fastforward(struct mbuf **mp) return 0; } + /* + * Clear any in-bound checksum flags for this packet. + */ + m-m_pkthdr.csum_flags = 0; + if (ip6-ip6_hlim = IPV6_HLIMDEC) return 0;
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:35:18 UTC 2013 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: ticket 895 To generate a diff of this commit: cvs rdiff -u -r1.1.2.9 -r1.1.2.10 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.9 src/doc/CHANGES-6.2:1.1.2.10 --- src/doc/CHANGES-6.2:1.1.2.9 Mon Jun 17 02:05:42 2013 +++ src/doc/CHANGES-6.2 Wed Jun 19 07:35:18 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.9 2013/06/17 02:05:42 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.10 2013/06/19 07:35:18 bouyer Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -242,3 +242,8 @@ usr.sbin/installboot/arch/vax.c 1.16-1 Don't include host's disklabel.h. Fixes cross compile error on some environment. [martin, ticket #865] +sys/netinet6/ip6_flow.c1.21 + + Clear mbuf's csum_flags in ip6flow_fastforward(). Fixes PR#47849. + [msaitoh, ticket #895] +
CVS commit: [netbsd-5] src/sys/arch/x86
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:44:42 UTC 2013 Modified Files: src/sys/arch/x86/include [netbsd-5]: mtrr.h specialreg.h src/sys/arch/x86/x86 [netbsd-5]: mtrr_i686.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1847): sys/arch/x86/include/mtrr.h: revision 1.5 sys/arch/x86/x86/mtrr_i686.c: revision 1.25 sys/arch/x86/include/specialreg.h: revision 1.55 Increase MTRR_I686_NVAR_MAX from 8 to 16. Avoids FIXME: more than 8 MTRRs (10) message on booting Thinkpad W520 and similar. While here replace a magic number with MTRR_I686_NVAR_MAX * 2 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.6.1 src/sys/arch/x86/include/mtrr.h cvs rdiff -u -r1.31.4.2 -r1.31.4.3 src/sys/arch/x86/include/specialreg.h cvs rdiff -u -r1.19.4.1 -r1.19.4.2 src/sys/arch/x86/x86/mtrr_i686.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/include/mtrr.h diff -u src/sys/arch/x86/include/mtrr.h:1.4 src/sys/arch/x86/include/mtrr.h:1.4.6.1 --- src/sys/arch/x86/include/mtrr.h:1.4 Tue Jul 1 15:27:34 2008 +++ src/sys/arch/x86/include/mtrr.h Wed Jun 19 07:44:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mtrr.h,v 1.4 2008/07/01 15:27:34 mrg Exp $ */ +/* $NetBSD: mtrr.h,v 1.4.6.1 2013/06/19 07:44:42 bouyer Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #define MTRR_I686_FIXED_IDX16K 1 #define MTRR_I686_FIXED_IDX4K 3 -#define MTRR_I686_NVAR_MAX 8 /* could be upto 255? */ +#define MTRR_I686_NVAR_MAX 16 /* could be upto 255? */ #define MTRR_I686_64K_START 0x0 #define MTRR_I686_16K_START 0x8 Index: src/sys/arch/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.31.4.2 src/sys/arch/x86/include/specialreg.h:1.31.4.3 --- src/sys/arch/x86/include/specialreg.h:1.31.4.2 Wed Nov 28 04:39:03 2012 +++ src/sys/arch/x86/include/specialreg.h Wed Jun 19 07:44:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.31.4.2 2012/11/28 04:39:03 riz Exp $ */ +/* $NetBSD: specialreg.h,v 1.31.4.3 2013/06/19 07:44:42 bouyer Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -314,6 +314,22 @@ #define MSR_MTRRphysMask6 0x20d #define MSR_MTRRphysBase7 0x20e #define MSR_MTRRphysMask7 0x20f +#define MSR_MTRRphysBase8 0x210 +#define MSR_MTRRphysMask8 0x211 +#define MSR_MTRRphysBase9 0x212 +#define MSR_MTRRphysMask9 0x213 +#define MSR_MTRRphysBase10 0x214 +#define MSR_MTRRphysMask10 0x215 +#define MSR_MTRRphysBase11 0x216 +#define MSR_MTRRphysMask11 0x217 +#define MSR_MTRRphysBase12 0x218 +#define MSR_MTRRphysMask12 0x219 +#define MSR_MTRRphysBase13 0x21a +#define MSR_MTRRphysMask13 0x21b +#define MSR_MTRRphysBase14 0x21c +#define MSR_MTRRphysMask14 0x21d +#define MSR_MTRRphysBase15 0x21e +#define MSR_MTRRphysMask15 0x21f #define MSR_MTRRfix64K_0 0x250 #define MSR_MTRRfix16K_8 0x258 #define MSR_MTRRfix16K_A 0x259 Index: src/sys/arch/x86/x86/mtrr_i686.c diff -u src/sys/arch/x86/x86/mtrr_i686.c:1.19.4.1 src/sys/arch/x86/x86/mtrr_i686.c:1.19.4.2 --- src/sys/arch/x86/x86/mtrr_i686.c:1.19.4.1 Wed Feb 16 20:54:13 2011 +++ src/sys/arch/x86/x86/mtrr_i686.c Wed Jun 19 07:44:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mtrr_i686.c,v 1.19.4.1 2011/02/16 20:54:13 bouyer Exp $ */ +/* $NetBSD: mtrr_i686.c,v 1.19.4.2 2013/06/19 07:44:42 bouyer Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mtrr_i686.c,v 1.19.4.1 2011/02/16 20:54:13 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: mtrr_i686.c,v 1.19.4.2 2013/06/19 07:44:42 bouyer Exp $); #include opt_multiprocessor.h @@ -84,6 +84,22 @@ mtrr_raw[] = { { MSR_MTRRphysMask6, 0 }, { MSR_MTRRphysBase7, 0 }, { MSR_MTRRphysMask7, 0 }, + { MSR_MTRRphysBase8, 0 }, + { MSR_MTRRphysMask8, 0 }, + { MSR_MTRRphysBase9, 0 }, + { MSR_MTRRphysMask9, 0 }, + { MSR_MTRRphysBase10, 0 }, + { MSR_MTRRphysMask10, 0 }, + { MSR_MTRRphysBase11, 0 }, + { MSR_MTRRphysMask11, 0 }, + { MSR_MTRRphysBase12, 0 }, + { MSR_MTRRphysMask12, 0 }, + { MSR_MTRRphysBase13, 0 }, + { MSR_MTRRphysMask13, 0 }, + { MSR_MTRRphysBase14, 0 }, + { MSR_MTRRphysMask14, 0 }, + { MSR_MTRRphysBase15, 0 }, + { MSR_MTRRphysMask15, 0 }, { MSR_MTRRfix64K_0, 0 }, { MSR_MTRRfix16K_8, 0 }, { MSR_MTRRfix16K_A, 0 }, @@ -306,8 +322,8 @@ i686_mtrr_init_first(void) MTRR_I686_NVAR_MAX); else if (i686_mtrr_vcnt MTRR_I686_NVAR_MAX) { for (i = MTRR_I686_NVAR_MAX - i686_mtrr_vcnt; i; i--) { - mtrr_raw[16 - (i*2)].msraddr = 0; - mtrr_raw[17 - (i*2)].msraddr = 0; + mtrr_raw[(MTRR_I686_NVAR_MAX - i) * 2].msraddr = 0; + mtrr_raw[(MTRR_I686_NVAR_MAX - i) * 2 + 1].msraddr = 0; } }
CVS commit: [netbsd-5] src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:51:06 UTC 2013 Modified Files: src/sys/dev/pci [netbsd-5]: pcidevs.h pcidevs_data.h Log Message: regen for ticket #1850 To generate a diff of this commit: cvs rdiff -u -r1.963.4.17 -r1.963.4.18 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.962.4.17 -r1.962.4.18 src/sys/dev/pci/pcidevs_data.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/pcidevs.h diff -u src/sys/dev/pci/pcidevs.h:1.963.4.17 src/sys/dev/pci/pcidevs.h:1.963.4.18 --- src/sys/dev/pci/pcidevs.h:1.963.4.17 Sun Jan 20 12:20:36 2013 +++ src/sys/dev/pci/pcidevs.h Wed Jun 19 07:50:54 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs.h,v 1.963.4.17 2013/01/20 12:20:36 bouyer Exp $ */ +/* $NetBSD: pcidevs.h,v 1.963.4.18 2013/06/19 07:50:54 bouyer Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.962.4.17 2013/01/20 12:19:06 bouyer Exp + * NetBSD: pcidevs,v 1.962.4.18 2013/06/19 07:50:15 bouyer Exp */ /* @@ -2301,8 +2301,10 @@ #define PCI_PRODUCT_INTEL_82870P2_IOxAPIC 0x1461 /* 82870P2 P64H2 IOxAPIC */ #define PCI_PRODUCT_INTEL_82870P2_HPLUG 0x1462 /* 82870P2 P64H2 Hot Plug Controller */ #define PCI_PRODUCT_INTEL_82801I_82567V_3 0x1501 /* i82567V-3 LAN Controller */ -#define PCI_PRODUCT_INTEL_82583V 0x150c /* i82583V 1000baseT Ethernet */ +#define PCI_PRODUCT_INTEL_PCH2_LV_LM 0x1502 /* 82579LM Gigabit Network Connection */ +#define PCI_PRODUCT_INTEL_PCH2_LV_V 0x1503 /* 82579V Gigabit Network Connection */ #define PCI_PRODUCT_INTEL_82576_NS 0x150a /* 82576 gigabit Ethernet */ +#define PCI_PRODUCT_INTEL_82583V 0x150c /* i82583V 1000baseT Ethernet */ #define PCI_PRODUCT_INTEL_82576_SERDES_QUAD 0x150d /* 82576 quad-gigabit Ethernet (SERDES) */ #define PCI_PRODUCT_INTEL_82580_COPPER 0x150e /* 82580 1000BaseT Ethernet */ #define PCI_PRODUCT_INTEL_82580_FIBER 0x150f /* 82580 1000BaseX Ethernet */ @@ -2312,6 +2314,12 @@ #define PCI_PRODUCT_INTEL_82576_NS_SERDES 0x1518 /* 82576 gigabit Ethernet (SERDES) */ #define PCI_PRODUCT_INTEL_82580_ER 0x151d /* 82580 1000BaseT Ethernet */ #define PCI_PRODUCT_INTEL_82580_ER_DUAL 0x151e /* 82580 dual-1000BaseT Ethernet */ +#define PCI_PRODUCT_INTEL_I350_COPPER 0x1521 /* I350 Gigabit Network Connection */ +#define PCI_PRODUCT_INTEL_I350_FIBER 0x1522 /* I350 Gigabit Fiber Network Connection */ +#define PCI_PRODUCT_INTEL_I350_SERDES 0x1523 /* I350 Gigabit Backplane Connection */ +#define PCI_PRODUCT_INTEL_I350_SGMII 0x1524 /* I350 Gigabit Connection */ +#define PCI_PRODUCT_INTEL_82801J_D_BM_V 0x1525 /* 82567V LAN Controller */ +#define PCI_PRODUCT_INTEL_82580_QUAD_FIBER 0x1527 /* 82580 quad-1000BaseX Ethernet */ #define PCI_PRODUCT_INTEL_80960_RP 0x1960 /* ROB-in i960RP Microprocessor */ #define PCI_PRODUCT_INTEL_80960RM_2 0x1962 /* i960 RM PCI-PCI */ #define PCI_PRODUCT_INTEL_82840_HB 0x1a21 /* 82840 Host */ @@ -2769,6 +2777,7 @@ #define PCI_PRODUCT_INTEL_21152 0xb152 /* S21152BB PCI-PCI Bridge */ #define PCI_PRODUCT_INTEL_21154 0xb154 /* S21152BA,S21154AE/BE PCI-PCI Bridge */ #define PCI_PRODUCT_INTEL_21555 0xb555 /* 21555 Non-Transparent PCI-PCI Bridge */ +#define PCI_PRODUCT_INTEL_HANKSVILLE 0xF0FE /* HANKSVILLE LAN Controller */ /* Intergraph products */ #define PCI_PRODUCT_INTERGRAPH_4D50T 0x00e4 /* Powerstorm 4D50T */ Index: src/sys/dev/pci/pcidevs_data.h diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.17 src/sys/dev/pci/pcidevs_data.h:1.962.4.18 --- src/sys/dev/pci/pcidevs_data.h:1.962.4.17 Sun Jan 20 12:20:38 2013 +++ src/sys/dev/pci/pcidevs_data.h Wed Jun 19 07:50:54 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs_data.h,v 1.962.4.17 2013/01/20 12:20:38 bouyer Exp $ */ +/* $NetBSD: pcidevs_data.h,v 1.962.4.18 2013/06/19 07:50:54 bouyer Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.962.4.17 2013/01/20 12:19:06 bouyer Exp + * NetBSD: pcidevs,v 1.962.4.18 2013/06/19 07:50:15 bouyer Exp */ /* @@ -8032,14 +8032,22 @@ static const struct pci_product pci_prod i82567V-3 LAN Controller, }, { - PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82583V, - i82583V 1000baseT Ethernet, + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_PCH2_LV_LM, + 82579LM Gigabit Network Connection, + }, + { + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_PCH2_LV_V, + 82579V Gigabit Network Connection, }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82576_NS, 82576 gigabit Ethernet, }, { + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82583V, + i82583V 1000baseT Ethernet, + }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82576_SERDES_QUAD, 82576 quad-gigabit Ethernet (SERDES), }, @@ -8076,6 +8084,30 @@ static const struct pci_product pci_prod 82580 dual-1000BaseT Ethernet, }, { + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_COPPER, + I350 Gigabit
CVS commit: [netbsd-5] src/sys/dev/mii
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:51:45 UTC 2013 Modified Files: src/sys/dev/mii [netbsd-5]: miidevs.h miidevs_data.h Log Message: Regen for ticket #1850 To generate a diff of this commit: cvs rdiff -u -r1.81.4.4 -r1.81.4.5 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.71.4.4 -r1.71.4.5 src/sys/dev/mii/miidevs_data.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/mii/miidevs.h diff -u src/sys/dev/mii/miidevs.h:1.81.4.4 src/sys/dev/mii/miidevs.h:1.81.4.5 --- src/sys/dev/mii/miidevs.h:1.81.4.4 Fri Nov 19 23:59:22 2010 +++ src/sys/dev/mii/miidevs.h Wed Jun 19 07:51:45 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs.h,v 1.81.4.4 2010/11/19 23:59:22 riz Exp $ */ +/* $NetBSD: miidevs.h,v 1.81.4.5 2013/06/19 07:51:45 bouyer Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.78.4.4 2010/11/19 23:58:41 riz Exp + * NetBSD: miidevs,v 1.78.4.5 2013/06/19 07:50:15 bouyer Exp */ /*- @@ -267,6 +267,10 @@ #define MII_STR_yyINTEL_I82553 i82553 10/100 media interface #define MII_MODEL_yyINTEL_I82566 0x0039 #define MII_STR_yyINTEL_I82566 i82566 10/100/1000 media interface +#define MII_MODEL_INTEL_I82577 0x0005 +#define MII_STR_INTEL_I82577 i82577 10/100/1000 media interface +#define MII_MODEL_INTEL_I82579 0x0009 +#define MII_STR_INTEL_I82579 i82579 10/100/1000 media interface #define MII_MODEL_xxMARVELL_I82563 0x000a #define MII_STR_xxMARVELL_I82563 i82563 10/100/1000 media interface Index: src/sys/dev/mii/miidevs_data.h diff -u src/sys/dev/mii/miidevs_data.h:1.71.4.4 src/sys/dev/mii/miidevs_data.h:1.71.4.5 --- src/sys/dev/mii/miidevs_data.h:1.71.4.4 Fri Nov 19 23:59:22 2010 +++ src/sys/dev/mii/miidevs_data.h Wed Jun 19 07:51:45 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs_data.h,v 1.71.4.4 2010/11/19 23:59:22 riz Exp $ */ +/* $NetBSD: miidevs_data.h,v 1.71.4.5 2013/06/19 07:51:45 bouyer Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.78.4.4 2010/11/19 23:58:41 riz Exp + * NetBSD: miidevs,v 1.78.4.5 2013/06/19 07:50:15 bouyer Exp */ /*- @@ -102,6 +102,8 @@ struct mii_knowndev mii_knowndevs[] = { { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_I82562ET, MII_STR_yyINTEL_I82562ET }, { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_I82553, MII_STR_yyINTEL_I82553 }, { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_I82566, MII_STR_yyINTEL_I82566 }, + { MII_OUI_INTEL, MII_MODEL_INTEL_I82577, MII_STR_INTEL_I82577 }, + { MII_OUI_INTEL, MII_MODEL_INTEL_I82579, MII_STR_INTEL_I82579 }, { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_I82563, MII_STR_xxMARVELL_I82563 }, { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_IGP01E1000, MII_STR_yyINTEL_IGP01E1000 }, { MII_OUI_JMICRON, MII_MODEL_JMICRON_JMC250, MII_STR_JMICRON_JMC250 },
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:55:44 UTC 2013 Modified Files: src/sys/kern [netbsd-5]: kern_drvctl.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1859): sys/kern/kern_drvctl.c: revision 1.34 Fix memory leak on the following cases when device attached or detached: - No one open drvctl. - kmem_alloc() failed in devmon_insert(). To generate a diff of this commit: cvs rdiff -u -r1.19.6.3 -r1.19.6.4 src/sys/kern/kern_drvctl.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/kern_drvctl.c diff -u src/sys/kern/kern_drvctl.c:1.19.6.3 src/sys/kern/kern_drvctl.c:1.19.6.4 --- src/sys/kern/kern_drvctl.c:1.19.6.3 Sun May 3 22:39:49 2009 +++ src/sys/kern/kern_drvctl.c Wed Jun 19 07:55:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_drvctl.c,v 1.19.6.3 2009/05/03 22:39:49 snj Exp $ */ +/* $NetBSD: kern_drvctl.c,v 1.19.6.4 2013/06/19 07:55:44 bouyer Exp $ */ /* * Copyright (c) 2004 @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_drvctl.c,v 1.19.6.3 2009/05/03 22:39:49 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_drvctl.c,v 1.19.6.4 2013/06/19 07:55:44 bouyer Exp $); #include sys/param.h #include sys/systm.h @@ -112,6 +112,7 @@ devmon_insert(const char *event, prop_di mutex_enter(drvctl_lock); if (drvctl_nopen == 0) { + prop_object_release(ev); mutex_exit(drvctl_lock); return; } @@ -125,6 +126,7 @@ devmon_insert(const char *event, prop_di dce = kmem_alloc(sizeof(*dce), KM_SLEEP); if (dce == NULL) { + prop_object_release(ev); mutex_exit(drvctl_lock); return; }
CVS commit: [netbsd-5] src/share/man/man4
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:58:34 UTC 2013 Modified Files: src/share/man/man4 [netbsd-5]: options.4 Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1862): share/man/man4/options.4: revision 1.420 s/can be displayed be calling/can be displayed by calling/ To generate a diff of this commit: cvs rdiff -u -r1.369.2.2 -r1.369.2.3 src/share/man/man4/options.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/options.4 diff -u src/share/man/man4/options.4:1.369.2.2 src/share/man/man4/options.4:1.369.2.3 --- src/share/man/man4/options.4:1.369.2.2 Tue Nov 18 01:56:58 2008 +++ src/share/man/man4/options.4 Wed Jun 19 07:58:33 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: options.4,v 1.369.2.2 2008/11/18 01:56:58 snj Exp $ +.\ $NetBSD: options.4,v 1.369.2.3 2013/06/19 07:58:33 bouyer Exp $ .\ .\ Copyright (c) 1996 .\ Perry E. Metzger. All rights reserved. @@ -30,7 +30,7 @@ .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ .\ -.Dd November 14, 2008 +.Dd May 15, 2013 .Os .Dt OPTIONS 4 .Sh NAME @@ -684,7 +684,7 @@ Default is 10 entries. .It Cd options UVMHIST Enables the UVM history logs, which create in-memory traces of various UVM activities. -These logs can be displayed be calling +These logs can be displayed by calling .Fn uvmhist_dump or .Fn uvm_hist
CVS commit: [netbsd-5-2] src/share/man/man4
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:58:46 UTC 2013 Modified Files: src/share/man/man4 [netbsd-5-2]: options.4 Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1862): share/man/man4/options.4: revision 1.420 s/can be displayed be calling/can be displayed by calling/ To generate a diff of this commit: cvs rdiff -u -r1.369.2.2 -r1.369.2.2.10.1 src/share/man/man4/options.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/options.4 diff -u src/share/man/man4/options.4:1.369.2.2 src/share/man/man4/options.4:1.369.2.2.10.1 --- src/share/man/man4/options.4:1.369.2.2 Tue Nov 18 01:56:58 2008 +++ src/share/man/man4/options.4 Wed Jun 19 07:58:46 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: options.4,v 1.369.2.2 2008/11/18 01:56:58 snj Exp $ +.\ $NetBSD: options.4,v 1.369.2.2.10.1 2013/06/19 07:58:46 bouyer Exp $ .\ .\ Copyright (c) 1996 .\ Perry E. Metzger. All rights reserved. @@ -30,7 +30,7 @@ .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ .\ -.Dd November 14, 2008 +.Dd May 15, 2013 .Os .Dt OPTIONS 4 .Sh NAME @@ -684,7 +684,7 @@ Default is 10 entries. .It Cd options UVMHIST Enables the UVM history logs, which create in-memory traces of various UVM activities. -These logs can be displayed be calling +These logs can be displayed by calling .Fn uvmhist_dump or .Fn uvm_hist
CVS commit: [netbsd-5-1] src/share/man/man4
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:59:02 UTC 2013 Modified Files: src/share/man/man4 [netbsd-5-1]: options.4 Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1862): share/man/man4/options.4: revision 1.420 s/can be displayed be calling/can be displayed by calling/ To generate a diff of this commit: cvs rdiff -u -r1.369.2.2 -r1.369.2.2.6.1 src/share/man/man4/options.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/options.4 diff -u src/share/man/man4/options.4:1.369.2.2 src/share/man/man4/options.4:1.369.2.2.6.1 --- src/share/man/man4/options.4:1.369.2.2 Tue Nov 18 01:56:58 2008 +++ src/share/man/man4/options.4 Wed Jun 19 07:59:02 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: options.4,v 1.369.2.2 2008/11/18 01:56:58 snj Exp $ +.\ $NetBSD: options.4,v 1.369.2.2.6.1 2013/06/19 07:59:02 bouyer Exp $ .\ .\ Copyright (c) 1996 .\ Perry E. Metzger. All rights reserved. @@ -30,7 +30,7 @@ .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ .\ -.Dd November 14, 2008 +.Dd May 15, 2013 .Os .Dt OPTIONS 4 .Sh NAME @@ -684,7 +684,7 @@ Default is 10 entries. .It Cd options UVMHIST Enables the UVM history logs, which create in-memory traces of various UVM activities. -These logs can be displayed be calling +These logs can be displayed by calling .Fn uvmhist_dump or .Fn uvm_hist
CVS commit: [netbsd-5-2] src/doc
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:59:38 UTC 2013 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.1 Log Message: ticket #1862 To generate a diff of this commit: cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-5.2.1 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.1 diff -u src/doc/CHANGES-5.2.1:1.1.2.9 src/doc/CHANGES-5.2.1:1.1.2.10 --- src/doc/CHANGES-5.2.1:1.1.2.9 Sun Jun 9 16:21:44 2013 +++ src/doc/CHANGES-5.2.1 Wed Jun 19 07:59:38 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.1,v 1.1.2.9 2013/06/09 16:21:44 msaitoh Exp $ +# $NetBSD: CHANGES-5.2.1,v 1.1.2.10 2013/06/19 07:59:38 bouyer Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.2.1 release: @@ -175,3 +175,8 @@ sys/dev/fss.c 1.84 Don't crash when running multiple dump -X. PR#47514. [gdt, ticket #1853] +share/man/man4/options.4 1.420 + + Fix typo + [msaitoh, ticket #1862] +
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: bouyer Date: Wed Jun 19 07:59:41 UTC 2013 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.3 Log Message: ticket #1862 To generate a diff of this commit: cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-5.1.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.1.3 diff -u src/doc/CHANGES-5.1.3:1.1.2.41 src/doc/CHANGES-5.1.3:1.1.2.42 --- src/doc/CHANGES-5.1.3:1.1.2.41 Sun Jun 9 16:21:16 2013 +++ src/doc/CHANGES-5.1.3 Wed Jun 19 07:59:41 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.3,v 1.1.2.41 2013/06/09 16:21:16 msaitoh Exp $ +# $NetBSD: CHANGES-5.1.3,v 1.1.2.42 2013/06/19 07:59:41 bouyer Exp $ A complete list of changes from the NetBSD 5.1.2 release to the NetBSD 5.1.3 release: @@ -2461,3 +2461,8 @@ sys/dev/fss.c 1.84 Don't crash when running multiple dump -X. PR#47514. [gdt, ticket #1853] +share/man/man4/options.4 1.420 + + Fix typo + [msaitoh, ticket #1862] +
CVS commit: [netbsd-5] src/sys/netinet6
Module Name:src Committed By: bouyer Date: Wed Jun 19 08:01:05 UTC 2013 Modified Files: src/sys/netinet6 [netbsd-5]: ip6_flow.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1864): sys/netinet6/ip6_flow.c: revision 1.21 Clear mbuf's csum_flags in ip6flow_fastforward(). Fixes PR#47849. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.10.1 src/sys/netinet6/ip6_flow.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/netinet6/ip6_flow.c diff -u src/sys/netinet6/ip6_flow.c:1.17 src/sys/netinet6/ip6_flow.c:1.17.10.1 --- src/sys/netinet6/ip6_flow.c:1.17 Mon Apr 28 20:24:10 2008 +++ src/sys/netinet6/ip6_flow.c Wed Jun 19 08:01:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_flow.c,v 1.17 2008/04/28 20:24:10 martin Exp $ */ +/* $NetBSD: ip6_flow.c,v 1.17.10.1 2013/06/19 08:01:05 bouyer Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ip6_flow.c,v 1.17 2008/04/28 20:24:10 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: ip6_flow.c,v 1.17.10.1 2013/06/19 08:01:05 bouyer Exp $); #include sys/param.h #include sys/systm.h @@ -277,6 +277,11 @@ ip6flow_fastforward(struct mbuf *m) return 0; } + /* + * Clear any in-bound checksum flags for this packet. + */ + m-m_pkthdr.csum_flags = 0; + if (ip6-ip6_hlim = IPV6_HLIMDEC) return 0;
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Wed Jun 19 08:02:06 UTC 2013 Modified Files: src/doc [netbsd-5]: CHANGES-5.3 Log Message: tickets #1847, #1850, #1859, #1862, #1864 To generate a diff of this commit: cvs rdiff -u -r1.1.2.18 -r1.1.2.19 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.18 src/doc/CHANGES-5.3:1.1.2.19 --- src/doc/CHANGES-5.3:1.1.2.18 Mon Jun 17 01:51:24 2013 +++ src/doc/CHANGES-5.3 Wed Jun 19 08:02:06 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.3,v 1.1.2.18 2013/06/17 01:51:24 msaitoh Exp $ +# $NetBSD: CHANGES-5.3,v 1.1.2.19 2013/06/19 08:02:06 bouyer Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3 release: @@ -338,3 +338,93 @@ usr.sbin/installboot/arch/vax.c 1.14-1 (booting via VMB.EXE). Don't include host's disklabel.h. [martin, ticket #1856] +sys/arch/x86/include/mtrr.h 1.5 +sys/arch/x86/include/specialreg.h 1.55 +sys/arch/x86/x86/mtrr_i686.c 1.25 + + Increase MTRR_I686_NVAR_MAX from 8 to 16. Avoids + FIXME: more than 8 MTRRs (10) message on booting Thinkpad W520 and + similar. While here replace a magic number with MTRR_I686_NVAR_MAX * 2 + [msaitoh, ticket #1847] + +sys/dev/pci/if_wm.c 1.201, 1.203-1.204, 1.207-1.212, 1.215, + 1.217-1.218, 1.220-1.223, 1.228, + 1.232-245 via patch +sys/dev/pci/if_wmreg.h 1.40-1.45, 1.47-1.48 via patch +sys/dev/pci/if_wmvar.h 1.11-1.13 via patch +sys/dev/pci/pcidevs 1.1074, 1.1077, 1.1117 via patch +sys/dev/pci/pcidevs.h regen +sys/dev/pci/pcidevs_data.h regen +sys/dev/mii/igphyreg.h 1.6 via patch +sys/dev/mii/ihphy.c 1.1-1.2 via patch +sys/dev/mii/ihphyreg.h 1.1 via patch +sys/dev/mii/inbmphyreg.h 1.3 via patch +sys/dev/mii/files.mii 1.47 via patch +sys/dev/mii/miidevs 1.97 and 1.100 via patch +sys/dev/mii/miidevs.h regen +sys/dev/mii/miidevs_data.h regen +sys/arch/i386/conf/ALL 1.280 via patch +sys/arch/i386/conf/GENERIC 1.1001 via patch +sys/arch/i386/conf/INSTALL_FLOPPY 1.11 via patch +sys/arch/i386/conf/XEN2_DOM0 patch +sys/arch/amd64/conf/GENERIC 1.293 via patch +sys/arch/amd64/conf/XEN3_DOM0 1.61 via patch +share/man/man4/wm.4 1.21-1.24 via patch + + Apply almost all fixes and improvements from netbsd-6 except for + the rev. 1.196's iqdrops' change. + + - Add the detach code. + - Add code for WOL, ASF, IPMI and Intel AMT. WOL is disabled by default + - Add Yet another workaround for ICH8. + - 82576 is dual port, so check the FUNCID and increment the + MAC address for the 2nd port. + - Fix the names of 82577L[MC] LAN controllers (for mobile). + - Fix CTRL_EXT_SWDPIN() and CTRL_EXT_SWDPIO() macros. The bit order + of the SW definable pin is not 6543 but 3654!!! + - Rewrite the code to read MAC address from eeprom. + - Add 82580 support. + - 82571 quirk. Only 82571 shares port 0 of EEMNGCTL_CFGDONE. + - The document says that the TDH register must be set after + TCL.EN is set on 82575 and newer devices. + - Fix some register names. No functional change. + - Omit U+00AE REGISTERED SIGN in a product name due to its + non-ASCII nature. + - Stop wm(4) from needlessly resetting when you add or delete a vlan(4). + - Fix MAC address check on 8257[156] and 80003 case. Some cards have + non 0x pointer but those don't use alternative MAC address + in reality. So we check whether the broadcast bit is set or not + like Intel's e1000 driver. + Fixes PR kern/44072 reported by Jean-Yves Moulin. + - Add PCH2(and 82579) support. Fixes PR#46487 + - Add yet another 82567V support. + - Add ICH10+HANKSVILL support. + - Add support Intel I350 Ethernet. + - Make vlan and all ip/ip6 checksum offload work for the I350. + - Fix compile error with WM_DEBUG. + - Fix a bug that PHY isn't set to low-power mode on PCH and PCH2. + - Add WM_DEBUG_NVM. If WM_DEBUG_NVM is enabled, dump the FLASH ROM data. + - Skip 64bit BAR correctly. + - Fix RAL_TABSIZE for ICH8, 82576, 82580 and I350. + - Use 82580(and I350) specific PHY read/write functions. Fixes PR#47542. + - Style fix. Fix typo in comment. Fix comments. Add comments. + [msaitoh, ticket #1850] + +sys/kern/kern_drvctl.c1.34 + + Fix memory leak on the following cases when device attached or detached: + - No one open drvctl. + - kmem_alloc() failed in devmon_insert(). + + [msaitoh, ticket #1859] + +share/man/man4/options.4 1.420 + + Fix typo + [msaitoh, ticket #1862] + +sys/netinet6/ip6_flow.c1.21 + + Clear mbuf's csum_flags in ip6flow_fastforward(). Fixes PR#47849. + [msaitoh, ticket #1864] +
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jun 19 10:27:08 UTC 2013 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix some bugs on I21[78] to make stable. To generate a diff of this commit: cvs rdiff -u -r1.255 -r1.256 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.255 src/sys/dev/pci/if_wm.c:1.256 --- src/sys/dev/pci/if_wm.c:1.255 Tue Jun 11 14:39:35 2013 +++ src/sys/dev/pci/if_wm.c Wed Jun 19 10:27:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.255 2013/06/11 14:39:35 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.256 2013/06/19 10:27:08 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.255 2013/06/11 14:39:35 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.256 2013/06/19 10:27:08 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -4443,7 +4443,8 @@ wm_init(struct ifnet *ifp) reg = CSR_READ(sc, WMREG_CTRL_EXT); /* Enable PHY low-power state when MAC is at D3 w/o WoL */ - if ((sc-sc_type == WM_T_PCH) || (sc-sc_type == WM_T_PCH2)) + if ((sc-sc_type == WM_T_PCH) || (sc-sc_type == WM_T_PCH2) + || (sc-sc_type == WM_T_PCH_LPT)) CSR_WRITE(sc, WMREG_CTRL_EXT, reg | CTRL_EXT_PHYPDEN); /* Initialize the transmit descriptor ring. */ @@ -4579,7 +4580,7 @@ wm_init(struct ifnet *ifp) */ if ((sc-sc_type != WM_T_ICH8) (sc-sc_type != WM_T_ICH9) (sc-sc_type != WM_T_ICH10) (sc-sc_type != WM_T_PCH) - (sc-sc_type != WM_T_PCH2)) { + (sc-sc_type != WM_T_PCH2) (sc-sc_type != WM_T_PCH_LPT)) { CSR_WRITE(sc, WMREG_FCAL, FCAL_CONST); CSR_WRITE(sc, WMREG_FCAH, FCAH_CONST); CSR_WRITE(sc, WMREG_FCT, ETHERTYPE_FLOWCONTROL); @@ -4677,7 +4678,7 @@ wm_init(struct ifnet *ifp) if ((sc-sc_type == WM_T_ICH8) || (sc-sc_type == WM_T_ICH9) || (sc-sc_type == WM_T_ICH10) || (sc-sc_type == WM_T_PCH) - || (sc-sc_type == WM_T_PCH2)) { + || (sc-sc_type == WM_T_PCH2) || (sc-sc_type == WM_T_PCH_LPT)) { reg = CSR_READ(sc, WMREG_KABGTXD); reg |= KABGTXD_BGSQLBIAS; CSR_WRITE(sc, WMREG_KABGTXD, reg);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jun 19 10:38:51 UTC 2013 Modified Files: src/sys/dev/pci: if_wm.c if_wmreg.h Log Message: Add ECC support for the packet buffer. Only 82571 and I21[78] support ECC. To generate a diff of this commit: cvs rdiff -u -r1.256 -r1.257 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.52 -r1.53 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.256 src/sys/dev/pci/if_wm.c:1.257 --- src/sys/dev/pci/if_wm.c:1.256 Wed Jun 19 10:27:08 2013 +++ src/sys/dev/pci/if_wm.c Wed Jun 19 10:38:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.256 2013/06/19 10:27:08 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.257 2013/06/19 10:38:51 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.256 2013/06/19 10:27:08 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.257 2013/06/19 10:38:51 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -4799,6 +4799,26 @@ wm_init(struct ifnet *ifp) /* Set the receive filter. */ wm_set_filter(sc); + /* Enable ECC */ + switch (sc-sc_type) { + case WM_T_82571: + reg = CSR_READ(sc, WMREG_PBA_ECC); + reg |= PBA_ECC_CORR_EN; + CSR_WRITE(sc, WMREG_PBA_ECC, reg); + break; + case WM_T_PCH_LPT: + reg = CSR_READ(sc, WMREG_PBECCSTS); + reg |= PBECCSTS_UNCORR_ECC_ENABLE; + CSR_WRITE(sc, WMREG_PBECCSTS, reg); + + reg = CSR_READ(sc, WMREG_CTRL); + reg |= CTRL_MEHE; + CSR_WRITE(sc, WMREG_CTRL, reg); + break; + default: + break; + } + /* On 575 and later set RDT only if RX enabled */ if ((sc-sc_flags WM_F_NEWQUEUE) != 0) for (i = 0; i WM_NRXDESC; i++) Index: src/sys/dev/pci/if_wmreg.h diff -u src/sys/dev/pci/if_wmreg.h:1.52 src/sys/dev/pci/if_wmreg.h:1.53 --- src/sys/dev/pci/if_wmreg.h:1.52 Sun Apr 21 19:59:41 2013 +++ src/sys/dev/pci/if_wmreg.h Wed Jun 19 10:38:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wmreg.h,v 1.52 2013/04/21 19:59:41 msaitoh Exp $ */ +/* $NetBSD: if_wmreg.h,v 1.53 2013/06/19 10:38:51 msaitoh Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -35,6 +35,39 @@ * POSSIBILITY OF SUCH DAMAGE. */ +/** + + Copyright (c) 2001-2012, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +**/ + /* * Register description for the Intel i82542 (``Wiseman''), * i82543 (``Livengood''), and i82544 (``Cordova'') Gigabit @@ -200,6 +233,7 @@ struct livengood_tcpip_ctxdesc { #define CTRL_SWDPIO_SHIFT 22 #define CTRL_SWDPIO_MASK 0x0f #define CTRL_SWDPIO(x) (1U (CTRL_SWDPIO_SHIFT + (x))) +#define CTRL_MEHE (1U 17) /* Memory Error Handling Enable(I217)*/ #define CTRL_RST (1U 26) /* device reset */ #define CTRL_RFCE (1U 27) /* Rx flow control enable */ #define CTRL_TFCE (1U 28) /* Tx flow control enable */ @@ -692,6 +726,11 @@ struct livengood_tcpip_ctxdesc { #define WMREG_PBS 0x1008 /* Packet Buffer Size (ICH) */ +#define WMREG_PBECCSTS 0x100c /* Packet Buffer ECC Status (PCH_LPT) */ +#define PBECCSTS_CORR_ERR_CNT_MASK 0x00ff +#define PBECCSTS_UNCORR_ERR_CNT_MASK 0xff00 +#define PBECCSTS_UNCORR_ECC_ENABLE 0x0001 + #define
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jun 19 10:53:24 UTC 2013 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix a bug that wrong semaphore is used in wm_gmii_hv_{read,write}reg. To generate a diff of this commit: cvs rdiff -u -r1.257 -r1.258 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.257 src/sys/dev/pci/if_wm.c:1.258 --- src/sys/dev/pci/if_wm.c:1.257 Wed Jun 19 10:38:51 2013 +++ src/sys/dev/pci/if_wm.c Wed Jun 19 10:53:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.257 2013/06/19 10:38:51 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.258 2013/06/19 10:53:24 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.257 2013/06/19 10:38:51 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.258 2013/06/19 10:53:24 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -7023,7 +7023,7 @@ wm_gmii_hv_readreg(device_t self, int ph uint16_t val; int rv; - if (wm_get_swfw_semaphore(sc, SWFW_PHY0_SM)) { + if (wm_get_swfwhw_semaphore(sc)) { aprint_error_dev(sc-sc_dev, %s: failed to get semaphore\n, __func__); return 0; @@ -7055,7 +7055,7 @@ wm_gmii_hv_readreg(device_t self, int ph } rv = wm_gmii_i82544_readreg(self, phy, regnum IGPHY_MAXREGADDR); - wm_put_swfw_semaphore(sc, SWFW_PHY0_SM); + wm_put_swfwhw_semaphore(sc); return rv; } @@ -7073,7 +7073,7 @@ wm_gmii_hv_writereg(device_t self, int p uint16_t page = BM_PHY_REG_PAGE(reg); uint16_t regnum = BM_PHY_REG_NUM(reg); - if (wm_get_swfw_semaphore(sc, SWFW_PHY0_SM)) { + if (wm_get_swfwhw_semaphore(sc)) { aprint_error_dev(sc-sc_dev, %s: failed to get semaphore\n, __func__); return; @@ -7110,7 +7110,7 @@ wm_gmii_hv_writereg(device_t self, int p } wm_gmii_i82544_writereg(self, phy, regnum IGPHY_MAXREGADDR, val); - wm_put_swfw_semaphore(sc, SWFW_PHY0_SM); + wm_put_swfwhw_semaphore(sc); } /*
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Wed Jun 19 13:20:05 UTC 2013 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_cursor.c Log Message: remove some unnecessary #includes To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.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/xf86-video-suncg14/dist/src/cg14_cursor.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c:1.1 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c:1.2 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c:1.1 Thu Apr 14 16:48:59 2011 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_cursor.c Wed Jun 19 13:20:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cg14_cursor.c,v 1.1 2011/04/14 16:48:59 macallan Exp $ */ +/* $NetBSD: cg14_cursor.c,v 1.2 2013/06/19 13:20:05 macallan Exp $ */ /* * Copyright (c) 2005 Michael Lorenz * All rights reserved. @@ -30,10 +30,6 @@ */ #include sys/types.h -#include sys/time.h -#include sys/endian.h -#include dev/wscons/wsconsio.h -#include errno.h /* all driver need this */ #include xf86.h
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Wed Jun 19 13:26:01 UTC 2013 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14.h cg14_driver.c Added Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_accel.c Log Message: support hardware acceleration via SX This requires a recent cgfourteen kernel driver which allows userland to map SX register space. Basic acceleration is enabled by default ( use Option Accel false to turn it off ), XRender support is incomplete but good enough for anti-aliased text rendering ( enable with Option xrender true ). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h cvs rdiff -u -r0 -r1.1 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c cvs rdiff -u -r1.9 -r1.10 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.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/xf86-video-suncg14/dist/src/cg14.h diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.5 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.6 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.5 Tue Jun 4 22:20:41 2013 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h Wed Jun 19 13:26:01 2013 @@ -30,6 +30,7 @@ #include X11/Xmd.h #include gcstruct.h #include xf86sbusBus.h +#include exa.h /* Various offsets in virtual (ie. mmap()) spaces Linux and Solaris support. */ #define CG14_REGS_VOFF 0x /* registers */ @@ -50,6 +51,11 @@ #define CG14_G32_VOFF 0xb000 #define CG14_R32_VOFF 0xc000 +/* these two are NetBSD specific */ +#define CG14_SXREG_VOFF 0x0001 /* SX userspace registers */ +#define CG14_SXIO_VOFF 0xd000 + + /* Hardware cursor map */ #define CG14_CURS_SIZE 32 struct cg14curs { @@ -76,6 +82,7 @@ typedef struct { int width; int height; int use_shadow; + int memsize; int HWCursor; void * shadow; sbusDevicePtr psdp; @@ -83,9 +90,21 @@ typedef struct { CreateScreenResourcesProcPtr CreateScreenResources; OptionInfoPtr Options; xf86CursorInfoPtr CursorInfoRec; + /* SX accel stuff */ + void *sxreg, *sxio; + int use_accel, use_xrender; + uint32_t last_mask; + uint32_t last_rop; + uint32_t srcoff, srcpitch, mskoff, mskpitch; + uint32_t srcformat, dstformat, mskformat; + uint32_t fillcolour; + int op; + int xdir, ydir; + ExaDriverPtr pExa; } Cg14Rec, *Cg14Ptr; Bool CG14SetupCursor(ScreenPtr); +Bool CG14InitAccel(ScreenPtr); #define GET_CG14_FROM_SCRN(p)((Cg14Ptr)((p)-driverPrivate)) Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.9 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.10 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.9 Tue Jun 4 22:20:41 2013 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c Wed Jun 19 13:26:01 2013 @@ -99,11 +99,15 @@ _X_EXPORT DriverRec SUNCG14 = { typedef enum { OPTION_SHADOW_FB, OPTION_HW_CURSOR, - OPTION_SW_CURSOR + OPTION_SW_CURSOR, + OPTION_ACCEL, + OPTION_XRENDER } CG14Opts; static const OptionInfoRec CG14Options[] = { -{ OPTION_SHADOW_FB, ShadowFB, OPTV_BOOLEAN, {0}, TRUE}, +{ OPTION_SHADOW_FB, ShadowFB, OPTV_BOOLEAN, {0}, TRUE}, +{ OPTION_ACCEL, Accel,OPTV_BOOLEAN, {0}, TRUE}, +{ OPTION_XRENDER, XRender, OPTV_BOOLEAN, {0}, FALSE}, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -342,6 +346,13 @@ CG14PreInit(ScrnInfoPtr pScrn, int flags if (psdp == NULL) return FALSE; +pCg14-memsize = 4 * 1024 * 1024; /* always safe */ +if ((psdp-height * psdp-width * 4) 0x0040) + pCg14-memsize = 0x0080; +if (psdp-size pCg14-memsize) + pCg14-memsize = psdp-size; +xf86DrvMsg(pScrn-scrnIndex, X_PROBED, found %d MB video memory\n, + pCg14-memsize 20); /* deal with depth */ @@ -370,6 +381,10 @@ CG14PreInit(ScrnInfoPtr pScrn, int flags xf86ProcessOptions(pScrn-scrnIndex, pScrn-options, pCg14-Options); pCg14-use_shadow = xf86ReturnOptValBool(pCg14-Options, OPTION_SHADOW_FB, TRUE); +pCg14-use_accel = xf86ReturnOptValBool(pCg14-Options, OPTION_ACCEL, +TRUE); +pCg14-use_xrender = xf86ReturnOptValBool(pCg14-Options, OPTION_XRENDER, +FALSE); /* * This must happen after pScrn-display has been set because @@ -505,7 +520,7 @@ CG14ScreenInit(SCREEN_INIT_ARGS_DECL) ScrnInfoPtr pScrn; Cg14Ptr pCg14; VisualPtr visual; -int ret; +int ret, have_accel = 0; /* * First get the ScrnInfoRec @@ -515,13 +530,28 @@ CG14ScreenInit(SCREEN_INIT_ARGS_DECL) pCg14 = GET_CG14_FROM_SCRN(pScrn); /* Map the CG14 memory */ -pCg14-fb = xf86MapSbusMem (pCg14-psdp, CG14_BGR_VOFF, 4 * -
CVS commit: src/external/mit/xorg/server/drivers/xf86-video-suncg14
Module Name:src Committed By: macallan Date: Wed Jun 19 13:27:07 UTC 2013 Modified Files: src/external/mit/xorg/server/drivers/xf86-video-suncg14: Makefile Log Message: build acceleration support To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile:1.3 src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile:1.4 --- src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile:1.3 Tue Jun 4 22:45:07 2013 +++ src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile Wed Jun 19 13:27:07 2013 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.3 2013/06/04 22:45:07 mrg Exp $ +# $NetBSD: Makefile,v 1.4 2013/06/19 13:27:07 macallan Exp $ DRIVER= xf86-video-suncg14 DRIVER_NAME= suncg14_drv -SRCS= cg14_driver.c cg14_cursor.c +SRCS= cg14_driver.c cg14_cursor.c cg14_accel.c MAN= suncg14.4 CPPFLAGS+= -I${X11SRCDIR.${DRIVER}}/../include
CVS commit: src/doc
Module Name:src Committed By: macallan Date: Wed Jun 19 13:31:33 UTC 2013 Modified Files: src/doc: CHANGES Log Message: mention CG14 acceleration support To generate a diff of this commit: cvs rdiff -u -r1.1827 -r1.1828 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.1827 src/doc/CHANGES:1.1828 --- src/doc/CHANGES:1.1827 Mon Jun 10 07:14:01 2013 +++ src/doc/CHANGES Wed Jun 19 13:31:33 2013 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1827 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1828 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -249,3 +249,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: and general. [mrg 20130605] kernel: Add driver soekrisgpio for Soekris net6501 Ported by kardel@ from a patch for OpenBSD. [kardel 20130609] + cgfourteen: both kernel and Xorg driver now support hardware + acceleration using SX [macallan 20130619]
CVS commit: src/sys/dev/mii
Module Name:src Committed By: msaitoh Date: Wed Jun 19 15:30:26 UTC 2013 Modified Files: src/sys/dev/mii: ihphy.c Log Message: Use ihphy(4) for I21[78]. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/mii/ihphy.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/mii/ihphy.c diff -u src/sys/dev/mii/ihphy.c:1.6 src/sys/dev/mii/ihphy.c:1.7 --- src/sys/dev/mii/ihphy.c:1.6 Tue Jun 11 07:22:08 2013 +++ src/sys/dev/mii/ihphy.c Wed Jun 19 15:30:25 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ihphy.c,v 1.6 2013/06/11 07:22:08 msaitoh Exp $ */ +/* $NetBSD: ihphy.c,v 1.7 2013/06/19 15:30:25 msaitoh Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ihphy.c,v 1.6 2013/06/11 07:22:08 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: ihphy.c,v 1.7 2013/06/19 15:30:25 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -98,6 +98,8 @@ static const struct mii_phydesc ihphys[] MII_STR_INTEL_I82577 }, { MII_OUI_INTEL, MII_MODEL_INTEL_I82579, MII_STR_INTEL_I82579 }, + { MII_OUI_INTEL, MII_MODEL_INTEL_I217, + MII_STR_INTEL_I217 }, { 0,0, NULL },
CVS commit: src
Module Name:src Committed By: dholland Date: Wed Jun 19 18:02:21 UTC 2013 Modified Files: src/sbin/fsck_ffs: pass1.c src/sys/ufs/ffs: ffs_alloc.c Log Message: blkoff() - ffs_blkoff() stragglers To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sbin/fsck_ffs/pass1.c cvs rdiff -u -r1.134 -r1.135 src/sys/ufs/ffs/ffs_alloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ffs/pass1.c diff -u src/sbin/fsck_ffs/pass1.c:1.52 src/sbin/fsck_ffs/pass1.c:1.53 --- src/sbin/fsck_ffs/pass1.c:1.52 Wed Jun 19 17:51:25 2013 +++ src/sbin/fsck_ffs/pass1.c Wed Jun 19 18:02:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pass1.c,v 1.52 2013/06/19 17:51:25 dholland Exp $ */ +/* $NetBSD: pass1.c,v 1.53 2013/06/19 18:02:21 dholland Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)pass1.c 8.6 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: pass1.c,v 1.52 2013/06/19 17:51:25 dholland Exp $); +__RCSID($NetBSD: pass1.c,v 1.53 2013/06/19 18:02:21 dholland Exp $); #endif #endif /* not lint */ @@ -431,7 +431,7 @@ checkinode(ino_t inumber, struct inodesc ndb = howmany(iswap32(dp-dp2.di_extsize), sblock-fs_bsize); for (j = 0; j UFS_NXADDR; j++) { if (--ndb == 0 - (offset = blkoff(sblock, iswap32(dp-dp2.di_extsize))) != 0) + (offset = ffs_blkoff(sblock, iswap32(dp-dp2.di_extsize))) != 0) idesc-id_numfrags = numfrags(sblock, fragroundup(sblock, offset)); else Index: src/sys/ufs/ffs/ffs_alloc.c diff -u src/sys/ufs/ffs/ffs_alloc.c:1.134 src/sys/ufs/ffs/ffs_alloc.c:1.135 --- src/sys/ufs/ffs/ffs_alloc.c:1.134 Wed Jun 19 17:51:26 2013 +++ src/sys/ufs/ffs/ffs_alloc.c Wed Jun 19 18:02:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_alloc.c,v 1.134 2013/06/19 17:51:26 dholland Exp $ */ +/* $NetBSD: ffs_alloc.c,v 1.135 2013/06/19 18:02:21 dholland Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ffs_alloc.c,v 1.134 2013/06/19 17:51:26 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: ffs_alloc.c,v 1.135 2013/06/19 18:02:21 dholland Exp $); #if defined(_KERNEL_OPT) #include opt_ffs.h @@ -217,7 +217,7 @@ ffs_alloc(struct inode *ip, daddr_t lbn, pg = uvm_pagelookup(uobj, off); KASSERT((pg == NULL (vp-v_vflag VV_MAPPED) == 0 (size PAGE_MASK) == 0 - blkoff(fs, size) == 0) || + ffs_blkoff(fs, size) == 0) || (pg != NULL pg-owner == curproc-p_pid pg-lowner == curlwp-l_lid)); off += PAGE_SIZE;
CVS commit: src/sys/ufs/chfs
Module Name:src Committed By: dholland Date: Wed Jun 19 18:15:35 UTC 2013 Modified Files: src/sys/ufs/chfs: chfs_vnops.c Log Message: blkoff - chfs_blkoff blksize - chfs_blksize To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/ufs/chfs/chfs_vnops.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/ufs/chfs/chfs_vnops.c diff -u src/sys/ufs/chfs/chfs_vnops.c:1.15 src/sys/ufs/chfs/chfs_vnops.c:1.16 --- src/sys/ufs/chfs/chfs_vnops.c:1.15 Mon Mar 18 19:35:47 2013 +++ src/sys/ufs/chfs/chfs_vnops.c Wed Jun 19 18:15:35 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: chfs_vnops.c,v 1.15 2013/03/18 19:35:47 plunky Exp $ */ +/* $NetBSD: chfs_vnops.c,v 1.16 2013/06/19 18:15:35 dholland Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -583,7 +583,7 @@ chfs_chown(struct vnode *vp, uid_t uid, (((off_t)(blk)) (chmp)-chm_fs_bshift) /* calculates (loc % chmp-chm_chm_fs_bsize) */ -#define blkoff(chmp, loc) \ +#define chfs_blkoff(chmp, loc) \ ((loc) (chmp)-chm_fs_qbmask) /* calculates (loc / chmp-chm_chm_fs_bsize) */ @@ -594,10 +594,10 @@ chfs_chown(struct vnode *vp, uid_t uid, #define fragroundup(chmp, size) \ (((size) + (chmp)-chm_fs_qfmask) (chmp)-chm_fs_fmask) -#define blksize(chmp, ip, lbn) \ +#define chfs_blksize(chmp, ip, lbn) \ (((lbn) = UFS_NDADDR || (ip)-size = lblktosize(chmp, (lbn) + 1)) \ ? (chmp)-chm_fs_bsize \ - : (fragroundup(chmp, blkoff(chmp, (ip)-size + : (fragroundup(chmp, chfs_blkoff(chmp, (ip)-size /* calculates roundup(size, chmp-chm_chm_fs_bsize) */ #define blkroundup(chmp, size) \ @@ -688,8 +688,8 @@ chfs_read(void *v) break; lbn = lblkno(chmp, uio-uio_offset); nextlbn = lbn + 1; - size = blksize(chmp, ip, lbn); - blkoffset = blkoff(chmp, uio-uio_offset); + size = chfs_blksize(chmp, ip, lbn); + blkoffset = chfs_blkoff(chmp, uio-uio_offset); xfersize = MIN(MIN(chmp-chm_fs_bsize - blkoffset, uio-uio_resid), bytesinfile); @@ -697,7 +697,7 @@ chfs_read(void *v) error = bread(vp, lbn, size, NOCRED, 0, bp); dbg(after bread\n); } else { - int nextsize = blksize(chmp, ip, nextlbn); + int nextsize = chfs_blksize(chmp, ip, nextlbn); dbg(size: %ld\n, size); error = breadn(vp, lbn, size, nextlbn, nextsize, 1, NOCRED, 0, bp); @@ -846,7 +846,7 @@ chfs_write(void *v) MAX(osize, uio-uio_offset))); aflag = ioflag IO_SYNC ? B_SYNC : 0; nsize = MAX(osize, uio-uio_offset + uio-uio_resid); - endallocoff = nsize - blkoff(chmp, nsize); + endallocoff = nsize - chfs_blkoff(chmp, nsize); /* * if we're increasing the file size, deal with expanding @@ -882,7 +882,7 @@ chfs_write(void *v) } oldoff = uio-uio_offset; - blkoffset = blkoff(chmp, uio-uio_offset); + blkoffset = chfs_blkoff(chmp, uio-uio_offset); bytelen = MIN(chmp-chm_fs_bsize - blkoffset, uio-uio_resid); if (bytelen == 0) { break; @@ -898,12 +898,12 @@ chfs_write(void *v) overwrite = uio-uio_offset = preallocoff uio-uio_offset endallocoff; if (!overwrite (vp-v_vflag VV_MAPPED) == 0 - blkoff(chmp, uio-uio_offset) == 0 + chfs_blkoff(chmp, uio-uio_offset) == 0 (uio-uio_offset PAGE_MASK) == 0) { vsize_t len; len = trunc_page(bytelen); - len -= blkoff(chmp, len); + len -= chfs_blkoff(chmp, len); if (len 0) { overwrite = true; bytelen = len;
CVS commit: src/sys/fs/filecorefs
Module Name:src Committed By: dholland Date: Wed Jun 19 18:16:10 UTC 2013 Modified Files: src/sys/fs/filecorefs: filecore_extern.h filecore_vnops.c Log Message: blkoff() - filecore_blkoff() blksize() - filecore_blksize() To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/fs/filecorefs/filecore_extern.h cvs rdiff -u -r1.36 -r1.37 src/sys/fs/filecorefs/filecore_vnops.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/fs/filecorefs/filecore_extern.h diff -u src/sys/fs/filecorefs/filecore_extern.h:1.20 src/sys/fs/filecorefs/filecore_extern.h:1.21 --- src/sys/fs/filecorefs/filecore_extern.h:1.20 Mon May 23 22:00:30 2011 +++ src/sys/fs/filecorefs/filecore_extern.h Wed Jun 19 18:16:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: filecore_extern.h,v 1.20 2011/05/23 22:00:30 rmind Exp $ */ +/* $NetBSD: filecore_extern.h,v 1.21 2013/06/19 18:16:10 dholland Exp $ */ /*- * Copyright (c) 1994 The Regents of the University of California. @@ -96,10 +96,10 @@ struct filecore_mnt { #define VFSTOFILECORE(mp) ((struct filecore_mnt *)((mp)-mnt_data)) -#define blkoff(fcp, loc) ((loc) ((fcp)-blksize-1)) +#define filecore_blkoff(fcp, loc) ((loc) ((fcp)-blksize-1)) #define lblktosize(fcp, blk) ((blk) (fcp)-log2bsize) #define lblkno(fcp, loc) ((loc) (fcp)-log2bsize) -#define blksize(fcp, ip, lbn) ((fcp)-blksize) +#define filecore_blksize(fcp, ip, lbn) ((fcp)-blksize) extern struct pool filecore_node_pool; Index: src/sys/fs/filecorefs/filecore_vnops.c diff -u src/sys/fs/filecorefs/filecore_vnops.c:1.36 src/sys/fs/filecorefs/filecore_vnops.c:1.37 --- src/sys/fs/filecorefs/filecore_vnops.c:1.36 Mon Mar 18 19:35:36 2013 +++ src/sys/fs/filecorefs/filecore_vnops.c Wed Jun 19 18:16:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: filecore_vnops.c,v 1.36 2013/03/18 19:35:36 plunky Exp $ */ +/* $NetBSD: filecore_vnops.c,v 1.37 2013/06/19 18:16:10 dholland Exp $ */ /*- * Copyright (c) 1994 The Regents of the University of California. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: filecore_vnops.c,v 1.36 2013/03/18 19:35:36 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: filecore_vnops.c,v 1.37 2013/06/19 18:16:10 dholland Exp $); #include sys/param.h #include sys/systm.h @@ -240,14 +240,14 @@ filecore_read(void *v) do { lbn = lblkno(fcmp, uio-uio_offset); - on = blkoff(fcmp, uio-uio_offset); - n = MIN(blksize(fcmp, ip, lbn) - on, uio-uio_resid); + on = filecore_blkoff(fcmp, uio-uio_offset); + n = MIN(filecore_blksize(fcmp, ip, lbn) - on, uio-uio_resid); diff = (off_t)ip-i_size - uio-uio_offset; if (diff = 0) return (0); if (diff n) n = diff; - size = blksize(fcmp, ip, lbn); + size = filecore_blksize(fcmp, ip, lbn); rablock = lbn + 1; if (ip-i_dirent.attr FILECORE_ATTR_DIR) { error = filecore_dbread(ip, bp);
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: dholland Date: Wed Jun 19 18:16:53 UTC 2013 Modified Files: src/sys/fs/cd9660: cd9660_extern.h cd9660_lookup.c cd9660_vfsops.c cd9660_vnops.c Log Message: blkoff() - cd9660_blkoff() blksize() - cd9660_blksize() To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/fs/cd9660/cd9660_extern.h cvs rdiff -u -r1.23 -r1.24 src/sys/fs/cd9660/cd9660_lookup.c cvs rdiff -u -r1.76 -r1.77 src/sys/fs/cd9660/cd9660_vfsops.c cvs rdiff -u -r1.43 -r1.44 src/sys/fs/cd9660/cd9660_vnops.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/fs/cd9660/cd9660_extern.h diff -u src/sys/fs/cd9660/cd9660_extern.h:1.24 src/sys/fs/cd9660/cd9660_extern.h:1.25 --- src/sys/fs/cd9660/cd9660_extern.h:1.24 Sat Jun 28 01:34:05 2008 +++ src/sys/fs/cd9660/cd9660_extern.h Wed Jun 19 18:16:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_extern.h,v 1.24 2008/06/28 01:34:05 rumble Exp $ */ +/* $NetBSD: cd9660_extern.h,v 1.25 2013/06/19 18:16:53 dholland Exp $ */ /*- * Copyright (c) 1994 @@ -85,10 +85,10 @@ struct iso_mnt { #define VFSTOISOFS(mp) ((struct iso_mnt *)((mp)-mnt_data)) -#define blkoff(imp, loc) ((loc) (imp)-im_bmask) +#define cd9660_blkoff(imp, loc) ((loc) (imp)-im_bmask) #define lblktosize(imp, blk) ((blk) (imp)-im_bshift) #define lblkno(imp, loc) ((loc) (imp)-im_bshift) -#define blksize(imp, ip, lbn) ((imp)-logical_block_size) +#define cd9660_blksize(imp, ip, lbn) ((imp)-logical_block_size) #ifdef _KERNEL Index: src/sys/fs/cd9660/cd9660_lookup.c diff -u src/sys/fs/cd9660/cd9660_lookup.c:1.23 src/sys/fs/cd9660/cd9660_lookup.c:1.24 --- src/sys/fs/cd9660/cd9660_lookup.c:1.23 Thu Dec 20 08:03:42 2012 +++ src/sys/fs/cd9660/cd9660_lookup.c Wed Jun 19 18:16:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_lookup.c,v 1.23 2012/12/20 08:03:42 hannken Exp $ */ +/* $NetBSD: cd9660_lookup.c,v 1.24 2013/06/19 18:16:53 dholland Exp $ */ /*- * Copyright (c) 1989, 1993, 1994 @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cd9660_lookup.c,v 1.23 2012/12/20 08:03:42 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: cd9660_lookup.c,v 1.24 2013/06/19 18:16:53 dholland Exp $); #include sys/param.h #include sys/namei.h @@ -422,14 +422,14 @@ cd9660_blkatoff(struct vnode *vp, off_t ip = VTOI(vp); imp = ip-i_mnt; lbn = lblkno(imp, offset); - bsize = blksize(imp, ip, lbn); + bsize = cd9660_blksize(imp, ip, lbn); if ((error = bread(vp, lbn, bsize, NOCRED, 0, bp)) != 0) { *bpp = NULL; return (error); } if (res) - *res = (char *)bp-b_data + blkoff(imp, offset); + *res = (char *)bp-b_data + cd9660_blkoff(imp, offset); *bpp = bp; return (0); } Index: src/sys/fs/cd9660/cd9660_vfsops.c diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.76 src/sys/fs/cd9660/cd9660_vfsops.c:1.77 --- src/sys/fs/cd9660/cd9660_vfsops.c:1.76 Thu Dec 20 08:03:42 2012 +++ src/sys/fs/cd9660/cd9660_vfsops.c Wed Jun 19 18:16:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vfsops.c,v 1.76 2012/12/20 08:03:42 hannken Exp $ */ +/* $NetBSD: cd9660_vfsops.c,v 1.77 2013/06/19 18:16:53 dholland Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cd9660_vfsops.c,v 1.76 2012/12/20 08:03:42 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: cd9660_vfsops.c,v 1.77 2013/06/19 18:16:53 dholland Exp $); #if defined(_KERNEL_OPT) #include opt_compat_netbsd.h @@ -766,7 +766,7 @@ cd9660_vget_internal(struct mount *mp, i return (ESTALE); } - off = blkoff(imp, ino); + off = cd9660_blkoff(imp, ino); if (off + ISO_DIRECTORY_RECORD_SIZE imp-logical_block_size) { vput(vp); printf(fhtovp: crosses block boundary %d\n, Index: src/sys/fs/cd9660/cd9660_vnops.c diff -u src/sys/fs/cd9660/cd9660_vnops.c:1.43 src/sys/fs/cd9660/cd9660_vnops.c:1.44 --- src/sys/fs/cd9660/cd9660_vnops.c:1.43 Mon Mar 18 19:35:35 2013 +++ src/sys/fs/cd9660/cd9660_vnops.c Wed Jun 19 18:16:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vnops.c,v 1.43 2013/03/18 19:35:35 plunky Exp $ */ +/* $NetBSD: cd9660_vnops.c,v 1.44 2013/06/19 18:16:53 dholland Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cd9660_vnops.c,v 1.43 2013/03/18 19:35:35 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: cd9660_vnops.c,v 1.44 2013/06/19 18:16:53 dholland Exp $); #include sys/param.h #include sys/systm.h @@ -250,17 +250,17 @@ cd9660_read(void *v) do { lbn = lblkno(imp, uio-uio_offset); - on = blkoff(imp, uio-uio_offset); + on = cd9660_blkoff(imp, uio-uio_offset); n = MIN(imp-logical_block_size - on, uio-uio_resid); diff = (off_t)ip-i_size - uio-uio_offset; if (diff = 0) return (0); if (diff n) n = diff; - size = blksize(imp, ip, lbn); + size = cd9660_blksize(imp, ip, lbn); rablock = lbn + 1; if (lblktosize(imp, rablock) ip-i_size) { - rasize =
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: dholland Date: Wed Jun 19 18:18:12 UTC 2013 Modified Files: src/sys/lib/libsa: minixfs3.c minixfs3.h Log Message: blkoff() - mfs_blkoff() XXX: this shouldn't be using mfs for its symbols as we also have XXX: sys/ufs/mfs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libsa/minixfs3.c \ src/sys/lib/libsa/minixfs3.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/lib/libsa/minixfs3.c diff -u src/sys/lib/libsa/minixfs3.c:1.2 src/sys/lib/libsa/minixfs3.c:1.3 --- src/sys/lib/libsa/minixfs3.c:1.2 Wed Jun 19 17:51:26 2013 +++ src/sys/lib/libsa/minixfs3.c Wed Jun 19 18:18:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: minixfs3.c,v 1.2 2013/06/19 17:51:26 dholland Exp $ */ +/* $NetBSD: minixfs3.c,v 1.3 2013/06/19 18:18:12 dholland Exp $ */ /*- * Copyright (c) 2012 @@ -358,7 +358,7 @@ buf_read_file(struct open_file *f, void size_t block_size; int rc; - off = blkoff(fs, fp-f_seekp); + off = mfs_blkoff(fs, fp-f_seekp); file_block = lblkno(fs, fp-f_seekp); block_size = fs-mfs_block_size; Index: src/sys/lib/libsa/minixfs3.h diff -u src/sys/lib/libsa/minixfs3.h:1.2 src/sys/lib/libsa/minixfs3.h:1.3 --- src/sys/lib/libsa/minixfs3.h:1.2 Wed Jun 19 17:51:26 2013 +++ src/sys/lib/libsa/minixfs3.h Wed Jun 19 18:18:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: minixfs3.h,v 1.2 2013/06/19 17:51:26 dholland Exp $ */ +/* $NetBSD: minixfs3.h,v 1.3 2013/06/19 18:18:12 dholland Exp $ */ /*- * Copyright (c) 2012 @@ -149,7 +149,7 @@ void minixfs3_i_bswap(struct mfs_dinode * quantities by using shifts and masks in place of divisions * modulos and multiplications. */ -#define blkoff(fs, loc) /* calculates (loc % fs-mfs_bsize) */ \ +#define mfs_blkoff(fs, loc) /* calculates (loc % fs-mfs_bsize) */ \ ((loc) (fs)-mfs_qbmask) #define lblkno(fs, loc) /* calculates (loc / fs-mfs_bsize) */ \ ((loc) (fs)-mfs_bshift)
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: christos Date: Wed Jun 19 21:12:03 UTC 2013 Modified Files: src/usr.bin/netstat: inet.c inet6.c main.c netstat.h Log Message: Don't use -P as a kmem printer, verify that the address points to a pcb first! To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/usr.bin/netstat/inet.c cvs rdiff -u -r1.60 -r1.61 src/usr.bin/netstat/inet6.c cvs rdiff -u -r1.85 -r1.86 src/usr.bin/netstat/main.c cvs rdiff -u -r1.46 -r1.47 src/usr.bin/netstat/netstat.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/netstat/inet.c diff -u src/usr.bin/netstat/inet.c:1.101 src/usr.bin/netstat/inet.c:1.102 --- src/usr.bin/netstat/inet.c:1.101 Sat Dec 24 15:18:35 2011 +++ src/usr.bin/netstat/inet.c Wed Jun 19 17:12:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: inet.c,v 1.101 2011/12/24 20:18:35 christos Exp $ */ +/* $NetBSD: inet.c,v 1.102 2013/06/19 21:12:03 christos Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = from: @(#)inet.c 8.4 (Berkeley) 4/20/94; #else -__RCSID($NetBSD: inet.c,v 1.101 2011/12/24 20:18:35 christos Exp $); +__RCSID($NetBSD: inet.c,v 1.102 2013/06/19 21:12:03 christos Exp $); #endif #endif /* not lint */ @@ -226,96 +226,72 @@ print_vtw_v4(const vtw_t *vtw) TCPS_TIME_WAIT, tcp, 0, vtw-expire); } -void -protopr(u_long off, const char *name) -{ - struct inpcbtable table; - struct inpcb *head, *next, *prev; - struct inpcb inpcb; - struct tcpcb tcpcb; - struct socket sockb; - int istcp = strcmp(name, tcp) == 0; - static int first = 1; - - compact = 0; - if (Aflag) { - if (!numeric_addr) - width = 18; - else { - width = 21; - compact = 1; - } - } else - width = 22; - - if (use_sysctl) { - struct kinfo_pcb *pcblist; - int mib[8]; - size_t namelen = 0, size = 0, i; - char *mibname = NULL; - - memset(mib, 0, sizeof(mib)); +struct kinfo_pcb * +getpcblist_sysctl(const char *name, size_t *len) { + int mib[8]; + size_t namelen = 0, size = 0; + char *mibname = NULL; + struct kinfo_pcb *pcblist; - if (asprintf(mibname, net.inet.%s.pcblist, name) == -1) - err(1, asprintf); + memset(mib, 0, sizeof(mib)); - /* get dynamic pcblist node */ - if (sysctlnametomib(mibname, mib, namelen) == -1) - err(1, sysctlnametomib: %s, mibname); + if (asprintf(mibname, net.inet%s.%s.pcblist, name + 3, name) == -1) + err(1, asprintf); - if (prog_sysctl(mib, __arraycount(mib), - NULL, size, NULL, 0) == -1) - err(1, sysctl (query)); + /* get dynamic pcblist node */ + if (sysctlnametomib(mibname, mib, namelen) == -1) + err(1, sysctlnametomib: %s, mibname); - if ((pcblist = malloc(size)) == NULL) - err(1, malloc); - memset(pcblist, 0, size); + free(mibname); - mib[6] = sizeof(*pcblist); - mib[7] = size / sizeof(*pcblist); + if (prog_sysctl(mib, __arraycount(mib), NULL, size, NULL, 0) == -1) + err(1, sysctl (query)); - if (prog_sysctl(mib, __arraycount(mib), - pcblist, size, NULL, 0) == -1) - err(1, sysctl (copy)); + if ((pcblist = malloc(size)) == NULL) + err(1, malloc); + memset(pcblist, 0, size); - for (i = 0; i size / sizeof(*pcblist); i++) { - struct sockaddr_in src, dst; + mib[6] = sizeof(*pcblist); + mib[7] = size / sizeof(*pcblist); - memcpy(src, pcblist[i].ki_s, sizeof(src)); - memcpy(dst, pcblist[i].ki_d, sizeof(dst)); + if (prog_sysctl(mib, __arraycount(mib), pcblist, size, NULL, 0) == -1) + err(1, sysctl (copy)); - if (!aflag - inet_lnaof(dst.sin_addr) == INADDR_ANY) -continue; + *len = size / sizeof(*pcblist); + return pcblist; - if (first) { -protoprhdr(); -first = 0; - } - - protopr0((intptr_t) pcblist[i].ki_ppcbaddr, - pcblist[i].ki_rcvq, pcblist[i].ki_sndq, - src.sin_addr, src.sin_port, - dst.sin_addr, dst.sin_port, - pcblist[i].ki_tstate, name, - pcblist[i].ki_pflags, NULL); - } +} - free(pcblist); - goto end; +static struct kinfo_pcb * +getpcblist_kmem(u_long off, const char *name, size_t *len) { + struct inpcbtable table; + struct inpcb *head, *next, *prev; + struct inpcb inpcb; + struct tcpcb tcpcb; + struct socket sockb; + int istcp = strcmp(name, tcp) == 0; + struct kinfo_pcb *pcblist; + size_t size = 100, i; + struct sockaddr_in sin; + + if (off == 0) { + *len = 0; + return NULL; } - if (off == 0) - return; kread(off, (char *)table, sizeof table); prev = head = (struct inpcb *)((struct inpcbtable *)off)-inpt_queue.cqh_first; next = (struct inpcb *)table.inpt_queue.cqh_first; + if ((pcblist = malloc(size)) == NULL) + err(1, malloc); + + i = 0; while (next != head) { kread((u_long)next, (char *)inpcb, sizeof inpcb); if ((struct inpcb *)inpcb.inp_queue.cqe_prev != prev) { - printf(???\n); + warnx(bad pcb); break; } prev = next; @@ -324,28 +300,83 @@ protopr(u_long off, const char *name) if (inpcb.inp_af !=
CVS commit: src/sys/arch/arm
Module Name:src Committed By: matt Date: Thu Jun 20 05:24:46 UTC 2013 Modified Files: src/sys/arch/arm/include: vfpreg.h src/sys/arch/arm/vfp: vfp_init.c Log Message: Add support for the Cortex-A15 Neon/VFP unit To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/include/vfpreg.h cvs rdiff -u -r1.19 -r1.20 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/include/vfpreg.h diff -u src/sys/arch/arm/include/vfpreg.h:1.8 src/sys/arch/arm/include/vfpreg.h:1.9 --- src/sys/arch/arm/include/vfpreg.h:1.8 Tue Feb 12 15:05:26 2013 +++ src/sys/arch/arm/include/vfpreg.h Thu Jun 20 05:24:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vfpreg.h,v 1.8 2013/02/12 15:05:26 matt Exp $ */ +/* $NetBSD: vfpreg.h,v 1.9 2013/06/20 05:24:46 matt Exp $ */ /* * Copyright (c) 2008 ARM Ltd @@ -63,6 +63,7 @@ #define FPU_VFP_CORTEXA7 0x41023070 #define FPU_VFP_CORTEXA8 0x410330c0 #define FPU_VFP_CORTEXA9 0x41033090 +#define FPU_VFP_CORTEXA15 0x410330f0 #define VFP_FPEXC_EX 0x8000 /* EXception status bit */ #define VFP_FPEXC_EN 0x4000 /* VFP Enable bit */ Index: src/sys/arch/arm/vfp/vfp_init.c diff -u src/sys/arch/arm/vfp/vfp_init.c:1.19 src/sys/arch/arm/vfp/vfp_init.c:1.20 --- src/sys/arch/arm/vfp/vfp_init.c:1.19 Tue Feb 5 23:23:34 2013 +++ src/sys/arch/arm/vfp/vfp_init.c Thu Jun 20 05:24:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vfp_init.c,v 1.19 2013/02/05 23:23:34 matt Exp $ */ +/* $NetBSD: vfp_init.c,v 1.20 2013/06/20 05:24:46 matt Exp $ */ /* * Copyright (c) 2008 ARM Ltd @@ -152,6 +152,7 @@ load_vfpregs(const struct vfpreg *fregs) case FPU_VFP_CORTEXA7: case FPU_VFP_CORTEXA8: case FPU_VFP_CORTEXA9: + case FPU_VFP_CORTEXA15: #endif load_vfpregs_hi(fregs-vfp_regs); #ifdef CPU_ARM11 @@ -172,6 +173,7 @@ save_vfpregs(struct vfpreg *fregs) case FPU_VFP_CORTEXA7: case FPU_VFP_CORTEXA8: case FPU_VFP_CORTEXA9: + case FPU_VFP_CORTEXA15: #endif save_vfpregs_hi(fregs-vfp_regs); #ifdef CPU_ARM11 @@ -376,6 +378,7 @@ vfp_attach(void) case FPU_VFP_CORTEXA7: case FPU_VFP_CORTEXA8: case FPU_VFP_CORTEXA9: + case FPU_VFP_CORTEXA15: model = NEON MPE (VFP 3.0+); cpu_neon_present = 1; break; @@ -539,6 +542,7 @@ vfp_state_load(lwp_t *l, u_int flags) case FPU_VFP_CORTEXA7: case FPU_VFP_CORTEXA8: case FPU_VFP_CORTEXA9: + case FPU_VFP_CORTEXA15: write_fpinst2(fregs-vfp_fpinst2); write_fpinst(fregs-vfp_fpinst); break; @@ -588,6 +592,7 @@ vfp_state_save(lwp_t *l, u_int flags) case FPU_VFP_CORTEXA7: case FPU_VFP_CORTEXA8: case FPU_VFP_CORTEXA9: + case FPU_VFP_CORTEXA15: fregs-vfp_fpinst = read_fpinst(); fregs-vfp_fpinst2 = read_fpinst2(); break;
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: matt Date: Thu Jun 20 05:27:31 UTC 2013 Modified Files: src/sys/arch/arm/omap: omap2_reg.h Log Message: More defintions for the OMAP5. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/omap/omap2_reg.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/omap/omap2_reg.h diff -u src/sys/arch/arm/omap/omap2_reg.h:1.22 src/sys/arch/arm/omap/omap2_reg.h:1.23 --- src/sys/arch/arm/omap/omap2_reg.h:1.22 Tue Jun 18 23:39:44 2013 +++ src/sys/arch/arm/omap/omap2_reg.h Thu Jun 20 05:27:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: omap2_reg.h,v 1.22 2013/06/18 23:39:44 matt Exp $ */ +/* $NetBSD: omap2_reg.h,v 1.23 2013/06/20 05:27:31 matt Exp $ */ /* * Copyright (c) 2007 Microsoft @@ -788,6 +788,14 @@ #define AHCI1_BASE_OMAP5 0x4a14 +#define OMAP5_PRM_FRAC_INCREMENTER_NUMERATOR 0x48243210 +#define PRM_FRAC_INCR_NUM_ABE_LP_MODE __BITS(27,16) +#define PRM_FRAC_INCR_NUM_SYS_MODE __BITS(11,0) +#define OMAP5_PRM_FRAC_INCREMENTER_DENUMERATOR_RELOAD 0x48243214 +#define PRM_FRAC_INCR_DENUM_RELOAD __BIT(16) +#define PRM_FRAC_INCR_DENUM_DENOMINATOR __BITS(11,0) +#define OMAP5_GTIMER_FREQ 6144000 /* 6.144Mhz */ + #ifdef TI_AM335X #define TI_AM335X_CTLMOD_BASE 0x44e1 #define CTLMOD_CONTROL_STATUS 0x40
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Thu Jun 20 05:29:01 UTC 2013 Modified Files: src/sys/arch/arm/cortex: a9_mpsubr.S Log Message: Set caching bits on the TTBR for ARMv7 Make sure TTCR is 0 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/cortex/a9_mpsubr.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/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.5 src/sys/arch/arm/cortex/a9_mpsubr.S:1.6 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.5 Mon Jun 17 04:38:51 2013 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Thu Jun 20 05:29:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.5 2013/06/17 04:38:51 matt Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.6 2013/06/20 05:29:01 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -143,8 +143,15 @@ arm_cpuinit: mcr p15, 0, r1, c7, c10, 4 /* Drain the write buffers. */ XPUTC(#71) + mrc p15, 0, r2, c0, c0, 5 /* get MPIDR */ + cmp r2, #0 + orrlt r10, r10, #0x5b /* MP, cachable (Normal WB) */ + orrge r10, r10, #0x1b /* Non-MP, cacheable, normal WB */ mcr p15, 0, r10, c2, c0, 0 /* Set Translation Table Base */ + XPUTC(#49) + mcr p15, 0, r1, c2, c0, 2 /* Set Translation Table Control */ + XPUTC(#72) mov r1, #0 mcr p15, 0, r1, c8, c7, 0 /* Invalidate TLBs */
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Thu Jun 20 05:30:21 UTC 2013 Modified Files: src/sys/arch/arm/cortex: a9tmr.c a9tmr_var.h armperiph.c gic.c gtmr.c gtmr_var.h mpcore_var.h Log Message: Pass the offset from CBAR/PERIPHBASE in mpcore_attach_args. Modify the list of devices to include the offset(s) from PERIPHBASE. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/cortex/a9tmr.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/cortex/a9tmr_var.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/cortex/armperiph.c \ src/sys/arch/arm/cortex/gic.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/cortex/gtmr.c \ src/sys/arch/arm/cortex/gtmr_var.h src/sys/arch/arm/cortex/mpcore_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/cortex/a9tmr.c diff -u src/sys/arch/arm/cortex/a9tmr.c:1.5 src/sys/arch/arm/cortex/a9tmr.c:1.6 --- src/sys/arch/arm/cortex/a9tmr.c:1.5 Wed Jun 12 00:59:50 2013 +++ src/sys/arch/arm/cortex/a9tmr.c Thu Jun 20 05:30:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: a9tmr.c,v 1.5 2013/06/12 00:59:50 matt Exp $ */ +/* $NetBSD: a9tmr.c,v 1.6 2013/06/20 05:30:21 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: a9tmr.c,v 1.5 2013/06/12 00:59:50 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: a9tmr.c,v 1.6 2013/06/20 05:30:21 matt Exp $); #include sys/param.h #include sys/bus.h @@ -123,9 +123,7 @@ a9tmr_attach(device_t parent, device_t s * This runs at the ARM PERIPHCLOCK which should be 1/2 of the CPU clock. * The MD code should have setup our frequency for us. */ - prop_number_t pn = prop_dictionary_get(dict, frequency); - KASSERT(pn != NULL); - sc-sc_freq = prop_number_unsigned_integer_value(pn); + prop_dictionary_get_uint32(dict, frequency, sc-sc_freq); humanize_number(freqbuf, sizeof(freqbuf), sc-sc_freq, Hz, 1000); Index: src/sys/arch/arm/cortex/a9tmr_var.h diff -u src/sys/arch/arm/cortex/a9tmr_var.h:1.2 src/sys/arch/arm/cortex/a9tmr_var.h:1.3 --- src/sys/arch/arm/cortex/a9tmr_var.h:1.2 Thu Sep 27 00:23:27 2012 +++ src/sys/arch/arm/cortex/a9tmr_var.h Thu Jun 20 05:30:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: a9tmr_var.h,v 1.2 2012/09/27 00:23:27 matt Exp $ */ +/* $NetBSD: a9tmr_var.h,v 1.3 2013/06/20 05:30:21 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -39,7 +39,7 @@ struct a9tmr_softc { bus_space_handle_t sc_private_memh; bus_space_handle_t sc_wdog_memh; struct evcnt sc_ev_missing_ticks; - u_long sc_freq; + uint32_t sc_freq; u_long sc_autoinc; void *sc_global_ih; }; Index: src/sys/arch/arm/cortex/armperiph.c diff -u src/sys/arch/arm/cortex/armperiph.c:1.3 src/sys/arch/arm/cortex/armperiph.c:1.4 --- src/sys/arch/arm/cortex/armperiph.c:1.3 Sun Jun 16 16:44:39 2013 +++ src/sys/arch/arm/cortex/armperiph.c Thu Jun 20 05:30:21 2013 @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: armperiph.c,v 1.3 2013/06/16 16:44:39 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: armperiph.c,v 1.4 2013/06/20 05:30:21 matt Exp $); #include sys/param.h #include sys/device.h @@ -52,41 +52,59 @@ struct armperiph_softc { bus_space_handle_t sc_memh; }; +struct armperiph_info { + const char pi_name[12]; + bus_size_t pi_off1; + bus_size_t pi_off2; +}; + #ifdef CPU_CORTEXA5 -static const char * const a5_devices[] = { - armscu, armgic, NULL +static const struct armperiph_info a5_devices[] = { + { armscu, 0x, 0 }, + { armgic, 0x1000, 0x0100 }, + { a9tmr, 0x0200, 0 }, + { , 0, 0 }, }; #endif #ifdef CPU_CORTEXA7 -static const char * const a7_devices[] = { - armgic, armtmr, NULL +static const struct armperiph_info a7_devices[] = { + { armgic, 0x1000, 0x2000 }, + { armgtmr, 0, 0 }, + { , 0, 0 }, }; #endif #ifdef CPU_CORTEXA9 -static const char * const a9_devices[] = { - armscu, arml2cc, armgic, a9tmr, a9wdt, NULL +static const struct armperiph_info a9_devices[] = { + { armscu, 0x, 0 }, + { arml2cc, 0x2000, 0 }, + { armgic, 0x1000, 0x0100 }, + { a9tmr, 0x0200, 0 }, + { a9wdt, 0x0600, 0 }, + { , 0, 0 }, }; #endif #ifdef CPU_CORTEXA15 -static const char * const a15_devices[] = { - armgic, armtmr, NULL +static const struct armperiph_info a15_devices[] = { + { armgic, 0x1000, 0x2000 }, + { armgtmr, 0, 0 }, + { , 0, 0 }, }; #endif static const struct mpcore_config { - const char * const *cfg_devices; + const struct armperiph_info *cfg_devices; uint32_t cfg_cpuid; uint32_t cfg_cbar_size; } configs[] = { #ifdef CPU_CORTEXA5 - { a5_devices, 0x410fc050, 8192 }, + { a5_devices, 0x410fc050, 2*4096 }, #endif #ifdef CPU_CORTEXA7 - { a7_devices, 0x410fc070, 32768 }, + { a7_devices, 0x410fc070, 8*4096 }, #endif #ifdef CPU_CORTEXA9 { a9_devices, 0x410fc090, 3*4096 }, @@ -172,11 +190,13 @@ armperiph_attach(device_t parent, device /* * Let's
CVS commit: src/sys/arch/evbarm/beagle
Module Name:src Committed By: matt Date: Thu Jun 20 05:39:19 UTC 2013 Modified Files: src/sys/arch/evbarm/beagle: beagle_machdep.c Log Message: more OMAP5 workarounds. u-boot doesn't initialize the generic timer on the omap5430 evm properly. so check to see if it's OK, and if not, initialize omap5 registers properly. Pass the timer freq via properties to the armgtmr since we can't write the cnt_frq cp15 register (which can be written in secure mode). To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/evbarm/beagle/beagle_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/beagle/beagle_machdep.c diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.48 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.49 --- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.48 Tue Jun 18 23:40:38 2013 +++ src/sys/arch/evbarm/beagle/beagle_machdep.c Thu Jun 20 05:39:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: beagle_machdep.c,v 1.48 2013/06/18 23:40:38 matt Exp $ */ +/* $NetBSD: beagle_machdep.c,v 1.49 2013/06/20 05:39:19 matt Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.48 2013/06/18 23:40:38 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.49 2013/06/20 05:39:19 matt Exp $); #include opt_machdep.h #include opt_ddb.h @@ -219,6 +219,10 @@ int use_fb_console = false; int use_fb_console = true; #endif +#ifdef CPU_CORTEXA15 +uint32_t omap5_cnt_frq; +#endif + /* * Macros to translate between physical and virtual for a subset of the * kernel address space. *Not* for general use. @@ -479,7 +483,7 @@ initarm(void *arg) #if 1 beagle_putchar('h'); #endif - printf(uboot arg = %#x, %#x, %#x, %#x\n, + printf(\nuboot arg = %#x, %#x, %#x, %#x\n, uboot_args[0], uboot_args[1], uboot_args[2], uboot_args[3]); #ifdef KGDB @@ -502,6 +506,8 @@ initarm(void *arg) printf(initarm: Configuring system ...\n); #endif + printf(initarm: cbar=%#x\n, armreg_cbar_read()); + /* * Set up the variables that define the availability of physical * memory. @@ -719,7 +725,8 @@ omap4_cpu_clk(void) const vaddr_t cm_base = OMAP2_CM_BASE - OMAP_L4_CORE_BASE + OMAP_L4_CORE_VBASE; static const uint32_t cm_clksel_freqs[] = OMAP4_CM_CLKSEL_FREQS; const uint32_t prm_clksel = *(volatile uint32_t *)(prm_base + OMAP4_CM_SYS_CLKSEL); - const uint32_t sys_clk = cm_clksel_freqs[__SHIFTOUT(prm_clksel, OMAP4_CM_SYS_CLKSEL_CLKIN)]; + const u_int clksel = __SHIFTOUT(prm_clksel, OMAP4_CM_SYS_CLKSEL_CLKIN); + const uint32_t sys_clk = cm_clksel_freqs[clksel]; const uint32_t dpll1 = *(volatile uint32_t *)(cm_base + OMAP4_CM_CLKSEL_DPLL_MPU); const uint32_t dpll2 = *(volatile uint32_t *)(cm_base + OMAP4_CM_DIV_M2_DPLL_MPU); const uint32_t m = __SHIFTOUT(dpll1, OMAP4_CM_CLKSEL_DPLL_MPU_DPLL_MULT); @@ -734,6 +741,56 @@ omap4_cpu_clk(void) printf(%s: %PRIu64: sys_clk=%u m=%u n=%u (%u) m2=%u mult=%u\n, __func__, curcpu()-ci_data.cpu_cc_freq, sys_clk, m, n, n+1, m2, OMAP4_CM_CLKSEL_MULT); + +#if defined(CPU_CORTEXA15) + if ((armreg_pfr1_read() ARM_PFR1_GTIMER_MASK) != 0) { + beagle_putchar('0'); + uint32_t voffset = OMAP_L4_PERIPHERAL_VBASE - OMAP_L4_PERIPHERAL_BASE; + uint32_t frac1_reg = OMAP5_PRM_FRAC_INCREMENTER_NUMERATOR; + uint32_t frac2_reg = OMAP5_PRM_FRAC_INCREMENTER_DENUMERATOR_RELOAD; + uint32_t frac1 = *(volatile uint32_t *)(frac1_reg + voffset); + beagle_putchar('1'); + uint32_t frac2 = *(volatile uint32_t *)(frac2_reg + voffset); + beagle_putchar('2'); + uint32_t numer = __SHIFTOUT(frac1, PRM_FRAC_INCR_NUM_SYS_MODE); + uint32_t denom = __SHIFTOUT(frac2, PRM_FRAC_INCR_DENUM_DENOMINATOR); + uint32_t freq = (uint64_t)omap_sys_clk * numer / denom; +#if 1 + if (freq != OMAP5_GTIMER_FREQ) { + static uint16_t numer_demon[8][2] = { + { 0, 0 }, /* not used */ + { 26 * 64, 26 * 125 }, /* 12.0Mhz */ + { 2 * 768, 2 * 1625 }, /* 13.0Mhz */ + { 0, 0 }, /* 16.8Mhz (not used) */ + { 130 * 8, 130 * 25 }, /* 19.2Mhz */ + { 2 * 384, 2 * 1625 }, /* 26.0Mhz */ + { 3 * 256, 3 * 1125 }, /* 27.0Mhz */ + { 130 * 4, 130 * 25 }, /* 38.4Mhz */ + }; + if (numer_demon[clksel][0] != numer) { +frac1 = ~PRM_FRAC_INCR_NUM_SYS_MODE; +frac1 |= numer_demon[clksel][0]; + } + if (numer_demon[clksel][1] != denom) { +frac2 = ~PRM_FRAC_INCR_DENUM_DENOMINATOR; +frac2 |= numer_demon[clksel][1]; + } + *(volatile uint32_t *)(frac1_reg + voffset) = frac1; + *(volatile uint32_t *)(frac2_reg + voffset) = frac2 + | PRM_FRAC_INCR_DENUM_RELOAD; + freq = OMAP5_GTIMER_FREQ; + } +#endif + beagle_putchar('3'); +#if 0 + if (gtimer_freq != freq) { + armreg_cnt_frq_write(freq); // secure only + } +#endif +