]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 258176:
authorroyger <royger@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 5 Dec 2013 18:08:05 +0000 (18:08 +0000)
committerroyger <royger@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 5 Dec 2013 18:08:05 +0000 (18:08 +0000)
commit6b6674034f3acbc69eeeb3a2d171e2d14f04eb81
tree7cd273c80ea5d2bfa2118107513388a6d01a77a4
parent256c76315834add3a340827e602f94a75ea97cd2
MFC 258176:

Fix accounting for hw.realmem on the i386 and amd64 platforms.

sys/i386/i386/machdep.c:
sys/amd64/amd64/machdep.c:
The value reported by FreeBSD as "real memory" when booting
doesn't match what is later reported by sysctl as hw.realmem.
This is due to the fact that the value printed during the
boot process is fetched from smbios data (when possible),
and accounts for holes in physical memory. On the other
hand, the value of hw.realmem is unconditionally set to be
one larger than the highest page of the physical address
space.

Fix this by setting hw.realmem to the same value printed
during boot, this makes hw.realmem honour it's name and
account properly for physical memory present in the system.

Submitted by: Roger Pau MonnĂ©
Reviewed by: gibbs
Approved by: gibbs (mentor)
Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/stable/10@258996 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/amd64/amd64/machdep.c
sys/i386/i386/machdep.c