[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v16 4/9] x86: add multiboot2 protocol support for EFI platforms



On Tue, Feb 21, 2017 at 08:19:53PM +0100, Daniel Kiper wrote:
> This way Xen can be loaded on EFI platforms using GRUB2 and
> other boot loaders which support multiboot2 protocol.
>
> Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
> ---
> v16 - suggestions/fixes:
>     - improve comments in error handling
>       (suggested by Jan Beulich).

Diff between v15 and v16:

diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index 6352142..a2177c3 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -133,16 +133,30 @@ not_multiboot:
         mov     $(sym_phys(.Lbad_ldr_msg)),%esi # Error message
         jmp     .Lget_vtb
 .Lmb2_no_st:
+        /*
+         * Here we are on EFI platform. vga_text_buffer was zapped earlier
+         * because there is pretty good chance that VGA is unavailable.
+         */
         mov     $(sym_phys(.Lbad_ldr_nst)),%esi # Error message
         jmp     .Lget_vtb
 .Lmb2_no_ih:
+        /* Ditto. */
         mov     $(sym_phys(.Lbad_ldr_nih)),%esi # Error message
         jmp     .Lget_vtb
 .Lmb2_no_bs:
+        /*
+         * Ditto. Additionally, here there is a chance that Xen was started
+         * via start label. Then reliable vga_text_buffer zap is impossible
+         * in Multiboot2 scanning loop and we have to zero %edi below.
+         */
         mov     $(sym_phys(.Lbad_ldr_nbs)),%esi # Error message
         xor     %edi,%edi                       # No VGA text buffer
         jmp     .Lsend_chr
 .Lmb2_efi_ia_32:
+        /*
+         * Here we are on EFI IA-32 platform. Then reliable vga_text_buffer 
zap is
+         * impossible in Multiboot2 scanning loop and we have to zero %edi 
below.
+         */
         mov     $(sym_phys(.Lbad_efi_msg)),%esi # Error message
         xor     %edi,%edi                       # No VGA text buffer
         jmp     .Lsend_chr
@@ -393,18 +407,10 @@ __start:

         /* EFI IA-32 platforms are not supported. */
         cmpl    $MULTIBOOT2_TAG_TYPE_EFI32,MB2_tag_type(%ecx)
-        /*
-         * Here we should zap vga_text_buffer. However, we can disable
-         * VGA updates in simpler and more reliable way later.
-         */
         je      .Lmb2_efi_ia_32

         /* Bootloader shutdown EFI x64 boot services. */
         cmpl    $MULTIBOOT2_TAG_TYPE_EFI64,MB2_tag_type(%ecx)
-        /*
-         * Here we should zap vga_text_buffer. However, we can disable
-         * VGA updates in simpler and more reliable way later.
-         */
         je      .Lmb2_no_bs

         /* Is it the end of Multiboot2 information? */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.