conf.c revision 59854
151053Smsmith/*-
251053Smsmith * Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
351053Smsmith * All rights reserved.
451053Smsmith *
551053Smsmith * Redistribution and use in source and binary forms, with or without
651053Smsmith * modification, are permitted provided that the following conditions
751053Smsmith * are met:
851053Smsmith * 1. Redistributions of source code must retain the above copyright
951053Smsmith *    notice, this list of conditions and the following disclaimer.
1051053Smsmith * 2. Redistributions in binary form must reproduce the above copyright
1151053Smsmith *    notice, this list of conditions and the following disclaimer in the
1251053Smsmith *    documentation and/or other materials provided with the distribution.
1351053Smsmith *
1451053Smsmith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1551053Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1651053Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1751053Smsmith * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1851053Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1951053Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2051053Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2151053Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2251053Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2351053Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2451053Smsmith * SUCH DAMAGE.
2551053Smsmith *
2651053Smsmith *	$FreeBSD: head/sys/boot/powerpc/ofw/conf.c 59854 2000-05-01 17:41:25Z bp $
2751053Smsmith */
2851053Smsmith
2951053Smsmith#include <stand.h>
3051053Smsmith#include "libalpha/libalpha.h"
3151053Smsmith#ifdef LOADER_NET_SUPPORT
3251053Smsmith#include "dev_net.h"
3351053Smsmith#endif
3451053Smsmith
3551053Smsmith/*
3651053Smsmith * We could use linker sets for some or all of these, but
3751053Smsmith * then we would have to control what ended up linked into
3851053Smsmith * the bootstrap.  So it's easier to conditionalise things
3951053Smsmith * here.
4051053Smsmith *
4151053Smsmith * XXX rename these arrays to be consistent and less namespace-hostile
4251053Smsmith */
4351053Smsmith
4451053Smsmith/* Exported for libstand */
4551053Smsmithstruct devsw *devsw[] = {
4651053Smsmith#if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CDROM_SUPPORT)
4751053Smsmith    &srmdisk,
4851053Smsmith#endif
4951053Smsmith#ifdef LOADER_NET_SUPPORT
5051053Smsmith    &netdev,
5151053Smsmith#endif
5251053Smsmith    NULL
5351053Smsmith};
5451053Smsmith
5551053Smsmithstruct fs_ops *file_system[] = {
5651053Smsmith#ifdef LOADER_DISK_SUPPORT
5751053Smsmith    &ufs_fsops,
5851053Smsmith#endif
5951053Smsmith#ifdef LOADER_CDROM_SUPPORT
6051053Smsmith    &cd9660_fsops,
6151053Smsmith#endif
6259767Sjlemon#ifdef LOADER_EXT2FS_SUPPORT
6359767Sjlemon    &ext2fs_fsops,
6459767Sjlemon#endif
6551053Smsmith#ifdef LOADER_NET_SUPPORT
6651053Smsmith    &nfs_fsops,
6751053Smsmith#endif
6851053Smsmith    &zipfs_fsops,
6951053Smsmith    NULL
7051053Smsmith};
7151053Smsmith
7251053Smsmith#ifdef LOADER_NET_SUPPORT
7351053Smsmithstruct netif_driver *netif_drivers[] = {
7451053Smsmith    &srmnet,
7551053Smsmith    NULL,
7651053Smsmith};
7751053Smsmith#endif
7851053Smsmith
7951053Smsmith/* Exported for alpha only */
8051053Smsmith/*
8151053Smsmith * Sort formats so that those that can detect based on arguments
8251053Smsmith * rather than reading the file go first.
8351053Smsmith */
8459854Sbpextern struct file_format alpha_elf;
8551053Smsmith
8659854Sbpstruct file_format *file_formats[] = {
8751053Smsmith    &alpha_elf,
8851053Smsmith    NULL
8951053Smsmith};
9051053Smsmith
9151053Smsmith/*
9251053Smsmith * Consoles
9351053Smsmith *
9451053Smsmith * We don't prototype these in libalpha.h because they require
9551053Smsmith * data structures from bootstrap.h as well.
9651053Smsmith */
9751053Smsmithextern struct console promconsole;
9851053Smsmith
9951053Smsmithstruct console *consoles[] = {
10051053Smsmith    &promconsole,
10151053Smsmith    NULL
10251053Smsmith};
103