ia64/xen-unstable

changeset 1668:0fc610c8aef9

bitkeeper revision 1.1041.6.3 (40e532ebjteJL-J2vKsGbaORF1GYvw)

Better bad-cpu error report.
author kaf24@scramble.cl.cam.ac.uk
date Fri Jul 02 10:03:23 2004 +0000 (2004-07-02)
parents 23e371e87d2f
children b7c52d517a26
files xen/arch/x86/boot/x86_32.S
line diff
     1.1 --- a/xen/arch/x86/boot/x86_32.S	Fri Jul 02 08:53:06 2004 +0000
     1.2 +++ b/xen/arch/x86/boot/x86_32.S	Fri Jul 02 10:03:23 2004 +0000
     1.3 @@ -19,8 +19,25 @@ ENTRY(start)
     1.4  	/* Checksum: must be the negated sum of the first two fields. */
     1.5  	.long	-0x1BADB004
     1.6          
     1.7 +bad_cpu_msg:
     1.8 +        .asciz "Bad CPU: we need at least a P6-compatible core."
     1.9  bad_cpu:
    1.10 -        jmp     bad_cpu
    1.11 +        mov     $SYMBOL_NAME(bad_cpu_msg)-__PAGE_OFFSET,%esi
    1.12 +        mov     $0xB8000,%edi  # VGA framebuffer
    1.13 +1:      mov     (%esi),%bl
    1.14 +        test    %bl,%bl        # Terminate on '\0' sentinel
    1.15 +2:      je      2b
    1.16 +        mov     $0x3f8+5,%dx   # UART Line Status Register
    1.17 +3:      in      %dx,%al
    1.18 +        test    $0x20,%al      # Test THR Empty flag
    1.19 +        je      3b
    1.20 +        mov     $0x3f8+0,%dx   # UART Transmit Holding Register
    1.21 +        mov     %bl,%al
    1.22 +        out     %al,%dx        # Send a character over the serial line
    1.23 +        movsb                  # Write a character to the VGA framebuffer
    1.24 +        mov     $7,%al
    1.25 +        stosb                  # Write an attribute to the VGA framebuffer
    1.26 +        jmp     1b
    1.27          
    1.28  __start:
    1.29          /* Set up a few descriptors: on entry only CS is guaranteed good. */