From patchwork Fri Dec 17 19:40:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1570319 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=TvdLzkjQ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JFztz6HgHz9sXM for ; Sat, 18 Dec 2021 06:43:55 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 22EFD837CD; Fri, 17 Dec 2021 20:42:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TvdLzkjQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C68ED8377F; Fri, 17 Dec 2021 20:41:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 983DE83781 for ; Fri, 17 Dec 2021 20:41:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2e.google.com with SMTP id p23so4486041iod.7 for ; Fri, 17 Dec 2021 11:41:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aYnLOGjuy5mkZebYup+aZwTOEXiJztrloR8UgFRuKX4=; b=TvdLzkjQJx35pta4RbjTifLgbEN2LoF6A1/h3yEJanE/onjrvPUIg2Pjbmwk+HAVwm lMil3gE0ub9D0l85ZM4QHdMl/HglOQQR0FaOPL58dMeXVbX9FaplLWT8i2f5WF9hh3p8 bhRdyoT4xx4SPqTzav0Jc2zHwvUK35qYciM7I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aYnLOGjuy5mkZebYup+aZwTOEXiJztrloR8UgFRuKX4=; b=QGe+qhPLdacrJeD544pBDbY82jrdhoYt7aVqOrb5YwgQzB7WwS4UKPOOA5IMPXWT/l dJE2n2lw6/DuSZqrJ5s3ppBUe7De+nxVHHw3B27Bu7aVcVRHkt7RT+Gcd7/o6qs5pr8A Ak8VdAkPyjuM9FbN6BZDVUQBlEibWpy6eyf0b1D51ok7xaIRMjlvW25xoYr18IUczdwl 3d/7qTwZyd6gdyZPfU3VR7XgU+DJMCPe4HiiqpTtnI33gcrLTZnylupQBF7qS/XelA2J RzTT6Y30T8nmMoejIEpBr1xT146xZAdfMF5RyAsJhe4MInwXAAVcqa7qkjdir+L1wq58 PJIw== X-Gm-Message-State: AOAM533cCXMLSam+xjFpkziqhbsYY7gjUu4r/M6wviYuduTUlanzK0tr 5iacbKh00kyAogQxGhrrucd+hhDKjMxPNw== X-Google-Smtp-Source: ABdhPJzHwfmwRiLKzziLYtkta5986twb4t7nuwouDgIH1yBKPhdR4e9ZmtkoyPaRaiHHSU5Y+6+q+g== X-Received: by 2002:a05:6638:410b:: with SMTP id ay11mr2899540jab.120.1639770091684; Fri, 17 Dec 2021 11:41:31 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id w19sm6079605iov.12.2021.12.17.11.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Dec 2021 11:41:31 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Christian Melki , Simon Glass , Alexander Graf Subject: [PATCH v6 15/27] efi: Check for failure when initing the app Date: Fri, 17 Dec 2021 12:40:47 -0700 Message-Id: <20211217194059.858580-12-sjg@chromium.org> X-Mailer: git-send-email 2.34.1.173.g76aa8bc2d0-goog In-Reply-To: <20211217194059.858580-1-sjg@chromium.org> References: <20211217194059.858580-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The stub checks for failure with efi_init(). Add this for the app as well. It is unlikely that anything can be done, but we may as well stop. Signed-off-by: Simon Glass --- Changes in v6: - Use 'U-Boot' instead of 'ARP' typo lib/efi/efi_app.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 2024ecc37b6..2a6740b836a 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -318,8 +318,11 @@ efi_status_t EFIAPI efi_main(efi_handle_t image, efi_status_t ret; /* Set up access to EFI data structures */ - efi_init(priv, "App", image, sys_table); - + ret = efi_init(priv, "App", image, sys_table); + if (ret) { + printf("Failed to set up U-Boot: err=%lx\n", ret); + return ret; + } efi_set_priv(priv); /*