From patchwork Sat Aug 1 16:08:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1339757 X-Patchwork-Delegate: bmeng.cn@gmail.com 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=pass (p=none dis=none) header.from=chromium.org Authentication-Results: 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=DavO7mzY; 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 4BJpyM0FTrz9sSt for ; Sun, 2 Aug 2020 02:10:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 22C32820C6; Sat, 1 Aug 2020 18:08:54 +0200 (CEST) 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="DavO7mzY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 004EA81E39; Sat, 1 Aug 2020 18:08:41 +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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oo1-xc43.google.com (mail-oo1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) (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 B2CBC808B3 for ; Sat, 1 Aug 2020 18:08:37 +0200 (CEST) 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-oo1-xc43.google.com with SMTP id s190so6485193ooa.13 for ; Sat, 01 Aug 2020 09:08:37 -0700 (PDT) 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=3j4JsHJYKFy3tRlH1141rllBrVsNY3x/3ftN3WgICh4=; b=DavO7mzY+lyPXGaKqGjMPRUQEErvyuxd2koPjKY68AxV9YxiXIj1Sfs3ONNR2vE0NF nPtDvbIrJl0152goQkzkEO6AU3dVxShAMMOyYAI6iLF8NbMi3Ne7RrlregGiY6vR6kJu qLJ+gfMNI8b3Uio+GJUxYX6BM0PIIx5s8saHw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3j4JsHJYKFy3tRlH1141rllBrVsNY3x/3ftN3WgICh4=; b=jTP+JybYUnZ4gGrSv9RO2iYbXxck+GmR61iv06ZRFHtGUP88eqbcG2gehUd8F0e8eJ wRdX7DIU12a1LOmLJlPEBcEL1EvPtViyrIjnLa8J7lBfCn4wr03bO9kpS4g0ESLIttuu 9imrCCvd+7J63EWd9zwd+MWhJ7fU64rCMUnWc2bxW+j7XkD0OiWlgkmgwrFcRo0rfn70 WVz1XOwu2htc86FWokJa/6lfk8aTTfECK16nmhTTAfeVfrH36wBdAHf9/nIg5Tm/gGwP 636SyZ9OBPWQsuyS6pBmdFxNdM0vSFp52oblIT/LqzQXvA/51edKVzzt0RPRTi20HvLO Sn+w== X-Gm-Message-State: AOAM530/JSqEmPEY2xasaanZ8ds042nQm7o4N+BE/pWfhyMlBs0LN6PW qeQORv4IvxjkkpS3XPHnjMDKSd9dGMNDBQ== X-Google-Smtp-Source: ABdhPJy9m4EPzA/1cspzFvj/TdmkgspoUmePI0WBwlDaUcQ4hNzOc6mkolIAET9mA6npmg3e2Dhz9Q== X-Received: by 2002:a05:6820:50a:: with SMTP id m10mr7879914ooj.54.1596298116216; Sat, 01 Aug 2020 09:08:36 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id a14sm1911907otf.41.2020.08.01.09.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2020 09:08:35 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Andy Shevchenko , Bin Meng , Joe Hershberger , Wolfgang Wallner Subject: [PATCH 06/16] x86: zimage: Disable interrupts just before booting Date: Sat, 1 Aug 2020 10:08:14 -0600 Message-Id: <20200801160824.17486-7-sjg@chromium.org> X-Mailer: git-send-email 2.28.0.163.g6104cc2f0b6-goog In-Reply-To: <20200801160824.17486-1-sjg@chromium.org> References: <20200801160824.17486-1-sjg@chromium.org> MIME-Version: 1.0 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 At present if an error occurs while setting up the boot, interrupts are left disabled. Move this call later in the sequence to avoid this problem. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- arch/x86/lib/zimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index ba9eb50b0ba..8651dea93b3 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -333,7 +333,6 @@ int do_zboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) struct boot_params *base_ptr; char *s; - disable_interrupts(); memset(&state, '\0', sizeof(state)); if (argc >= 2) { /* argv[1] holds the address of the bzImage */ @@ -369,6 +368,7 @@ int do_zboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return -1; } + disable_interrupts(); /* we assume that the kernel is in place */ return boot_linux_kernel((ulong)base_ptr, state.load_address, false); }