conf.c revision 84617
10SN/A/*-
22362SN/A * Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
30SN/A * All rights reserved.
40SN/A *
50SN/A * Redistribution and use in source and binary forms, with or without
60SN/A * modification, are permitted provided that the following conditions
72362SN/A * are met:
80SN/A * 1. Redistributions of source code must retain the above copyright
92362SN/A *    notice, this list of conditions and the following disclaimer.
100SN/A * 2. Redistributions in binary form must reproduce the above copyright
110SN/A *    notice, this list of conditions and the following disclaimer in the
120SN/A *    documentation and/or other materials provided with the distribution.
130SN/A *
140SN/A * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
150SN/A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
160SN/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
170SN/A * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
180SN/A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
190SN/A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
200SN/A * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
212362SN/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
222362SN/A * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
232362SN/A * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
240SN/A * SUCH DAMAGE.
250SN/A *
260SN/A *	$FreeBSD: head/sys/boot/powerpc/ofw/conf.c 84617 2001-10-07 13:22:25Z benno $
270SN/A */
280SN/A
290SN/A#include <stand.h>
300SN/A#include "bootstrap.h"
310SN/A#include "libofw.h"
320SN/A#include "openfirm.h"
330SN/A
340SN/A#if defined(LOADER_NET_SUPPORT)
350SN/A#include "dev_net.h"
360SN/A#endif
370SN/A
380SN/A/*
390SN/A * We could use linker sets for some or all of these, but
400SN/A * then we would have to control what ended up linked into
410SN/A * the bootstrap.  So it's easier to conditionalise things
420SN/A * here.
43 *
44 * XXX rename these arrays to be consistent and less namespace-hostile
45 */
46
47/* Exported for libstand */
48struct devsw *devsw[] = {
49#if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CDROM_SUPPORT)
50    &ofwdisk,
51#endif
52#if defined(LOADER_NET_SUPPORT)
53    &netdev,
54#endif
55    NULL
56};
57
58struct fs_ops *file_system[] = {
59#ifdef LOADER_UFS_SUPPORT
60    &ufs_fsops,
61#endif
62#ifdef LOADER_CDROM_SUPPORT
63    &cd9660_fsops,
64#endif
65#ifdef LOADER_EXT2FS_SUPPORT
66    &ext2fs_fsops,
67#endif
68#ifdef LOADER_NET_SUPPORT
69    &nfs_fsops,
70#endif
71    &zipfs_fsops,
72    NULL
73};
74
75struct netif_driver *netif_drivers[] = {
76#ifdef LOADER_NET_SUPPORT
77	&ofwnet,
78#endif
79	NULL,
80};
81
82/* Exported for PowerPC only */
83/*
84 * Sort formats so that those that can detect based on arguments
85 * rather than reading the file go first.
86 */
87
88struct file_format *file_formats[] = {
89    &ofw_elf,
90    NULL
91};
92
93/*
94 * Consoles
95 *
96 * We don't prototype these in libalpha.h because they require
97 * data structures from bootstrap.h as well.
98 */
99extern struct console ofwconsole;
100
101struct console *consoles[] = {
102    &ofwconsole,
103    NULL
104};
105
106/*
107 * reloc - our load address
108 */
109vm_offset_t	reloc = RELOC;
110