mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
amd64: do not switch back and restore UEFI IDT in wrmsr_early_safe_end()
The memory where the pre-OS IDT was located might be already consumed by kernel. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57321
This commit is contained in:
@@ -1827,7 +1827,6 @@ clear_pcb_flags(struct pcb *pcb, const u_int flags)
|
||||
}
|
||||
|
||||
extern const char wrmsr_early_safe_gp_handler[];
|
||||
static struct region_descriptor wrmsr_early_safe_orig_efi_idt;
|
||||
|
||||
void
|
||||
wrmsr_early_safe_start(void)
|
||||
@@ -1836,7 +1835,6 @@ wrmsr_early_safe_start(void)
|
||||
struct gate_descriptor *gpf_descr;
|
||||
int i;
|
||||
|
||||
sidt(&wrmsr_early_safe_orig_efi_idt);
|
||||
efi_idt.rd_limit = 32 * sizeof(idt0[0]);
|
||||
efi_idt.rd_base = (uintptr_t)idt0;
|
||||
lidt(&efi_idt);
|
||||
@@ -1857,12 +1855,6 @@ wrmsr_early_safe_start(void)
|
||||
void
|
||||
wrmsr_early_safe_end(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
lidt(&wrmsr_early_safe_orig_efi_idt);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
memset_early(&idt0[i], 0, sizeof(idt0[0]));
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user