Date: Sun, 26 Jun 2005 22:21:38 GMT From: Paul Saab <ps@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 79019 for review Message-ID: <200506262221.j5QMLc0L002721@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=79019 Change 79019 by ps@butter.corp on 2005/06/26 22:21:36 export dump_avail and make kernphys static Affected files ... .. //depot/projects/hammer/sys/i386/i386/dump_machdep.c#7 edit .. //depot/projects/hammer/sys/i386/i386/machdep.c#55 edit .. //depot/projects/hammer/sys/i386/include/pmap.h#22 edit Differences ... ==== //depot/projects/hammer/sys/i386/i386/dump_machdep.c#7 (text+ko) ==== @@ -64,37 +64,24 @@ static size_t fragsz; /* 20 phys_avail entry pairs correspond to 10 md_pa's */ -static struct md_pa dump_avail[10]; +static struct md_pa dump_map[10]; static void md_pa_init(void) { int n, idx; - bzero(&dump_avail, sizeof(dump_avail)); - for (n = 0; n < sizeof(dump_avail) / sizeof(dump_avail[0]); n++) { + bzero(dump_map, sizeof(dump_map)); + for (n = 0; n < sizeof(dump_map) / sizeof(dump_map[0]); n++) { idx = n * 2; - if (phys_avail[idx] == 0 && phys_avail[idx + 1] == 0) + if (dump_avail[idx] == 0 && dump_avail[idx + 1] == 0) break; - dump_avail[n].md_start = phys_avail[idx]; - dump_avail[n].md_size = phys_avail[idx + 1] - phys_avail[idx]; - if (dump_avail[n].md_start == kernphys[1]) { - /* Include the kernel, that would be helpful! */ - dump_avail[n].md_start = kernphys[0]; - dump_avail[n].md_size += kernphys[1] - kernphys[0]; - } - if (dump_avail[n].md_start == PAGE_SIZE) { + dump_map[n].md_start = dump_avail[idx]; + dump_map[n].md_size = dump_avail[idx + 1] - dump_avail[idx]; + if (dump_map[n].md_start == PAGE_SIZE) { /* Include page zero */ - dump_avail[n].md_start = 0; - dump_avail[n].md_size += PAGE_SIZE; - } - if (dump_avail[n].md_start == 0 && dump_avail[n].md_size >= 0x98000) { - /* Include mpboot code and/or bios EBDA */ - dump_avail[n].md_size = 0xA0000; - } - if (phys_avail[idx + 1] == avail_end) { - /* Include msgbuf, that would be helpful! */ - dump_avail[n].md_size += (Maxmem << PAGE_SHIFT) - avail_end; + dump_map[n].md_start = 0; + dump_map[n].md_size += PAGE_SIZE; } } } @@ -103,7 +90,7 @@ md_pa_first(void) { - return (&dump_avail[0]); + return (&dump_map[0]); } static struct md_pa * ==== //depot/projects/hammer/sys/i386/i386/machdep.c#55 (text+ko) ==== @@ -186,7 +186,7 @@ vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[10]; -vm_paddr_t kernphys[2]; +static vm_paddr_t kernphys[2]; /* must be 2 less so 0 0 can signal end of chunks */ #define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(phys_avail[0])) - 2) ==== //depot/projects/hammer/sys/i386/include/pmap.h#22 (text+ko) ==== @@ -346,7 +346,7 @@ extern pt_entry_t *CMAP1; extern vm_paddr_t avail_end; extern vm_paddr_t phys_avail[]; -extern vm_paddr_t kernphys[]; +extern vm_paddr_t dump_avail[]; extern int pseflag; extern int pgeflag; extern char *ptvmmap; /* poor name! */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506262221.j5QMLc0L002721>