mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86/boot: use 'hlt' inside terminal loops
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
7e510a7b87
commit
8705acd6ee
2 files changed
+7
-4
No files matched your search
@@ -54,11 +54,11 @@ print_err:
|
||||
mov $0xB8000,%edi # VGA framebuffer
|
||||
1: mov (%esi),%bl
|
||||
test %bl,%bl # Terminate on '\0' sentinel
|
||||
2: je 2b
|
||||
je .Lhalt
|
||||
mov $0x3f8+5,%dx # UART Line Status Register
|
||||
3: in %dx,%al
|
||||
2: in %dx,%al
|
||||
test $0x20,%al # Test THR Empty flag
|
||||
je 3b
|
||||
je 2b
|
||||
mov $0x3f8+0,%dx # UART Transmit Holding Register
|
||||
mov %bl,%al
|
||||
out %al,%dx # Send a character over the serial line
|
||||
@@ -66,6 +66,8 @@ print_err:
|
||||
mov $7,%al
|
||||
stosb # Write an attribute to the VGA framebuffer
|
||||
jmp 1b
|
||||
.Lhalt: hlt
|
||||
jmp .Lhalt
|
||||
|
||||
__start:
|
||||
cld
|
||||
|
||||
@@ -73,7 +73,8 @@ ignore_int:
|
||||
call printk
|
||||
testq $0xff8,%rbp
|
||||
jnz 0b
|
||||
1: jmp 1b
|
||||
1: hlt
|
||||
jmp 1b
|
||||
|
||||
.section .init.rodata, "a", @progbits
|
||||
|
||||
|
||||