:: commit a7e879ab3f9f8de6d290d0283b459c37722108bd

Mintsuki <mintsuki@protonmail.com> — 2025-09-21 19:20

parents: b3f0233219

Revert "protos/linux_x86: For the 64-bit protocol, call flush_irqs() after disabling interrupts"

This reverts commit a800f4b1c455bb4dda545f76851ae773fb34f539.
diff --git a/common/protos/linux_64.asm_uefi_x86_64 b/common/protos/linux_64.asm_uefi_x86_64
index 00ca10bb..bca9b46b 100644
--- a/common/protos/linux_64.asm_uefi_x86_64
+++ b/common/protos/linux_64.asm_uefi_x86_64
@@ -1,8 +1,3 @@
-section .rodata
-
-invalid_idt:
-    dq 0, 0
-
 section .data
 
 align 16
@@ -36,15 +31,12 @@ section .text
 
 bits 64
 
-extern flush_irqs
-
 global linux_spinup64
 linux_spinup64:
     cli
     cld
 
     lgdt [rel linux_gdt64_ptr]
-    lidt [rel invalid_idt]
 
     lea rbx, [rel .fj]
     push 0x10
@@ -59,20 +51,6 @@ linux_spinup64:
     mov gs, eax
     mov ss, eax
 
-    push r8
-    push r9
-    push rcx
-    push rdx
-    push rsi
-    push rdi
-    call flush_irqs
-    pop rdi
-    pop rsi
-    pop rdx
-    pop rcx
-    pop r9
-    pop r8
-
     mov rax, rdi
 
     xor ebp, ebp
diff --git a/common/protos/linux_x86.c b/common/protos/linux_x86.c
index 7aeef99e..a7b6bf9a 100644
--- a/common/protos/linux_x86.c
+++ b/common/protos/linux_x86.c
@@ -612,6 +612,7 @@ no_fb:;
 
 #if defined (UEFI) && defined (__x86_64__)
     if (use_64_bit_proto == true && (setup_header->xloadflags & 3) == 3) {
+        flush_irqs();
         linux_spinup64((void *)kernel_load_addr + 0x200, boot_params);
     }
 #endif
tab: 248 wrap: offon