conf.c revision 40600
138465Smsmith/*-
238465Smsmith * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
338465Smsmith * All rights reserved.
438465Smsmith *
538465Smsmith * Redistribution and use in source and binary forms, with or without
638465Smsmith * modification, are permitted provided that the following conditions
738465Smsmith * are met:
838465Smsmith * 1. Redistributions of source code must retain the above copyright
938465Smsmith *    notice, this list of conditions and the following disclaimer.
1038465Smsmith * 2. Redistributions in binary form must reproduce the above copyright
1138465Smsmith *    notice, this list of conditions and the following disclaimer in the
1238465Smsmith *    documentation and/or other materials provided with the distribution.
1338465Smsmith *
1438465Smsmith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1538465Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1638465Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1738465Smsmith * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1838465Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1938465Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2038465Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2138465Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2238465Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2338465Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2438465Smsmith * SUCH DAMAGE.
2538465Smsmith *
2640600Smsmith *	$Id: conf.c,v 1.8 1998/10/21 20:10:33 msmith Exp $
2738465Smsmith */
2838465Smsmith
2938465Smsmith#include <stand.h>
3038465Smsmith#include <bootstrap.h>
3138465Smsmith#include "libi386/libi386.h"
3238465Smsmith
3338465Smsmith/*
3438465Smsmith * We could use linker sets for some or all of these, but
3538465Smsmith * then we would have to control what ended up linked into
3638465Smsmith * the bootstrap.  So it's easier to conditionalise things
3738465Smsmith * here.
3838465Smsmith *
3938465Smsmith * XXX rename these arrays to be consistent and less namespace-hostile
4038465Smsmith *
4138465Smsmith * XXX as libi386 and biosboot merge, some of these can become linker sets.
4238465Smsmith */
4338465Smsmith
4438465Smsmith/* Exported for libstand */
4538465Smsmithstruct devsw *devsw[] = {
4639450Smsmith    &biosdisk,
4738465Smsmith    /* XXX network devices? */
4838465Smsmith    NULL
4938465Smsmith};
5038465Smsmith
5138465Smsmithstruct fs_ops *file_system[] = {
5238465Smsmith    &ufs_fsops,
5338465Smsmith    &dosfs_fsops,
5438465Smsmith    &zipfs_fsops,
5538465Smsmith    NULL
5638465Smsmith};
5738465Smsmith
5838465Smsmith/* Exported for i386 only */
5938465Smsmith/*
6038465Smsmith * Sort formats so that those that can detect based on arguments
6138465Smsmith * rather than reading the file go first.
6238465Smsmith */
6338465Smsmithextern struct module_format	i386_aout;
6439834Speterextern struct module_format	i386_elf;
6538465Smsmith
6638465Smsmithstruct module_format *module_formats[] = {
6739834Speter    &i386_elf,
6839731Speter    &i386_aout,
6938465Smsmith    NULL
7038465Smsmith};
7138465Smsmith
7238465Smsmith/*
7338465Smsmith * Consoles
7438465Smsmith *
7538465Smsmith * We don't prototype these in libi386.h because they require
7638465Smsmith * data structures from bootstrap.h as well.
7738465Smsmith */
7838465Smsmithextern struct console vidconsole;
7938465Smsmithextern struct console comconsole;
8038465Smsmith
8138465Smsmithstruct console *consoles[] = {
8238465Smsmith    &vidconsole,
8338465Smsmith    &comconsole,
8438465Smsmith    NULL
8538465Smsmith};
8639178Smsmith
8739178Smsmithextern struct pnphandler isapnphandler;
8840600Smsmithextern struct pnphandler biospnphandler;
8939178Smsmith/* extern struct pnphandler pcipnphandler;*/
9039178Smsmith
9139178Smsmithstruct pnphandler *pnphandlers[] = {
9240600Smsmith    &biospnphandler,		/* should go first, as it may set isapnp_readport */
9340555Smsmith    &isapnphandler,
9439178Smsmith/*    &pcipnphandler, */
9539178Smsmith    NULL
9639178Smsmith};
97