xref: /openbsd/sys/arch/luna88k/stand/boot/samachdep.h (revision 684cac8d)
1*684cac8dSaoyama /*	$OpenBSD: samachdep.h,v 1.7 2023/02/15 12:43:32 aoyama Exp $	*/
296f141a8Smiod /*	$NetBSD: samachdep.h,v 1.10 2013/03/05 15:34:53 tsutsui Exp $	*/
396f141a8Smiod 
496f141a8Smiod /*
596f141a8Smiod  * Copyright (c) 1982, 1990, 1993
696f141a8Smiod  *	The Regents of the University of California.  All rights reserved.
796f141a8Smiod  *
896f141a8Smiod  * Redistribution and use in source and binary forms, with or without
996f141a8Smiod  * modification, are permitted provided that the following conditions
1096f141a8Smiod  * are met:
1196f141a8Smiod  * 1. Redistributions of source code must retain the above copyright
1296f141a8Smiod  *    notice, this list of conditions and the following disclaimer.
1396f141a8Smiod  * 2. Redistributions in binary form must reproduce the above copyright
1496f141a8Smiod  *    notice, this list of conditions and the following disclaimer in the
1596f141a8Smiod  *    documentation and/or other materials provided with the distribution.
1696f141a8Smiod  * 3. Neither the name of the University nor the names of its contributors
1796f141a8Smiod  *    may be used to endorse or promote products derived from this software
1896f141a8Smiod  *    without specific prior written permission.
1996f141a8Smiod  *
2096f141a8Smiod  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2196f141a8Smiod  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2296f141a8Smiod  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2396f141a8Smiod  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2496f141a8Smiod  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2596f141a8Smiod  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2696f141a8Smiod  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2796f141a8Smiod  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2896f141a8Smiod  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2996f141a8Smiod  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3096f141a8Smiod  * SUCH DAMAGE.
3196f141a8Smiod  *
3296f141a8Smiod  *	@(#)samachdep.h	8.1 (Berkeley) 6/10/93
3396f141a8Smiod  */
3496f141a8Smiod 
3596f141a8Smiod #include <sys/param.h>
3696f141a8Smiod #include <lib/libsa/stand.h>
3796f141a8Smiod 
3896f141a8Smiod #define MHZ_25		25
3996f141a8Smiod #define MHZ_33		33
4096f141a8Smiod 
4196f141a8Smiod struct consdev;
4296f141a8Smiod typedef struct label_t {
4396f141a8Smiod 	long val[19];
4496f141a8Smiod } label_t;
4596f141a8Smiod 
4696f141a8Smiod /* autoconf.c */
4796f141a8Smiod void configure(void);
4896f141a8Smiod void find_devs(void);
4996f141a8Smiod 
5096f141a8Smiod /* bmc.c */
5196f141a8Smiod void bmccnprobe(struct consdev *);
5296f141a8Smiod void bmccninit(struct consdev *);
5396f141a8Smiod int  bmccngetc(dev_t);
5496f141a8Smiod void bmccnputc(dev_t, int);
5596f141a8Smiod 
5696f141a8Smiod /* bmd.c */
5796f141a8Smiod void bmdinit(void);
5896f141a8Smiod int bmdputc(int);
5996f141a8Smiod void bmdadjust(short, short);
6096f141a8Smiod void bmdclear(void);
6196f141a8Smiod 
6296f141a8Smiod /* boot.c */
638352e4cbSmiod extern uint32_t bootdev;
6496f141a8Smiod 
658352e4cbSmiod /* conf.c */
668352e4cbSmiod extern	struct fs_ops file_system_disk[];
678352e4cbSmiod extern	int nfsys_disk;
688352e4cbSmiod extern	struct fs_ops file_system_nfs[];
6996f141a8Smiod 
708352e4cbSmiod /* exec.c */
718352e4cbSmiod void run_loadfile(uint64_t *, int);
7296f141a8Smiod 
7396f141a8Smiod /* fault.c */
7496f141a8Smiod int badaddr(void *, int);
7596f141a8Smiod 
7696f141a8Smiod /* font.c */
77a5011688Smiod extern const u_short bmdfont[][20];
7896f141a8Smiod 
7996f141a8Smiod /* init_main.c */
8096f141a8Smiod extern int cpuspeed;
8196f141a8Smiod extern int nplane;
8296f141a8Smiod extern int machtype;
8396f141a8Smiod extern char default_file[];
8496f141a8Smiod extern char fuse_rom_data[];
8596f141a8Smiod 
8696f141a8Smiod /* kbd.c */
8796f141a8Smiod int kbd_decode(u_char);
8896f141a8Smiod 
8996f141a8Smiod /* lance.c */
90d2f66e2eSmiod void *lance_attach(uint, void *, void *, uint8_t *);
91d2f66e2eSmiod void *lance_cookie(uint);
9296f141a8Smiod uint8_t *lance_eaddr(void *);
9396f141a8Smiod int lance_init(void *);
9496f141a8Smiod int lance_get(void *, void *, size_t);
9596f141a8Smiod int lance_put(void *, void *, size_t);
9696f141a8Smiod int lance_end(void *);
9796f141a8Smiod 
9896f141a8Smiod /* locore.S */
9996f141a8Smiod extern uint16_t dipswitch;
10096f141a8Smiod extern volatile uint32_t tick;
10196f141a8Smiod int setjmp(label_t *);
10296f141a8Smiod void delay(int);
10396f141a8Smiod 
104*684cac8dSaoyama /* logo.c */
105*684cac8dSaoyama void draw_logo(void);
106*684cac8dSaoyama 
10796f141a8Smiod /* sc.c */
108d2f66e2eSmiod struct scsi_softc;
109d2f66e2eSmiod int scinit(struct scsi_softc *, uint);
110d2f66e2eSmiod struct scsi_generic_cdb;
111d2f66e2eSmiod int scsi_immed_command(struct scsi_softc *, int, int, struct scsi_generic_cdb *,
112d2f66e2eSmiod     u_char *, unsigned int);
113d2f66e2eSmiod int scsi_request_sense(struct scsi_softc *, int, int, u_char *, unsigned int);
114d2f66e2eSmiod int scsi_test_unit_rdy(struct scsi_softc *, int, int);
11596f141a8Smiod 
11696f141a8Smiod /* sd.c */
1173e58d19eSkrw int sdstrategy(void *, int, daddr_t, size_t, void *, size_t *);
11896f141a8Smiod int sdopen(struct open_file *, ...);
11996f141a8Smiod int sdclose(struct open_file *);
12096f141a8Smiod 
12196f141a8Smiod /* sio.c */
1228352e4cbSmiod int  siointr(int);
12396f141a8Smiod void siocnprobe(struct consdev *);
12496f141a8Smiod void siocninit(struct consdev *);
12596f141a8Smiod int  siocngetc(dev_t);
12696f141a8Smiod void siocnputc(dev_t, int);
12796f141a8Smiod void sioinit(void);
12896f141a8Smiod 
12996f141a8Smiod /* ufs_disklabel.c */
130d2f66e2eSmiod char *readdisklabel(struct scsi_softc *, uint, struct disklabel *);
13196f141a8Smiod 
13296f141a8Smiod #define DELAY(n)	delay(n)
133