]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
x86/boot: Don't use INC to set defaults
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 3 Oct 2024 14:03:38 +0000 (15:03 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 3 Oct 2024 17:07:36 +0000 (18:07 +0100)
__efi64_mb2_start() makes some bold assumptions about the efi_platform and
skip_realmode booleans.  Set them to 1 explicitly, which is more robust.

Make the comment a little more concise.

No practical change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Frediano Ziglio <frediano.ziglio@cloud.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/boot/head.S

index d1856d8012c9b019acc8e8894b8d1a8a10d566b7..af776c201a151ea17d979efdb6234f9f60628829 100644 (file)
@@ -279,14 +279,12 @@ __efi64_mb2_start:
         pop     %rbx
         pop     %rax
 
-        /* We are on EFI platform and EFI boot services are available. */
-        incb    efi_platform(%rip)
-
         /*
-         * Disable real mode and other legacy stuff which should not
-         * be run on EFI platforms.
+         * efi_multiboot2_prelude() is happy that we're on EFI platform.  Skip
+         * the BIOS initialisation path.
          */
-        incb    skip_realmode(%rip)
+        movb    $1, efi_platform(%rip)
+        movb    $1, skip_realmode(%rip)
 
         /* Jump to trampoline_setup after switching CPU to x86_32 mode. */
         lea     trampoline_setup(%rip),%r15