summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/locore.h38
-rw-r--r--i386/i386/pcb.c1
-rw-r--r--i386/i386/pcb.h61
-rw-r--r--i386/i386/pit.c2
-rw-r--r--i386/i386/spl.h22
-rw-r--r--i386/i386at/kd.c2
-rw-r--r--i386/i386at/kd.h2
-rw-r--r--i386/i386at/kd_event.c2
-rw-r--r--i386/i386at/kd_event.h33
-rw-r--r--i386/i386at/kd_mouse.c4
-rw-r--r--i386/i386at/kd_mouse.h57
-rw-r--r--i386/i386at/lpr.c2
12 files changed, 220 insertions, 6 deletions
diff --git a/i386/i386/locore.h b/i386/i386/locore.h
new file mode 100644
index 0000000..ca3467d
--- /dev/null
+++ b/i386/i386/locore.h
@@ -0,0 +1,38 @@
+/*
+ * Header file for printf type functions.
+ * Copyright (C) 2006 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, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _MACHINE_LOCORE_H_
+#define _MACHINE_LOCORE_H_
+
+#include <sys/types.h>
+
+#include <kern/sched_prim.h>
+
+extern int copyin (const void *userbuf, void *kernelbuf, size_t cn);
+
+extern int copyinmsg (vm_offset_t userbuf, vm_offset_t kernelbuf, size_t cn);
+
+extern int copyout (const void *kernelbuf, void *userbuf, size_t cn);
+
+extern int copyoutmsg (vm_offset_t kernelbuf, vm_offset_t userbuf, size_t cn);
+
+extern int call_continuation (continuation_t continuation);
+
+#endif /* _MACHINE__LOCORE_H_ */
+
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index a660357..f431e89 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -50,6 +50,7 @@
#include "gdt.h"
#include "ldt.h"
#include "ktss.h"
+#include "pcb.h"
#if NCPUS > 1
#include <i386/mp_desc.h>
diff --git a/i386/i386/pcb.h b/i386/i386/pcb.h
new file mode 100644
index 0000000..e7d3363
--- /dev/null
+++ b/i386/i386/pcb.h
@@ -0,0 +1,61 @@
+/*
+ *
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * 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, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Author: Barry deFreese.
+ */
+/*
+ *
+ *
+ */
+
+#ifndef _I386_PCB_H_
+#define _I386_PCB_H_
+
+#include <sys/types.h>
+
+extern void pcb_init (thread_t thread);
+
+extern void pcb_terminate (thread_t thread);
+
+extern void pcb_collect (thread_t thread);
+
+extern kern_return_t thread_setstatus (
+ thread_t thread,
+ int flavor,
+ thread_state_t tstate,
+ unsigned int count);
+
+extern kern_return_t thread_getstatus (
+ thread_t thread,
+ int flavor,
+ thread_state_t tstate,
+ unsigned int *count);
+
+extern void thread_set_syscall_return (
+ thread_t thread,
+ kern_return_t retval);
+
+extern vm_offset_t user_stack_low (vm_size_t stack_size);
+
+extern vm_offset_t set_user_regs (
+ vm_offset_t stack_base,
+ vm_offset_t stack_size,
+ struct exec_info *exec_info,
+ vm_size_t arg_size);
+
+#endif /* _I386_PCB_H_ */
diff --git a/i386/i386/pit.c b/i386/i386/pit.c
index b9d71db..5c927c3 100644
--- a/i386/i386/pit.c
+++ b/i386/i386/pit.c
@@ -68,7 +68,7 @@ unsigned int clknumb = CLKNUM; /* interrupt interval for timer 0 */
clkstart()
{
unsigned char byte;
- int s;
+ unsigned long s;
intpri[0] = SPLHI;
form_pic_mask();
diff --git a/i386/i386/spl.h b/i386/i386/spl.h
index 7208ac8..8552e11 100644
--- a/i386/i386/spl.h
+++ b/i386/i386/spl.h
@@ -34,6 +34,8 @@ typedef int spl_t;
extern spl_t (splhi)(void);
+extern spl_t (spl0)(void);
+
extern spl_t (spl1)(void);
extern spl_t (spl2)(void);
@@ -48,6 +50,26 @@ extern spl_t (spldcm)(void);
extern spl_t (spl6)(void);
+extern spl_t (splsched)(void);
+
+extern spl_t (splx)(spl_t n);
+
+extern spl_t (splsoftclock)(void);
+
+extern void splon (unsigned long n);
+
+extern unsigned long sploff (void);
+
+extern spl_t splhigh (void);
+
+extern spl_t splimp (void);
+
+extern spl_t spltty (void);
+
+extern spl_t splclock (void);
+
+extern void setsoftclock (void);
+
/* XXX Include each other... */
#include <i386/ipl.h>
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index b8249c2..144b87a 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -91,6 +91,8 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <i386/pio.h>
#include <i386at/cram.h>
#include <i386at/kd.h>
+#include <i386at/kd_event.h>
+#include <i386at/kd_mouse.h>
#include <i386at/kdsoft.h>
#include <device/cons.h>
diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h
index 9abea8e..2e8f831 100644
--- a/i386/i386at/kd.h
+++ b/i386/i386at/kd.h
@@ -567,8 +567,6 @@ extern u_char key_map[NUMKEYS][WIDTH_KMAP];
#ifdef KERNEL
#include <i386/machspl.h>
-extern void splx();
-extern spl_t spltty();
#define SPLKD spltty
#endif /* KERNEL */
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index ff70ce0..993dc44 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -77,6 +77,8 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <i386at/kd.h>
#include <i386at/kd_queue.h>
+#include "kd_event.h"
+
/*
* Code for /dev/kbd. The interrupt processing is done in kd.c,
* which calls into this module to enqueue scancode events when
diff --git a/i386/i386at/kd_event.h b/i386/i386at/kd_event.h
new file mode 100644
index 0000000..677af99
--- /dev/null
+++ b/i386/i386at/kd_event.h
@@ -0,0 +1,33 @@
+/*
+ * Keyboard event handlers
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * 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, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Author: Barry deFreese.
+ */
+/*
+ * Keyboard event handling functions.
+ *
+ */
+
+#ifndef _KD_EVENT_H_
+#define _KD_EVENT_H_
+
+extern void X_kdb_enter (void);
+
+extern void X_kdb_exit (void);
+
+#endif /* _KD_EVENT_H_ */
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index b02e792..5e8b858 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -87,6 +87,8 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <i386at/kd_queue.h>
#include <i386at/i8250.h>
+#include "kd_mouse.h"
+
static int (*oldvect)(); /* old interrupt vector */
static int oldunit;
static spl_t oldspl;
@@ -263,7 +265,7 @@ mouseclose(dev, flags)
case MICROSOFT_MOUSE7:
case MOUSE_SYSTEM_MOUSE:
case LOGITECH_TRACKMAN:
- serial_mouse_close(dev);
+ serial_mouse_close(dev, flags);
break;
case IBM_MOUSE:
ibm_ps2_mouse_close(dev);
diff --git a/i386/i386at/kd_mouse.h b/i386/i386at/kd_mouse.h
new file mode 100644
index 0000000..baa51c8
--- /dev/null
+++ b/i386/i386at/kd_mouse.h
@@ -0,0 +1,57 @@
+/*
+ * Mouse event handlers
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * 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, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Author: Barry deFreese.
+ */
+/*
+ * Mouse event handling functions.
+ *
+ */
+
+#ifndef _KD_MOUSE_H_
+#define _KD_MOUSE_H_
+
+#include <sys/types.h>
+
+extern void mouse_button (kev_type which, u_char direction);
+
+extern void mouse_enqueue (kd_event *ev);
+
+extern void mouse_moved (struct mouse_motion where);
+
+extern void mouse_handle_byte (u_char ch);
+
+extern void serial_mouse_open (dev_t dev);
+
+extern void serial_mouse_close (dev_t dev, int flags);
+
+extern void kd_mouse_open (dev_t dev, int mouse_pic);
+
+extern void kd_mouse_close (dev_t dev, int mouse_pic);
+
+extern void ibm_ps2_mouse_open (dev_t dev);
+
+extern void ibm_ps2_mouse_close (dev_t dev);
+
+extern void mouse_packet_microsoft_mouse (u_char *mousebuf);
+
+extern void mouse_packet_mouse_system_mouse (u_char *mousebuf);
+
+extern void mouse_packet_ibm_ps2_mouse (u_char *mousebuf);
+
+#endif /* _KD_MOUSE_H_ */
diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c
index d68313d..f2fa032 100644
--- a/i386/i386at/lpr.c
+++ b/i386/i386at/lpr.c
@@ -57,8 +57,6 @@
#include <chips/busses.h>
#include <i386at/lprreg.h>
-extern void splx();
-extern spl_t spltty();
extern void timeout();
extern void ttrstrt();