[BACK]Return to mcmem.c CVS log [TXT][DIR] Up to [local] / sys / arch / alpha / mcbus

Annotation of sys/arch/alpha/mcbus/mcmem.c, Revision 1.1

1.1     ! nbrk        1: /* $OpenBSD: mcmem.c,v 1.1 2007/03/16 21:22:27 robert Exp $ */
        !             2: /* $NetBSD: mcmem.c,v 1.4 2002/10/02 04:06:38 thorpej Exp $ */
        !             3:
        !             4: /*
        !             5:  * Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
        !             6:  * Copyright (c) 1998 by Matthew Jacob
        !             7:  * NASA AMES Research Center.
        !             8:  * All rights reserved.
        !             9:  *
        !            10:  * Redistribution and use in source and binary forms, with or without
        !            11:  * modification, are permitted provided that the following conditions
        !            12:  * are met:
        !            13:  * 1. Redistributions of source code must retain the above copyright
        !            14:  *    notice immediately at the beginning of the file, without modification,
        !            15:  *    this list of conditions, and the following disclaimer.
        !            16:  * 2. Redistributions in binary form must reproduce the above copyright
        !            17:  *    notice, this list of conditions and the following disclaimer in the
        !            18:  *    documentation and/or other materials provided with the distribution.
        !            19:  * 3. The name of the author may not be used to endorse or promote products
        !            20:  *    derived from this software without specific prior written permission.
        !            21:  *
        !            22:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
        !            23:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        !            24:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            25:  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
        !            26:  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            27:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            28:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            29:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            30:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            31:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            32:  * SUCH DAMAGE.
        !            33:  */
        !            34:
        !            35: /*
        !            36:  * 'dummy' (for now) node for the memory modules attached to
        !            37:  * the MCBUS main system bus found on AlphaServer 4100 systems.
        !            38:  */
        !            39:
        !            40: #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
        !            41: #include <sys/param.h>
        !            42: #include <sys/systm.h>
        !            43: #include <sys/device.h>
        !            44: #include <sys/malloc.h>
        !            45:
        !            46: #include <machine/autoconf.h>
        !            47: #include <machine/rpb.h>
        !            48: #include <machine/pte.h>
        !            49:
        !            50: #include <alpha/mcbus/mcbusreg.h>
        !            51: #include <alpha/mcbus/mcbusvar.h>
        !            52:
        !            53: int    mcmemmatch (struct device *, void *, void *);
        !            54: void   mcmemattach (struct device *, struct device *, void *);
        !            55:
        !            56: struct cfattach mcmem_ca = {
        !            57:         sizeof(struct device), mcmemmatch, mcmemattach
        !            58: };
        !            59:
        !            60: struct cfdriver mcmem_cd = {
        !            61:         NULL, "mcmem", DV_DULL,
        !            62: };
        !            63:
        !            64: int
        !            65: mcmemmatch(parent, cf, aux)
        !            66:        struct device *parent;
        !            67:        void *cf;
        !            68:        void *aux;
        !            69: {
        !            70:        struct mcbus_dev_attach_args *ta = aux;
        !            71:
        !            72:        if (ta->ma_type == MCBUS_TYPE_MEM)
        !            73:                return (1);
        !            74:
        !            75:        return (0);
        !            76: }
        !            77:
        !            78: void
        !            79: mcmemattach(parent, self, aux)
        !            80:        struct device *parent;
        !            81:        struct device *self;
        !            82:        void *aux;
        !            83: {
        !            84:        printf("\n");
        !            85: }

CVSweb