From owner-svn-src-all@FreeBSD.ORG Thu Jan 15 07:45:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72DE7106564A; Thu, 15 Jan 2009 07:45:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6215B8FC14; Thu, 15 Jan 2009 07:45:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0F7jeY3068425; Thu, 15 Jan 2009 07:45:40 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0F7jeEe068424; Thu, 15 Jan 2009 07:45:40 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901150745.n0F7jeEe068424@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jan 2009 07:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187292 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2009 07:45:40 -0000 Author: imp Date: Thu Jan 15 07:45:40 2009 New Revision: 187292 URL: http://svn.freebsd.org/changeset/base/187292 Log: MFp4: Remove #if'd 0 code. It is interfering with other diffs. Modified: head/sys/mips/mips/machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Thu Jan 15 07:11:14 2009 (r187291) +++ head/sys/mips/mips/machdep.c Thu Jan 15 07:45:40 2009 (r187292) @@ -82,9 +82,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if 0 -#include -#endif #include #include #include @@ -104,10 +101,6 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, static char cpu_model[30]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "Machine model"); -#if 0 /* see comment below */ -static void getmemsize(void); -#endif - int cold = 1; int Maxmem; long realmem = 0; @@ -294,116 +287,6 @@ mips_proc0_init(void) struct msgbuf *msgbufp=0; -#if 0 -/* - * This code has been moved to the platform_init code. The only - * thing that's beign done here that hasn't been moved is the wired tlb - * pool stuff. I'm still trying to understand that feature..., since - * it maps from the end the kernel to 0x08000000 somehow. But the stuff - * was stripped out, so it is hard to say what's going on.... - */ -u_int32_t freemem_start; - -static void -getmemsize() -{ - vm_offset_t kern_start, kern_end; - vm_offset_t AllowMem, memsize; - const char *cp; - size_t sz; - int phys_avail_cnt; - - /* Determine memory layout */ - phys_avail_cnt = 0; - kern_start = mips_trunc_page(MIPS_CACHED_TO_PHYS(btext)); - if (kern_start < freemem_start) -panic("kernel load address too low, overlapping with memory reserved for FPC IPC\n"); - - if (kern_start > freemem_start) { - phys_avail[phys_avail_cnt++] = freemem_start; - /* - * Since the stack is setup just before kern_start, - * leave some space for stack to grow - */ - phys_avail[phys_avail_cnt++] = kern_start - PAGE_SIZE * 3; - MIPS_DEBUG_PRINT("phys_avail : %p - %p", \ - phys_avail[phys_avail_cnt-2], phys_avail[phys_avail_cnt-1]); - } - - kern_end = (vm_offset_t) end; - kern_end = (vm_offset_t) mips_round_page(kern_end); - MIPS_DEBUG_PRINT("kern_start : 0x%x, kern_end : 0x%x", btext, kern_end); - phys_avail[phys_avail_cnt++] = MIPS_CACHED_TO_PHYS(kern_end); - - if (need_wired_tlb_page_pool) { - mips_wired_tlb_physmem_start = MIPS_CACHED_TO_PHYS(kern_end); - mips_wired_tlb_physmem_end = 0x08000000; - MIPS_DEBUG_PRINT("%s: unmapped page start [0x%x] end[0x%x]\n",\ - __FUNCTION__, mips_wired_tlb_physmem_start, \ - mips_wired_tlb_physmem_end); - if (mips_wired_tlb_physmem_start > mips_wired_tlb_physmem_end) - panic("Error in Page table page physical address assignment\n"); - } - - if (bootinfo.bi_memsizes_valid) - memsize = bootinfo.bi_basemem * 1024; - else { - memsize = SDRAM_MEM_SIZE; - } - - /* - * hw.physmem is a size in bytes; we also allow k, m, and g suffixes - * for the appropriate modifiers. - */ - if ((cp = getenv("hw.physmem")) != NULL) { - vm_offset_t sanity; - char *ep; - - sanity = AllowMem = strtouq(cp, &ep, 0); - if ((ep != cp) && (*ep != 0)) { - switch(*ep) { - case 'g': - case 'G': - AllowMem <<= 10; - case 'm': - case 'M': - AllowMem <<= 10; - case 'k': - case 'K': - AllowMem <<= 10; - break; - default: - AllowMem = sanity = 0; - } - if (AllowMem < sanity) - AllowMem = 0; - } - if (!AllowMem || (AllowMem < (kern_end - KERNBASE))) - printf("Ignoring invalid hw.physmem size of '%s'\n", cp); - } else - AllowMem = 0; - - if (AllowMem) - memsize = (memsize > AllowMem) ? AllowMem : memsize; - - phys_avail[phys_avail_cnt++] = SDRAM_ADDR_START + memsize; - MIPS_DEBUG_PRINT("phys_avail : 0x%x - 0x%x", \ - phys_avail[phys_avail_cnt-2], phys_avail[phys_avail_cnt-1]); - phys_avail[phys_avail_cnt] = 0; - - physmem = btoc(memsize); - Maxmem = physmem; - - /* - * Initialize error message buffer (at high end of memory). - */ - sz = round_page(MSGBUF_SIZE); - msgbufp = (struct msgbuf *) pmap_steal_memory(sz); - msgbufinit(msgbufp, sz); - printf("%s: msgbufp[size=%d] = 0x%p\n", __FUNCTION__, sz, msgbufp); -} -#endif - /* * Initialize the hardware exception vectors, and the jump table used to * call locore cache and TLB management functions, based on the kind