svn commit: r233217 - stable/9/usr.sbin/pc-sysinstall/backend-query

Josh Paetzel jpaetzel at FreeBSD.org
Mon Mar 19 22:41:53 UTC 2012


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


More information about the svn-src-stable-9 mailing list