summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-22 21:30:09 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-22 21:33:20 +0100
commited76abfe7620043d898f488ea8c87bf132364845 (patch)
tree7e490147f2f66da7dcf9b4d2fef1f03bc799dbfa /i386
parentea8c8c2dac05b2b7788fefd0f3c7a7e00b17b6ae (diff)
Add phys_first_addr and phys_last_addr declaration
* i386/i386/model_dep.h (phys_first_addr, phys_last_addr): New declarations. * i386/i386/trap.c: Include <i386/model_dep.h> (user_trap): Remove extern declaration of phys_last_addr. * i386/intel/pmap.c: Include <i386/model_dep.h> (phys_first_addr, phys_last_addr): Remove extern declaration.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/model_dep.h7
-rw-r--r--i386/i386/trap.c2
-rw-r--r--i386/intel/pmap.c8
3 files changed, 9 insertions, 8 deletions
diff --git a/i386/i386/model_dep.h b/i386/i386/model_dep.h
index c6685d0..a41c474 100644
--- a/i386/i386/model_dep.h
+++ b/i386/i386/model_dep.h
@@ -50,4 +50,11 @@ extern void resettodr (void);
extern void startrtclock (void);
+/*
+ * More-specific code provides these;
+ * they indicate the total extent of physical memory
+ * that we know about and might ever have to manage.
+ */
+extern vm_offset_t phys_first_addr, phys_last_addr;
+
#endif /* _I386AT_MODEL_DEP_H_ */
diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index 5609131..111fdc4 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -33,6 +33,7 @@
#include <mach/machine/eflags.h>
#include <i386/trap.h>
#include <i386/fpu.h>
+#include <i386/model_dep.h>
#include <intel/read_fault.h>
#include <machine/machspl.h> /* for spl_t */
@@ -374,7 +375,6 @@ int user_trap(regs)
int subcode;
register int type;
register thread_t thread = current_thread();
- extern vm_offset_t phys_last_addr;
if ((vm_offset_t)thread < phys_last_addr) {
printf("user_trap: bad thread pointer 0x%p\n", thread);
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index e380be7..e385404 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -81,6 +81,7 @@
#include <i386/cpu_number.h>
#include <i386/proc_reg.h>
#include <i386/locore.h>
+#include <i386/model_dep.h>
#define WRITE_PTE(pte_p, pte_entry) *(pte_p) = (pte_entry);
@@ -142,13 +143,6 @@ char *pv_lock_table; /* pointer to array of bits */
boolean_t pmap_initialized = FALSE;
/*
- * More-specific code provides these;
- * they indicate the total extent of physical memory
- * that we know about and might ever have to manage.
- */
-extern vm_offset_t phys_first_addr, phys_last_addr;
-
-/*
* Range of kernel virtual addresses available for kernel memory mapping.
* Does not include the virtual addresses used to map physical memory 1-1.
* Initialized by pmap_bootstrap.