conf.c revision 217044
1193323Sed/*- 2193323Sed * Copyright (c) 1999 Michael Smith <msmith@freebsd.org> 3193323Sed * All rights reserved. 4193323Sed * 5193323Sed * Redistribution and use in source and binary forms, with or without 6193323Sed * modification, are permitted provided that the following conditions 7193323Sed * are met: 8193323Sed * 1. Redistributions of source code must retain the above copyright 9193323Sed * notice, this list of conditions and the following disclaimer. 10193323Sed * 2. Redistributions in binary form must reproduce the above copyright 11193323Sed * notice, this list of conditions and the following disclaimer in the 12193323Sed * documentation and/or other materials provided with the distribution. 13193323Sed * 14193323Sed * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15193323Sed * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16193323Sed * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17193323Sed * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18193323Sed * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19198090Srdivacky * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20193323Sed * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21193323Sed * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22193323Sed * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23193323Sed * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24193323Sed * SUCH DAMAGE. 25193323Sed */ 26193323Sed 27193323Sed#include <sys/cdefs.h> 28193323Sed__FBSDID("$FreeBSD: head/sys/boot/powerpc/ps3/conf.c 217044 2011-01-06 04:12:29Z nwhitehorn $"); 29193323Sed 30193323Sed#include <stand.h> 31193323Sed#include "bootstrap.h" 32204642Srdivacky 33193323Sed#if defined(LOADER_NET_SUPPORT) 34193323Sed#include "dev_net.h" 35193323Sed#endif 36193323Sed 37198090Srdivacky/* 38198090Srdivacky * We could use linker sets for some or all of these, but 39193323Sed * then we would have to control what ended up linked into 40193323Sed * the bootstrap. So it's easier to conditionalise things 41193323Sed * here. 42193323Sed * 43219077Sdim * XXX rename these arrays to be consistent and less namespace-hostile 44193323Sed */ 45219077Sdim 46193323Sed/* Exported for libstand */ 47193323Sedstruct devsw *devsw[] = { 48193323Sed#if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT) 49193323Sed#ifdef NOTYET 50193323Sed &ps3disk, 51193323Sed#endif 52193323Sed#endif 53198090Srdivacky#if defined(LOADER_NET_SUPPORT) 54198090Srdivacky &netdev, 55204961Srdivacky#endif 56204961Srdivacky NULL 57204961Srdivacky}; 58204642Srdivacky 59204642Srdivackystruct fs_ops *file_system[] = { 60204961Srdivacky#if defined(LOADER_UFS_SUPPORT) 61193323Sed &ufs_fsops, 62193323Sed#endif 63193323Sed#if defined(LOADER_CD9660_SUPPORT) 64193323Sed &cd9660_fsops, 65198090Srdivacky#endif 66193323Sed#if defined(LOADER_EXT2FS_SUPPORT) 67193323Sed &ext2fs_fsops, 68193323Sed#endif 69193323Sed#if defined(LOADER_NFS_SUPPORT) 70193323Sed &nfs_fsops, 71193323Sed#endif 72193323Sed#if defined(LOADER_TFTP_SUPPORT) 73193323Sed &tftp_fsops, 74193323Sed#endif 75193323Sed#if defined(LOADER_GZIP_SUPPORT) 76193323Sed &gzipfs_fsops, 77193323Sed#endif 78193323Sed#if defined(LOADER_BZIP2_SUPPORT) 79193323Sed &bzipfs_fsops, 80208599Srdivacky#endif 81193323Sed NULL 82193323Sed}; 83193323Sed 84193323Sedextern struct netif_driver ps3net; 85193323Sed 86193323Sedstruct netif_driver *netif_drivers[] = { 87193323Sed#if defined(LOADER_NET_SUPPORT) 88193323Sed &ps3net, 89193323Sed#endif 90193323Sed NULL, 91193323Sed}; 92193323Sed 93193323Sed/* Exported for PowerPC only */ 94193323Sed/* 95219077Sdim * Sort formats so that those that can detect based on arguments 96193323Sed * rather than reading the file go first. 97198090Srdivacky */ 98198090Srdivacky 99204961Srdivackyextern struct file_format ppc_elf64; 100204961Srdivacky 101193323Sedstruct file_format *file_formats[] = { 102193323Sed &ppc_elf64, 103193323Sed NULL 104193323Sed}; 105193323Sed 106219077Sdim/* 107193323Sed * Consoles 108193323Sed */ 109193323Sedextern struct console ps3console; 110193323Sed 111219077Sdimstruct console *consoles[] = { 112193323Sed &ps3console, 113219077Sdim NULL 114204642Srdivacky}; 115204642Srdivacky 116193323Sed/* 117193323Sed * reloc - our load address 118199511Srdivacky */ 119199511Srdivackyvm_offset_t reloc = RELOC; 120193323Sed