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
This commit is contained in:
Ed Maste 2011-11-12 19:02:55 +00:00
parent a3909ec506
commit 574280af1a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227470

View File

@ -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