From patchwork Tue Sep 4 13:50:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 145929 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3689221ljw; Tue, 4 Sep 2018 06:50:55 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdaqa7eCPoHRDZLH+F7qqFUqVFzSgGZohr+s0Fu2mV7tMZ05MU7GSot58C60InpRM15cr9uU X-Received: by 2002:a50:af03:: with SMTP id g3-v6mr35805011edd.220.1536069055845; Tue, 04 Sep 2018 06:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536069055; cv=none; d=google.com; s=arc-20160816; b=HQaAFWk9+4dfzCyZjN4iOMP1eAv3nmH9nCjSkBPv0dF0misVdqXTP52K99c9OtitVz ZgnoqEO8qDpQLD0UCps/9IJlYFzuU3pGKktcTYVERouU8jeNaVj5DKk1nfzb9nCc83Kt /V+imCNEVx/gpN5x4wguaFg0m5LndvgknJ6dfbBGZx8YOdPNkozHmDPS9IxXZ2c6n0Mt HcCtgVzO8LOS7bKrHuIe3y1dAd0yO/1/qvXi7ty+gJL4toRKLifE7gyec0PiHxhog7AK 5jD2PauIUbB/qIS7wdj5m3oMvZWE4pwyNGel+ygbPtH4VmAQso7c5/ZlPsc3v4Vdw9Ex VmyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :arc-authentication-results; bh=PjK9EPbZ+a6x6WQ3Y9klADrcieGCUk9mHVUqAXSAfbc=; b=h4owkZc3oTQXfF4xPaCG4im7c+tq/iMoSCR6qGC4AkwpBoz/a2sB0ESMjgIidnXVyF ZhwXA8uXzRxHQ8FLjZluQNPzNWlDbM0zIZXzm4KFZbkPJCOgYs0Chnqr7Dqh1WzuiBOa bgimUm0V+e4RGqU+2bP3tA01JkEeRcJk6QU7adHKJ6afoyoM21lQ5LIgf235E/zGHfgD vrFwwWVh6hlcYpY/SYO2q/7Ls9RGPdMEX837qcdZFhEtUevHgWjbwuTQ0prNsC/IPS3d Xbotw/ySPpNs55nWj6b4JulFeuq0hUbL9Nkyw07sSUjaFo2lFNWFhMPSYoMj9I5k+SnK n3iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 5-v6si17037011edo.397.2018.09.04.06.50.55; Tue, 04 Sep 2018 06:50:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 72B7CC21FD4; Tue, 4 Sep 2018 13:50:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8D473C21F49; Tue, 4 Sep 2018 13:50:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 65AC2C21F49; Tue, 4 Sep 2018 13:50:51 +0000 (UTC) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id 1B035C21F42 for ; Tue, 4 Sep 2018 13:50:51 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8A5A0AEAB; Tue, 4 Sep 2018 13:50:50 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Tue, 4 Sep 2018 15:50:49 +0200 Message-Id: <20180904135049.88266-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 Cc: Heinrich Schuchardt Subject: [U-Boot] [PATCH] efi_loader: Add console handle references to in/out/err X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We register the console in/out protocol on the loaded image handle, but never tell anyone about it in the systab. Because of this Shell.efi can not find the input protocol. So let's add a proper reference. Signed-off-by: Alexander Graf Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_console.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index f5f3f256dd..277eb91e52 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -604,17 +604,23 @@ int efi_console_register(void) r = efi_create_handle((efi_handle_t *)&efi_console_output_obj); if (r != EFI_SUCCESS) goto out_of_memory; + r = efi_add_protocol(efi_console_output_obj->handle, &efi_guid_text_output_protocol, &efi_con_out); if (r != EFI_SUCCESS) goto out_of_memory; + systab.con_out_handle = efi_console_output_obj->handle; + systab.stderr_handle = efi_console_output_obj->handle; + r = efi_create_handle((efi_handle_t *)&efi_console_input_obj); if (r != EFI_SUCCESS) goto out_of_memory; + r = efi_add_protocol(efi_console_input_obj->handle, &efi_guid_text_input_protocol, &efi_con_in); if (r != EFI_SUCCESS) goto out_of_memory; + systab.con_in_handle = efi_console_input_obj->handle; /* Create console events */ r = efi_create_event(EVT_NOTIFY_WAIT, TPL_CALLBACK, efi_key_notify,