summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2006-11-19 20:54:58 +0000
committeralc <alc@FreeBSD.org>2006-11-19 20:54:58 +0000
commitb2f49e89dfec75e07cb3b542600531e1860a899d (patch)
tree891657095fe5bdd2f00ff4991286a5bf89a91acb /sys/i386
parenta8077682d09327ba1bd27f42262428f912eb8aba (diff)
downloadFreeBSD-src-b2f49e89dfec75e07cb3b542600531e1860a899d.zip
FreeBSD-src-b2f49e89dfec75e07cb3b542600531e1860a899d.tar.gz
The global variable avail_end is redundant and only used once. Eliminate
it. Make avail_start static to the pmap on amd64. (It no longer exists on other architectures.)
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/machdep.c13
-rw-r--r--sys/i386/i386/pmap.c1
-rw-r--r--sys/i386/include/pmap.h1
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index bff17e6..c416c38 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -1608,7 +1608,7 @@ sdtossd(sd, ssd)
static void
getmemsize(int first)
{
- int i, physmap_idx, pa_indx, da_indx;
+ int i, off, physmap_idx, pa_indx, da_indx;
int hasbrokenint12, has_smap;
u_long physmem_tunable;
u_int extmem;
@@ -2036,7 +2036,10 @@ do_next:
/* Trim off space for the message buffer. */
phys_avail[pa_indx] -= round_page(MSGBUF_SIZE);
- avail_end = phys_avail[pa_indx];
+ /* Map the message buffer. */
+ for (off = 0; off < round_page(MSGBUF_SIZE); off += PAGE_SIZE)
+ pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] +
+ off);
}
void
@@ -2044,7 +2047,7 @@ init386(first)
int first;
{
struct gate_descriptor *gdp;
- int gsel_tss, metadata_missing, off, x;
+ int gsel_tss, metadata_missing, x;
struct pcpu *pc;
thread0.td_kstack = proc0kstack;
@@ -2269,10 +2272,6 @@ init386(first)
/* now running on new page tables, configured,and u/iom is accessible */
- /* Map the message buffer. */
- for (off = 0; off < round_page(MSGBUF_SIZE); off += PAGE_SIZE)
- pmap_kenter((vm_offset_t)msgbufp + off, avail_end + off);
-
msgbufinit(msgbufp, MSGBUF_SIZE);
/* make a call gate to reenter kernel with */
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index c4b2032..a1de346 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -196,7 +196,6 @@ LIST_HEAD(pmaplist, pmap);
static struct pmaplist allpmaps;
static struct mtx allpmaps_lock;
-vm_paddr_t avail_end; /* PA of last available physical page */
vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */
vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */
int pgeflag = 0; /* PG_G or-in */
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index 996795f..02adbb5 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -361,7 +361,6 @@ extern struct ppro_vmtrr PPro_vmtrr[NPPROVMTRR];
extern caddr_t CADDR1;
extern pt_entry_t *CMAP1;
-extern vm_paddr_t avail_end;
extern vm_paddr_t phys_avail[];
extern vm_paddr_t dump_avail[];
extern int pseflag;
OpenPOWER on IntegriCloud