[{"id":1772188,"web_url":"http://patchwork.ozlabs.org/comment/1772188/","msgid":"<CAF6AEGsBjE2YagOPhw4n_HU6RO3g2rg6nDyK1CO6T7QbCoxROA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-20T20:31:08","subject":"Re: [U-Boot] [PATCH 1/1] efi_loader: reenable selftest","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/","name":"Rob Clark","email":"robdclark@gmail.com"},"content":"On Wed, Sep 20, 2017 at 3:46 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n> ad503ffe9c6 efi_loader: refactor boot device and loaded_image handling\n> leads to an error when building with CONFIG_CMD_BOOTEFI_SELFTEST=y\n> This patch fixes the problem.\n>\n> Fixes: ad503ffe9c6 efi_loader: refactor boot device and loaded_image handling\n> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n> ---\n>  cmd/bootefi.c | 2 ++\n>  1 file changed, 2 insertions(+)\n>\n> diff --git a/cmd/bootefi.c b/cmd/bootefi.c\n> index 1e2dbcc4a4..9460747f96 100644\n> --- a/cmd/bootefi.c\n> +++ b/cmd/bootefi.c\n> @@ -273,6 +273,8 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])\n>  #endif\n>  #ifdef CONFIG_CMD_BOOTEFI_SELFTEST\n>         if (!strcmp(argv[1], \"selftest\")) {\n> +               struct efi_loaded_image loaded_image_info = {};\n> +\n>                 /*\n>                  * gd lives in a fixed register which may get clobbered while we\n>                  * execute the payload. So save it here and restore it on every\n> --\n> 2.14.1\n>\n\nI'm not sure this is complete enough (or at least will run into\nproblems if you add more tests) since loaded_image_info won't be\npopulated completely.  You want a efi_setup_loaded_image() call:\n\n        efi_setup_loaded_image(&loaded_image_info, &loaded_image_info_obj,\n                       bootefi_device_path, bootefi_image_path);\n\n\nBR,\n-R","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Ny5u77gc\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyBGf3cWYz9s4q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 06:31:22 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 4BEB5C21E31; Wed, 20 Sep 2017 20:31:15 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 9392BC21C5D;\n\tWed, 20 Sep 2017 20:31:13 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid A8B01C21C5D; Wed, 20 Sep 2017 20:31:11 +0000 (UTC)","from mail-lf0-f67.google.com (mail-lf0-f67.google.com\n\t[209.85.215.67])\n\tby lists.denx.de (Postfix) with ESMTPS id 3DF3AC21C35\n\tfor <u-boot@lists.denx.de>; Wed, 20 Sep 2017 20:31:11 +0000 (UTC)","by mail-lf0-f67.google.com with SMTP id l196so1951055lfl.3\n\tfor <u-boot@lists.denx.de>; Wed, 20 Sep 2017 13:31:11 -0700 (PDT)","by 10.46.41.75 with HTTP; Wed, 20 Sep 2017 13:31:08 -0700 (PDT)"],"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=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=k8s8wprukEBuBopc226GVPZPP7+/4/SfJvSPWkcbH6g=;\n\tb=Ny5u77gcyA+tQJ1nvLUDu3vAmAFsuT2GSEToowxWbN1Rl/Uc0+Ebr18xA52+TdZv1a\n\tiy4pIdjliVDxmmq0ZmTarwEbsG0BwL4/9grM0mQ0CcCRwXR6HiWErg55/CI+bCHYv61+\n\t0yoLN7SrHwU9xvdYmm3w+01JTir0Z9TkvLvxTJ5udCOPAFadGO9f72dy9BIT/kETuX7q\n\tD1xhS3dR7cWhf9NrfW03+dS/WRqzQ3wMwv/YeLobAuMn3MpHLfU+DFZspOK7Q8XQo9hs\n\trqfsy4fYhB79Em1VGsoWc672jjLAzh37FhNNl9M051SQAo0M5X1kf9tcGIBgGLpAP8L6\n\tBO4Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=k8s8wprukEBuBopc226GVPZPP7+/4/SfJvSPWkcbH6g=;\n\tb=FJpO3uXBSSvcGmDMIU4u9leWmU4UV0M4a+Vnv31B3Gm2bwJONSEI819w6fjMDRHdgR\n\tT3HRJ3vDVgEbS8b17EBWvsxFmanOO5LXCg+1ePEmsu0q00jyHu5saT8IYkArnCf+n6YI\n\tMpm13CLMc2ubP3rGjBEIpq/UMc4BMZCMREOio5VFTsc17kO+oqxgUIqW49pbp8x+fvhd\n\tFG4SMhha26wFoYsOJ+JDMccMnhb2emeIpPcJ0yF3fbKkKnaSfyTk27u6rhN+xEZ8vujO\n\tvwLHHaOmyCAY/oL1WkLzemYTZ9uCdiwPmlmqn1H+oAaT84YsjbFt3mkLgI9Z74eaNwc+\n\tAISQ==","X-Gm-Message-State":"AHPjjUifXfIbz0M96HERzxtJMQefp+6EKS3BefS98tNADkGELxEA6A4/\n\tAbVWSLLD/vXwf8BXI/aJIpnilfcCGiAwh4CkSQw=","X-Google-Smtp-Source":"AOwi7QCvw722HZ4RhT7r7QOZo6JzoV/ttaINvfzU6B0Xft3bCxeElttP0dS9+c/5wSyOm0RDSTpArzZ4FNIITWtu9IU=","X-Received":"by 10.25.78.153 with SMTP id u25mr1301261lfk.111.1505939469330; \n\tWed, 20 Sep 2017 13:31:09 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170920194603.5783-1-xypron.glpk@gmx.de>","References":"<6dc60fb8-3bff-b684-9236-8a1297743718@gmx.de>\n\t<20170920194603.5783-1-xypron.glpk@gmx.de>","From":"Rob Clark <robdclark@gmail.com>","Date":"Wed, 20 Sep 2017 16:31:08 -0400","Message-ID":"<CAF6AEGsBjE2YagOPhw4n_HU6RO3g2rg6nDyK1CO6T7QbCoxROA@mail.gmail.com>","To":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH 1/1] efi_loader: reenable selftest","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]