Date: Sat, 12 Nov 2011 19:02:55 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227470 - head/usr.sbin/pc-sysinstall/backend-query Message-ID: <201111121902.pACJ2tHC057359@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111121902.pACJ2tHC057359>