From patchwork Tue Oct 17 21:41:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 10012979 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7D1EA60235 for ; Tue, 17 Oct 2017 21:44:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F61328113 for ; Tue, 17 Oct 2017 21:44:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6418A2846C; Tue, 17 Oct 2017 21:44:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6ED5028451 for ; Tue, 17 Oct 2017 21:44:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4Zci-0007pe-32; Tue, 17 Oct 2017 21:42:04 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4Zcg-0007pS-Hs for xen-devel@lists.xenproject.org; Tue, 17 Oct 2017 21:42:02 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id 93/17-08856-92976E95; Tue, 17 Oct 2017 21:42:01 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAIsWRWlGSWpSXmKPExsVyMfTGYV3Nyme RBrNvM1l83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBn/77WzF3TyVnw/y93A2MnZxcjFISQwk1Hi 5OcbzCAOi0A7s8SNo0dZQRwJgXcsEm/+nmfqYuQEcvIkOs6sgbLTJHY+PsYCYZdLrO57A2YLC ShI/J5wiAli7HImif2Xr7GBJNgENCSe/JoBZosIKEncWzUZrIhZYD6jxLm7HcwgCWEBS4lTMy FsFgFViduzprKC2LwCZhK39j4AsjmAtslL7NgsOIGRfwEjwypGjeLUorLUIl0jS72kosz0jJL cxMwcXUMDY73c1OLixPTUnMSkYr3k/NxNjMAQqmdgYNzB2LTX7xCjJAeTkiivs+GTSCG+pPyU yozE4oz4otKc1OJDjDIcHEoSvEEVzyKFBItS01Mr0jJzgMEMk5bg4FES4VUHSfMWFyTmFmemQ 6ROMVpyXLhz6Q8Tx4E9t4Bkx827f5iEWPLy81KlxHnVQBoEQBoySvPgxsEi7hKjrJQwLyMDA4 MQT0FqUW5mCar8K0ZxDkYlYd5ikCk8mXklcFtfAR3EBHTQOqcnIAeVJCKkpBoYN73sm/q2ZYH ObQbBN1zTXO+X76jZe5lticR3DpYfLxYxfpyZciPwz2qB2NMHFkydlinyYPb9T6u0X7jMM1/1 8Fig8bbnB0sufE424ui8IbZRIaUrM6H0/t0Je6W/uojyXpm/6MOMLwUSNQ3f9muJ2ZwqrXpbp ugutGR7wMKpwqZ81uuurnnD+kCJpTgj0VCLuag4EQAb3hWqswIAAA== X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-12.tower-31.messagelabs.com!1508276520!93917329!1 X-Originating-IP: [209.85.216.195] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28938 invoked from network); 17 Oct 2017 21:42:00 -0000 Received: from mail-qt0-f195.google.com (HELO mail-qt0-f195.google.com) (209.85.216.195) by server-12.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Oct 2017 21:42:00 -0000 Received: by mail-qt0-f195.google.com with SMTP id z19so6754056qtg.11 for ; Tue, 17 Oct 2017 14:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id; bh=c0niK/fe6SQ7ESOvIpXhkB6yyuNT/d7P9y3Yenf56co=; b=MXkthJnxk/rqHAx22cmHdjvX2Ix3Pw2brKav5FrloQfxpqSWkjkFdDlu0iUA14y2hX 0aKxz8Pb/TqiN5SKZvZeZwaGgCxnc1A7DvqrujyPuc/c3qTZm/FGO1CHZp5rSaqOgZJu ac6JOWFVspNp0A15jINsTCS6KhMtqEi/xjGSc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=c0niK/fe6SQ7ESOvIpXhkB6yyuNT/d7P9y3Yenf56co=; b=RWmip6KuAQeU4FknH/nccdBABfHgGq9oec/8ay4vAY8z8doUexFOb1HISiLJzAuhhn Ck61+D3KXuN7+JpdkdYeHQ+kNKZcZiX3VgHPbGxFmLOb/on0NXZtSzA8oroEhEE9IxoY r4SDGpaTqpepY2jFQ+d+VPrMQC63XPdJHJ+R3g4neL0u04PQ5W0AAzV837K6Xe5qs9up ecbdQxB7lfOvI9xX9tjQHqHfK3Lh1TGJlM/yRsMUzz7xkiu8zCTBzpoYDv1nIqxZOcih ZIrdLBLiloL3Z86lXsnTaW4e3iGXqMe0G0/QPkc5Wi8Slqaynn7uzRWCVNiVPqa07/hG SD/A== X-Gm-Message-State: AMCzsaUqBsADaAnIdr2p3OIti5SIRv9N075M4P0FRWZWJi0JQTE+gsY6 CQn++8bjgaA3cWCc8Iie9OgtH51g4hg= X-Google-Smtp-Source: ABhQp+TuymFTfaVuKnysENKFVlMsJIkgcpPFrNZkh05ix9WPOKUoikhknSJrRv0Zm0tyok0if/AnOA== X-Received: by 10.200.53.89 with SMTP id z25mr255001qtb.58.1508276519680; Tue, 17 Oct 2017 14:41:59 -0700 (PDT) Received: from swanson.localdomain (104-179-196-18.lightspeed.brhmal.sbcglobal.net. [104.179.196.18]) by smtp.gmail.com with ESMTPSA id j40sm6826965qtj.52.2017.10.17.14.41.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Oct 2017 14:41:59 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xenproject.org Date: Tue, 17 Oct 2017 16:41:37 -0500 Message-Id: <20171017214138.27663-1-cardoe@cardoe.com> X-Mailer: git-send-email 2.13.5 Cc: Andrew Cooper , Daniel Kiper , David Esler , Jan Beulich Subject: [Xen-devel] [PATCH v2 1/2] x86/boot: fix early error display X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: David Esler In 9180f5365524 a change was made to the send_chr function to take in C-strings and print out a character at a time until a NULL was encountered. However there is no code to increment the current character position resulting in an endless loop of the first character. This adds a simple increment. Reviewed-by: Doug Goldstein Signed-off-by: David Esler --- xen/arch/x86/boot/head.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index fd6fc337fe..9cc35da558 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -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