From ed76abfe7620043d898f488ea8c87bf132364845 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 22 Nov 2009 21:30:09 +0100 Subject: 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 (user_trap): Remove extern declaration of phys_last_addr. * i386/intel/pmap.c: Include (phys_first_addr, phys_last_addr): Remove extern declaration. --- i386/i386/model_dep.h | 7 +++++++ i386/i386/trap.c | 2 +- i386/intel/pmap.c | 8 +------- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'i386') 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 #include #include +#include #include #include /* 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 #include #include +#include #define WRITE_PTE(pte_p, pte_entry) *(pte_p) = (pte_entry); @@ -141,13 +142,6 @@ char *pv_lock_table; /* pointer to array of bits */ /* Has pmap_init completed? */ 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. -- cgit v1.2.3