From patchwork Tue Feb 14 18:38:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiper X-Patchwork-Id: 9572501 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 B30F860573 for ; Tue, 14 Feb 2017 18:40:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F4CE205A8 for ; Tue, 14 Feb 2017 18:40:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 938CF2845E; Tue, 14 Feb 2017 18:40:40 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY 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 9A30128457 for ; Tue, 14 Feb 2017 18:40:38 +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 1cdhzp-0003qt-R1; Tue, 14 Feb 2017 18:38:37 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdhzo-0003qa-M5 for xen-devel@lists.xenproject.org; Tue, 14 Feb 2017 18:38:36 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id 1B/7F-01719-BAE43A85; Tue, 14 Feb 2017 18:38:35 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMIsWRWlGSWpSXmKPExsXSO6nOVXe13+I Ig597hS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1ox5Mw+yFZznqzj27gt7A+N+ri5GLg4hgYlM ElMuzmKEcL4xSjyYcZWpi5ETyNnIKLHkezhUFaPE9KNTWbsYOThYBFQlnn42AKlhE9CRuPjlI TuILSKgJHFv1WQmkHpmgZlMEqfvnGQBSQgLhEnsWTmNFcTmFbCVeNXwDGpbC6NE38Zt7BAJQY mTM5+ANTALaEnc+PeSCWQZs4C0xPJ/HCBhTgEPiccHP4KViwqoSEw5uY0NxJYQMJT4vHEp8wR GwVlIJs1CMmkWwqQFjMyrGDWKU4vKUot0jcz0kooy0zNKchMzc3QNDUz1clOLixPTU3MSk4r1 kvNzNzECA7eegYFxB+PtyX6HGCU5mJREee2EFkcI8SXlp1RmJBZnxBeV5qQWH2KU4eBQkuBN8 QXKCRalpqdWpGXmAGMIJi3BwaMkwtsFkuYtLkjMLc5Mh0idYlSUEufVAUkIgCQySvPg2mBxe4 lRVkqYl5GBgUGIpyC1KDezBFX+FaM4B6OSMG8WyBSezLwSuOmvgBYzAS1mjVsIsrgkESEl1cD IVRz45cniX37KkaUKe2bmMz/5kDc9/HvS9f/h0XK2GdKb9xltkKr5bbtadl4G+26J1E6L+rnt FtfbTnud3nmOv0bC5bHe39m8PErt6x/WZTh0GT4XEYuvLc7bllLplC6/+o9KnN+JEztqlu+8K Cq47cWyKcdnTOGM+WD/yMnKeP52ucIfiy4osRRnJBpqMRcVJwIArT3gPNYCAAA= X-Env-Sender: daniel.kiper@oracle.com X-Msg-Ref: server-6.tower-206.messagelabs.com!1487097513!84699882!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 63620 invoked from network); 14 Feb 2017 18:38:35 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-6.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Feb 2017 18:38:35 -0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v1EIcLHn030558 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Feb 2017 18:38:21 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v1EIcKfE015969 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Feb 2017 18:38:20 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v1EIcHae011310; Tue, 14 Feb 2017 18:38:19 GMT Received: from olila.local.net-space.pl (/10.175.236.150) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 Feb 2017 10:38:17 -0800 Date: Tue, 14 Feb 2017 19:38:11 +0100 From: Daniel Kiper To: xen-devel@lists.xenproject.org Message-ID: <20170214183811.GC10876@olila.local.net-space.pl> References: <1487097209-19552-1-git-send-email-daniel.kiper@oracle.com> <1487097209-19552-6-git-send-email-daniel.kiper@oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1487097209-19552-6-git-send-email-daniel.kiper@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Cc: jgross@suse.com, sstabellini@kernel.org, andrew.cooper3@citrix.com, cardoe@cardoe.com, pgnet.dev@gmail.com, ning.sun@intel.com, julien.grall@arm.com, jbeulich@suse.com, qiaowei.ren@intel.com, gang.wei@intel.com, fu.wei@linaro.org Subject: Re: [Xen-devel] [PATCH v15 05/10] x86: add multiboot2 protocol support for EFI platforms 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Feb 14, 2017 at 07:33:24PM +0100, Daniel Kiper wrote: > This way Xen can be loaded on EFI platforms using GRUB2 and > other boot loaders which support multiboot2 protocol. > > Signed-off-by: Daniel Kiper I am posting diff between v14 and v15 for your convenience. diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index 5147204..eb738d4 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -394,10 +394,18 @@ __start: /* EFI IA-32 platforms are not supported. */ cmpl $MULTIBOOT2_TAG_TYPE_EFI32,MB2_tag_type(%ecx) + /* + * Here we should zap vga_text_buffer. However, we can disable + * VGA updates in simpler and more reliable way later. + */ je .Lmb2_efi_ia_32 /* Bootloader shutdown EFI x64 boot services. */ cmpl $MULTIBOOT2_TAG_TYPE_EFI64,MB2_tag_type(%ecx) + /* + * Here we should zap vga_text_buffer. However, we can disable + * VGA updates in simpler and more reliable way later. + */ je .Lmb2_no_bs /* Is it the end of Multiboot2 information? */ diff --git a/xen/arch/x86/efi/stub.c b/xen/arch/x86/efi/stub.c index 2127cce..17da050 100644 --- a/xen/arch/x86/efi/stub.c +++ b/xen/arch/x86/efi/stub.c @@ -34,10 +34,10 @@ void __init noreturn efi_multiboot2(EFI_HANDLE ImageHandle, * not be directly supported by C compiler. */ asm volatile( - " call *%2 \n" + " call *%3 \n" "0: hlt \n" " jmp 0b \n" - : "+c" (StdErr) : "d" (err), "rm" (StdErr->OutputString) + : "+c" (StdErr), "=d" (StdErr) : "1" (err), "rm" (StdErr->OutputString) : "rax", "r8", "r9", "r10", "r11", "memory"); unreachable();