mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
amd64: add variables indicating INVLPGB works
Reviewed by: alc, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45191
This commit is contained in:
parent
111c7fc2fe
commit
bc4ffcadf2
3 changed files with 12 additions and 0 deletions
|
|
@ -1487,6 +1487,12 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
|
|||
|
||||
finishidentcpu(); /* Final stage of CPU initialization */
|
||||
|
||||
invlpgb_works = (amd_extended_feature_extensions &
|
||||
AMDFEID_INVLPGB) != 0;
|
||||
TUNABLE_INT_FETCH("vm.pmap.invlpgb_works", &invlpgb_works);
|
||||
if (invlpgb_works)
|
||||
invlpgb_maxcnt = cpu_procinfo3 & AMDID_INVLPGB_MAXCNT;
|
||||
|
||||
/*
|
||||
* Initialize the clock before the console so that console
|
||||
* initialization can use DELAY().
|
||||
|
|
|
|||
|
|
@ -550,6 +550,10 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pcid_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH,
|
|||
int invpcid_works = 0;
|
||||
SYSCTL_INT(_vm_pmap, OID_AUTO, invpcid_works, CTLFLAG_RD, &invpcid_works, 0,
|
||||
"Is the invpcid instruction available ?");
|
||||
int invlpgb_works;
|
||||
SYSCTL_INT(_vm_pmap, OID_AUTO, invlpgb_works, CTLFLAG_RD, &invlpgb_works, 0,
|
||||
"Is the invlpgb instruction available?");
|
||||
int invlpgb_maxcnt;
|
||||
int pmap_pcid_invlpg_workaround = 0;
|
||||
SYSCTL_INT(_vm_pmap, OID_AUTO, pcid_invlpg_workaround,
|
||||
CTLFLAG_RDTUN | CTLFLAG_NOFETCH,
|
||||
|
|
|
|||
|
|
@ -424,6 +424,8 @@ extern vm_offset_t virtual_end;
|
|||
extern vm_paddr_t dmaplimit;
|
||||
extern int pmap_pcid_enabled;
|
||||
extern int invpcid_works;
|
||||
extern int invlpgb_works;
|
||||
extern int invlpgb_maxcnt;
|
||||
extern int pmap_pcid_invlpg_workaround;
|
||||
extern int pmap_pcid_invlpg_workaround_uena;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue