xref: /freebsd/stand/uboot/arch/powerpc/conf.c (revision 3e15b01d)
19dc70af8SWarner Losh /*-
29dc70af8SWarner Losh  * Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
39dc70af8SWarner Losh  * All rights reserved.
49dc70af8SWarner Losh  *
59dc70af8SWarner Losh  * Redistribution and use in source and binary forms, with or without
69dc70af8SWarner Losh  * modification, are permitted provided that the following conditions
79dc70af8SWarner Losh  * are met:
89dc70af8SWarner Losh  * 1. Redistributions of source code must retain the above copyright
99dc70af8SWarner Losh  *    notice, this list of conditions and the following disclaimer.
109dc70af8SWarner Losh  * 2. Redistributions in binary form must reproduce the above copyright
119dc70af8SWarner Losh  *    notice, this list of conditions and the following disclaimer in the
129dc70af8SWarner Losh  *    documentation and/or other materials provided with the distribution.
139dc70af8SWarner Losh  *
149dc70af8SWarner Losh  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
159dc70af8SWarner Losh  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
169dc70af8SWarner Losh  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
179dc70af8SWarner Losh  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
189dc70af8SWarner Losh  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
199dc70af8SWarner Losh  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
209dc70af8SWarner Losh  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
219dc70af8SWarner Losh  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
229dc70af8SWarner Losh  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
239dc70af8SWarner Losh  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
249dc70af8SWarner Losh  * SUCH DAMAGE.
259dc70af8SWarner Losh  */
269dc70af8SWarner Losh 
279dc70af8SWarner Losh #include <stand.h>
289dc70af8SWarner Losh #include "bootstrap.h"
299dc70af8SWarner Losh #include "libuboot.h"
309dc70af8SWarner Losh 
319dc70af8SWarner Losh #if defined(LOADER_NET_SUPPORT)
329dc70af8SWarner Losh #include "dev_net.h"
339dc70af8SWarner Losh #endif
349dc70af8SWarner Losh 
359dc70af8SWarner Losh /* Make sure we have an explicit reference to exit so libsa's panic pulls in the MD exit */
369dc70af8SWarner Losh void (*exitfn)(int) = exit;
379dc70af8SWarner Losh 
389dc70af8SWarner Losh /*
399dc70af8SWarner Losh  * We could use linker sets for some or all of these, but
409dc70af8SWarner Losh  * then we would have to control what ended up linked into
419dc70af8SWarner Losh  * the bootstrap.  So it's easier to conditionalise things
429dc70af8SWarner Losh  * here.
439dc70af8SWarner Losh  *
449dc70af8SWarner Losh  * XXX rename these arrays to be consistent and less namespace-hostile
459dc70af8SWarner Losh  */
469dc70af8SWarner Losh 
47bd001d86SWarner Losh /* Exported for libsa */
489dc70af8SWarner Losh struct devsw *devsw[] = {
499dc70af8SWarner Losh #if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT)
509dc70af8SWarner Losh     &uboot_storage,
519dc70af8SWarner Losh #endif
529dc70af8SWarner Losh #if defined(LOADER_NET_SUPPORT)
539dc70af8SWarner Losh     &netdev,
549dc70af8SWarner Losh #endif
559dc70af8SWarner Losh     NULL
569dc70af8SWarner Losh };
579dc70af8SWarner Losh 
589dc70af8SWarner Losh struct fs_ops *file_system[] = {
599dc70af8SWarner Losh #if defined(LOADER_UFS_SUPPORT)
609dc70af8SWarner Losh     &ufs_fsops,
619dc70af8SWarner Losh #endif
629dc70af8SWarner Losh #if defined(LOADER_CD9660_SUPPORT)
639dc70af8SWarner Losh     &cd9660_fsops,
649dc70af8SWarner Losh #endif
659dc70af8SWarner Losh #if defined(LOADER_EXT2FS_SUPPORT)
669dc70af8SWarner Losh     &ext2fs_fsops,
679dc70af8SWarner Losh #endif
689dc70af8SWarner Losh #if defined(LOADER_NFS_SUPPORT)
699dc70af8SWarner Losh     &nfs_fsops,
709dc70af8SWarner Losh #endif
719dc70af8SWarner Losh #if defined(LOADER_TFTP_SUPPORT)
729dc70af8SWarner Losh     &tftp_fsops,
739dc70af8SWarner Losh #endif
749dc70af8SWarner Losh #if defined(LOADER_GZIP_SUPPORT)
759dc70af8SWarner Losh     &gzipfs_fsops,
769dc70af8SWarner Losh #endif
779dc70af8SWarner Losh #if defined(LOADER_BZIP2_SUPPORT)
789dc70af8SWarner Losh     &bzipfs_fsops,
799dc70af8SWarner Losh #endif
809dc70af8SWarner Losh     NULL
819dc70af8SWarner Losh };
829dc70af8SWarner Losh 
839dc70af8SWarner Losh struct netif_driver *netif_drivers[] = {
849dc70af8SWarner Losh #if defined(LOADER_NET_SUPPORT)
859dc70af8SWarner Losh 	&uboot_net,
869dc70af8SWarner Losh #endif
879dc70af8SWarner Losh 	NULL,
889dc70af8SWarner Losh };
899dc70af8SWarner Losh 
909dc70af8SWarner Losh /* Exported for PowerPC only */
919dc70af8SWarner Losh /*
929dc70af8SWarner Losh  * Sort formats so that those that can detect based on arguments
939dc70af8SWarner Losh  * rather than reading the file go first.
949dc70af8SWarner Losh  */
959dc70af8SWarner Losh extern struct file_format uboot_elf64;
969dc70af8SWarner Losh 
979dc70af8SWarner Losh struct file_format *file_formats[] = {
989dc70af8SWarner Losh 	&uboot_elf,
999dc70af8SWarner Losh 	&uboot_elf64,
1009dc70af8SWarner Losh 	NULL
1019dc70af8SWarner Losh };
1029dc70af8SWarner Losh 
1039dc70af8SWarner Losh /*
1049dc70af8SWarner Losh  * Consoles
1059dc70af8SWarner Losh  */
1069dc70af8SWarner Losh extern struct console uboot_console;
1079dc70af8SWarner Losh 
1089dc70af8SWarner Losh struct console *consoles[] = {
1099dc70af8SWarner Losh 	&uboot_console,
1109dc70af8SWarner Losh 	NULL
1119dc70af8SWarner Losh };
112