From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH v2 3/3] x86/boot: Use 'hlt' inside terminal loops
Date: Mon, 28 Apr 2014 14:06:44 +0100 [thread overview]
Message-ID: <1398690404-9559-4-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1398690404-9559-1-git-send-email-andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
---
v2: Use '.Lhalt' in preference to '3f'
---
xen/arch/x86/boot/head.S | 8 +++++---
xen/arch/x86/boot/x86_64.S | 3 ++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index 0d87b27..ca0e97d 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -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
diff --git a/xen/arch/x86/boot/x86_64.S b/xen/arch/x86/boot/x86_64.S
index 7ecfad3..fe5469a 100644
--- a/xen/arch/x86/boot/x86_64.S
+++ b/xen/arch/x86/boot/x86_64.S
@@ -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
--
1.7.10.4
prev parent reply other threads:[~2014-04-28 13:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 13:06 [PATCH v2 0/3] Improvements to x86 boot code Andrew Cooper
2014-04-28 13:06 ` [PATCH v2 1/3] x86/boot: Early data should live in init.rodata Andrew Cooper
2014-04-28 13:06 ` [PATCH v2 2/3] x86/boot: Move some __high_start code and data into init sections Andrew Cooper
2014-04-28 14:04 ` Jan Beulich
2014-04-28 14:09 ` Andrew Cooper
2014-04-28 14:45 ` Jan Beulich
2014-04-28 14:49 ` Andrew Cooper
2014-04-28 14:55 ` [PATCH v3 " Andrew Cooper
2014-04-28 13:06 ` Andrew Cooper [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398690404-9559-4-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).