Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/newsmips Add some ioctl() definitions to eject floppy.
details: https://anonhg.NetBSD.org/src/rev/1a22dd1f2531
branches: trunk
changeset: 525575:1a22dd1f2531
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Apr 13 07:56:02 2002 +0000
description:
Add some ioctl() definitions to eject floppy.
diffstat:
sys/arch/newsmips/include/apcall.h | 3 ++-
sys/arch/newsmips/include/romcall.h | 5 ++++-
sys/arch/newsmips/stand/common/romcalls.S | 22 ++++++++++++++++++++--
3 files changed, 26 insertions(+), 4 deletions(-)
diffs (81 lines):
diff -r 3619e1101948 -r 1a22dd1f2531 sys/arch/newsmips/include/apcall.h
--- a/sys/arch/newsmips/include/apcall.h Sat Apr 13 07:53:53 2002 +0000
+++ b/sys/arch/newsmips/include/apcall.h Sat Apr 13 07:56:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apcall.h,v 1.2 1999/12/23 06:52:30 tsubai Exp $ */
+/* $NetBSD: apcall.h,v 1.3 2002/04/13 07:56:02 tsutsui Exp $ */
/*-
* Copyright (C) 1999 SHIMIZU Ryo. All rights reserved.
@@ -44,6 +44,7 @@
#define APCALL_FLUSHCACHE 1006
#define APCALL_GETTIMEOFDAY 1012
+#define APIOCEJECT 2003 /* eject floppy */
#define APIOCGIFHWADDR 9200 /* get hardware address */
#define apcall_exit(a) APCALL(APCALL_EXIT,(a))
diff -r 3619e1101948 -r 1a22dd1f2531 sys/arch/newsmips/include/romcall.h
--- a/sys/arch/newsmips/include/romcall.h Sat Apr 13 07:53:53 2002 +0000
+++ b/sys/arch/newsmips/include/romcall.h Sat Apr 13 07:56:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: romcall.h,v 1.2 2002/04/13 02:43:43 tsutsui Exp $ */
+/* $NetBSD: romcall.h,v 1.3 2002/04/13 07:56:02 tsutsui Exp $ */
/*-
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
@@ -35,6 +35,8 @@
#define SYS_lseek 19
#define SYS_ioctl 54
+#define SYSIOCEJECT 11 /* eject floppy */
+
#define BOOTDEV_MAG(x) (((x) >> 28) & 0x0f) /* MAGIC (5) */
#define BOOTDEV_BUS(x) (((x) >> 24) & 0x0f) /* bus number */
#define BOOTDEV_CTLR(x) (((x) >> 20) & 0x0f)
@@ -56,4 +58,5 @@
int rom_read(int, void *, int);
int rom_write(int, void *, int);
int rom_lseek(int, int, int);
+int rom_ioctl(int, int, void *);
#endif
diff -r 3619e1101948 -r 1a22dd1f2531 sys/arch/newsmips/stand/common/romcalls.S
--- a/sys/arch/newsmips/stand/common/romcalls.S Sat Apr 13 07:53:53 2002 +0000
+++ b/sys/arch/newsmips/stand/common/romcalls.S Sat Apr 13 07:56:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: romcalls.S,v 1.3 2002/04/13 02:43:44 tsutsui Exp $ */
+/* $NetBSD: romcalls.S,v 1.4 2002/04/13 07:56:03 tsutsui Exp $ */
/*-
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
@@ -117,7 +117,6 @@
j ra
nop
-
.globl rom_lseek
rom_lseek:
addu sp, sp, -32
@@ -136,3 +135,22 @@
addu sp, sp, 32
j ra
nop
+
+ .globl rom_ioctl
+rom_ioctl:
+ addu sp, sp, -32
+ sw ra, 28(sp)
+
+ sw a0, 16(sp)
+ sw a1, 20(sp)
+ sw a2, 24(sp)
+
+ li a0, SYS_ioctl
+ addu a1, sp, 16
+ syscall
+ nop
+
+ lw ra, 28(sp)
+ addu sp, sp, 32
+ j ra
+ nop
Home |
Main Index |
Thread Index |
Old Index