From owner-p4-projects@FreeBSD.ORG Mon May 12 17:43:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E318037B401; Mon, 12 May 2003 17:43:20 -0700 (PDT) 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 92DEC37B404 for ; Mon, 12 May 2003 17:43:20 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5F3F43FBD for ; Mon, 12 May 2003 17:43:19 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4D0hJ0U047656 for ; Mon, 12 May 2003 17:43:19 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4D0hJJn047653 for perforce@freebsd.org; Mon, 12 May 2003 17:43:19 -0700 (PDT) Date: Mon, 12 May 2003 17:43:19 -0700 (PDT) Message-Id: <200305130043.h4D0hJJn047653@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31040 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 00:43:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=31040 Change 31040 by jmallett@jmallett_dalek on 2003/05/12 17:42:23 Cheatingly do things in KSEG0. Instead of fooling with physmem in sgimips_machdep, fool with physsz, and convert and print it as physmem in pmap_bootstrap, as a placeholder for using this variable. Cheat and run with what we've got to work with from ARCS. Affected files ... .. //depot/projects/mips/sys/mips/include/pmap.h#8 edit .. //depot/projects/mips/sys/mips/mips/pmap.c#12 edit .. //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#15 edit Differences ... ==== //depot/projects/mips/sys/mips/include/pmap.h#8 (text+ko) ==== @@ -52,6 +52,7 @@ extern vm_offset_t avail_start; extern vm_offset_t avail_end; extern vm_offset_t phys_avail[]; +extern vm_size_t physsz; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; extern struct segtab *segbase; ==== //depot/projects/mips/sys/mips/mips/pmap.c#12 (text+ko) ==== @@ -55,6 +55,7 @@ vm_offset_t avail_start; vm_offset_t avail_end; vm_offset_t phys_avail[10]; /* XXX this is wrong */ +vm_size_t physsz; vm_offset_t virtual_avail; vm_offset_t virtual_end; @@ -177,7 +178,7 @@ vm_offset_t pmap_map(vm_offset_t *va, vm_offset_t start, vm_offset_t end, int prot) { - return (MIPS_PHYS_TO_KSEG1(start)); + return (MIPS_PHYS_TO_KSEG0(start)); } int @@ -344,6 +345,9 @@ { int i; + printf("Bootstrapping with %lu bytes of physical memory\n", physsz); + physmem = btoc(physsz); + kptemapsize = PAGE_SIZE; /* XXX placeholder */ kptemap = pmap_steal_memory(sizeof *kptemap * kptemapsize); @@ -364,8 +368,9 @@ /* * Set the start and end of kva. */ - virtual_avail = VM_MIN_KERNEL_ADDRESS; - virtual_end = VM_MAX_KERNEL_ADDRESS; + virtual_avail = avail_start; + virtual_end = avail_end; + kernel_vm_end = virtual_end; } /* ==== //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#15 (text+ko) ==== @@ -29,18 +29,19 @@ #include #include +#include +#include + #include #include #include #include +#include #include #include #include -#include -#include - #include #include @@ -143,10 +144,8 @@ first, last, mem->Type); break; } - physmem += btoc(size); + physsz += size; } - printf("total memory = %ld (%ld MB)\n", ctob(physmem), - ctob(physmem) / (1024 * 1024)); printf("ARCS memory = %d (%d KB)\n", ctob(arcsmem), ctob(arcsmem) / 1024); printf("avail memory = %d (%d MB)\n", ctob(availmem),