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