aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2018-06-11 15:28:20 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2018-06-11 15:28:20 +0000
commitb45e10c3f4be1c65c0648cdfe5d682b583daab9e (patch)
tree707063d9d3b67a058237bdea6a7f12b97cca12ea
parentc205be608c82f63f82fccb6600fafb0aee3bb176 (diff)
downloadsrc-b45e10c3f4be1c65c0648cdfe5d682b583daab9e.tar.gz
src-b45e10c3f4be1c65c0648cdfe5d682b583daab9e.zip
Fix braino in r334799. Maxmem is in pages.
Reported by: ae, pho Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
Notes
Notes: svn path=/head/; revision=334952
-rw-r--r--sys/amd64/amd64/mp_machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 0e03ba26e2d5..8062ed62161d 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -122,7 +122,7 @@ mp_bootaddress(vm_paddr_t *physmap, unsigned int *physmap_idx)
*/
if (physmap[i] >= GiB(4) || physmap[i + 1] -
round_page(physmap[i]) < PAGE_SIZE * 3 ||
- physmap[i + 1] > Maxmem)
+ atop(physmap[i + 1]) > Maxmem)
continue;
allocated = true;