11.1Ssimonb/* $NetBSD: autoconf.c,v 1.1 2021/01/27 05:24:16 simonb Exp $ */ 21.1Ssimonb 31.1Ssimonb/*- 41.1Ssimonb * Copyright (c) 2001,2021 The NetBSD Foundation, Inc. 51.1Ssimonb * All rights reserved. 61.1Ssimonb * 71.1Ssimonb * This code is derived from software contributed to The NetBSD Foundation 81.1Ssimonb * by Jason R. Thorpe and Simon Burge. 91.1Ssimonb * 101.1Ssimonb * Redistribution and use in source and binary forms, with or without 111.1Ssimonb * modification, are permitted provided that the following conditions 121.1Ssimonb * are met: 131.1Ssimonb * 1. Redistributions of source code must retain the above copyright 141.1Ssimonb * notice, this list of conditions and the following disclaimer. 151.1Ssimonb * 2. Redistributions in binary form must reproduce the above copyright 161.1Ssimonb * notice, this list of conditions and the following disclaimer in the 171.1Ssimonb * documentation and/or other materials provided with the distribution. 181.1Ssimonb * 191.1Ssimonb * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 201.1Ssimonb * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 211.1Ssimonb * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 221.1Ssimonb * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 231.1Ssimonb * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 241.1Ssimonb * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 251.1Ssimonb * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 261.1Ssimonb * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 271.1Ssimonb * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 281.1Ssimonb * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 291.1Ssimonb * POSSIBILITY OF SUCH DAMAGE. 301.1Ssimonb */ 311.1Ssimonb 321.1Ssimonb#include <sys/cdefs.h> 331.1Ssimonb__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.1 2021/01/27 05:24:16 simonb Exp $"); 341.1Ssimonb 351.1Ssimonb#include <sys/param.h> 361.1Ssimonb#include <sys/systm.h> 371.1Ssimonb#include <sys/conf.h> 381.1Ssimonb#include <sys/device.h> 391.1Ssimonb#include <sys/bus.h> 401.1Ssimonb 411.1Ssimonb/* 421.1Ssimonb * Configure all devices on system 431.1Ssimonb */ 441.1Ssimonbvoid 451.1Ssimonbcpu_configure(void) 461.1Ssimonb{ 471.1Ssimonb 481.1Ssimonb intr_init(); 491.1Ssimonb 501.1Ssimonb /* Kick off autoconfiguration. */ 511.1Ssimonb (void)splhigh(); 521.1Ssimonb if (config_rootfound("mainbus", NULL) == NULL) 531.1Ssimonb panic("no mainbus found"); 541.1Ssimonb 551.1Ssimonb spl0(); 561.1Ssimonb} 571.1Ssimonb 581.1Ssimonbvoid 591.1Ssimonbcpu_rootconf(void) 601.1Ssimonb{ 611.1Ssimonb 621.1Ssimonb rootconf(); 631.1Ssimonb} 641.1Ssimonb 651.1Ssimonbvoid 661.1Ssimonbdevice_register(device_t dev, void *aux) 671.1Ssimonb{ 681.1Ssimonb 691.1Ssimonb /* nothing to do here */ 701.1Ssimonb} 71