From da6cdf144615238b6c4e97ec23eb1e6b40f056bb Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 15 Mar 2002 17:29:06 +0000 Subject: [PATCH] Added IRIX /dev/kmem emulation pseudodevice and SVR4 net pseudodevice --- sys/arch/sgimips/sgimips/conf.c | 14 ++++++++++++-- sys/sys/conf.h | 5 ++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/sys/arch/sgimips/sgimips/conf.c b/sys/arch/sgimips/sgimips/conf.c index 528b51864a42..8abc791a3c71 100644 --- a/sys/arch/sgimips/sgimips/conf.c +++ b/sys/arch/sgimips/sgimips/conf.c @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.13 2002/03/13 13:12:29 simonb Exp $ */ +/* $NetBSD: conf.c,v 1.14 2002/03/15 17:29:06 manu Exp $ */ /* * Copyright (c) 1992, 1993 @@ -38,6 +38,8 @@ * @(#)conf.c 8.2 (Berkeley) 11/14/93 */ +#include "opt_compat_irix.h" + #include #include #include @@ -99,6 +101,8 @@ cdev_decl(arcbios_tty); #include "clockctl.h" cdev_decl(clockctl); +cdev_decl(irix_kmem); + struct bdevsw bdevsw[] = { bdev_notdef(), /* 0: */ @@ -179,7 +183,7 @@ struct cdevsw cdevsw[] = cdev_i4brbch_init(NI4BRBCH, i4brbch), /* 40: i4b raw b-channel access */ cdev_i4btrc_init(NI4BTRC, i4btrc), /* 41: i4b trace device */ cdev_i4btel_init(NI4BTEL, i4btel), /* 42: i4b phone device */ - cdev_notdef(), /* 43: */ + cdev_svr4_net_init(NSVR4_NET,svr4_net), /* 43: svr4 net pseudo-device */ cdev_notdef(), /* 44: */ cdev_notdef(), /* 45: */ cdev_notdef(), /* 46: */ @@ -199,6 +203,11 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 58: */ cdev_notdef(), /* 59: */ cdev_clockctl_init(NCLOCKCTL, clockctl),/* 60: clockctl pseudo device */ +#ifdef COMPAT_IRIX + cdev_irix_kmem_init(1,irix_kmem), /* 61: IRIX kmem emulator */ +#else + cdev_notdef(), /* 61: */ +#endif }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); @@ -281,6 +290,7 @@ static int chrtoblktbl[] = { /* 58 */ NODEV, /* 59 */ NODEV, /* 60 */ NODEV, + /* 61 */ NODEV, }; dev_t diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 181445fbd471..8cfac9704b4a 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $NetBSD: conf.h,v 1.98 2002/02/27 01:17:58 christos Exp $ */ +/* $NetBSD: conf.h,v 1.99 2002/03/15 17:29:06 manu Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -371,6 +371,9 @@ extern struct cdevsw cdevsw[]; #define cdev_clockctl_init(c,n) cdev__oci_init(c,n) #define cdev_radio_init(c,n) cdev__oci_init(c,n) +/* open, close, read, write */ +#define cdev_irix_kmem_init(c,n) cdev__ocrw_init(c,n) + /* open, close, read, ioctl, poll */ #define cdev_usb_init(c,n) cdev__ocrip_init(c,n)