Reinitialize PAT MSR via pmap_init_pat() while resuming. This function does
better job since r215703 and it is safer now.
This commit is contained in:
parent
89c3fe1b15
commit
f7107036f8
@ -76,12 +76,6 @@ ENTRY(acpi_restorecpu)
|
||||
movl WAKEUP_CTX(efer), %eax
|
||||
wrmsr
|
||||
|
||||
/* Restore PAT. */
|
||||
movl $MSR_PAT, %ecx
|
||||
movl WAKEUP_CTX(pat), %eax
|
||||
movl 4 + WAKEUP_CTX(pat), %edx
|
||||
wrmsr
|
||||
|
||||
/* Restore fast syscall stuff. */
|
||||
movl $MSR_STAR, %ecx
|
||||
movl WAKEUP_CTX(star), %eax
|
||||
|
@ -274,8 +274,6 @@ wakeup_gdt:
|
||||
ALIGN_DATA
|
||||
wakeup_efer:
|
||||
.quad 0
|
||||
wakeup_pat:
|
||||
.quad 0
|
||||
wakeup_star:
|
||||
.quad 0
|
||||
wakeup_lstar:
|
||||
|
@ -278,6 +278,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
|
||||
for (;;)
|
||||
ia32_pause();
|
||||
} else {
|
||||
pmap_init_pat();
|
||||
PCPU_SET(switchtime, 0);
|
||||
PCPU_SET(switchticks, ticks);
|
||||
#ifdef SMP
|
||||
@ -372,7 +373,6 @@ acpi_install_wakeup_handler(struct acpi_softc *sc)
|
||||
WAKECODE_FIXUP(wakeup_ctx, vm_offset_t,
|
||||
WAKECODE_VADDR(sc) + wakeup_ctx);
|
||||
WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER));
|
||||
WAKECODE_FIXUP(wakeup_pat, uint64_t, rdmsr(MSR_PAT));
|
||||
WAKECODE_FIXUP(wakeup_star, uint64_t, rdmsr(MSR_STAR));
|
||||
WAKECODE_FIXUP(wakeup_lstar, uint64_t, rdmsr(MSR_LSTAR));
|
||||
WAKECODE_FIXUP(wakeup_cstar, uint64_t, rdmsr(MSR_CSTAR));
|
||||
|
@ -1410,6 +1410,7 @@ cpususpend_handler(void)
|
||||
wbinvd();
|
||||
atomic_set_int(&stopped_cpus, cpumask);
|
||||
} else {
|
||||
pmap_init_pat();
|
||||
PCPU_SET(switchtime, 0);
|
||||
PCPU_SET(switchticks, ticks);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user