From owner-p4-projects@FreeBSD.ORG Sun Jun 26 22:21:39 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C627516A420; Sun, 26 Jun 2005 22:21:38 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9993116A41C for ; Sun, 26 Jun 2005 22:21:38 +0000 (GMT) (envelope-from ps@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A15C43D1F for ; Sun, 26 Jun 2005 22:21:38 +0000 (GMT) (envelope-from ps@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j5QMLcTB002724 for ; Sun, 26 Jun 2005 22:21:38 GMT (envelope-from ps@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j5QMLc0L002721 for perforce@freebsd.org; Sun, 26 Jun 2005 22:21:38 GMT (envelope-from ps@freebsd.org) Date: Sun, 26 Jun 2005 22:21:38 GMT Message-Id: <200506262221.j5QMLc0L002721@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ps@freebsd.org using -f From: Paul Saab To: Perforce Change Reviews Cc: Subject: PERFORCE change 79019 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jun 2005 22:21:39 -0000 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! */