From b45e10c3f4be1c65c0648cdfe5d682b583daab9e Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 11 Jun 2018 15:28:20 +0000 Subject: [PATCH] Fix braino in r334799. Maxmem is in pages. Reported by: ae, pho Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/amd64/mp_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;