mcmem.c revision 1.5
11.5Sjoerg/* $NetBSD: mcmem.c,v 1.5 2008/07/09 21:30:04 joerg 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.5Sjoerg__KERNEL_RCSID(0, "$NetBSD: mcmem.c,v 1.5 2008/07/09 21:30:04 joerg 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.5Sjoergstatic int mcmemmatch(device_t, cfdata_t, void *); 551.5Sjoergstatic void mcmemattach(device_t, device_t, void *); 561.5Sjoerg 571.5SjoergCFATTACH_DECL_NEW(mcmem, 0, mcmemmatch, mcmemattach, NULL, NULL); 581.1Smjacob 591.1Smjacobstatic int 601.5Sjoergmcmemmatch(device_t parent, cfdata_t cf, void *aux) 611.1Smjacob{ 621.1Smjacob struct mcbus_dev_attach_args *ta = aux; 631.1Smjacob if (ta->ma_type == MCBUS_TYPE_MEM) 641.1Smjacob return (1); 651.1Smjacob return (0); 661.1Smjacob} 671.1Smjacob 681.1Smjacobstatic void 691.5Sjoergmcmemattach(device_t parent, device_t self, void *aux) 701.1Smjacob{ 711.5Sjoerg aprint_naive("\n"); 721.5Sjoerg aprint_verbose("\n"); 731.1Smjacob} 74