xref: /netbsd-src/sys/arch/news68k/include/romcall.h (revision add41a3fee94c33cf3cf7885451fd4243e20db79)
1*add41a3fStsutsui /*	$NetBSD: romcall.h,v 1.2 2000/11/25 04:42:06 tsutsui Exp $	*/
2a1099430Stsutsui 
3a1099430Stsutsui /*-
4a1099430Stsutsui  * Copyright (C) 1999 Tsubai Masanari.  All rights reserved.
5a1099430Stsutsui  *
6a1099430Stsutsui  * Redistribution and use in source and binary forms, with or without
7a1099430Stsutsui  * modification, are permitted provided that the following conditions
8a1099430Stsutsui  * are met:
9a1099430Stsutsui  * 1. Redistributions of source code must retain the above copyright
10a1099430Stsutsui  *    notice, this list of conditions and the following disclaimer.
11a1099430Stsutsui  * 2. Redistributions in binary form must reproduce the above copyright
12a1099430Stsutsui  *    notice, this list of conditions and the following disclaimer in the
13a1099430Stsutsui  *    documentation and/or other materials provided with the distribution.
14a1099430Stsutsui  * 3. The name of the author may not be used to endorse or promote products
15a1099430Stsutsui  *    derived from this software without specific prior written permission.
16a1099430Stsutsui  *
17a1099430Stsutsui  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18a1099430Stsutsui  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19a1099430Stsutsui  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20a1099430Stsutsui  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21a1099430Stsutsui  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22a1099430Stsutsui  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23a1099430Stsutsui  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24a1099430Stsutsui  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25a1099430Stsutsui  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26a1099430Stsutsui  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27a1099430Stsutsui  */
28a1099430Stsutsui 
29a1099430Stsutsui #define SYS_reboot	0
30a1099430Stsutsui #define SYS_exit	1
31a1099430Stsutsui #define SYS_read	3
32a1099430Stsutsui #define SYS_write	4
33a1099430Stsutsui #define SYS_open	5
34a1099430Stsutsui #define SYS_close	6
35a1099430Stsutsui #define SYS_lseek	19
36a1099430Stsutsui #define SYS_ioctl	54
37a1099430Stsutsui 
38a1099430Stsutsui #define BOOTDEV_MAG(x)	(((x) >> 28) & 0x0f)	/* MAGIC (5) */
39a1099430Stsutsui #if 0
40a1099430Stsutsui #define BOOTDEV_BUS(x)	(((x) >> 24) & 0x0f)	/* bus number */
41a1099430Stsutsui #define BOOTDEV_CTLR(x) (((x) >> 20) & 0x0f)
42a1099430Stsutsui #else
43a1099430Stsutsui #define BOOTDEV_CTLR(x) (((x) >> 24) & 0x0f)
44a1099430Stsutsui #endif
45a1099430Stsutsui #define BOOTDEV_UNIT(x) (((x) >> 16) & 0x0f)
46a1099430Stsutsui #define BOOTDEV_HOST(x) (((x) >> 12) & 0x0f)
47a1099430Stsutsui #define BOOTDEV_PART(x) (((x) >> 8) & 0x0f)
48a1099430Stsutsui #define BOOTDEV_TYPE(x) ((x) & 0xff)
49a1099430Stsutsui 
50a1099430Stsutsui #define BOOTDEV_SD	0	/* SCSI disk */
51a1099430Stsutsui #define BOOTDEV_FH	1	/* 1.4M floppy */
52a1099430Stsutsui #define BOOTDEV_FD	2	/* 800k floppy */
53a1099430Stsutsui #define BOOTDEV_RD	5	/* remote(?) disk */
54a1099430Stsutsui #define BOOTDEV_ST	6	/* SCSI TAPE */
55a1099430Stsutsui 
56a1099430Stsutsui #ifndef _LOCORE
57*add41a3fStsutsui void rom_halt(void);
58a1099430Stsutsui int rom_open(const char * ,int);
59a1099430Stsutsui int rom_close(int);
60a1099430Stsutsui int rom_read(int, void *, int);
61a1099430Stsutsui int rom_write(int, void *, int);
62a1099430Stsutsui int rom_lseek(int, int, int);
63a1099430Stsutsui #endif
64