Date: Mon, 19 Mar 2012 22:52:19 +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: r233218 - stable/9/usr.sbin/pc-sysinstall/backend-query Message-ID: <201203192252.q2JMqJ30090301@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jpaetzel Date: Mon Mar 19 22:52:19 2012 New Revision: 233218 URL: http://svn.freebsd.org/changeset/base/233218 Log: MFC: 232681 Work around broken BIOS memory reporting Andrzej has a machine with 32GB of RAM, but only 16GB is reported by the smbios.memory.enabled. Thus, use the greater of hw.realmem and the smbios value. Reported by: Andrzej Tobola <ato of iem pw edu pl> 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:41:53 2012 (r233217) +++ stable/9/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh Mon Mar 19 22:52:19 2012 (r233218) @@ -26,7 +26,14 @@ # $FreeBSD$ if smbios_mem=$(kenv -q smbios.memory.enabled); then - expr $smbios_mem / 1024 + smbios_mem=$(expr $smbios_mem / 1024) else - expr $(sysctl -n hw.realmem) / 1048576 + smbios_mem=0 +fi +realmem=$(expr $(sysctl -n hw.realmem) / 1048576) + +if [ $smbios_mem -gt $realmem ]; then + echo $smbios_mem +else + echo $realmem fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203192252.q2JMqJ30090301>