]> xenbits.xensource.com Git - xen.git/commitdiff
x86/boot: fix early error output
authorDavid Esler <drumandstrum@gmail.com>
Thu, 16 Nov 2017 10:40:37 +0000 (11:40 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 16 Nov 2017 10:40:37 +0000 (11:40 +0100)
In 9180f5365524 a change was made to the send_chr function to take in
C-strings and output a character at a time until a NULL was encountered.
However, when there is no VGA there is no code to increment the current
character position resulting in an endless loop of the first character.
This moves the (implicit) increment such that it occurs in all cases.

Signed-off-by: David Esler <drumandstrum@gmail.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
[jb: correct title and description]
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
master commit: 78e693cc123296db2f79e792cf474544c1ffd064
master date: 2017-10-20 09:29:29 +0200

xen/arch/x86/boot/head.S

index fd6fc337fe2b4e2252980f6ffcbcc120b092b40c..9cc35da558537ff2c36f23655020a460b3648915 100644 (file)
@@ -173,10 +173,11 @@ not_multiboot:
 .Lget_vtb:
         mov     sym_esi(vga_text_buffer),%edi
 .Lsend_chr:
-        mov     (%esi),%bl
-        test    %bl,%bl        # Terminate on '\0' sentinel
+        lodsb
+        test    %al,%al        # Terminate on '\0' sentinel
         je      .Lhalt
         mov     $0x3f8+5,%dx   # UART Line Status Register
+        mov     %al,%bl
 2:      in      %dx,%al
         test    $0x20,%al      # Test THR Empty flag
         je      2b
@@ -185,7 +186,7 @@ not_multiboot:
         out     %al,%dx        # Send a character over the serial line
         test    %edi,%edi      # Is the VGA text buffer available?
         jz      .Lsend_chr
-        movsb                  # Write a character to the VGA text buffer
+        stosb                  # Write a character to the VGA text buffer
         mov     $7,%al
         stosb                  # Write an attribute to the VGA text buffer
         jmp     .Lsend_chr