autoconf.c revision 1.13
11.13Smlelstv/* $NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:42 mlelstv Exp $ */ 21.1Shannken 31.1Shannken/*- 41.1Shannken * Copyright (c) 2003 The NetBSD Foundation, Inc. 51.1Shannken * All rights reserved. 61.1Shannken * 71.1Shannken * This code is derived from software contributed to The NetBSD Foundation 81.1Shannken * by Juergen Hannken-Illjes. 91.1Shannken * 101.1Shannken * Redistribution and use in source and binary forms, with or without 111.1Shannken * modification, are permitted provided that the following conditions 121.1Shannken * are met: 131.1Shannken * 1. Redistributions of source code must retain the above copyright 141.1Shannken * notice, this list of conditions and the following disclaimer. 151.1Shannken * 2. Redistributions in binary form must reproduce the above copyright 161.1Shannken * notice, this list of conditions and the following disclaimer in the 171.1Shannken * documentation and/or other materials provided with the distribution. 181.1Shannken * 191.1Shannken * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 201.1Shannken * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 211.1Shannken * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 221.1Shannken * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 231.1Shannken * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 241.1Shannken * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 251.1Shannken * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 261.1Shannken * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 271.1Shannken * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 281.1Shannken * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 291.1Shannken * POSSIBILITY OF SUCH DAMAGE. 301.1Shannken */ 311.3Slukem 321.3Slukem#include <sys/cdefs.h> 331.13Smlelstv__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:42 mlelstv Exp $"); 341.1Shannken 351.1Shannken#include <sys/param.h> 361.1Shannken#include <sys/conf.h> 371.11Smatt#include <sys/device_if.h> 381.1Shannken#include <sys/systm.h> 391.11Smatt#include <sys/cpu.h> 401.11Smatt 411.11Smatt#include <powerpc/ibm4xx/cpu.h> 421.1Shannken 431.1Shannkenvoid 441.1Shannkencpu_configure(void) 451.1Shannken{ 461.1Shannken calc_delayconst(); 471.1Shannken 481.1Shannken if (config_rootfound("elb", NULL) == NULL) 491.1Shannken panic("configure: elb not configured"); 501.1Shannken 511.7Stsutsui printf("biomask %x netmask %x ttymask %x\n", 521.7Stsutsui imask[IPL_BIO], imask[IPL_NET], imask[IPL_TTY]); 531.1Shannken 541.1Shannken (void)spl0(); 551.1Shannken} 561.1Shannken 571.1Shannkenvoid 581.1Shannkencpu_rootconf(void) 591.1Shannken{ 601.13Smlelstv rootconf(); 611.2Sthorpej} 621.2Sthorpej 631.2Sthorpejvoid 641.11Smattdevice_register(device_t dev, void *aux) 651.2Sthorpej{ 661.1Shannken} 67