svn commit: r227470 - head/usr.sbin/pc-sysinstall/backend-query

Ed Maste emaste at FreeBSD.org
Sat Nov 12 19:02:55 UTC 2011


Author: emaste
Date: Sat Nov 12 19:02:55 2011
New Revision: 227470
URL: http://svn.freebsd.org/changeset/base/227470

Log:
  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:
  head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh

Modified: head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh
==============================================================================
--- head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh	Sat Nov 12 17:12:33 2011	(r227469)
+++ head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh	Sat Nov 12 19:02:55 2011	(r227470)
@@ -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


More information about the svn-src-head mailing list