conf.c revision 136890
1133819Stjr/*- 2133819Stjr * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 3133819Stjr * All rights reserved. 4133819Stjr * 5133819Stjr * Redistribution and use in source and binary forms, with or without 6283442Sdchagin * modification, are permitted provided that the following conditions 7133819Stjr * are met: 8133819Stjr * 1. Redistributions of source code must retain the above copyright 9133819Stjr * notice, this list of conditions and the following disclaimer. 10133819Stjr * 2. Redistributions in binary form must reproduce the above copyright 11133819Stjr * notice, this list of conditions and the following disclaimer in the 12133819Stjr * documentation and/or other materials provided with the distribution. 13133819Stjr * 14177999Skib * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15227776Slstewart * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16164199Sru * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17133819Stjr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18255673Srdivacky * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19133819Stjr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20161330Sjhb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21161330Sjhb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22133819Stjr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23133819Stjr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24133819Stjr * SUCH DAMAGE. 25133819Stjr */ 26133819Stjr 27133819Stjr#include <sys/cdefs.h> 28133819Stjr__FBSDID("$FreeBSD: head/sys/boot/pc98/loader/conf.c 136890 2004-10-24 12:14:05Z nyan $"); 29133819Stjr 30133819Stjr#include <stand.h> 31133819Stjr#include <bootstrap.h> 32133819Stjr#include "libi386/libi386.h" 33133819Stjr 34133819Stjr/* 35133819Stjr * We could use linker sets for some or all of these, but 36133819Stjr * then we would have to control what ended up linked into 37143198Ssobomax * the bootstrap. So it's easier to conditionalise things 38283371Sdchagin * here. 39283371Sdchagin * 40283371Sdchagin * XXX rename these arrays to be consistent and less namespace-hostile 41133819Stjr * 42133819Stjr * XXX as libi386 and biosboot merge, some of these can become linker sets. 43133819Stjr */ 44133819Stjr 45133819Stjr#if defined(LOADER_NFS_SUPPORT) && defined(LOADER_TFTP_SUPPORT) 46133819Stjr#error "Cannot have both tftp and nfs support yet." 47133819Stjr#endif 48133819Stjr 49133819Stjr/* Exported for libstand */ 50133819Stjrstruct devsw *devsw[] = { 51133819Stjr &bioscd, 52133819Stjr &biosdisk, 53133819Stjr#if defined(LOADER_NFS_SUPPORT) || defined(LOADER_TFTP_SUPPORT) 54133819Stjr &pxedisk, 55133819Stjr#endif 56133819Stjr NULL 57133819Stjr}; 58133819Stjr 59133819Stjrstruct fs_ops *file_system[] = { 60133819Stjr &ufs_fsops, 61133819Stjr &ext2fs_fsops, 62133819Stjr &dosfs_fsops, 63133819Stjr &cd9660_fsops, 64133819Stjr &splitfs_fsops, 65133819Stjr#ifdef LOADER_GZIP_SUPPORT 66133819Stjr &gzipfs_fsops, 67236027Sed#endif 68236027Sed#ifdef LOADER_BZIP2_SUPPORT 69133819Stjr &bzipfs_fsops, 70133819Stjr#endif 71133819Stjr#ifdef LOADER_NFS_SUPPORT 72133819Stjr &nfs_fsops, 73133819Stjr#endif 74133819Stjr#ifdef LOADER_TFTP_SUPPORT 75133819Stjr &tftp_fsops, 76133819Stjr#endif 77133819Stjr NULL 78133819Stjr}; 79133819Stjr 80133819Stjr/* Exported for i386 only */ 81133819Stjr/* 82133819Stjr * Sort formats so that those that can detect based on arguments 83133819Stjr * rather than reading the file go first. 84133819Stjr */ 85133819Stjrextern struct file_format i386_elf; 86133819Stjrextern struct file_format i386_elf_obj; 87133819Stjr 88133819Stjrstruct file_format *file_formats[] = { 89133819Stjr &i386_elf, 90156919Snetchild &i386_elf_obj, 91156919Snetchild NULL 92156919Snetchild}; 93156919Snetchild 94133819Stjr/* 95133819Stjr * Consoles 96133819Stjr * 97133819Stjr * We don't prototype these in libi386.h because they require 98133819Stjr * data structures from bootstrap.h as well. 99133819Stjr */ 100133819Stjrextern struct console vidconsole; 101133819Stjrextern struct console comconsole; 102133819Stjrextern struct console nullconsole; 103133819Stjr 104133819Stjrstruct console *consoles[] = { 105133819Stjr &vidconsole, 106133819Stjr &comconsole, 107133819Stjr &nullconsole, 108133819Stjr NULL 109133819Stjr}; 110133819Stjr 111133819Stjrextern struct pnphandler isapnphandler; 112133819Stjrextern struct pnphandler biospnphandler; 113133819Stjrextern struct pnphandler biospcihandler; 114133819Stjr 115133819Stjrstruct pnphandler *pnphandlers[] = { 116133819Stjr &biospnphandler, /* should go first, as it may set isapnp_readport */ 117133819Stjr &isapnphandler, 118133819Stjr &biospcihandler, 119133819Stjr NULL 120133819Stjr}; 121133819Stjr