The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=606d3cb1be5fd594c1f51addd063e7c13e16bdbc
commit 606d3cb1be5fd594c1f51addd063e7c13e16bdbc Author: Konstantin Belousov <[email protected]> AuthorDate: 2026-05-29 07:32:41 +0000 Commit: Konstantin Belousov <[email protected]> CommitDate: 2026-06-01 16:35:33 +0000 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 --- sys/amd64/amd64/machdep.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 79bef08f8a64..ab9edfe2c68f 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -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
