1 /* 2 * Copyright (c) 2006 Marcel Moolenaar 3 * All rights reserved. 4 * Copyright 2024 MNX Cloud, Inc. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28 #include <sys/cdefs.h> 29 30 #include <stand.h> 31 #include <bootstrap.h> 32 #include <efi.h> 33 #include <efilib.h> 34 #include <libzfs.h> 35 36 extern struct devsw vdisk_dev; 37 38 struct devsw *devsw[] = { 39 &efipart_fddev, 40 &efipart_cddev, 41 &efipart_hddev, 42 &efinet_dev, 43 &vdisk_dev, 44 &zfs_dev, 45 NULL 46 }; 47 48 struct fs_ops *file_system[] = { 49 &gzipfs_fsops, 50 &zfs_fsops, 51 &dosfs_fsops, 52 &ufs_fsops, 53 &cd9660_fsops, 54 &dosfs_fsops, 55 &tftp_fsops, 56 &nfs_fsops, 57 NULL 58 }; 59 60 struct netif_driver *netif_drivers[] = { 61 &efinetif, 62 NULL 63 }; 64 65 extern struct console efi_console; 66 extern struct console nullconsole; 67 extern struct console spinconsole; 68 69 struct console_template ct_list[] = { 70 [0] = { .ct_dev = &efi_console, .ct_init = NULL }, 71 [1] = { .ct_dev = NULL, .ct_init = efi_serial_ini }, 72 [2] = { .ct_dev = NULL, .ct_init = efi_isa_ini }, 73 [3] = { .ct_dev = &nullconsole, .ct_init = NULL }, 74 [4] = { .ct_dev = &spinconsole, .ct_init = NULL }, 75 [5] = { .ct_dev = NULL, .ct_init = NULL }, 76 }; 77 78 struct console **consoles; 79