Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2012 22:41:53 +0000 (UTC)
From:      Josh Paetzel <jpaetzel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r233217 - stable/9/usr.sbin/pc-sysinstall/backend-query
Message-ID:  <201203192241.q2JMfrY6089925@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203192241.q2JMfrY6089925>