From owner-svn-src-stable@FreeBSD.ORG Mon Mar 19 22:41:53 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A0AC1065693; Mon, 19 Mar 2012 22:41:53 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73A538FC18; Mon, 19 Mar 2012 22:41:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2JMfrBu089927; Mon, 19 Mar 2012 22:41:53 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2JMfrY6089925; Mon, 19 Mar 2012 22:41:53 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201203192241.q2JMfrY6089925@svn.freebsd.org> From: Josh Paetzel Date: Mon, 19 Mar 2012 22:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233217 - stable/9/usr.sbin/pc-sysinstall/backend-query X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2012 22:41:53 -0000 Author: jpaetzel Date: Mon Mar 19 22:41:53 2012 New Revision: 233217 URL: http://svn.freebsd.org/changeset/base/233217 Log: MFC 227470: Report the amount of memory from smbios data if provided. This should get the correct memory size even if a 32-bit image is running on a machine with > 4GB of memory. This can be useful is using a 32-bit installer on a machine which will eventually run a 64-bit image. Reviewed by: kmoore Modified: stable/9/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh Mon Mar 19 22:34:24 2012 (r233216) +++ stable/9/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh Mon Mar 19 22:41:53 2012 (r233217) @@ -25,4 +25,8 @@ # # $FreeBSD$ -expr $(sysctl -n hw.realmem) / 1048576 +if smbios_mem=$(kenv -q smbios.memory.enabled); then + expr $smbios_mem / 1024 +else + expr $(sysctl -n hw.realmem) / 1048576 +fi