1 /* $OpenBSD: samachdep.h,v 1.7 2023/02/15 12:43:32 aoyama Exp $ */ 2 /* $NetBSD: samachdep.h,v 1.10 2013/03/05 15:34:53 tsutsui Exp $ */ 3 4 /* 5 * Copyright (c) 1982, 1990, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 3. Neither the name of the University nor the names of its contributors 17 * may be used to endorse or promote products derived from this software 18 * without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)samachdep.h 8.1 (Berkeley) 6/10/93 33 */ 34 35 #include <sys/param.h> 36 #include <lib/libsa/stand.h> 37 38 #define MHZ_25 25 39 #define MHZ_33 33 40 41 struct consdev; 42 typedef struct label_t { 43 long val[19]; 44 } label_t; 45 46 /* autoconf.c */ 47 void configure(void); 48 void find_devs(void); 49 50 /* bmc.c */ 51 void bmccnprobe(struct consdev *); 52 void bmccninit(struct consdev *); 53 int bmccngetc(dev_t); 54 void bmccnputc(dev_t, int); 55 56 /* bmd.c */ 57 void bmdinit(void); 58 int bmdputc(int); 59 void bmdadjust(short, short); 60 void bmdclear(void); 61 62 /* boot.c */ 63 extern uint32_t bootdev; 64 65 /* conf.c */ 66 extern struct fs_ops file_system_disk[]; 67 extern int nfsys_disk; 68 extern struct fs_ops file_system_nfs[]; 69 70 /* exec.c */ 71 void run_loadfile(uint64_t *, int); 72 73 /* fault.c */ 74 int badaddr(void *, int); 75 76 /* font.c */ 77 extern const u_short bmdfont[][20]; 78 79 /* init_main.c */ 80 extern int cpuspeed; 81 extern int nplane; 82 extern int machtype; 83 extern char default_file[]; 84 extern char fuse_rom_data[]; 85 86 /* kbd.c */ 87 int kbd_decode(u_char); 88 89 /* lance.c */ 90 void *lance_attach(uint, void *, void *, uint8_t *); 91 void *lance_cookie(uint); 92 uint8_t *lance_eaddr(void *); 93 int lance_init(void *); 94 int lance_get(void *, void *, size_t); 95 int lance_put(void *, void *, size_t); 96 int lance_end(void *); 97 98 /* locore.S */ 99 extern uint16_t dipswitch; 100 extern volatile uint32_t tick; 101 int setjmp(label_t *); 102 void delay(int); 103 104 /* logo.c */ 105 void draw_logo(void); 106 107 /* sc.c */ 108 struct scsi_softc; 109 int scinit(struct scsi_softc *, uint); 110 struct scsi_generic_cdb; 111 int scsi_immed_command(struct scsi_softc *, int, int, struct scsi_generic_cdb *, 112 u_char *, unsigned int); 113 int scsi_request_sense(struct scsi_softc *, int, int, u_char *, unsigned int); 114 int scsi_test_unit_rdy(struct scsi_softc *, int, int); 115 116 /* sd.c */ 117 int sdstrategy(void *, int, daddr_t, size_t, void *, size_t *); 118 int sdopen(struct open_file *, ...); 119 int sdclose(struct open_file *); 120 121 /* sio.c */ 122 int siointr(int); 123 void siocnprobe(struct consdev *); 124 void siocninit(struct consdev *); 125 int siocngetc(dev_t); 126 void siocnputc(dev_t, int); 127 void sioinit(void); 128 129 /* ufs_disklabel.c */ 130 char *readdisklabel(struct scsi_softc *, uint, struct disklabel *); 131 132 #define DELAY(n) delay(n) 133