mcmem.c revision 1.1
11.1Smjacob/* $NetBSD: mcmem.c,v 1.1 1998/04/15 00:48:12 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.1Smjacob * Dummy Node for MCBUS Memory Modules found on AlphaServer 4100 systems. 351.1Smjacob */ 361.1Smjacob 371.1Smjacob#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ 381.1Smjacob 391.1Smjacob__KERNEL_RCSID(0, "$NetBSD: mcmem.c,v 1.1 1998/04/15 00:48:12 mjacob Exp $"); 401.1Smjacob 411.1Smjacob#include <sys/param.h> 421.1Smjacob#include <sys/systm.h> 431.1Smjacob#include <sys/device.h> 441.1Smjacob#include <sys/malloc.h> 451.1Smjacob 461.1Smjacob#include <machine/autoconf.h> 471.1Smjacob#include <machine/rpb.h> 481.1Smjacob#include <machine/pte.h> 491.1Smjacob 501.1Smjacob#include <alpha/mcbus/mcbusreg.h> 511.1Smjacob#include <alpha/mcbus/mcbusvar.h> 521.1Smjacob 531.1Smjacobstatic int mcmemmatch __P((struct device *, struct cfdata *, void *)); 541.1Smjacobstatic void mcmemattach __P((struct device *, struct device *, void *)); 551.1Smjacobstruct cfattach mcmem_ca = { 561.1Smjacob sizeof (struct device), mcmemmatch, mcmemattach 571.1Smjacob}; 581.1Smjacob 591.1Smjacobstatic int 601.1Smjacobmcmemmatch(parent, cf, aux) 611.1Smjacob struct device *parent; 621.1Smjacob struct cfdata *cf; 631.1Smjacob void *aux; 641.1Smjacob{ 651.1Smjacob struct mcbus_dev_attach_args *ta = aux; 661.1Smjacob if (ta->ma_type == MCBUS_TYPE_MEM) 671.1Smjacob return (1); 681.1Smjacob return (0); 691.1Smjacob} 701.1Smjacob 711.1Smjacobstatic void 721.1Smjacobmcmemattach(parent, self, aux) 731.1Smjacob struct device *parent; 741.1Smjacob struct device *self; 751.1Smjacob void *aux; 761.1Smjacob{ 771.1Smjacob printf("\n"); 781.1Smjacob} 79