summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-rw-r--r--i386/Makefrag.am2
-rw-r--r--i386/i386at/com.h10
-rw-r--r--i386/i386at/conf.c26
-rw-r--r--i386/i386at/kd.h21
-rw-r--r--i386/i386at/kd_event.h16
-rw-r--r--i386/i386at/kd_mouse.h10
-rw-r--r--i386/i386at/lpr.h10
-rw-r--r--i386/i386at/mem.h24
-rw-r--r--i386/i386at/model_dep.c3
-rw-r--r--i386/i386at/model_dep.h26
10 files changed, 127 insertions, 21 deletions
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index 15b867f..76aa538 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -24,6 +24,7 @@ libkernel_a_SOURCES += \
i386/i386at/cons_conf.c \
i386/i386at/idt.h \
i386/i386at/model_dep.c \
+ i386/i386at/model_dep.h \
i386/include/mach/sa/stdarg.h
if PLATFORM_at
@@ -50,6 +51,7 @@ libkernel_a_SOURCES += \
i386/i386at/kdasm.S \
i386/i386at/kdsoft.h \
i386/i386at/mem.c \
+ i386/i386at/mem.h \
i386/i386at/pic_isa.c \
i386/i386at/rtc.c \
i386/i386at/rtc.h
diff --git a/i386/i386at/com.h b/i386/i386at/com.h
index 7d5ee5e..475fa69 100644
--- a/i386/i386at/com.h
+++ b/i386/i386at/com.h
@@ -56,18 +56,24 @@ void comstart(struct tty *tp);
void comstop(struct tty *tp, int flags);
void comattach(struct bus_device *dev);
-io_return_t
+extern io_return_t
comgetstat(
dev_t dev,
int flavor,
int *data,
natural_t *count);
-io_return_t
+extern io_return_t
comsetstat(
dev_t dev,
int flavor,
int *data,
natural_t count);
+extern io_return_t comopen(int dev, int flag, io_req_t ior);
+extern io_return_t comclose(int dev, int flag);
+extern io_return_t comread(int dev, io_req_t ior);
+extern io_return_t comwrite(int dev, io_req_t ior);
+extern io_return_t comportdeath(dev_t dev, mach_port_t port);
+
#endif /* _COM_H_ */
diff --git a/i386/i386at/conf.c b/i386/i386at/conf.c
index 83c8dbf..4fcd81e 100644
--- a/i386/i386at/conf.c
+++ b/i386/i386at/conf.c
@@ -29,48 +29,42 @@
#include <mach/machine/vm_types.h>
#include <device/conf.h>
+#include <kern/mach_clock.h>
+#include <i386at/model_dep.h>
-extern int timeopen(), timeclose();
-extern vm_offset_t timemmap();
#define timename "time"
#ifndef MACH_HYP
-extern int kdopen(), kdclose(), kdread(), kdwrite();
-extern int kdgetstat(), kdsetstat(), kdportdeath();
-extern vm_offset_t kdmmap();
+#include <i386at/kd.h>
#define kdname "kd"
#if NCOM > 0
-extern int comopen(), comclose(), comread(), comwrite();
-extern int comgetstat(), comsetstat(), comportdeath();
+#include <i386at/com.h>
#define comname "com"
#endif /* NCOM > 0 */
#if NLPR > 0
-extern int lpropen(), lprclose(), lprread(), lprwrite();
-extern int lprgetstat(), lprsetstat(), lprportdeath();
+#include <i386at/lpr.h>
#define lprname "lpr"
#endif /* NLPR > 0 */
#endif /* MACH_HYP */
-extern int kbdopen(), kbdclose(), kbdread();
-extern int kbdgetstat(), kbdsetstat();
+#include <i386at/kd_event.h>
#define kbdname "kbd"
#ifndef MACH_HYP
-extern int mouseopen(), mouseclose(), mouseread(), mousegetstat();
+#include <i386at/kd_mouse.h>
#define mousename "mouse"
-extern vm_offset_t memmmap();
+#include <i386at/mem.h>
#define memname "mem"
#endif /* MACH_HYP */
-extern int kmsgopen(), kmsgclose(), kmsgread(), kmsggetstat();
+#include <device/kmsg.h>
#define kmsgname "kmsg"
#ifdef MACH_HYP
-extern int hypcnopen(), hypcnclose(), hypcnread(), hypcnwrite();
-extern int hypcngetstat(), hypcnsetstat(), hypcnportdeath();
+#include <xen/console.h>
#define hypcnname "hyp"
#endif /* MACH_HYP */
diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h
index b29a5bf..c38f90b 100644
--- a/i386/i386at/kd.h
+++ b/i386/i386at/kd.h
@@ -76,6 +76,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <sys/types.h>
#include <sys/time.h>
#include <device/cons.h>
+#include <device/io_req.h>
/*
@@ -746,4 +747,24 @@ extern void kdintr(int vec);
extern void kdb_kintr(void);
#endif /* MACH_KDB */
+extern int kdopen(dev_t dev, int flag, io_req_t ior);
+extern void kdclose(int dev, int flag);
+extern int kdread(int dev, struct uio *uio);
+extern int kdwrite(int dev, struct uio *uio);
+
+extern io_return_t kdgetstat(
+ dev_t dev,
+ int flavor,
+ int *data,
+ natural_t *count);
+
+extern io_return_t kdsetstat(
+ dev_t dev,
+ int flavor,
+ int * data,
+ natural_t count);
+
+extern int kdportdeath(dev_t dev, mach_port_t port);
+extern int kdmmap(dev_t dev, off_t off, int prot);
+
#endif /* _KD_H_ */
diff --git a/i386/i386at/kd_event.h b/i386/i386at/kd_event.h
index 677af99..ae18047 100644
--- a/i386/i386at/kd_event.h
+++ b/i386/i386at/kd_event.h
@@ -30,4 +30,20 @@ extern void X_kdb_enter (void);
extern void X_kdb_exit (void);
+extern int kbdopen(dev_t dev, int flags);
+extern void kbdclose(dev_t dev, int flags);
+extern int kbdread(dev_t dev, io_req_t ior);
+
+extern io_return_t kbdgetstat(
+ dev_t dev,
+ int flavor,
+ int *data,
+ unsigned int *count);
+
+extern io_return_t kbdsetstat(
+ dev_t dev,
+ int flavor,
+ int *data,
+ unsigned int count);
+
#endif /* _KD_EVENT_H_ */
diff --git a/i386/i386at/kd_mouse.h b/i386/i386at/kd_mouse.h
index baa51c8..0f09418 100644
--- a/i386/i386at/kd_mouse.h
+++ b/i386/i386at/kd_mouse.h
@@ -54,4 +54,14 @@ extern void mouse_packet_mouse_system_mouse (u_char *mousebuf);
extern void mouse_packet_ibm_ps2_mouse (u_char *mousebuf);
+extern int mouseopen(dev_t dev, int flags);
+extern void mouseclose(dev_t dev, int flags);
+extern int mouseread(dev_t dev, io_req_t ior);
+
+extern io_return_t mousegetstat(
+ dev_t dev,
+ int flavor,
+ int *data,
+ unsigned int *count);
+
#endif /* _KD_MOUSE_H_ */
diff --git a/i386/i386at/lpr.h b/i386/i386at/lpr.h
index ca7aeea..820d0ab 100644
--- a/i386/i386at/lpr.h
+++ b/i386/i386at/lpr.h
@@ -41,14 +41,14 @@ void lprstop(struct tty *tp, int flags);
void lprstart(struct tty *tp);
void lprattach(struct bus_device *dev);
-io_return_t
+extern io_return_t
lprgetstat(
dev_t dev,
int flavor,
int *data,
natural_t *count);
-io_return_t
+extern io_return_t
lprsetstat(
dev_t dev,
int flavor,
@@ -57,4 +57,10 @@ lprsetstat(
void lprpr_addr(unsigned short addr);
+extern int lpropen(int dev, int flag, io_req_t ior);
+extern void lprclose(int dev, int flag);
+extern int lprread(int dev, io_req_t ior);
+extern int lprwrite(int dev, io_req_t ior);
+extern int lprportdeath(dev_t dev, mach_port_t port);
+
#endif /* _LPRREG_H_ */
diff --git a/i386/i386at/mem.h b/i386/i386at/mem.h
new file mode 100644
index 0000000..3d6a96c
--- /dev/null
+++ b/i386/i386at/mem.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2013 Free Software Foundation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _MEM_H_
+#define _MEM_H_
+
+extern int memmmap(int dev, vm_offset_t off, vm_prot_t prot);
+
+#endif /* _MEM_H_ */
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 5606639..48ef329 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -620,9 +620,10 @@ void c_boot_entry(vm_offset_t bi)
#include <mach/vm_prot.h>
#include <vm/pmap.h>
#include <mach/time_value.h>
+#include <i386at/model_dep.h>
int
-timemmap(dev,off,prot)
+timemmap(dev, off, prot)
vm_prot_t prot;
{
extern time_value_t *mtime;
diff --git a/i386/i386at/model_dep.h b/i386/i386at/model_dep.h
new file mode 100644
index 0000000..3a5749f
--- /dev/null
+++ b/i386/i386at/model_dep.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013 Free Software Foundation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _MODEL_DEP_H_
+#define _MODEL_DEP_H_
+
+#include <mach/vm_prot.h>
+
+extern int timemmap(int dev, int off, vm_prot_t prot);
+
+#endif /* _MODEL_DEP_H_ */