summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-09-09 10:33:04 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-09-09 10:33:04 +0200
commitb509223167d6cf0780e1dd7ac9b2bde6bf6a2728 (patch)
tree4c2dd8eca716e827f660c5a76c45b34f8d2920fe /i386
parent3ce294eb968503db9dece469100344a4a472aa1d (diff)
parent3f5fd3de61dbca8c4b081acc6ffc36ab59486a2c (diff)
Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumach
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/.gitignore1
-rw-r--r--i386/i386/locore.h34
-rw-r--r--i386/i386/pcb.c2
-rw-r--r--i386/i386/pcb.h2
-rw-r--r--i386/i386/trap.c21
5 files changed, 30 insertions, 30 deletions
diff --git a/i386/i386/.gitignore b/i386/i386/.gitignore
new file mode 100644
index 0000000..4520a2a
--- /dev/null
+++ b/i386/i386/.gitignore
@@ -0,0 +1 @@
+/i386asm.h
diff --git a/i386/i386/locore.h b/i386/i386/locore.h
index b649726..bfd1317 100644
--- a/i386/i386/locore.h
+++ b/i386/i386/locore.h
@@ -1,6 +1,5 @@
/*
- * Header file for printf type functions.
- * Copyright (C) 2006 Free Software Foundation.
+ * Copyright (C) 2006, 2011 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
@@ -24,18 +23,37 @@
#include <kern/sched_prim.h>
-extern int copyin (const void *userbuf, void *kernelbuf, size_t cn);
+/*
+ * Fault recovery in copyin/copyout routines.
+ */
+struct recovery {
+ int fault_addr;
+ int recover_addr;
+};
-extern int copyinmsg (const void *userbuf, void *kernelbuf, size_t cn);
+extern struct recovery recover_table[];
+extern struct recovery recover_table_end[];
-extern int copyout (const void *kernelbuf, void *userbuf, size_t cn);
+/*
+ * Recovery from Successful fault in copyout does not
+ * return directly - it retries the pte check, since
+ * the 386 ignores write protection in kernel mode.
+ */
+extern struct recovery retry_table[];
+extern struct recovery retry_table_end[];
+
+
+extern int call_continuation (continuation_t continuation);
+extern int discover_x86_cpu_type (void);
+
+extern int copyin (const void *userbuf, void *kernelbuf, size_t cn);
+extern int copyinmsg (const void *userbuf, void *kernelbuf, size_t cn);
+extern int copyout (const void *kernelbuf, void *userbuf, size_t cn);
extern int copyoutmsg (const void *kernelbuf, void *userbuf, size_t cn);
extern int inst_fetch (int eip, int cs);
-extern int call_continuation (continuation_t continuation);
-
extern void cpu_shutdown (void);
extern unsigned int cpu_features[1];
@@ -72,7 +90,5 @@ extern unsigned int cpu_features[1];
#define CPU_HAS_FEATURE(feature) (cpu_features[(feature) / 32] & (1 << ((feature) % 32)))
-extern int discover_x86_cpu_type (void);
-
#endif /* _MACHINE__LOCORE_H_ */
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index 7f2b3c8..fffa92a 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -78,7 +78,7 @@ vm_offset_t kernel_stack[NCPUS]; /* top of active_stack */
void stack_attach(thread, stack, continuation)
register thread_t thread;
register vm_offset_t stack;
- void (*continuation)();
+ void (*continuation)(thread_t);
{
counter(if (++c_stacks_current > c_stacks_max)
c_stacks_max = c_stacks_current);
diff --git a/i386/i386/pcb.h b/i386/i386/pcb.h
index f8671a2..21bdfd9 100644
--- a/i386/i386/pcb.h
+++ b/i386/i386/pcb.h
@@ -64,7 +64,7 @@ extern void load_context (thread_t new);
extern void stack_attach (
thread_t thread,
vm_offset_t stack,
- void (*continuation)());
+ void (*continuation)(thread_t));
extern vm_offset_t stack_detach (thread_t thread);
diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index 90d4c31..01c83f5 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -123,25 +123,6 @@ user_page_fault_continue(kr)
/*NOTREACHED*/
}
-/*
- * Fault recovery in copyin/copyout routines.
- */
-struct recovery {
- int fault_addr;
- int recover_addr;
-};
-
-extern struct recovery recover_table[];
-extern struct recovery recover_table_end[];
-
-/*
- * Recovery from Successful fault in copyout does not
- * return directly - it retries the pte check, since
- * the 386 ignores write protection in kernel mode.
- */
-extern struct recovery retry_table[];
-extern struct recovery retry_table_end[];
-
static char *trap_type[] = {
"Divide error",
@@ -296,6 +277,7 @@ dump_ss(regs);
*/
register struct recovery *rp;
+ /* Linear searching; but the list is small enough. */
for (rp = retry_table; rp < retry_table_end; rp++) {
if (regs->eip == rp->fault_addr) {
regs->eip = rp->recover_addr;
@@ -312,6 +294,7 @@ dump_ss(regs);
{
register struct recovery *rp;
+ /* Linear searching; but the list is small enough. */
for (rp = recover_table;
rp < recover_table_end;
rp++) {