From: Andrew Cooper Subject: [PATCH 4/4] x86/boot: Use 'hlt' inside terminal loops Date: Fri, 25 Apr 2014 20:50:59 +0100 Message-ID: <1398455459-8431-5-git-send-email-andrew.cooper3@citrix.com> References: <1398455459-8431-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1398455459-8431-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org Signed-off-by: Andrew Cooper CC: Keir Fraser CC: Jan Beulich --- 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 d706c44..06014ec 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -52,11 +52,11 @@ print_err: mov $0xB8000,%edi # VGA framebuffer 1: mov (%esi),%bl test %bl,%bl # Terminate on '\0' sentinel -2: je 2b + je 3f 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 @@ -64,6 +64,8 @@ print_err: mov $7,%al stosb # Write an attribute to the VGA framebuffer jmp 1b +3: hlt + jmp 3b __start: cld diff --git a/xen/arch/x86/boot/x86_64.S b/xen/arch/x86/boot/x86_64.S index 0c086b2..fd3d93a 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.data, "aw", @progbits -- 1.7.10.4