Date: Wed, 9 Sep 2020 21:01:36 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365511 - head/sys/amd64/amd64 Message-ID: <202009092101.089L1aWC069281@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Sep 9 21:01:36 2020 New Revision: 365511 URL: https://svnweb.freebsd.org/changeset/base/365511 Log: amd64: report support for 1G superpages in getpagesizes(2). Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Sep 9 21:00:11 2020 (r365510) +++ head/sys/amd64/amd64/pmap.c Wed Sep 9 21:01:36 2020 (r365511) @@ -2382,6 +2382,11 @@ pmap_init(void) KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, ("pmap_init: can't assign to pagesizes[1]")); pagesizes[1] = NBPDR; + if ((amd_feature & AMDID_PAGE1GB) != 0) { + KASSERT(MAXPAGESIZES > 1 && pagesizes[2] == 0, + ("pmap_init: can't assign to pagesizes[2]")); + pagesizes[2] = NBPDP; + } } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009092101.089L1aWC069281>