Changeset View
Changeset View
Standalone View
Standalone View
head/sys/amd64/amd64/machdep.c
Show First 20 Lines • Show All 1,615 Lines • ▼ Show 20 Lines | hammer_time(u_int64_t modulep, u_int64_t physfree) | ||||
* must be able to get the icu lock, so it can't be | * must be able to get the icu lock, so it can't be | ||||
* under witness. | * under witness. | ||||
*/ | */ | ||||
mutex_init(); | mutex_init(); | ||||
mtx_init(&icu_lock, "icu", NULL, MTX_SPIN | MTX_NOWITNESS); | mtx_init(&icu_lock, "icu", NULL, MTX_SPIN | MTX_NOWITNESS); | ||||
mtx_init(&dt_lock, "descriptor tables", NULL, MTX_DEF); | mtx_init(&dt_lock, "descriptor tables", NULL, MTX_DEF); | ||||
/* exceptions */ | /* exceptions */ | ||||
pti = pti_get_default(); | |||||
TUNABLE_INT_FETCH("vm.pmap.pti", &pti); | TUNABLE_INT_FETCH("vm.pmap.pti", &pti); | ||||
for (x = 0; x < NIDT; x++) | for (x = 0; x < NIDT; x++) | ||||
setidt(x, pti ? &IDTVEC(rsvd_pti) : &IDTVEC(rsvd), SDT_SYSIGT, | setidt(x, pti ? &IDTVEC(rsvd_pti) : &IDTVEC(rsvd), SDT_SYSIGT, | ||||
SEL_KPL, 0); | SEL_KPL, 0); | ||||
setidt(IDT_DE, pti ? &IDTVEC(div_pti) : &IDTVEC(div), SDT_SYSIGT, | setidt(IDT_DE, pti ? &IDTVEC(div_pti) : &IDTVEC(div), SDT_SYSIGT, | ||||
SEL_KPL, 0); | SEL_KPL, 0); | ||||
setidt(IDT_DB, pti ? &IDTVEC(dbg_pti) : &IDTVEC(dbg), SDT_SYSIGT, | setidt(IDT_DB, pti ? &IDTVEC(dbg_pti) : &IDTVEC(dbg), SDT_SYSIGT, | ||||
▲ Show 20 Lines • Show All 988 Lines • Show Last 20 Lines |