mcmem.c revision 1.2
11.2Smjacob/* $NetBSD: mcmem.c,v 1.2 1998/04/15 20:40:34 mjacob Exp $ */
21.1Smjacob
31.1Smjacob/*
41.1Smjacob * Copyright (c) 1998 by Matthew Jacob
51.1Smjacob * NASA AMES Research Center.
61.1Smjacob * All rights reserved.
71.1Smjacob *
81.1Smjacob * Redistribution and use in source and binary forms, with or without
91.1Smjacob * modification, are permitted provided that the following conditions
101.1Smjacob * are met:
111.1Smjacob * 1. Redistributions of source code must retain the above copyright
121.1Smjacob *    notice immediately at the beginning of the file, without modification,
131.1Smjacob *    this list of conditions, and the following disclaimer.
141.1Smjacob * 2. Redistributions in binary form must reproduce the above copyright
151.1Smjacob *    notice, this list of conditions and the following disclaimer in the
161.1Smjacob *    documentation and/or other materials provided with the distribution.
171.1Smjacob * 3. The name of the author may not be used to endorse or promote products
181.1Smjacob *    derived from this software without specific prior written permission.
191.1Smjacob *
201.1Smjacob * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
211.1Smjacob * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
221.1Smjacob * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
231.1Smjacob * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
241.1Smjacob * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
251.1Smjacob * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
261.1Smjacob * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
271.1Smjacob * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
281.1Smjacob * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
291.1Smjacob * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
301.1Smjacob * SUCH DAMAGE.
311.1Smjacob */
321.1Smjacob
331.1Smjacob/*
341.2Smjacob * 'dummy' (for now) node for the memory modules attached to
351.2Smjacob * the MCBUS main system bus found on AlphaServer 4100 systems.
361.1Smjacob */
371.1Smjacob
381.1Smjacob#include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
391.1Smjacob
401.2Smjacob__KERNEL_RCSID(0, "$NetBSD: mcmem.c,v 1.2 1998/04/15 20:40:34 mjacob Exp $");
411.1Smjacob
421.1Smjacob#include <sys/param.h>
431.1Smjacob#include <sys/systm.h>
441.1Smjacob#include <sys/device.h>
451.1Smjacob#include <sys/malloc.h>
461.1Smjacob
471.1Smjacob#include <machine/autoconf.h>
481.1Smjacob#include <machine/rpb.h>
491.1Smjacob#include <machine/pte.h>
501.1Smjacob
511.1Smjacob#include <alpha/mcbus/mcbusreg.h>
521.1Smjacob#include <alpha/mcbus/mcbusvar.h>
531.1Smjacob
541.1Smjacobstatic int	mcmemmatch __P((struct device *, struct cfdata *, void *));
551.1Smjacobstatic void	mcmemattach __P((struct device *, struct device *, void *));
561.1Smjacobstruct cfattach mcmem_ca = {
571.1Smjacob	sizeof (struct device), mcmemmatch, mcmemattach
581.1Smjacob};
591.1Smjacob
601.1Smjacobstatic int
611.1Smjacobmcmemmatch(parent, cf, aux)
621.1Smjacob	struct device *parent;
631.1Smjacob	struct cfdata *cf;
641.1Smjacob	void *aux;
651.1Smjacob{
661.1Smjacob	struct mcbus_dev_attach_args *ta = aux;
671.1Smjacob	if (ta->ma_type == MCBUS_TYPE_MEM)
681.1Smjacob		return (1);
691.1Smjacob	return (0);
701.1Smjacob}
711.1Smjacob
721.1Smjacobstatic void
731.1Smjacobmcmemattach(parent, self, aux)
741.1Smjacob	struct device *parent;
751.1Smjacob	struct device *self;
761.1Smjacob	void *aux;
771.1Smjacob{
781.1Smjacob	printf("\n");
791.1Smjacob}
80