From patchwork Thu Sep 10 11:00:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1361497 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: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=TdaElxDf; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 ozlabs.org (Postfix) with ESMTPS id 4BnGD46KrWz9sTg for ; Thu, 10 Sep 2020 21:01:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4B388822E3; Thu, 10 Sep 2020 13:01:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="TdaElxDf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 68E4D822CD; Thu, 10 Sep 2020 13:01:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8973B821DB for ; Thu, 10 Sep 2020 13:01:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599735661; bh=U4laNpUrOkWhfVQdXOpcv7ckMdJw1J77/6Jfz/tUqyU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=TdaElxDfhCvNjb6D5DMVyPO1WH8SmTTCm+DNH1DTRSjIWr2W9CKPKe6USswB/w8+K xlqjb670zPS8yNyMllxz6XeDp5yad9D8a0xV9QYMYFEZ5iBLohf2a4gWIxr2veXcC+ nIaaZqdDu+H+aEul0YWtEJY08fJJrj8+/RIXmyq0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from workstation4.fritz.box ([178.202.41.107]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MeCtj-1kqTow0zu3-00bK5g; Thu, 10 Sep 2020 13:01:01 +0200 From: Heinrich Schuchardt To: Alexander Graf Cc: Rick Chen , Bin Meng , Atish Patra , Sean Anderson , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 3/3] efi_selftest: restore gd before do_reset() Date: Thu, 10 Sep 2020 13:00:48 +0200 Message-Id: <20200910110048.21446-4-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200910110048.21446-1-xypron.glpk@gmx.de> References: <20200910110048.21446-1-xypron.glp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4xAAPxsf+Dyzi5mG34G7Sw0HOtA85ToH6IoMVXEftS qhBtwbIZV/C+IRItW52IIXaSseOOPRnCGLJkbcOBgW1e5+24xSCkeJaWrCinTvPcrPcM+OfFL fL2frfKlhBcG/E2e+FOd06i8gevDiv3I/76GHkKjKzlhdOvE3bu3561GEVicUZ4rqLVJexz2D 18difRPHaNH9+NiRN7oT0UUkKVM4sMkY+DXTsUi3o49NNAvvhgY41DfOELnNL7R+Q/sB0Xcs9 RHG8tck6utL8s37TDWVASW0WJoK5dlba8nMz30ZJzNe3suQixm5KL8C1rNry+DAT1kq3i/QmX Mi4jtNGMix9cfeE8CPNuyFGHA8iFs/PIhK/vaXdtYleFH0jAG99Guhr1Ac9uQYlQi5+1QVvyV 1YcqNQzw7CpUV81EKeAQLHjr8NqQ6j2rDnif5HCYZcdRyujUJ9VUey+80Is/ZuI1Bg3K2vbhv 4vQhqMydgll9jwXo6gQGF/WyO5IzqBdd+zdJ29w== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Before calling do_reset() in the EFI selftest we must restore the global data pointer. Fixes: fa63753f86cc ("efi_selftest: substitute ResetSystem() by do_reset()") Signed-off-by: Heinrich Schuchardt --- lib/efi_selftest/efi_selftest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.28.0 diff --git a/lib/efi_selftest/efi_selftest.c b/lib/efi_selftest/efi_selftest.c index 6eec8ae2a7..165fa265f2 100644 --- a/lib/efi_selftest/efi_selftest.c +++ b/lib/efi_selftest/efi_selftest.c @@ -311,11 +311,13 @@ efi_status_t EFIAPI efi_selftest(efi_handle_t image_handle, efi_st_printf("Preparing for reset. Press any key...\n"); efi_st_get_key(); - if (IS_ENABLED(CONFIG_EFI_HAVE_RUNTIME_RESET)) + if (IS_ENABLED(CONFIG_EFI_HAVE_RUNTIME_RESET)) { runtime->reset_system(EFI_RESET_WARM, EFI_NOT_READY, sizeof(reset_message), reset_message); - else + } else { + efi_restore_gd(); do_reset(NULL, 0, 0, NULL); + } efi_st_printf("\n"); efi_st_error("Reset failed\n");