From patchwork Thu Oct 16 14:55:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 38831 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5708B20D8F for ; Thu, 16 Oct 2014 14:56:00 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id b57sf2151270eek.4 for ; Thu, 16 Oct 2014 07:55:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:reply-to:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=5s/8/DdoZwwagDliIPG6R15S9No0ksZzKAweomE1L5o=; b=l3IeqbY65/JVq/uMf2Lx+CN2UDkoQ7L65lpNpHD1M8rS4RksvMLIZ5o5U3i991XtQX p2+sPUWoFx1Ar5AZzlUy+f2RyCn/AuthTMiO9IzItWcaPb1f20dEW5Xut4vW+8EjVOiL JQb/SOk9/+orE6Z1hhvTMMPzXJ6G4F4Drz1zd4T3qpsBMoFJWFav9ZhifMYULCkqvgxK Xm4dQtkxBXpRMOvgzUZXmXjq1afWMoZQLWf6xaWwSDgKKH5daNTW0Q+TFAk32rp/xWOP m/VPTQVRn//LL2pJiiymkHaQdboKbhZsCAv+mwLrULmsIfPXJOTeHYbi3aBXrjJx6ecM FlaA== X-Gm-Message-State: ALoCoQlIclpp2EO7GNFPkjkGwsPR8gk3/5orsma6DKb+rKpv7vZUDt/UnEBkcyB1h7u2d/JsESWS X-Received: by 10.181.27.135 with SMTP id jg7mr1029888wid.5.1413471359446; Thu, 16 Oct 2014 07:55:59 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.68 with SMTP id p4ls172757laa.52.gmail; Thu, 16 Oct 2014 07:55:59 -0700 (PDT) X-Received: by 10.152.203.231 with SMTP id kt7mr2203029lac.84.1413471359252; Thu, 16 Oct 2014 07:55:59 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) by mx.google.com with ESMTPS id r1si11301000lae.109.2014.10.16.07.55.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Oct 2014 07:55:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id pv20so3076362lab.34 for ; Thu, 16 Oct 2014 07:55:59 -0700 (PDT) X-Received: by 10.152.87.98 with SMTP id w2mr2145015laz.27.1413471359120; Thu, 16 Oct 2014 07:55:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp54175lbz; Thu, 16 Oct 2014 07:55:57 -0700 (PDT) X-Received: by 10.42.250.17 with SMTP id mm17mr4659404icb.18.1413471356107; Thu, 16 Oct 2014 07:55:56 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id c7si40868394ick.65.2014.10.16.07.55.55 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 16 Oct 2014 07:55:56 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XemSt-0002WY-PD; Thu, 16 Oct 2014 14:55:43 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XemSs-0002WE-BG for edk2-devel@lists.sourceforge.net; Thu, 16 Oct 2014 14:55:42 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=lersek@redhat.com; helo=mx1.redhat.com; Received: from mx1.redhat.com ([209.132.183.28]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1XemSn-0001b2-Vg for edk2-devel@lists.sourceforge.net; Thu, 16 Oct 2014 14:55:42 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9GEtQTW025104 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 16 Oct 2014 10:55:27 -0400 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-74.ams2.redhat.com [10.36.116.74]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9GEtOMV032146; Thu, 16 Oct 2014 10:55:25 -0400 From: Laszlo Ersek To: edk2-devel@lists.sourceforge.net, ard.biesheuvel@linaro.org Date: Thu, 16 Oct 2014 16:55:23 +0200 Message-Id: <1413471323-19304-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1XemSn-0001b2-Vg Subject: [edk2] [PATCH] ArmVirtualizationQemu: fix the console when ConIn/ConOut/ErrOut are missing X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lersek@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The ConPlatformDxe driver examines Simple Text Input and Simple Text Output protocol instances, and decides whether they are suitable for console input and output splitting (ie. whether the given STI or STO protocol should be included in the set of consoles that ConSplitterDxe multiplexes). ConPlatformDxe signals its decision by installing Console In Device, Console Out Device, and Standard Error Device protocol instances on the handle in question. ConSplitterDxe then looks for these latter protocol instances and builds the set of multiplexed input and output consoles based on them. If the Console In Device protocol is not available on a handle, then that handle won't be used for console input, and the output case works similarly. In order for ConPlatformDxe to allow ConSplitterDxe to multiplex a given STI or STO (which is signalled by the installation of CID or COD), ConPlatformDxe requires the device path of the STI or STO in question to be present in the ConIn or ConOut non-volatile variable, respectively. At the very first boot of the VM, the ConIn and ConOut (and ErrOut) non-volatile variables are missing (for a while). This causes ConPlatformDxe to filter out the serial terminal (which provides the only STI and STO on ArmVirtualizationQemu), and that in turn prevents ConSplitterDxe from multiplexing input and output to/from the terminal, in effect leaving the VM without any console. Given that the "virt" machine type of qemu-system-aarch64 has no graphical display, and ArmVirtualizationQemu in fact has a single (serial) console, drop: - ConSplitterDxe -- no splitting needed, - ConPlatformDxe -- since we're dropping ConSplitterDxe, - GraphicsConsoleDxe -- because no GOP is produced to begin with. This way the ConIn, ConOut, StdErr fields of the UEFI System Table will be associated with the terminal driver's STI/STO directly, rather than with the STI/STO of the backend-less console splitter. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 6 +++--- ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc index 61689b7..871641d 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc @@ -221,9 +221,9 @@ EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf - MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf - MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf - MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf + # + # Single Console IO support + # MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf EmbeddedPkg/SerialDxe/SerialDxe.inf diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf index 2b71d61..434fdd9 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf @@ -124,11 +124,8 @@ READ_LOCK_STATUS = TRUE INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf # - # Multiple Console IO support + # Single Console IO support # - INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf - INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf - INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf INF EmbeddedPkg/SerialDxe/SerialDxe.inf