From owner-freebsd-mips@FreeBSD.ORG Thu Mar 10 03:11:10 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BCC9106564A for ; Thu, 10 Mar 2011 03:11:10 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id BE3738FC12 for ; Thu, 10 Mar 2011 03:11:09 +0000 (UTC) Received: by wyf23 with SMTP id 23so1335569wyf.13 for ; Wed, 09 Mar 2011 19:11:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MrwQvI/rSbBSzIFlS7toTPr2fMKkxUvU4Uxx47tM96Q=; b=X66mDIJsJN9AQECxVTlUtbg0aJZc83r5kBCO+Lei2mCkabIjtevt9k4apRy/kMUyVT G2F4Apgze/qwc+V9KKUsXGzw6NQs09pcYCxotVXTnfGk010TjakmJBuuipPDCj4opV9v IjU7krurZ/EkklAKeFM7hSjo2jdMj7KVPlBPw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Hyf0emv8sQ2P9QWYKrbuCCoZiic6nCIhYItDgA5qha0yuxZ9gusHsloVreVS/RKKnJ pPdIiWLcsZ20bDicLDQzQLsOEOwvM5MCIHr6vHTJi/gPJyCGvy0lYlvYobem9XUwhuMw sWfz5KLbcHqQjzihikTpx3E6HB/RYAVvX0lOw= MIME-Version: 1.0 Received: by 10.227.196.208 with SMTP id eh16mr6411248wbb.224.1299726668379; Wed, 09 Mar 2011 19:11:08 -0800 (PST) Received: by 10.227.142.141 with HTTP; Wed, 9 Mar 2011 19:11:08 -0800 (PST) In-Reply-To: References: Date: Thu, 10 Mar 2011 08:41:08 +0530 Message-ID: From: "Jayachandran C." To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org Subject: Re: What to do when redboot lies about RAM? X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2011 03:11:10 -0000 On Thu, Mar 10, 2011 at 8:13 AM, Adrian Chadd wrote: > One of the Ubiquiti boards (LS-SR71) has redboot firmware that seems to lie > about the amount of RAM it has. > > Although the board has 32 megabytes of RAM, Redboot only reports 16mb. Linux > doesn't query redboot; it probes the amount of RAM by writing bits and > reading them back until it finds where that fails. > > I've whacked together a quick hack to make this memory selection overridable > in the kernel configuration. > What would be the cleaner way? :) Sibyte (mips/sibyte/sb_machdep.c) has a tunable hw.physmem for this. That has an advantage that you do not have to re-compile the kernel to change the memory setting. There is also a MAXMEM option already in conf/options.mips which can be used I think... JC.