Re: CVS commit: src/sys/arch
On Sun, Feb 23, 2014 at 02:48:19PM -0800, John Nemeth wrote: On Feb 23, 10:35pm, David Laight wrote: } } Module Name:src } Committed By: dsl } Date: Sun Feb 23 22:35:28 UTC 2014 } } Modified Files: } src/sys/arch/i386/i386: freebsd_machdep.c ibcs2_machdep.c } svr4_machdep.c } src/sys/arch/x86/include: fpu.h } src/sys/arch/x86/x86: fpu.c } } Log Message: } Add fpu_set_default_cw() and use it in the emulations to set the default } x87 control word. } This means that nothing outside fpu.c cares about the internals of the } fpu save area. } New kernel modules won't load with the old kernel - but that won't matter. This requires a kernel version bump. There'll be one soon enough, and was one a few days ago. Mismatches in the modules will stop them loading. In any case no one uses the three affected emulations - I'm not even sure they really work at all! David -- David Laight: da...@l8s.co.uk
CVS commit: src/sys/arch/emips/stand/common
Module Name:src Committed By: martin Date: Mon Feb 24 08:00:52 UTC 2014 Modified Files: src/sys/arch/emips/stand/common: enic.c Log Message: Add missing prototypes/includes and remove unused variables To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/emips/stand/common/enic.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/emips/stand/common/enic.c diff -u src/sys/arch/emips/stand/common/enic.c:1.1 src/sys/arch/emips/stand/common/enic.c:1.2 --- src/sys/arch/emips/stand/common/enic.c:1.1 Wed Jan 26 01:18:54 2011 +++ src/sys/arch/emips/stand/common/enic.c Mon Feb 24 08:00:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: enic.c,v 1.1 2011/01/26 01:18:54 pooka Exp $ */ +/* $NetBSD: enic.c,v 1.2 2014/02/24 08:00:52 martin Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -66,6 +66,8 @@ #include lib/libsa/netif.h #include lib/libkern/libkern.h +#include start.h + #include machine/emipsreg.h #define the_enic ((struct _Enic *)ETHERNET_DEFAULT_ADDRESS) @@ -76,6 +78,8 @@ static void enicinit (struct iodesc *, v static int enicget (struct iodesc *, void *, size_t, saseconds_t); static int enicput (struct iodesc *, void *, size_t); static void enicend (struct netif *); +int enic_getpkt(struct _Enic *regs, void *buf, int bytes, int timeo); +int enic_present(int unit); #ifdef NET_DEBUG static void dump_packet(void *, int); @@ -154,7 +158,7 @@ int enic_getpkt(struct _Enic *regs, void ;/* nothing */ } else if (fl != ES_F_CMD) { -printf(enic: invalid saf=x%x (lo=%x)\n, saf, lo); +printf(enic: invalid saf=x%x (lo=%x, hi=%x)\n, saf, lo, hi); } }
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: martin Date: Mon Feb 24 10:47:46 UTC 2014 Modified Files: src/sys/arch/arm/xscale: ixp425_if_npe.c Log Message: Explicitly include sys/simplelock.h for now (untill Nick kills it for real), to make it compile. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/xscale/ixp425_if_npe.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/xscale/ixp425_if_npe.c diff -u src/sys/arch/arm/xscale/ixp425_if_npe.c:1.23 src/sys/arch/arm/xscale/ixp425_if_npe.c:1.24 --- src/sys/arch/arm/xscale/ixp425_if_npe.c:1.23 Sun Jul 22 14:32:50 2012 +++ src/sys/arch/arm/xscale/ixp425_if_npe.c Mon Feb 24 10:47:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ixp425_if_npe.c,v 1.23 2012/07/22 14:32:50 matt Exp $ */ +/* $NetBSD: ixp425_if_npe.c,v 1.24 2014/02/24 10:47:46 martin Exp $ */ /*- * Copyright (c) 2006 Sam Leffler. All rights reserved. @@ -28,7 +28,7 @@ #if 0 __FBSDID($FreeBSD: src/sys/arm/xscale/ixp425/if_npe.c,v 1.1 2006/11/19 23:55:23 sam Exp $); #endif -__KERNEL_RCSID(0, $NetBSD: ixp425_if_npe.c,v 1.23 2012/07/22 14:32:50 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ixp425_if_npe.c,v 1.24 2014/02/24 10:47:46 martin Exp $); /* * Intel XScale NPE Ethernet driver. @@ -57,6 +57,7 @@ __KERNEL_RCSID(0, $NetBSD: ixp425_if_np #include sys/socket.h #include sys/endian.h #include sys/ioctl.h +#include sys/simplelock.h #include sys/syslog.h #include sys/bus.h
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: martin Date: Mon Feb 24 10:50:40 UTC 2014 Modified Files: src/sys/arch/arm/xscale: ixp425_pci_space.c Log Message: Fix compilation To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/xscale/ixp425_pci_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/xscale/ixp425_pci_space.c diff -u src/sys/arch/arm/xscale/ixp425_pci_space.c:1.12 src/sys/arch/arm/xscale/ixp425_pci_space.c:1.13 --- src/sys/arch/arm/xscale/ixp425_pci_space.c:1.12 Sat Feb 22 20:33:00 2014 +++ src/sys/arch/arm/xscale/ixp425_pci_space.c Mon Feb 24 10:50:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ixp425_pci_space.c,v 1.12 2014/02/22 20:33:00 matt Exp $ */ +/* $NetBSD: ixp425_pci_space.c,v 1.13 2014/02/24 10:50:40 martin Exp $ */ /* * Copyright (c) 2003 @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ixp425_pci_space.c,v 1.12 2014/02/22 20:33:00 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ixp425_pci_space.c,v 1.13 2014/02/24 10:50:40 martin Exp $); /* * bus_space PCI functions for ixp425 @@ -373,7 +373,7 @@ _pci_io_bs_w_4(void *v, bus_space_handle /* mem bs */ int ixp425_pci_mem_bs_map(void *t, bus_addr_t bpa, bus_size_t size, - int cacheable, bus_space_handle_t *bshp) + int flags, bus_space_handle_t *bshp) { const struct pmap_devmap *pd; @@ -403,7 +403,7 @@ ixp425_pci_mem_bs_map(void *t, bus_addr_ *bshp = va + offset; const int pmapflags = - (flag (BUS_SPACE_MAP_CACHEABLE|BUS_SPACE_MAP_PREFETCHABLE)) + (flags (BUS_SPACE_MAP_CACHEABLE|BUS_SPACE_MAP_PREFETCHABLE)) ? 0 : PMAP_NOCACHE;
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Mon Feb 24 11:43:33 UTC 2014 Modified Files: src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: truncate is not a defined operation for host files To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/rump/librump/rumpvfs/rumpfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpvfs/rumpfs.c diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.124 src/sys/rump/librump/rumpvfs/rumpfs.c:1.125 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.124 Fri Feb 7 15:29:23 2014 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Mon Feb 24 11:43:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.124 2014/02/07 15:29:23 hannken Exp $ */ +/* $NetBSD: rumpfs.c,v 1.125 2014/02/24 11:43:33 pooka Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.124 2014/02/07 15:29:23 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.125 2014/02/24 11:43:33 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -965,7 +965,8 @@ rump_vop_setattr(void *v) if (vp-v_type == VREG vap-va_size != VSIZENOTSET - vap-va_size != rn-rn_dlen) { + vap-va_size != rn-rn_dlen + (rn-rn_flags RUMPNODE_ET_PHONE_HOST) == 0) { void *newdata; size_t copylen, newlen;
CVS commit: src/distrib/notes/common
Module Name:src Committed By: ozaki-r Date: Mon Feb 24 11:56:01 UTC 2014 Modified Files: src/distrib/notes/common: main Log Message: Add myself To generate a diff of this commit: cvs rdiff -u -r1.506 -r1.507 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.506 src/distrib/notes/common/main:1.507 --- src/distrib/notes/common/main:1.506 Mon Feb 24 07:23:39 2014 +++ src/distrib/notes/common/main Mon Feb 24 11:56:01 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: main,v 1.506 2014/02/24 07:23:39 skrll Exp $ +.\ $NetBSD: main,v 1.507 2014/02/24 11:56:01 ozaki-r Exp $ .\ .\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -1325,6 +1325,7 @@ If you're one of them, and would like to .It Ta Ryo ONODERA Ta Mt ry...@netbsd.org .It Ta Atsushi Onoe Ta Mt o...@netbsd.org .It Ta Greg Oster Ta Mt os...@netbsd.org +.It Ta Ryota Ozaki Ta Mt ozak...@netbsd.org .It Ta Jonathan Perkin Ta Mt ske...@netbsd.org .It Ta Fredrik Pettai Ta Mt pet...@netbsd.org .It Ta Herb Peyerl Ta Mt hpey...@netbsd.org
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Mon Feb 24 12:19:05 UTC 2014 Modified Files: src/sys/dev/ic: ahcisata_core.c ahcisatavar.h Log Message: - Only enable AHCI mode if it is not already enabled. - Add support for capturing initial CAP/CAP2/PI regs before reset (and restoring them afterwords) - Add optional callbacks for channel_start / channel_stop. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ic/ahcisata_core.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/ahcisatavar.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/ic/ahcisata_core.c diff -u src/sys/dev/ic/ahcisata_core.c:1.50 src/sys/dev/ic/ahcisata_core.c:1.51 --- src/sys/dev/ic/ahcisata_core.c:1.50 Sun Sep 8 11:47:16 2013 +++ src/sys/dev/ic/ahcisata_core.c Mon Feb 24 12:19:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_core.c,v 1.50 2013/09/08 11:47:16 matt Exp $ */ +/* $NetBSD: ahcisata_core.c,v 1.51 2014/02/24 12:19:05 jmcneill Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ahcisata_core.c,v 1.50 2013/09/08 11:47:16 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ahcisata_core.c,v 1.51 2014/02/24 12:19:05 jmcneill Exp $); #include sys/types.h #include sys/malloc.h @@ -119,6 +119,18 @@ const struct ata_bustype ahci_ata_bustyp static void ahci_intr_port(struct ahci_softc *, struct ahci_channel *); static void ahci_setup_port(struct ahci_softc *sc, int i); +static void +ahci_enable(struct ahci_softc *sc) +{ + uint32_t ghc; + + ghc = AHCI_READ(sc, AHCI_GHC); + if (!(ghc AHCI_GHC_AE)) { + ghc |= AHCI_GHC_AE; + AHCI_WRITE(sc, AHCI_GHC, ghc); + } +} + static int ahci_reset(struct ahci_softc *sc) { @@ -137,7 +149,15 @@ ahci_reset(struct ahci_softc *sc) return -1; } /* enable ahci mode */ - AHCI_WRITE(sc, AHCI_GHC, AHCI_GHC_AE); + ahci_enable(sc); + + if (sc-sc_save_init_data) { + AHCI_WRITE(sc, AHCI_CAP, sc-sc_init_data.cap); + if (sc-sc_init_data.cap2) + AHCI_WRITE(sc, AHCI_CAP2, sc-sc_init_data.cap2); + AHCI_WRITE(sc, AHCI_PI, sc-sc_init_data.ports); + } + return 0; } @@ -216,6 +236,24 @@ ahci_attach(struct ahci_softc *sc) void *cmdhp; void *cmdtblp; + if (sc-sc_save_init_data) { + ahci_enable(sc); + + sc-sc_init_data.cap = AHCI_READ(sc, AHCI_CAP); + sc-sc_init_data.ports = AHCI_READ(sc, AHCI_PI); + + ahci_rev = AHCI_READ(sc, AHCI_VS); + if (AHCI_VS_MJR(ahci_rev) 1 || + (AHCI_VS_MJR(ahci_rev) == 1 AHCI_VS_MNR(ahci_rev) = 20)) { + sc-sc_init_data.cap2 = AHCI_READ(sc, AHCI_CAP2); + } else { + sc-sc_init_data.cap2 = 0; + } + if (sc-sc_init_data.ports == 0) { + sc-sc_init_data.ports = sc-sc_ahci_ports; + } + } + if (ahci_reset(sc) != 0) return; @@ -1330,6 +1368,9 @@ ahci_channel_stop(struct ahci_softc *sc, /* XXX controller reset ? */ return; } + + if (sc-sc_channel_stop) + sc-sc_channel_stop(sc, chp); } static void @@ -1363,6 +1404,10 @@ ahci_channel_start(struct ahci_softc *sc return; } } + + if (sc-sc_channel_start) + sc-sc_channel_start(sc, chp); + /* and start controller */ p_cmd = AHCI_P_CMD_ICC_AC | AHCI_P_CMD_POD | AHCI_P_CMD_SUD | AHCI_P_CMD_FRE | AHCI_P_CMD_ST; @@ -1382,7 +1427,7 @@ ahci_timeout(void *v) struct ahci_softc *sc = (struct ahci_softc *)chp-ch_atac; #endif int s = splbio(); - AHCIDEBUG_PRINT((ahci_timeout xfer %p intr %#x\n, xfer, AHCI_READ(sc, AHCI_P_IS(chp-ch_channel))), DEBUG_INTR); + AHCIDEBUG_PRINT((ahci_timeout xfer %p intr %#x ghc %08x is %08x\n, xfer, AHCI_READ(sc, AHCI_P_IS(chp-ch_channel)), AHCI_READ(sc, AHCI_GHC), AHCI_READ(sc, AHCI_IS)), DEBUG_INTR); if ((chp-ch_flags ATACH_IRQ_WAIT) != 0) { xfer-c_flags |= C_TIMEOU; Index: src/sys/dev/ic/ahcisatavar.h diff -u src/sys/dev/ic/ahcisatavar.h:1.15 src/sys/dev/ic/ahcisatavar.h:1.16 --- src/sys/dev/ic/ahcisatavar.h:1.15 Sun Sep 8 11:47:16 2013 +++ src/sys/dev/ic/ahcisatavar.h Mon Feb 24 12:19:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisatavar.h,v 1.15 2013/09/08 11:47:16 matt Exp $ */ +/* $NetBSD: ahcisatavar.h,v 1.16 2014/02/24 12:19:05 jmcneill Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -83,6 +83,16 @@ struct ahci_softc { bus_dmamap_t ahcic_datad[AHCI_MAX_CMDS]; uint32_t ahcic_cmds_active; /* active commands */ } sc_channels[AHCI_MAX_PORTS]; + + void (*sc_channel_start)(struct ahci_softc *, struct ata_channel *); + void (*sc_channel_stop)(struct ahci_softc *, struct ata_channel *); + + bool sc_save_init_data; + struct { + uint32_t cap; + uint32_t cap2; + uint32_t ports; + } sc_init_data; }; #define AHCINAME(sc) (device_xname((sc)-sc_atac.atac_dev))
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: jmcneill Date: Mon Feb 24 12:21:27 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_ahcisata.c Log Message: Save initial CAP/CAP2/PI config over reset. Provide channel_start callback that sets up awin specific DMA regs. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/allwinner/awin_ahcisata.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/allwinner/awin_ahcisata.c diff -u src/sys/arch/arm/allwinner/awin_ahcisata.c:1.8 src/sys/arch/arm/allwinner/awin_ahcisata.c:1.9 --- src/sys/arch/arm/allwinner/awin_ahcisata.c:1.8 Sun Sep 8 11:47:50 2013 +++ src/sys/arch/arm/allwinner/awin_ahcisata.c Mon Feb 24 12:21:27 2014 @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: awin_ahcisata.c,v 1.8 2013/09/08 11:47:50 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: awin_ahcisata.c,v 1.9 2014/02/24 12:21:27 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -167,6 +167,17 @@ awin_ahci_enable(bus_space_tag_t bst, bu } static void +awin_ahci_channel_start(struct ahci_softc *sc, struct ata_channel *chp) +{ + uint32_t dma; + + dma = AHCI_READ(sc, AWIN_AHCI_DMA_REG); + dma = ~0xff00; + dma |= 0x4400; + AHCI_WRITE(sc, AWIN_AHCI_DMA_REG, dma); +} + +static void awin_ahci_attach(device_t parent, device_t self, void *aux) { struct awin_ahci_softc * const asc = device_private(self); @@ -181,6 +192,9 @@ awin_ahci_attach(device_t parent, device sc-sc_ahcit = aio-aio_core_bst; sc-sc_ahcis = loc-loc_size; sc-sc_ahci_ports = 1; + sc-sc_ahci_quirks = AHCI_QUIRK_BADPMP; + sc-sc_save_init_data = true; + sc-sc_channel_start = awin_ahci_channel_start; bus_space_subregion(aio-aio_core_bst, aio-aio_core_bsh, loc-loc_offset, loc-loc_size, sc-sc_ahcih);
CVS commit: src/sys/arch/emips/ebus
Module Name:src Committed By: martin Date: Mon Feb 24 14:26:11 UTC 2014 Modified Files: src/sys/arch/emips/ebus: clock_ebus.c Log Message: Remove the only use of __qdivrem inside kernels To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/emips/ebus/clock_ebus.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/emips/ebus/clock_ebus.c diff -u src/sys/arch/emips/ebus/clock_ebus.c:1.7 src/sys/arch/emips/ebus/clock_ebus.c:1.8 --- src/sys/arch/emips/ebus/clock_ebus.c:1.7 Sun Nov 10 18:27:15 2013 +++ src/sys/arch/emips/ebus/clock_ebus.c Mon Feb 24 14:26:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: clock_ebus.c,v 1.7 2013/11/10 18:27:15 christos Exp $ */ +/* $NetBSD: clock_ebus.c,v 1.8 2014/02/24 14:26:11 martin Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: clock_ebus.c,v 1.7 2013/11/10 18:27:15 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: clock_ebus.c,v 1.8 2014/02/24 14:26:11 martin Exp $); #include sys/param.h #include sys/kernel.h @@ -117,8 +117,6 @@ __eclock_init(device_t dev) * NB: At 10MHz, our 64bits FreeRunning is worth 58,426 years. */ -extern u_quad_t __qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq); - static int eclock_gettime(struct todr_chip_handle *todr, struct timeval *tv) @@ -140,14 +138,14 @@ eclock_gettime(struct todr_chip_handle * /* * Big fight with the compiler here, it gets very confused by 64bits. */ -#if 0 +#if 1 /* * This is in C: */ { uint64_t freeS, freeU; - freeS = free / (10 * 1000 * 1000); - freeU = free % (10 * 1000 * 1000); + freeS = free / 1000UL; + freeU = free % 1000UL; tv-tv_sec = freeS; tv-tv_usec = freeU / 10; #if 0
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: jmcneill Date: Mon Feb 24 15:47:43 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_ahcisata.c Log Message: write to vendor specific dma reg relative to the port, not the base. sata works on cubieboard2 now To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/allwinner/awin_ahcisata.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/allwinner/awin_ahcisata.c diff -u src/sys/arch/arm/allwinner/awin_ahcisata.c:1.9 src/sys/arch/arm/allwinner/awin_ahcisata.c:1.10 --- src/sys/arch/arm/allwinner/awin_ahcisata.c:1.9 Mon Feb 24 12:21:27 2014 +++ src/sys/arch/arm/allwinner/awin_ahcisata.c Mon Feb 24 15:47:43 2014 @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: awin_ahcisata.c,v 1.9 2014/02/24 12:21:27 jmcneill Exp $); +__KERNEL_RCSID(1, $NetBSD: awin_ahcisata.c,v 1.10 2014/02/24 15:47:43 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -171,10 +171,10 @@ awin_ahci_channel_start(struct ahci_soft { uint32_t dma; - dma = AHCI_READ(sc, AWIN_AHCI_DMA_REG); + dma = AHCI_READ(sc, 0x100 + AHCI_P_OFFSET(chp-ch_channel) + AWIN_AHCI_DMA_REG); dma = ~0xff00; dma |= 0x4400; - AHCI_WRITE(sc, AWIN_AHCI_DMA_REG, dma); + AHCI_WRITE(sc, 0x100 + AHCI_P_OFFSET(chp-ch_channel) + AWIN_AHCI_DMA_REG, dma); } static void
CVS commit: src/common/lib/libc
Module Name:src Committed By: martin Date: Mon Feb 24 16:15:43 UTC 2014 Modified Files: src/common/lib/libc/arch/mips/atomic: Makefile.inc Added Files: src/common/lib/libc/atomic: atomic_cas_by_cas32.c Log Message: Provide cas_16 and cas_8 emulation via cas_32 and use that for mips64 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/common/lib/libc/arch/mips/atomic/Makefile.inc cvs rdiff -u -r0 -r1.1 src/common/lib/libc/atomic/atomic_cas_by_cas32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/mips/atomic/Makefile.inc diff -u src/common/lib/libc/arch/mips/atomic/Makefile.inc:1.11 src/common/lib/libc/arch/mips/atomic/Makefile.inc:1.12 --- src/common/lib/libc/arch/mips/atomic/Makefile.inc:1.11 Fri Feb 21 19:05:33 2014 +++ src/common/lib/libc/arch/mips/atomic/Makefile.inc Mon Feb 24 16:15:43 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11 2014/02/21 19:05:33 martin Exp $ +# $NetBSD: Makefile.inc,v 1.12 2014/02/24 16:15:43 martin Exp $ .if defined(LIB) (${LIB} == kern || ${LIB} == c || ${LIB} == pthread \ || ${LIB} == rump) @@ -33,7 +33,7 @@ SRCS+= membar_ops.S .if ${MACHINE_ARCH:Mmips64*} == SRCS+= atomic_init_testset.c atomic_cas_up.S .else -SRCS+= atomic_cas.S atomic_init_cas.c +SRCS+= atomic_cas.S atomic_init_cas.c atomic_cas_by_cas32.c .endif .endif Added files: Index: src/common/lib/libc/atomic/atomic_cas_by_cas32.c diff -u /dev/null src/common/lib/libc/atomic/atomic_cas_by_cas32.c:1.1 --- /dev/null Mon Feb 24 16:15:43 2014 +++ src/common/lib/libc/atomic/atomic_cas_by_cas32.c Mon Feb 24 16:15:43 2014 @@ -0,0 +1,77 @@ +/* $NetBSD: atomic_cas_by_cas32.c,v 1.1 2014/02/24 16:15:43 martin Exp $ */ + +/*- + * Copyright (c) 2014 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +#include sys/types.h +#include sys/inttypes.h + +uint32_t _atomic_cas_32(volatile uint32_t *addr, uint32_t old, uint32_t new); +uint16_t _atomic_cas_16(volatile uint16_t *addr, uint16_t old, uint16_t new); +uint8_t _atomic_cas_8(volatile uint8_t *addr, uint8_t old, uint8_t new); + +/* + * This file provides emulation of 8 bit and 16 bit CAS operations based on + * 32 bit CAS. + */ +uint16_t +_atomic_cas_16(volatile uint16_t *addr, uint16_t old, uint16_t new) +{ + const uintptr_t base = (uintptr_t)addr ~3; + const size_t off = (uintptr_t)addr - base; + volatile uint32_t * ptr = (volatile uint32_t *)base; + const size_t shift = off*8; + const uint32_t mask = 0x0 shift; + uint32_t old32, new32; + + do { + old32 = *ptr; + new32 = (old32 ~mask) | (uint32_t)new shift; + old32 = (old32 ~mask) | (uint32_t)old shift; + } while (_atomic_cas_32(ptr, old32, new32) != old32); + return (old shift) mask; +} + +uint8_t +_atomic_cas_8(volatile uint8_t *addr, uint8_t old, uint8_t new) +{ + const uintptr_t base = (uintptr_t)addr ~3; + const size_t off = (uintptr_t)addr - base; + volatile uint32_t * ptr = (volatile uint32_t *)base; + const size_t shift = off*8; + const uint32_t mask = 0x0ff shift; + uint32_t old32, new32; + + do { + old32 = *ptr; + new32 = (old32 ~mask) | (uint32_t)new shift; + old32 = (old32 ~mask) | (uint32_t)old shift; + } while (_atomic_cas_32(ptr, old32, new32) != old32); + return (old shift) mask; +}
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: matt Date: Mon Feb 24 16:40:29 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_ahcisata.c awin_reg.h Log Message: Remove unneeded delays. for ACHI port reg, act like ahcisatareg.h (e.g. AHCI_P_AWIN_DMA(p)) To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/allwinner/awin_ahcisata.c \ src/sys/arch/arm/allwinner/awin_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/allwinner/awin_ahcisata.c diff -u src/sys/arch/arm/allwinner/awin_ahcisata.c:1.10 src/sys/arch/arm/allwinner/awin_ahcisata.c:1.11 --- src/sys/arch/arm/allwinner/awin_ahcisata.c:1.10 Mon Feb 24 15:47:43 2014 +++ src/sys/arch/arm/allwinner/awin_ahcisata.c Mon Feb 24 16:40:29 2014 @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: awin_ahcisata.c,v 1.10 2014/02/24 15:47:43 jmcneill Exp $); +__KERNEL_RCSID(1, $NetBSD: awin_ahcisata.c,v 1.11 2014/02/24 16:40:29 matt Exp $); #include sys/param.h #include sys/bus.h @@ -86,38 +86,34 @@ awin_ahci_phy_init(struct awin_ahci_soft */ delay(5000); bus_space_write_4(bst, bsh, AWIN_AHCI_RWCR_REG, 0); - delay(10); awin_reg_set_clear(bst, bsh, AWIN_AHCI_PHYCS1R_REG, __BIT(19), 0); - delay(10); + awin_reg_set_clear(bst, bsh, AWIN_AHCI_PHYCS0R_REG, __BIT(26)|__BIT(24)|__BIT(23)|__BIT(18), __BIT(25)); - delay(10); + awin_reg_set_clear(bst, bsh, AWIN_AHCI_PHYCS1R_REG, __BIT(17)|__BIT(10)|__BIT(9)|__BIT(7), __BIT(16)|__BIT(12)|__BIT(11)|__BIT(8)|__BIT(6)); - delay(10); + awin_reg_set_clear(bst, bsh, AWIN_AHCI_PHYCS1R_REG, __BIT(28)|__BIT(15), 0); - delay(10); + awin_reg_set_clear(bst, bsh, AWIN_AHCI_PHYCS1R_REG, 0, __BIT(19)); - delay(10); awin_reg_set_clear(bst, bsh, AWIN_AHCI_PHYCS0R_REG, __BIT(21)|__BIT(20), __BIT(22)); - delay(10); + awin_reg_set_clear(bst, bsh, AWIN_AHCI_PHYCS2R_REG, __BIT(9)|__BIT(8)|__BIT(5), __BIT(7)|__BIT(6)); - delay(20); - delay(5000); + delay(10); awin_reg_set_clear(bst, bsh, AWIN_AHCI_PHYCS0R_REG, __BIT(19), 0); - delay(20); timeout = 1000; do { - delay(10); + delay(1); v = bus_space_read_4(bst, bsh, AWIN_AHCI_PHYCS0R_REG); } while (--timeout __SHIFTOUT(v, __BITS(30,28)) != 2); @@ -141,7 +137,7 @@ awin_ahci_phy_init(struct awin_ahci_soft SATA PHY calibration failed (%#x)\n, v); } } - delay(15000); + delay(10); bus_space_write_4(bst, bsh, AWIN_AHCI_RWCR_REG, 7); } @@ -169,12 +165,12 @@ awin_ahci_enable(bus_space_tag_t bst, bu static void awin_ahci_channel_start(struct ahci_softc *sc, struct ata_channel *chp) { - uint32_t dma; + bus_size_t dma_reg = AHCI_P_AWIN_DMA(chp-ch_channel); - dma = AHCI_READ(sc, 0x100 + AHCI_P_OFFSET(chp-ch_channel) + AWIN_AHCI_DMA_REG); + uint32_t dma = AHCI_READ(sc, dma_reg); dma = ~0xff00; dma |= 0x4400; - AHCI_WRITE(sc, 0x100 + AHCI_P_OFFSET(chp-ch_channel) + AWIN_AHCI_DMA_REG, dma); + AHCI_WRITE(sc, dma_reg, dma); } static void @@ -224,15 +220,14 @@ awin_ahci_attach(device_t parent, device /* * Establish the interrupt */ - asc-asc_ih = intr_establish(loc-loc_intr, IPL_VM, IST_LEVEL, + asc-asc_ih = intr_establish(loc-loc_intr, IPL_BIO, IST_LEVEL, ahci_intr, sc); if (asc-asc_ih == NULL) { aprint_error_dev(self, failed to establish interrupt %d\n, loc-loc_intr); goto fail; } - aprint_normal_dev(self, interrupting on irq %d\n, - loc-loc_intr); + aprint_normal_dev(self, interrupting on irq %d\n, loc-loc_intr); ahci_attach(sc); Index: src/sys/arch/arm/allwinner/awin_reg.h diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.10 src/sys/arch/arm/allwinner/awin_reg.h:1.11 --- src/sys/arch/arm/allwinner/awin_reg.h:1.10 Fri Feb 21 22:18:47 2014 +++ src/sys/arch/arm/allwinner/awin_reg.h Mon Feb 24 16:40:29 2014 @@ -562,7 +562,7 @@ #define AWIN_EMAC_INT_TX1 __BIT(1) #define AWIN_EMAC_INT_TX0 __BIT(0) -#define AWIN_AHCI_DMA_REG 0x0070 +#define AHCI_P_AWIN_DMA(p) (0x170 + AHCI_P_OFFSET(p)) #define AWIN_AHCI_BISTAFR_REG 0x00A0 #define AWIN_AHCI_BISTCR_REG 0x00A4 #define AWIN_AHCI_BISTFCTR_REG 0x00A8
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Mon Feb 24 16:45:06 UTC 2014 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Add more inlines. Default FSR ARMv6+ bits. Add A7/A15 L2CTRL defs. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/arch/arm/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.85 src/sys/arch/arm/include/armreg.h:1.86 --- src/sys/arch/arm/include/armreg.h:1.85 Fri Jan 10 17:48:11 2014 +++ src/sys/arch/arm/include/armreg.h Mon Feb 24 16:45:06 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.85 2014/01/10 17:48:11 matt Exp $ */ +/* $NetBSD: armreg.h,v 1.86 2014/02/24 16:45:06 matt Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -532,7 +532,11 @@ #define FAULT_PERM_S0x0d /* Permission -- Section */ #define FAULT_PERM_P0x0f /* Permission -- Page */ -#define FAULT_IMPRECISE 0x400 /* Imprecise exception (XSCALE) */ +#define FAULT_LPAE 0x0200 /* (SW) used long descriptors */ +#define FAULT_IMPRECISE 0x0400 /* Imprecise exception (XSCALE) */ +#define FAULT_WRITE 0x0800 /* fault was due to write (ARMv6+) */ +#define FAULT_EXT 0x1000 /* fault was due to external abort (ARMv6+) */ +#define FAULT_CM 0x2000 /* fault was due to cache maintenance (ARMv7+) */ /* * Address of the vector page, low and high versions. @@ -608,6 +612,10 @@ #define CORTEX_CNTENC_C __BIT(31) /* Disables the cycle counter */ #define CORTEX_CNTOFL_C __BIT(31) /* Cycle counter overflow flag */ +/* Defines for ARM Cortex A7/A15 L2CTRL */ +#define L2CTRL_NUMCPU __BITS(25,24) // numcpus - 1 +#define L2CTRL_ICPRES __BIT(23) // Interrupt Controller is present + /* Translate Table Base Control Register */ #define TTBCR_S_EAE __BIT(31) // Extended Address Extension #define TTBCR_S_PD1 __BIT(5) // Don't use TTBR1 @@ -736,6 +744,9 @@ ARMREG_READ_INLINE(ttbr1, p15,0,%0,c2,c ARMREG_WRITE_INLINE(ttbr1, p15,0,%0,c2,c0,1) /* Translation Table Base Register 1 */ ARMREG_READ_INLINE(ttbcr, p15,0,%0,c2,c0,2) /* Translation Table Base Register */ ARMREG_WRITE_INLINE(ttbcr, p15,0,%0,c2,c0,2) /* Translation Table Base Register */ +/* cp15 c3 registers */ +ARMREG_READ_INLINE(dacr, p15,0,%0,c3,c0,0) /* Domain Access Control Register */ +ARMREG_WRITE_INLINE(dacr, p15,0,%0,c3,c0,0) /* Domain Access Control Register */ /* cp15 c5 registers */ ARMREG_READ_INLINE(dfsr, p15,0,%0,c5,c0,0) /* Data Fault Status Register */ ARMREG_READ_INLINE(ifsr, p15,0,%0,c5,c0,1) /* Instruction Fault Status Register */ @@ -753,6 +764,9 @@ ARMREG_WRITE_INLINE(bpiall, p15,0,%0,c5 ARMREG_WRITE_INLINE(dcimvac, p15,0,%0,c7,c6,1) /* Data Invalidate MVA to PoC */ ARMREG_WRITE_INLINE(dcisw, p15,0,%0,c7,c6,2) /* Data Invalidate Set/Way */ ARMREG_WRITE_INLINE(ats1cpr, p15,0,%0,c7,c8,0) /* AddrTrans CurState PL1 Read */ +ARMREG_WRITE_INLINE(ats1cpw, p15,0,%0,c7,c8,1) /* AddrTrans CurState PL1 Write */ +ARMREG_WRITE_INLINE(ats1cur, p15,0,%0,c7,c8,2) /* AddrTrans CurState PL0 Read */ +ARMREG_WRITE_INLINE(ats1cuw, p15,0,%0,c7,c8,3) /* AddrTrans CurState PL0 Write */ ARMREG_WRITE_INLINE(dccmvac, p15,0,%0,c7,c10,1) /* Data Clean MVA to PoC */ ARMREG_WRITE_INLINE(dccsw, p15,0,%0,c7,c10,2) /* Data Clean Set/Way */ ARMREG_WRITE_INLINE(dsb, p15,0,%0,c7,c10,4) /* Data Synchronization Barrier */ @@ -788,6 +802,7 @@ ARMREG_READ_INLINE(pmccntr, p15,0,%0,c9 ARMREG_WRITE_INLINE(pmccntr, p15,0,%0,c9,c13,0) /* PMC Cycle Counter */ ARMREG_READ_INLINE(pmuserenr, p15,0,%0,c9,c14,0) /* PMC User Enable */ ARMREG_WRITE_INLINE(pmuserenr, p15,0,%0,c9,c14,0) /* PMC User Enable */ +ARMREG_READ_INLINE(l2ctrl, p15,1,%0,c9,c0,2) /* A7/A15 L2 Control Register */ /* cp15 c13 registers */ ARMREG_READ_INLINE(contextidr, p15,0,%0,c13,c0,1) /* Context ID Register */ ARMREG_WRITE_INLINE(contextidr, p15,0,%0,c13,c0,1) /* Context ID Register */
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: matt Date: Mon Feb 24 16:50:49 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_board.c Log Message: Extract # of cores from L2CTRL for MULTIPROCESSOR kernels To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/awin_board.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/allwinner/awin_board.c diff -u src/sys/arch/arm/allwinner/awin_board.c:1.7 src/sys/arch/arm/allwinner/awin_board.c:1.8 --- src/sys/arch/arm/allwinner/awin_board.c:1.7 Thu Feb 20 21:46:14 2014 +++ src/sys/arch/arm/allwinner/awin_board.c Mon Feb 24 16:50:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_board.c,v 1.7 2014/02/20 21:46:14 matt Exp $ */ +/* $NetBSD: awin_board.c,v 1.8 2014/02/24 16:50:49 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.7 2014/02/20 21:46:14 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.8 2014/02/24 16:50:49 matt Exp $); #include sys/param.h #include sys/bus.h @@ -46,6 +46,8 @@ __KERNEL_RCSID(1, $NetBSD: awin_board.c #include net/if.h #include net/if_ether.h +#include arm/locore.h + #include arm/mainbus/mainbus.h #include arm/allwinner/awin_reg.h @@ -163,6 +165,20 @@ awin_bootstrap(vaddr_t iobase, vaddr_t u #ifdef VERBOSE_INIT_ARM printf(\n); #endif + +#ifdef MULTIPROCESSOR +#ifdef VERBOSE_INIT_ARM + uint32_t s0 = bus_space_read_4(awin_bs_tag, awin_core_bsh, + AWIN_CPUCFG_OFFSET + AWIN_CPUCFG_CPU0_STATUS_REG); + uint32_t s1 = bus_space_read_4(awin_bs_tag, awin_core_bsh, + AWIN_CPUCFG_OFFSET + AWIN_CPUCFG_CPU1_STATUS_REG); + printf(%s: cpu status: 0=%#x 1=%#x\n, __func__, s0, s1); +#endif + arm_cpu_max = 1 + __SHIFTOUT(armreg_l2ctrl_read(), L2CTRL_NUMCPU); +#ifdef VERBOSE_INIT_ARM + printf(%s: %d cpus present\n, __func__, arm_cpu_max); +#endif +#endif } #ifdef MULTIPROCESSOR
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: christos Date: Mon Feb 24 16:57:57 UTC 2014 Modified Files: src/sys/arch/arm/include: ansi.h aout_machdep.h apmvar.h int_types.h limits.h proc.h vfpreg.h Log Message: consistency in include protection To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/include/ansi.h \ src/sys/arch/arm/include/proc.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/include/aout_machdep.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/include/apmvar.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/include/int_types.h cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/include/limits.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/vfpreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/ansi.h diff -u src/sys/arch/arm/include/ansi.h:1.16 src/sys/arch/arm/include/ansi.h:1.17 --- src/sys/arch/arm/include/ansi.h:1.16 Tue Jan 28 19:18:32 2014 +++ src/sys/arch/arm/include/ansi.h Mon Feb 24 11:57:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.16 2014/01/29 00:18:32 matt Exp $ */ +/* $NetBSD: ansi.h,v 1.17 2014/02/24 16:57:57 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -31,8 +31,8 @@ * from: @(#)ansi.h 8.2 (Berkeley) 1/4/94 */ -#ifndef _ARM_ANSI_H_ -#define _ARM_ANSI_H_ +#ifndef _ARM_ANSI_H_ +#define _ARM_ANSI_H_ #include sys/cdefs.h Index: src/sys/arch/arm/include/proc.h diff -u src/sys/arch/arm/include/proc.h:1.16 src/sys/arch/arm/include/proc.h:1.17 --- src/sys/arch/arm/include/proc.h:1.16 Tue Jan 28 19:42:15 2014 +++ src/sys/arch/arm/include/proc.h Mon Feb 24 11:57:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.16 2014/01/29 00:42:15 matt Exp $ */ +/* $NetBSD: proc.h,v 1.17 2014/02/24 16:57:57 christos Exp $ */ /* * Copyright (c) 1994 Mark Brinicombe. @@ -32,8 +32,8 @@ * SUCH DAMAGE. */ -#ifndef _ARM_PROC_H_ -#define _ARM_PROC_H_ +#ifndef _ARM_PROC_H_ +#define _ARM_PROC_H_ /* * Machine-dependent part of the proc structure for arm. Index: src/sys/arch/arm/include/aout_machdep.h diff -u src/sys/arch/arm/include/aout_machdep.h:1.6 src/sys/arch/arm/include/aout_machdep.h:1.7 --- src/sys/arch/arm/include/aout_machdep.h:1.6 Tue Jan 28 19:42:15 2014 +++ src/sys/arch/arm/include/aout_machdep.h Mon Feb 24 11:57:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: aout_machdep.h,v 1.6 2014/01/29 00:42:15 matt Exp $ */ +/* $NetBSD: aout_machdep.h,v 1.7 2014/02/24 16:57:57 christos Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -32,8 +32,8 @@ * SUCH DAMAGE. */ -#ifndef _ARM_AOUT_MACHDEP_H_ -#define _ARM_AOUT_MACHDEP_H_ +#ifndef _ARM_AOUT_MACHDEP_H_ +#define _ARM_AOUT_MACHDEP_H_ #define AOUT_LDPGSZ 4096 Index: src/sys/arch/arm/include/apmvar.h diff -u src/sys/arch/arm/include/apmvar.h:1.1 src/sys/arch/arm/include/apmvar.h:1.2 --- src/sys/arch/arm/include/apmvar.h:1.1 Wed May 1 23:56:40 2013 +++ src/sys/arch/arm/include/apmvar.h Mon Feb 24 11:57:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: apmvar.h,v 1.1 2013/05/02 03:56:40 matt Exp $ */ +/* $NetBSD: apmvar.h,v 1.2 2014/02/24 16:57:57 christos Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -25,10 +25,10 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __ZAURUS_APMVAR_H__ -#define __ZAURUS_APMVAR_H__ +#ifndef _ARM_APMVAR_H_ +#define _ARM_APMVAR_H_ #include dev/apm/apmbios.h #include dev/apm/apmio.h -#endif /* __ZAURUS_APMVAR_H__ */ +#endif /* _ARM_APMVAR_H_ */ Index: src/sys/arch/arm/include/int_types.h diff -u src/sys/arch/arm/include/int_types.h:1.13 src/sys/arch/arm/include/int_types.h:1.14 --- src/sys/arch/arm/include/int_types.h:1.13 Fri Jan 31 06:37:13 2014 +++ src/sys/arch/arm/include/int_types.h Mon Feb 24 11:57:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.13 2014/01/31 11:37:13 matt Exp $ */ +/* $NetBSD: int_types.h,v 1.14 2014/02/24 16:57:57 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -29,8 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _ARM_INT_TYPES_H_ -#define _ARM_INT_TYPES_H_ +#ifndef _ARM_INT_TYPES_H_ +#define _ARM_INT_TYPES_H_ #include sys/cdefs.h Index: src/sys/arch/arm/include/limits.h diff -u src/sys/arch/arm/include/limits.h:1.17 src/sys/arch/arm/include/limits.h:1.18 --- src/sys/arch/arm/include/limits.h:1.17 Tue Jan 28 20:40:35 2014 +++ src/sys/arch/arm/include/limits.h Mon Feb 24 11:57:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: limits.h,v 1.17 2014/01/29 01:40:35 matt Exp $ */ +/* $NetBSD: limits.h,v 1.18 2014/02/24 16:57:57 christos Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -31,8 +31,8 @@ * from: @(#)limits.h 7.2 (Berkeley) 6/28/90 */ -#ifndef _ARM_LIMITS_H_ -#define _ARM_LIMITS_H_ +#ifndef _ARM_LIMITS_H_ +#define _ARM_LIMITS_H_ #include sys/featuretest.h Index: src/sys/arch/arm/include/vfpreg.h diff -u
CVS commit: src/common/lib/libc/atomic
Module Name:src Committed By: martin Date: Mon Feb 24 17:18:27 UTC 2014 Modified Files: src/common/lib/libc/atomic: atomic_init_testset.c Log Message: Provide CAS variants for 16 and 8 bit when running with more that 1 cpu To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/common/lib/libc/atomic/atomic_init_testset.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/atomic/atomic_init_testset.c diff -u src/common/lib/libc/atomic/atomic_init_testset.c:1.13 src/common/lib/libc/atomic/atomic_init_testset.c:1.14 --- src/common/lib/libc/atomic/atomic_init_testset.c:1.13 Sat Feb 22 17:08:30 2014 +++ src/common/lib/libc/atomic/atomic_init_testset.c Mon Feb 24 17:18:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_init_testset.c,v 1.13 2014/02/22 17:08:30 martin Exp $ */ +/* $NetBSD: atomic_init_testset.c,v 1.14 2014/02/24 17:18:27 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: atomic_init_testset.c,v 1.13 2014/02/22 17:08:30 martin Exp $); +__RCSID($NetBSD: atomic_init_testset.c,v 1.14 2014/02/24 17:18:27 martin Exp $); #include atomic_op_namespace.h @@ -53,6 +53,12 @@ __RCSID($NetBSD: atomic_init_testset.c, #define I128 I16 I16 I16 I16 I16 I16 I16 I16 static __cpu_simple_lock_t atomic_locks[128] = { I128 }; +/* + * Pick a lock out of above array depending on the object address + * passed. Most variables used atomically will not be in the same + * cacheline - and if they are, using the same lock is fine. + */ +#define HASH(PTR) (((uintptr_t)(PTR) 3) 127) #ifdef __HAVE_ASM_ATOMIC_CAS_UP extern uint32_t _atomic_cas_up(volatile uint32_t *, uint32_t, uint32_t); @@ -143,7 +149,41 @@ _atomic_cas_mp(volatile uint32_t *ptr, u __cpu_simple_lock_t *lock; uint32_t ret; - lock = atomic_locks[((uintptr_t)ptr 3) 127]; + lock = atomic_locks[HASH(ptr)]; + __cpu_simple_lock(lock); + ret = *ptr; + if (__predict_true(ret == old)) { + *ptr = new; + } + __cpu_simple_unlock(lock); + + return ret; +} + +static uint16_t +_atomic_cas_16_mp(volatile uint16_t *ptr, uint16_t old, uint16_t new) +{ + __cpu_simple_lock_t *lock; + uint16_t ret; + + lock = atomic_locks[HASH(ptr)]; + __cpu_simple_lock(lock); + ret = *ptr; + if (__predict_true(ret == old)) { + *ptr = new; + } + __cpu_simple_unlock(lock); + + return ret; +} + +static uint8_t +_atomic_cas_8_mp(volatile uint8_t *ptr, uint8_t old, uint8_t new) +{ + __cpu_simple_lock_t *lock; + uint8_t ret; + + lock = atomic_locks[HASH(ptr)]; __cpu_simple_lock(lock); ret = *ptr; if (__predict_true(ret == old)) { @@ -186,6 +226,8 @@ __libc_atomic_init(void) size_t len; _atomic_cas_fn = _atomic_cas_mp; + _atomic_cas_16_fn = _atomic_cas_16_mp; + _atomic_cas_8_fn = _atomic_cas_8_mp; mib[0] = CTL_HW; mib[1] = HW_NCPU;
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Mon Feb 24 19:22:14 UTC 2014 Modified Files: src/sys/rump: listsrcdirs Log Message: +rump_wmd To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/rump/listsrcdirs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/listsrcdirs diff -u src/sys/rump/listsrcdirs:1.12 src/sys/rump/listsrcdirs:1.13 --- src/sys/rump/listsrcdirs:1.12 Fri Dec 20 10:13:24 2013 +++ src/sys/rump/listsrcdirs Mon Feb 24 19:22:14 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: listsrcdirs,v 1.12 2013/12/20 10:13:24 pooka Exp $ +# $NetBSD: listsrcdirs,v 1.13 2014/02/24 19:22:14 pooka Exp $ # # @@ -32,7 +32,8 @@ precho src/external/cddl/ osnet precho src/external/historical/ nawk precho src/usr.bin/ make xinstall config mktemp sed tsort precho src/usr.bin/ lorder join cksum m4 mkdep Makefile.inc -precho src/usr.bin/ rump_server rump_allserver shmif_dumpbus +precho src/usr.bin/ rump_server rump_allserver rump_wmd +precho src/usr.bin/ shmif_dumpbus precho src/usr.sbin/ mtree # If -c is given, use CVS syntax to exclude large subdirectories
CVS commit: othersrc/external/bsd/transit
Module Name:othersrc Committed By: agc Date: Mon Feb 24 21:05:18 UTC 2014 Modified Files: othersrc/external/bsd/transit/bin: Makefile othersrc/external/bsd/transit/dist: main.c transit.c transit.h Log Message: Update transit to version 20140223 + properly escape valid JSON strings when converting To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/transit/bin/Makefile cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/transit/dist/main.c \ othersrc/external/bsd/transit/dist/transit.c \ othersrc/external/bsd/transit/dist/transit.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/transit/bin/Makefile diff -u othersrc/external/bsd/transit/bin/Makefile:1.1.1.1 othersrc/external/bsd/transit/bin/Makefile:1.2 --- othersrc/external/bsd/transit/bin/Makefile:1.1.1.1 Mon Feb 24 05:59:13 2014 +++ othersrc/external/bsd/transit/bin/Makefile Mon Feb 24 21:05:18 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.1.1 2014/02/24 05:59:13 agc Exp $ +# $NetBSD: Makefile,v 1.2 2014/02/24 21:05:18 agc Exp $ .include bsd.own.mk @@ -83,3 +83,8 @@ t: ${PROG} env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d 12.enc 12.out diff 12.expected 12.out rm -f 12.enc 12.out + @echo 13. json structured data + env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -j '{field1:[potatoes\\,tomatoes,anykindoftoes,[1,2,3,4,sublist,{field1.1:11,field1.2:twotwo}]],field2:[quayle,bush,shrub,reagan,[3,nothing],[4,4,4,4,4,5,6]]}' 13.enc + env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d 13.enc 13.out + diff 13.expected 13.out + rm -f 13.enc 13.out Index: othersrc/external/bsd/transit/dist/main.c diff -u othersrc/external/bsd/transit/dist/main.c:1.1.1.1 othersrc/external/bsd/transit/dist/main.c:1.2 --- othersrc/external/bsd/transit/dist/main.c:1.1.1.1 Mon Feb 24 05:59:13 2014 +++ othersrc/external/bsd/transit/dist/main.c Mon Feb 24 21:05:18 2014 @@ -35,7 +35,7 @@ #define PROGRAM_NAME transit #define PROGRAM_AUTHOR tran...@agc.ac -#define PROGRAM_VERSION 20140222 +#define PROGRAM_VERSION 20140223 static char * Index: othersrc/external/bsd/transit/dist/transit.c diff -u othersrc/external/bsd/transit/dist/transit.c:1.1.1.1 othersrc/external/bsd/transit/dist/transit.c:1.2 --- othersrc/external/bsd/transit/dist/transit.c:1.1.1.1 Mon Feb 24 05:59:13 2014 +++ othersrc/external/bsd/transit/dist/transit.c Mon Feb 24 21:05:18 2014 @@ -284,6 +284,9 @@ transit_read_json(transit_t *t, const ch return (int)(cp - json); case '': for (i = 1, cp = __UNCONST(json[i]) ; json[i] != '' ; i++) { +if (json[i] == '\\') { + i += 1; +} } transit_encode_string(t, json[1], (size_t)(json[i] - cp)); return i + 1; Index: othersrc/external/bsd/transit/dist/transit.h diff -u othersrc/external/bsd/transit/dist/transit.h:1.1.1.1 othersrc/external/bsd/transit/dist/transit.h:1.2 --- othersrc/external/bsd/transit/dist/transit.h:1.1.1.1 Mon Feb 24 05:59:13 2014 +++ othersrc/external/bsd/transit/dist/transit.h Mon Feb 24 21:05:18 2014 @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TRANSIT_H_ -#define TRANSIT_H_ 20140222 +#define TRANSIT_H_ 20140223 #include sys/types.h
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: joerg Date: Mon Feb 24 21:14:13 UTC 2014 Modified Files: src/distrib/sets/lists/comp: md.sparc64 Log Message: Fix compat entries. To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/distrib/sets/lists/comp/md.sparc64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/md.sparc64 diff -u src/distrib/sets/lists/comp/md.sparc64:1.179 src/distrib/sets/lists/comp/md.sparc64:1.180 --- src/distrib/sets/lists/comp/md.sparc64:1.179 Sat Feb 1 17:01:35 2014 +++ src/distrib/sets/lists/comp/md.sparc64 Mon Feb 24 21:14:13 2014 @@ -1,7 +1,7 @@ -# $NetBSD: md.sparc64,v 1.179 2014/02/01 17:01:35 nakayama Exp $ -./usr/include/g++/bits/sparc comp-c-include +# $NetBSD: md.sparc64,v 1.180 2014/02/24 21:14:13 joerg Exp $ +./usr/include/g++/bits/sparc comp-c-include gcccmds,gcc=48,compat ./usr/include/g++/bits/sparc/c++config.h comp-c-include gcccmds,gcc=48,compat -./usr/include/g++/bits/sparc64 comp-c-include +./usr/include/g++/bits/sparc64 comp-c-include gcccmds,gcc=48,compat ./usr/include/g++/bits/sparc64/c++config.h comp-c-include gcccmds,gcc=48,compat ./usr/include/gcc-4.5/tgmath.h comp-c-include gcccmds,gcc=45 ./usr/include/gcc-4.8/tgmath.h comp-c-include gcccmds,gcc=48
CVS commit: src/sys/arch/emips/stand/common
Module Name:src Committed By: christos Date: Mon Feb 24 22:31:56 UTC 2014 Modified Files: src/sys/arch/emips/stand/common: clock.c common.h enic.c prom_iface.c putchar.c Log Message: make this compile To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/emips/stand/common/clock.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/emips/stand/common/common.h \ src/sys/arch/emips/stand/common/enic.c \ src/sys/arch/emips/stand/common/prom_iface.c \ src/sys/arch/emips/stand/common/putchar.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/emips/stand/common/clock.c diff -u src/sys/arch/emips/stand/common/clock.c:1.1 src/sys/arch/emips/stand/common/clock.c:1.2 --- src/sys/arch/emips/stand/common/clock.c:1.1 Tue Jan 25 20:18:54 2011 +++ src/sys/arch/emips/stand/common/clock.c Mon Feb 24 17:31:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.1 2011/01/26 01:18:54 pooka Exp $ */ +/* $NetBSD: clock.c,v 1.2 2014/02/24 22:31:56 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -33,11 +33,12 @@ #include sys/types.h #include machine/emipsreg.h +#include lib/libsa/net.h #include stand/common/common.h -long -getsecs() +satime_t +getsecs(void) { struct _Tc *Tc = (struct _Tc *)TIMER_DEFAULT_ADDRESS; uint64_t now; Index: src/sys/arch/emips/stand/common/common.h diff -u src/sys/arch/emips/stand/common/common.h:1.2 src/sys/arch/emips/stand/common/common.h:1.3 --- src/sys/arch/emips/stand/common/common.h:1.2 Thu Feb 6 13:43:41 2014 +++ src/sys/arch/emips/stand/common/common.h Mon Feb 24 17:31:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: common.h,v 1.2 2014/02/06 18:43:41 christos Exp $ */ +/* $NetBSD: common.h,v 1.3 2014/02/24 22:31:56 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -43,9 +43,6 @@ extern int debug; /* only used for netwo /* startprog.S */ extern void startprog (int, int, int, char **, int, const void *, int, int); -/* clock.c */ -extern long getsecs (void); - /* init_board.c */ #define BOARD_HAS_DISK0 0x01 #define BOARD_HAS_DISK1 0x02 @@ -69,5 +66,8 @@ extern int enic_present(int); /* print.c */ extern void xputchar(int); +/* putchar.c */ +extern void putchar(int); + /* vers.c (generated by newvers.sh) */ extern const char bootprog_rev[]; Index: src/sys/arch/emips/stand/common/enic.c diff -u src/sys/arch/emips/stand/common/enic.c:1.2 src/sys/arch/emips/stand/common/enic.c:1.3 --- src/sys/arch/emips/stand/common/enic.c:1.2 Mon Feb 24 03:00:52 2014 +++ src/sys/arch/emips/stand/common/enic.c Mon Feb 24 17:31:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: enic.c,v 1.2 2014/02/24 08:00:52 martin Exp $ */ +/* $NetBSD: enic.c,v 1.3 2014/02/24 22:31:56 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -69,6 +69,10 @@ #include start.h #include machine/emipsreg.h + +#include start.h +#include common.h + #define the_enic ((struct _Enic *)ETHERNET_DEFAULT_ADDRESS) /* forward declarations */ @@ -100,7 +104,8 @@ static void dump_packet(void *, int); /* Send a packet */ -static int enic_putpkt(struct _Enic *regs, void *buf, int bytes) +static int +enic_putpkt(struct _Enic *regs, void *buf, int bytes) { paddr_t phys = kvtophys(buf); @@ -113,7 +118,8 @@ static int enic_putpkt(struct _Enic *reg /* Get a packet */ -int enic_getpkt(struct _Enic *regs, void *buf, int bytes, int timeo) +static int +enic_getpkt(struct _Enic *regs, void *buf, int bytes, int timeo) { paddr_t phys; unsigned int isr, saf, hi, lo, fl; @@ -143,8 +149,9 @@ int enic_getpkt(struct _Enic *regs, void /* beware, order matters */ saf = regs-SizeAndFlags; -hi = regs-BufferAddressHi32; /* BUGBUG 64bit */ -lo = regs-BufferAddressLo32; /* this pops the fifo */ +hi = regs-BufferAddressHi32; /* BUGBUG 64bit */ +lo = regs-BufferAddressLo32; /* this pops the fifo */ + __USE(hi); fl = saf (ES_F_MASK ~ ES_F_DONE); @@ -182,7 +189,7 @@ static int enic_getmac(struct _Enic *reg regs-Control = EC_RESET; Delay(1); - regs-Control = regs-Control (~EC_RXDIS); +regs-Control = regs-Control (~EC_RXDIS); buffer[0] = ENIC_CMD_GET_ADDRESS; @@ -208,10 +215,11 @@ static int enic_getmac(struct _Enic *reg /* Exported interface */ -int enic_present(int unit) +int +enic_present(int unit) { - if ((unit != 0) || (the_enic-Tag != PMTTAG_ETHERNET)) -return 0; +if ((unit != 0) || (the_enic-Tag != PMTTAG_ETHERNET)) + return 0; return 1; } Index: src/sys/arch/emips/stand/common/prom_iface.c diff -u src/sys/arch/emips/stand/common/prom_iface.c:1.2 src/sys/arch/emips/stand/common/prom_iface.c:1.3 --- src/sys/arch/emips/stand/common/prom_iface.c:1.2 Mon Feb 24 02:50:22 2014 +++ src/sys/arch/emips/stand/common/prom_iface.c Mon Feb 24 17:31:56
CVS commit: src/sys/arch/emips/stand/common
Module Name:src Committed By: christos Date: Mon Feb 24 22:34:08 UTC 2014 Modified Files: src/sys/arch/emips/stand/common: enic.c prom_iface.c Log Message: make more things static, remove dup decls To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/emips/stand/common/enic.c \ src/sys/arch/emips/stand/common/prom_iface.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/emips/stand/common/enic.c diff -u src/sys/arch/emips/stand/common/enic.c:1.3 src/sys/arch/emips/stand/common/enic.c:1.4 --- src/sys/arch/emips/stand/common/enic.c:1.3 Mon Feb 24 17:31:56 2014 +++ src/sys/arch/emips/stand/common/enic.c Mon Feb 24 17:34:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: enic.c,v 1.3 2014/02/24 22:31:56 christos Exp $ */ +/* $NetBSD: enic.c,v 1.4 2014/02/24 22:34:08 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -66,7 +66,6 @@ #include lib/libsa/netif.h #include lib/libkern/libkern.h -#include start.h #include machine/emipsreg.h @@ -82,8 +81,6 @@ static void enicinit (struct iodesc *, v static int enicget (struct iodesc *, void *, size_t, saseconds_t); static int enicput (struct iodesc *, void *, size_t); static void enicend (struct netif *); -int enic_getpkt(struct _Enic *regs, void *buf, int bytes, int timeo); -int enic_present(int unit); #ifdef NET_DEBUG static void dump_packet(void *, int); Index: src/sys/arch/emips/stand/common/prom_iface.c diff -u src/sys/arch/emips/stand/common/prom_iface.c:1.3 src/sys/arch/emips/stand/common/prom_iface.c:1.4 --- src/sys/arch/emips/stand/common/prom_iface.c:1.3 Mon Feb 24 17:31:56 2014 +++ src/sys/arch/emips/stand/common/prom_iface.c Mon Feb 24 17:34:08 2014 @@ -58,9 +58,6 @@ void epmc_halt(void); void save_locore(void); void restore_locore(void); -void *nope(void); -void real_halt(void*); -void halt(int *unused, int howto); static void *nope(void) {return NULL;} int getchar(void){return GetChar();}
CVS commit: src/sys/arch/arm
Module Name:src Committed By: matt Date: Mon Feb 24 23:54:10 UTC 2014 Modified Files: src/sys/arch/arm/arm: core_machdep.c src/sys/arch/arm/include: elf_machdep.h Log Message: If we are dumping a EABI coredump, set the version to EABI5. If we are dumping a BE coredump on a BE8 system, set the BE8 flag. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/arm/core_machdep.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/elf_machdep.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/arm/core_machdep.c diff -u src/sys/arch/arm/arm/core_machdep.c:1.4 src/sys/arch/arm/arm/core_machdep.c:1.5 --- src/sys/arch/arm/arm/core_machdep.c:1.4 Sat Jan 4 00:10:02 2014 +++ src/sys/arch/arm/arm/core_machdep.c Mon Feb 24 23:54:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: core_machdep.c,v 1.4 2014/01/04 00:10:02 dsl Exp $ */ +/* $NetBSD: core_machdep.c,v 1.5 2014/02/24 23:54:10 matt Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -37,7 +37,10 @@ #include sys/param.h -__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.4 2014/01/04 00:10:02 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.5 2014/02/24 23:54:10 matt Exp $); + +#include opt_execfmt.h +#include opt_compat_netbsd32.h #include sys/core.h #include sys/exec.h @@ -49,6 +52,13 @@ __KERNEL_RCSID(0, $NetBSD: core_machdep #include sys/exec_aout.h /* for MID_* */ +#ifdef EXEC_ELF32 +#include sys/exec_elf.h +#ifdef COMPAT_NETBSD32 +#include compat/netbsd32/netbsd32_exec.h +#endif +#endif + #include machine/reg.h @@ -96,3 +106,33 @@ cpu_coredump(struct lwp *l, struct cored return coredump_write(iocookie, UIO_SYSSPACE, cpustate, sizeof(cpustate)); } + +#ifdef EXEC_ELF32 +void +arm_netbsd_elf32_coredump_setup(struct lwp *l, void *arg) +{ +#if defined(__ARMEB__) || defined(__ARM_EABI__) || defined(COMPAT_NETBSD32) + Elf_Ehdr * const eh = arg; +#if defined(__ARM_EABI__) || defined(COMPAT_NETBSD32) + struct proc * const p = l-l_proc; + +#ifdef __ARM_EABI__ + if (p-p_emul == emul_netbsd) { + eh-e_flags |= EF_ARM_EABI_VER5; + } +#elif defined(COMPAT_NETBSD32) + if (p-p_emul == emul_netbsd32) { + eh-e_flags |= EF_ARM_EABI_VER5; + } +#endif +#endif /* __ARM_EABI__ || COMPAT_NETBSD32 */ +#ifdef __ARMEB__ +if (CPU_IS_ARMV7_P() + || (CPU_IS_ARMV6_P() + (armreg_sctrl_read() CPU_CONTROL_BEND_ENABLE) == 0)) { + eh-e_flags |= EF_ARM_BE8; + } +#endif +#endif +} +#endif Index: src/sys/arch/arm/include/elf_machdep.h diff -u src/sys/arch/arm/include/elf_machdep.h:1.15 src/sys/arch/arm/include/elf_machdep.h:1.16 --- src/sys/arch/arm/include/elf_machdep.h:1.15 Wed Jan 29 19:00:08 2014 +++ src/sys/arch/arm/include/elf_machdep.h Mon Feb 24 23:54:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.15 2014/01/29 19:00:08 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.16 2014/02/24 23:54:09 matt Exp $ */ #ifndef _ARM_ELF_MACHDEP_H_ #define _ARM_ELF_MACHDEP_H_ @@ -147,12 +147,14 @@ #ifdef _KERNEL #ifdef ELFSIZE #define ELF_MD_PROBE_FUNC ELFNAME2(arm_netbsd,probe) +#define ELF_MD_COREDUMP_FUNC ELFNAME2(arm_netbsd,coredump_setup) #endif struct exec_package; int arm_netbsd_elf32_probe(struct lwp *, struct exec_package *, void *, char *, vaddr_t *); +void arm_netbsd_elf32_coredump_setup(struct lwp *, void *); #endif #endif /* _ARM_ELF_MACHDEP_H_ */
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: jmcneill Date: Tue Feb 25 00:08:29 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_io.c awin_reg.h awin_var.h files.awin Added Files: src/sys/arch/arm/allwinner: awin_mmc.c Removed Files: src/sys/arch/arm/allwinner: awin_sdhc.c Log Message: Add Allwinner SD/MMC driver. No DMA yet. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/allwinner/awin_io.c \ src/sys/arch/arm/allwinner/files.awin cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/allwinner/awin_mmc.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/allwinner/awin_reg.h cvs rdiff -u -r1.4 -r0 src/sys/arch/arm/allwinner/awin_sdhc.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/awin_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/allwinner/awin_io.c diff -u src/sys/arch/arm/allwinner/awin_io.c:1.6 src/sys/arch/arm/allwinner/awin_io.c:1.7 --- src/sys/arch/arm/allwinner/awin_io.c:1.6 Thu Feb 20 21:48:38 2014 +++ src/sys/arch/arm/allwinner/awin_io.c Tue Feb 25 00:08:29 2014 @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: awin_io.c,v 1.6 2014/02/20 21:48:38 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: awin_io.c,v 1.7 2014/02/25 00:08:29 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -104,11 +104,11 @@ static const struct awin_locators awin_l { awinwdt, OFFANDSIZE(TMR), NOPORT, NOINTR, AANY }, { awinusb, OFFANDSIZE(USB1), 0, NOINTR, AANY }, { awinusb, OFFANDSIZE(USB2), 1, NOINTR, AANY }, - { sdhc, OFFANDSIZE(SDMMC0), 0, AWIN_IRQ_SDMMC0, AANY }, - { sdhc, OFFANDSIZE(SDMMC1), 1, AWIN_IRQ_SDMMC1, AANY }, - { sdhc, OFFANDSIZE(SDMMC2), 2, AWIN_IRQ_SDMMC2, AANY }, - { sdhc, OFFANDSIZE(SDMMC3), 3, AWIN_IRQ_SDMMC3, AANY }, - { sdhc, OFFANDSIZE(SDMMC1), 4, AWIN_IRQ_SDMMC1, AANY }, + { awinmmc, OFFANDSIZE(SDMMC0), 0, AWIN_IRQ_SDMMC0, AANY }, + { awinmmc, OFFANDSIZE(SDMMC1), 1, AWIN_IRQ_SDMMC1, AANY }, + { awinmmc, OFFANDSIZE(SDMMC2), 2, AWIN_IRQ_SDMMC2, AANY }, + { awinmmc, OFFANDSIZE(SDMMC3), 3, AWIN_IRQ_SDMMC3, AANY }, + { awinmmc, OFFANDSIZE(SDMMC1), 4, AWIN_IRQ_SDMMC1, AANY }, { ahcisata, OFFANDSIZE(SATA), NOPORT, AWIN_IRQ_SATA, AANY }, { awiniic, OFFANDSIZE(TWI0), 0, AWIN_IRQ_TWI0, AANY }, { awiniic, OFFANDSIZE(TWI1), 1, AWIN_IRQ_TWI1, AANY }, Index: src/sys/arch/arm/allwinner/files.awin diff -u src/sys/arch/arm/allwinner/files.awin:1.6 src/sys/arch/arm/allwinner/files.awin:1.7 --- src/sys/arch/arm/allwinner/files.awin:1.6 Sun Sep 8 04:06:44 2013 +++ src/sys/arch/arm/allwinner/files.awin Tue Feb 25 00:08:29 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.awin,v 1.6 2013/09/08 04:06:44 matt Exp $ +# $NetBSD: files.awin,v 1.7 2014/02/25 00:08:29 jmcneill Exp $ # # Configuration info for Allwinner ARM Peripherals # @@ -88,9 +88,10 @@ attach ohci at awinusb with ohci_awinusb attach ehci at awinusb with ehci_awinusb file arch/arm/allwinner/awin_usb.c awin_usb -# A10/A20 SD/MMC Controller (SDHC) -attach sdhc at awinio with awin_sdhc -file arch/arm/allwinner/awin_sdhc.c awin_sdhc +# A10/A20 SD/MMC Controller (SD/MMC) +device awinmmc: sdmmcbus +attach awinmmc at awinio with awin_mmc +file arch/arm/allwinner/awin_mmc.c awin_mmc # A10 WDC Controller (PATA) attach wdc at awinio with awin_wdc Index: src/sys/arch/arm/allwinner/awin_reg.h diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.11 src/sys/arch/arm/allwinner/awin_reg.h:1.12 --- src/sys/arch/arm/allwinner/awin_reg.h:1.11 Mon Feb 24 16:40:29 2014 +++ src/sys/arch/arm/allwinner/awin_reg.h Tue Feb 25 00:08:29 2014 @@ -587,6 +587,35 @@ #define AWIN_AHCI_P0PHYCR_REG 0x0178 #define AWIN_AHCI_P0PHYSR_REG 0x017C +#define AWIN_MMC_GCTRL 0x +#define AWIN_MMC_CLKCR 0x0004 +#define AWIN_MMC_TIMEOUT 0x0008 +#define AWIN_MMC_WIDTH 0x000C +#define AWIN_MMC_BLKSZ 0x0010 +#define AWIN_MMC_BYTECNT 0x0014 +#define AWIN_MMC_CMD 0x0018 +#define AWIN_MMC_ARG 0x001C +#define AWIN_MMC_RESP0 0x0020 +#define AWIN_MMC_RESP1 0x0024 +#define AWIN_MMC_RESP2 0x0028 +#define AWIN_MMC_RESP3 0x002C +#define AWIN_MMC_IMASK 0x0030 +#define AWIN_MMC_MINT 0x0034 +#define AWIN_MMC_RINT 0x0038 +#define AWIN_MMC_STATUS 0x003C +#define AWIN_MMC_FTRGLEVEL 0x0040 +#define AWIN_MMC_FUNCSEL 0x0044 +#define AWIN_MMC_CBCR 0x0048 +#define AWIN_MMC_BBCR 0x004C +#define AWIN_MMC_DBGC 0x0050 +#define AWIN_MMC_DMAC 0x0080 +#define AWIN_MMC_DLBA 0x0084 +#define AWIN_MMC_IDST 0x0088 +#define AWIN_MMC_IDIE 0x008C +#define AWIN_MMC_CHDA 0x0090 +#define AWIN_MMC_CBDA 0x0094 +#define AWIN_MMC_FIFO 0x0100 + #define AWIN_CPUCFG_CPU0_RST_CTRL_REG 0x0040 #define AWIN_CPUCFG_CPU0_CTRL_REG 0x0044 #define AWIN_CPUCFG_CPU0_STATUS_REG 0x0048 Index: src/sys/arch/arm/allwinner/awin_var.h diff -u src/sys/arch/arm/allwinner/awin_var.h:1.7 src/sys/arch/arm/allwinner/awin_var.h:1.8 --- src/sys/arch/arm/allwinner/awin_var.h:1.7 Thu Feb 20 21:45:06 2014 +++
CVS commit: [matt-nb5-mips64] src/sys/arch/arm
Module Name:src Committed By: matt Date: Tue Feb 25 00:05:49 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: core_machdep.c src/sys/arch/arm/include [matt-nb5-mips64]: elf_machdep.h Log Message: Tag BE8 coredumps properly. To generate a diff of this commit: cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/sys/arch/arm/arm/core_machdep.c cvs rdiff -u -r1.7.78.1 -r1.7.78.2 src/sys/arch/arm/include/elf_machdep.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/arm/core_machdep.c diff -u src/sys/arch/arm/arm/core_machdep.c:1.4.2.2 src/sys/arch/arm/arm/core_machdep.c:1.4.2.3 --- src/sys/arch/arm/arm/core_machdep.c:1.4.2.2 Sat Feb 15 16:18:35 2014 +++ src/sys/arch/arm/arm/core_machdep.c Tue Feb 25 00:05:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: core_machdep.c,v 1.4.2.2 2014/02/15 16:18:35 matt Exp $ */ +/* $NetBSD: core_machdep.c,v 1.4.2.3 2014/02/25 00:05:49 matt Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -37,7 +37,10 @@ #include sys/param.h -__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.4.2.2 2014/02/15 16:18:35 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.4.2.3 2014/02/25 00:05:49 matt Exp $); + +#include opt_execfmt.h +#include opt_compat_netbsd32.h #include sys/core.h #include sys/exec.h @@ -49,6 +52,12 @@ __KERNEL_RCSID(0, $NetBSD: core_machdep #include sys/exec_aout.h /* for MID_* */ +#ifdef EXEC_ELF32 +#include sys/exec_elf.h +#endif + +#include arm/locore.h + #include machine/reg.h @@ -95,3 +104,19 @@ cpu_coredump(struct lwp *l, void *iocook return coredump_write(iocookie, UIO_SYSSPACE, cpustate, sizeof(cpustate)); } + +#ifdef EXEC_ELF32 +void +arm_netbsd_elf32_coredump_setup(struct lwp *l, void *arg) +{ +#if defined(__ARMEB__) + Elf32_Ehdr * const eh = arg; + +if (CPU_IS_ARMV7_P() + || (CPU_IS_ARMV6_P() + (armreg_sctrl_read() CPU_CONTROL_BEND_ENABLE) == 0)) { + eh-e_flags |= EF_ARM_BE8; + } +#endif +} +#endif Index: src/sys/arch/arm/include/elf_machdep.h diff -u src/sys/arch/arm/include/elf_machdep.h:1.7.78.1 src/sys/arch/arm/include/elf_machdep.h:1.7.78.2 --- src/sys/arch/arm/include/elf_machdep.h:1.7.78.1 Sat Feb 15 16:18:36 2014 +++ src/sys/arch/arm/include/elf_machdep.h Tue Feb 25 00:05:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.7.78.1 2014/02/15 16:18:36 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.7.78.2 2014/02/25 00:05:49 matt Exp $ */ #ifndef _ARM_ELF_MACHDEP_H_ #define _ARM_ELF_MACHDEP_H_ @@ -144,4 +144,14 @@ /* Processor specific symbol types */ #define STT_ARM_TFUNC STT_LOPROC +#ifdef _KERNEL +#ifdef ELFSIZE +#define ELF_MD_COREDUMP_FUNC ELFNAME2(arm_netbsd,coredump_setup) +#endif + +struct exec_package; + +void arm_netbsd_elf32_coredump_setup(struct lwp *, void *); +#endif + #endif /* _ARM_ELF_MACHDEP_H_ */
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Tue Feb 25 00:09:00 UTC 2014 Modified Files: src/sys/arch/evbarm/conf: CUBIEBOARD Log Message: enable MMC driver To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/CUBIEBOARD Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/CUBIEBOARD diff -u src/sys/arch/evbarm/conf/CUBIEBOARD:1.8 src/sys/arch/evbarm/conf/CUBIEBOARD:1.9 --- src/sys/arch/evbarm/conf/CUBIEBOARD:1.8 Sun Sep 8 04:06:44 2013 +++ src/sys/arch/evbarm/conf/CUBIEBOARD Tue Feb 25 00:09:00 2014 @@ -1,5 +1,5 @@ # -# $NetBSD: CUBIEBOARD,v 1.8 2013/09/08 04:06:44 matt Exp $ +# $NetBSD: CUBIEBOARD,v 1.9 2014/02/25 00:09:00 jmcneill Exp $ # # CUBIEBOARD -- Allwinner A10/A20 Eval Board Kernel # @@ -177,11 +177,10 @@ armgtmr0 at armperiph?# ARM Generic # SoC I/O awinio0 at mainbus? -# SDHC controllers -#sdhc0 at awinio0 port 0 -#sdhc* at awinio0 port ? -#sdmmc* at sdhc? # SD/MMC bus -#ld* at sdmmc? +# SD/MMC controllers +awinmmc0 at awinio0 port 0 +sdmmc* at awinmmc? +ld* at sdmmc? # NAND controller awinnand0 at awinio0 @@ -293,4 +292,4 @@ pseudo-device pty # pseudo-terminals pseudo-device ksyms # /dev/ksyms pseudo-device lockstat # lock profiling -cinclude arch/evbarm/conf/BEAGLEBOARD.local +cinclude arch/evbarm/conf/CUBIEBOARD.local
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Tue Feb 25 00:05:11 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: cpu_exec.c Log Message: fix typo To generate a diff of this commit: cvs rdiff -u -r1.8.2.2 -r1.8.2.3 src/sys/arch/arm/arm/cpu_exec.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/arm/cpu_exec.c diff -u src/sys/arch/arm/arm/cpu_exec.c:1.8.2.2 src/sys/arch/arm/arm/cpu_exec.c:1.8.2.3 --- src/sys/arch/arm/arm/cpu_exec.c:1.8.2.2 Sat Feb 15 16:18:35 2014 +++ src/sys/arch/arm/arm/cpu_exec.c Tue Feb 25 00:05:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_exec.c,v 1.8.2.2 2014/02/15 16:18:35 matt Exp $ */ +/* $NetBSD: cpu_exec.c,v 1.8.2.3 2014/02/25 00:05:11 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.8.2.2 2014/02/15 16:18:35 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.8.2.3 2014/02/25 00:05:11 matt Exp $); #include opt_compat_netbsd.h #include opt_compat_netbsd32.h @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v #include arm/locore.h -#if EXEC_ELF32 +#ifdef EXEC_ELF32 int arm_netbsd_elf32_probe(struct lwp *l, struct exec_package *epp, void *eh0, char *itp, vaddr_t *start_p)
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Tue Feb 25 00:26:43 UTC 2014 Modified Files: src/sys/arch/arm/arm: core_machdep.c Log Message: #include arm/locore.h To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/arm/core_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/arm/arm/core_machdep.c diff -u src/sys/arch/arm/arm/core_machdep.c:1.5 src/sys/arch/arm/arm/core_machdep.c:1.6 --- src/sys/arch/arm/arm/core_machdep.c:1.5 Mon Feb 24 23:54:10 2014 +++ src/sys/arch/arm/arm/core_machdep.c Tue Feb 25 00:26:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: core_machdep.c,v 1.5 2014/02/24 23:54:10 matt Exp $ */ +/* $NetBSD: core_machdep.c,v 1.6 2014/02/25 00:26:43 matt Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -37,7 +37,7 @@ #include sys/param.h -__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.5 2014/02/24 23:54:10 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.6 2014/02/25 00:26:43 matt Exp $); #include opt_execfmt.h #include opt_compat_netbsd32.h @@ -52,6 +52,8 @@ __KERNEL_RCSID(0, $NetBSD: core_machdep #include sys/exec_aout.h /* for MID_* */ +#include arm/locore.h + #ifdef EXEC_ELF32 #include sys/exec_elf.h #ifdef COMPAT_NETBSD32
CVS commit: src/sys
Module Name:src Committed By: justin Date: Tue Feb 25 01:02:42 UTC 2014 Modified Files: src/sys/kern: init_sysctl.c init_sysctl_base.c src/sys/rump/librump/rumpkern: rump.c Log Message: Add kern.{ostype,osrelease,osrevision,version} kern.domainname, kern.rawpartition sysctl support to rump kernel. Moved the sysctl support that is shared between rump and normal kernels to init_sysctl_base.c as rump cannot use init_sysctl.c in order to avoid code duplication. Agreed with pooka@. To generate a diff of this commit: cvs rdiff -u -r1.199 -r1.200 src/sys/kern/init_sysctl.c cvs rdiff -u -r1.1 -r1.2 src/sys/kern/init_sysctl_base.c cvs rdiff -u -r1.284 -r1.285 src/sys/rump/librump/rumpkern/rump.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/init_sysctl.c diff -u src/sys/kern/init_sysctl.c:1.199 src/sys/kern/init_sysctl.c:1.200 --- src/sys/kern/init_sysctl.c:1.199 Fri Jan 17 02:12:48 2014 +++ src/sys/kern/init_sysctl.c Tue Feb 25 01:02:42 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: init_sysctl.c,v 1.199 2014/01/17 02:12:48 pooka Exp $ */ +/* $NetBSD: init_sysctl.c,v 1.200 2014/02/25 01:02:42 justin Exp $ */ /*- * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.199 2014/01/17 02:12:48 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.200 2014/02/25 01:02:42 justin Exp $); #include opt_sysv.h #include opt_compat_netbsd.h @@ -105,7 +105,6 @@ static int sysctl_kern_maxvnodes(SYSCTLF static int sysctl_kern_rtc_offset(SYSCTLFN_PROTO); static int sysctl_kern_maxproc(SYSCTLFN_PROTO); static int sysctl_kern_hostid(SYSCTLFN_PROTO); -static int sysctl_setlen(SYSCTLFN_PROTO); static int sysctl_kern_clockrate(SYSCTLFN_PROTO); static int sysctl_msgbuf(SYSCTLFN_PROTO); static int sysctl_kern_defcorename(SYSCTLFN_PROTO); @@ -151,30 +150,6 @@ SYSCTL_SETUP(sysctl_kern_setup, sysctl CTL_KERN, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_STRING, ostype, - SYSCTL_DESCR(Operating system type), - NULL, 0, __UNCONST(ostype), 0, - CTL_KERN, KERN_OSTYPE, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_STRING, osrelease, - SYSCTL_DESCR(Operating system release), - NULL, 0, __UNCONST(osrelease), 0, - CTL_KERN, KERN_OSRELEASE, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE, - CTLTYPE_INT, osrevision, - SYSCTL_DESCR(Operating system revision), - NULL, __NetBSD_Version__, NULL, 0, - CTL_KERN, KERN_OSREV, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT, - CTLTYPE_STRING, version, - SYSCTL_DESCR(Kernel version), - NULL, 0, __UNCONST(version), 0, - CTL_KERN, KERN_VERSION, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, maxvnodes, SYSCTL_DESCR(Maximum number of vnodes), @@ -200,12 +175,6 @@ SYSCTL_SETUP(sysctl_kern_setup, sysctl NULL, ARG_MAX, NULL, 0, CTL_KERN, KERN_ARGMAX, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, - CTLTYPE_STRING, hostname, - SYSCTL_DESCR(System hostname), - sysctl_setlen, 0, hostname, MAXHOSTNAMELEN, - CTL_KERN, KERN_HOSTNAME, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE|CTLFLAG_HEX, CTLTYPE_INT, hostid, SYSCTL_DESCR(System host ID number), @@ -282,12 +251,6 @@ SYSCTL_SETUP(sysctl_kern_setup, sysctl NULL, 0, boottime, sizeof(boottime), CTL_KERN, KERN_BOOTTIME, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, - CTLTYPE_STRING, domainname, - SYSCTL_DESCR(YP domain name), - sysctl_setlen, 0, domainname, MAXHOSTNAMELEN, - CTL_KERN, KERN_DOMAINNAME, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE, CTLTYPE_INT, maxpartitions, SYSCTL_DESCR(Maximum number of partitions allowed per @@ -295,12 +258,6 @@ SYSCTL_SETUP(sysctl_kern_setup, sysctl NULL, MAXPARTITIONS, NULL, 0, CTL_KERN, KERN_MAXPARTITIONS, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE, - CTLTYPE_INT, rawpartition, - SYSCTL_DESCR(Raw partition of a disk), - NULL, RAW_PART, NULL, 0, - CTL_KERN, KERN_RAWPARTITION, CTL_EOL); - sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_STRUCT, timex, NULL, sysctl_notavail, 0, NULL, 0, @@ -1011,32 +968,6 @@
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: matt Date: Tue Feb 25 02:51:52 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: files.awin Log Message: Add options COM_16750 to handle the IIR_BUSY interrupt. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/files.awin 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/allwinner/files.awin diff -u src/sys/arch/arm/allwinner/files.awin:1.7 src/sys/arch/arm/allwinner/files.awin:1.8 --- src/sys/arch/arm/allwinner/files.awin:1.7 Tue Feb 25 00:08:29 2014 +++ src/sys/arch/arm/allwinner/files.awin Tue Feb 25 02:51:52 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.awin,v 1.7 2014/02/25 00:08:29 jmcneill Exp $ +# $NetBSD: files.awin,v 1.8 2014/02/25 02:51:52 matt Exp $ # # Configuration info for Allwinner ARM Peripherals # @@ -48,6 +48,7 @@ attach awintmr at awinio with awin_tmr file arch/arm/allwinner/awin_tmr.c awin_tmr # A10/A20 UART +options COM_16750 # for IIR_BUSY attach com at awinio with awin_com file arch/arm/allwinner/awin_com.c awin_com
CVS commit: src/sys/arch/emips/stand/common
Module Name:src Committed By: martin Date: Mon Feb 24 08:00:52 UTC 2014 Modified Files: src/sys/arch/emips/stand/common: enic.c Log Message: Add missing prototypes/includes and remove unused variables To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/emips/stand/common/enic.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/arm/xscale
Module Name:src Committed By: martin Date: Mon Feb 24 10:47:46 UTC 2014 Modified Files: src/sys/arch/arm/xscale: ixp425_if_npe.c Log Message: Explicitly include sys/simplelock.h for now (untill Nick kills it for real), to make it compile. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/xscale/ixp425_if_npe.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/arm/xscale
Module Name:src Committed By: martin Date: Mon Feb 24 10:50:40 UTC 2014 Modified Files: src/sys/arch/arm/xscale: ixp425_pci_space.c Log Message: Fix compilation To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/xscale/ixp425_pci_space.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Mon Feb 24 11:43:33 UTC 2014 Modified Files: src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: truncate is not a defined operation for host files To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/rump/librump/rumpvfs/rumpfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes/common
Module Name:src Committed By: ozaki-r Date: Mon Feb 24 11:56:01 UTC 2014 Modified Files: src/distrib/notes/common: main Log Message: Add myself To generate a diff of this commit: cvs rdiff -u -r1.506 -r1.507 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Mon Feb 24 12:19:05 UTC 2014 Modified Files: src/sys/dev/ic: ahcisata_core.c ahcisatavar.h Log Message: - Only enable AHCI mode if it is not already enabled. - Add support for capturing initial CAP/CAP2/PI regs before reset (and restoring them afterwords) - Add optional callbacks for channel_start / channel_stop. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ic/ahcisata_core.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/ahcisatavar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: jmcneill Date: Mon Feb 24 12:21:27 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_ahcisata.c Log Message: Save initial CAP/CAP2/PI config over reset. Provide channel_start callback that sets up awin specific DMA regs. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/allwinner/awin_ahcisata.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/emips/ebus
Module Name:src Committed By: martin Date: Mon Feb 24 14:26:11 UTC 2014 Modified Files: src/sys/arch/emips/ebus: clock_ebus.c Log Message: Remove the only use of __qdivrem inside kernels To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/emips/ebus/clock_ebus.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/arm/allwinner
Module Name:src Committed By: jmcneill Date: Mon Feb 24 15:47:43 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_ahcisata.c Log Message: write to vendor specific dma reg relative to the port, not the base. sata works on cubieboard2 now To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/allwinner/awin_ahcisata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc
Module Name:src Committed By: martin Date: Mon Feb 24 16:15:43 UTC 2014 Modified Files: src/common/lib/libc/arch/mips/atomic: Makefile.inc Added Files: src/common/lib/libc/atomic: atomic_cas_by_cas32.c Log Message: Provide cas_16 and cas_8 emulation via cas_32 and use that for mips64 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/common/lib/libc/arch/mips/atomic/Makefile.inc cvs rdiff -u -r0 -r1.1 src/common/lib/libc/atomic/atomic_cas_by_cas32.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/arm/allwinner
Module Name:src Committed By: matt Date: Mon Feb 24 16:40:29 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_ahcisata.c awin_reg.h Log Message: Remove unneeded delays. for ACHI port reg, act like ahcisatareg.h (e.g. AHCI_P_AWIN_DMA(p)) To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/allwinner/awin_ahcisata.c \ src/sys/arch/arm/allwinner/awin_reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Mon Feb 24 16:45:06 UTC 2014 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Add more inlines. Default FSR ARMv6+ bits. Add A7/A15 L2CTRL defs. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/arch/arm/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: matt Date: Mon Feb 24 16:50:49 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_board.c Log Message: Extract # of cores from L2CTRL for MULTIPROCESSOR kernels To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/awin_board.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/arm/include
Module Name:src Committed By: christos Date: Mon Feb 24 16:57:57 UTC 2014 Modified Files: src/sys/arch/arm/include: ansi.h aout_machdep.h apmvar.h int_types.h limits.h proc.h vfpreg.h Log Message: consistency in include protection To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/include/ansi.h \ src/sys/arch/arm/include/proc.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/include/aout_machdep.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/include/apmvar.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/include/int_types.h cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/include/limits.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/vfpreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libc/atomic
Module Name:src Committed By: martin Date: Mon Feb 24 17:18:27 UTC 2014 Modified Files: src/common/lib/libc/atomic: atomic_init_testset.c Log Message: Provide CAS variants for 16 and 8 bit when running with more that 1 cpu To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/common/lib/libc/atomic/atomic_init_testset.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Mon Feb 24 19:22:14 UTC 2014 Modified Files: src/sys/rump: listsrcdirs Log Message: +rump_wmd To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/rump/listsrcdirs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: othersrc/external/bsd/transit
Module Name:othersrc Committed By: agc Date: Mon Feb 24 21:05:18 UTC 2014 Modified Files: othersrc/external/bsd/transit/bin: Makefile othersrc/external/bsd/transit/dist: main.c transit.c transit.h Log Message: Update transit to version 20140223 + properly escape valid JSON strings when converting To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/transit/bin/Makefile cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/transit/dist/main.c \ othersrc/external/bsd/transit/dist/transit.c \ othersrc/external/bsd/transit/dist/transit.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: joerg Date: Mon Feb 24 21:14:13 UTC 2014 Modified Files: src/distrib/sets/lists/comp: md.sparc64 Log Message: Fix compat entries. To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/distrib/sets/lists/comp/md.sparc64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/emips/stand/common
Module Name:src Committed By: christos Date: Mon Feb 24 22:31:56 UTC 2014 Modified Files: src/sys/arch/emips/stand/common: clock.c common.h enic.c prom_iface.c putchar.c Log Message: make this compile To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/emips/stand/common/clock.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/emips/stand/common/common.h \ src/sys/arch/emips/stand/common/enic.c \ src/sys/arch/emips/stand/common/prom_iface.c \ src/sys/arch/emips/stand/common/putchar.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/emips/stand/common
Module Name:src Committed By: christos Date: Mon Feb 24 22:34:08 UTC 2014 Modified Files: src/sys/arch/emips/stand/common: enic.c prom_iface.c Log Message: make more things static, remove dup decls To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/emips/stand/common/enic.c \ src/sys/arch/emips/stand/common/prom_iface.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/arm
Module Name:src Committed By: matt Date: Mon Feb 24 23:54:10 UTC 2014 Modified Files: src/sys/arch/arm/arm: core_machdep.c src/sys/arch/arm/include: elf_machdep.h Log Message: If we are dumping a EABI coredump, set the version to EABI5. If we are dumping a BE coredump on a BE8 system, set the BE8 flag. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/arm/core_machdep.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/elf_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [matt-nb5-mips64] src/sys/arch/arm
Module Name:src Committed By: matt Date: Tue Feb 25 00:05:49 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: core_machdep.c src/sys/arch/arm/include [matt-nb5-mips64]: elf_machdep.h Log Message: Tag BE8 coredumps properly. To generate a diff of this commit: cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/sys/arch/arm/arm/core_machdep.c cvs rdiff -u -r1.7.78.1 -r1.7.78.2 src/sys/arch/arm/include/elf_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Tue Feb 25 00:05:11 UTC 2014 Modified Files: src/sys/arch/arm/arm [matt-nb5-mips64]: cpu_exec.c Log Message: fix typo To generate a diff of this commit: cvs rdiff -u -r1.8.2.2 -r1.8.2.3 src/sys/arch/arm/arm/cpu_exec.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/evbarm/conf
Module Name:src Committed By: jmcneill Date: Tue Feb 25 00:09:00 UTC 2014 Modified Files: src/sys/arch/evbarm/conf: CUBIEBOARD Log Message: enable MMC driver To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/CUBIEBOARD Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: jmcneill Date: Tue Feb 25 00:08:29 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_io.c awin_reg.h awin_var.h files.awin Added Files: src/sys/arch/arm/allwinner: awin_mmc.c Removed Files: src/sys/arch/arm/allwinner: awin_sdhc.c Log Message: Add Allwinner SD/MMC driver. No DMA yet. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/allwinner/awin_io.c \ src/sys/arch/arm/allwinner/files.awin cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/allwinner/awin_mmc.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/allwinner/awin_reg.h cvs rdiff -u -r1.4 -r0 src/sys/arch/arm/allwinner/awin_sdhc.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/awin_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Tue Feb 25 00:26:43 UTC 2014 Modified Files: src/sys/arch/arm/arm: core_machdep.c Log Message: #include arm/locore.h To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/arm/core_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: justin Date: Tue Feb 25 01:02:42 UTC 2014 Modified Files: src/sys/kern: init_sysctl.c init_sysctl_base.c src/sys/rump/librump/rumpkern: rump.c Log Message: Add kern.{ostype,osrelease,osrevision,version} kern.domainname, kern.rawpartition sysctl support to rump kernel. Moved the sysctl support that is shared between rump and normal kernels to init_sysctl_base.c as rump cannot use init_sysctl.c in order to avoid code duplication. Agreed with pooka@. To generate a diff of this commit: cvs rdiff -u -r1.199 -r1.200 src/sys/kern/init_sysctl.c cvs rdiff -u -r1.1 -r1.2 src/sys/kern/init_sysctl_base.c cvs rdiff -u -r1.284 -r1.285 src/sys/rump/librump/rumpkern/rump.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/arm/allwinner
Module Name:src Committed By: matt Date: Tue Feb 25 02:51:52 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: files.awin Log Message: Add options COM_16750 to handle the IIR_BUSY interrupt. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/files.awin Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.