From owner-p4-projects@FreeBSD.ORG Sat Mar 19 22:02:58 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6919A16A4D0; Sat, 19 Mar 2005 22:02:58 +0000 (GMT) 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 40D4516A4CE for ; Sat, 19 Mar 2005 22:02:58 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE59343D2F for ; Sat, 19 Mar 2005 22:02:57 +0000 (GMT) (envelope-from jmallett@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 j2JM2vfl046418 for ; Sat, 19 Mar 2005 22:02:57 GMT (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j2JM2vV0046415 for perforce@freebsd.org; Sat, 19 Mar 2005 22:02:57 GMT (envelope-from jmallett@freebsd.org) Date: Sat, 19 Mar 2005 22:02:57 GMT Message-Id: <200503192202.j2JM2vV0046415@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 73542 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: Sat, 19 Mar 2005 22:02:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=73542 Change 73542 by jmallett@jmallett_windward on 2005/03/19 22:02:16 Make the most of this realmem stuff. Affected files ... .. //depot/projects/mips/sys/mips/include/pmap.h#17 edit .. //depot/projects/mips/sys/mips/mips/machdep.c#52 edit .. //depot/projects/mips/sys/mips/mips/pmap.c#42 edit .. //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#41 edit Differences ... ==== //depot/projects/mips/sys/mips/include/pmap.h#17 (text+ko) ==== @@ -72,7 +72,6 @@ extern pmap_t kernel_pmap; extern vm_offset_t phys_avail[]; -extern vm_size_t physsz; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; ==== //depot/projects/mips/sys/mips/mips/machdep.c#52 (text+ko) ==== @@ -76,16 +76,13 @@ vm_offset_t kstack0; -vm_size_t physsz; - void cpu_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); void mips_init(void) { - physmem = btoc(physsz); - + init_param2(physmem); mips_cpu_init(); pmap_bootstrap(); ==== //depot/projects/mips/sys/mips/mips/pmap.c#42 (text+ko) ==== @@ -298,7 +298,7 @@ /* * Initialise TLB management, and have it allocate page tables. */ - tlb_bootstrap(physsz >> PAGE_SHIFT, pmap_steal_memory); + tlb_bootstrap(realmem, pmap_steal_memory); for (i = 0; phys_avail[i+2]; i+= 2) /* find non-empty ones */; ==== //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#41 (text+ko) ==== @@ -125,10 +125,10 @@ if (mem == NULL) break; - realmem += btoc(size); first = round_page(mem->BasePage << ARCS_PAGESHIFT); last = trunc_page(first + (mem->PageCount << ARCS_PAGESHIFT)); size = last - first; + realmem += btoc(size); switch (mem->Type) { case ARCS_Mem_Type_FirmwareTemporary: @@ -150,10 +150,8 @@ default: break; } - physsz += size; } - - init_param2(btoc(physsz)); + physmem = realmem; mips_init(); }