Message ID | 20230504165823.v3.30.I3ff4f57cec46d4068d7790792b6373bae7c28c0e@changeid |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=<UNKNOWN>) Authentication-Results: legolas.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=KzKPCvh5; dkim-atps=neutral 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QC8Z63vnTz1ydV for <incoming@patchwork.ozlabs.org>; Fri, 5 May 2023 09:06:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F13A86100; Fri, 5 May 2023 00:59:32 +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="KzKPCvh5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8F52486044; Fri, 5 May 2023 00:59:13 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) (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 6588C8609C for <u-boot@lists.denx.de>; Fri, 5 May 2023 00:59:09 +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-io1-xd2a.google.com with SMTP id ca18e2360f4ac-766692684c6so24004639f.2 for <u-boot@lists.denx.de>; Thu, 04 May 2023 15:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1683241149; x=1685833149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1BiqbGustB+/4sNtyTfeZMQqmuUl14XRG9p4pV2QmPc=; b=KzKPCvh5cz/cVP4mXRYntvOebGw3BYBAmjG230dUE4NkOt8HI6SQZbRUmYJdvVSmKS iDWK/ON7E1P3bo7T18jAZr9Rg2z4DEz53DIg/JoW5jnlxnmKwiDGeDCeTOJQCT9lNyvW B0wM8XluN2wwOpO04bAoE9tSrhukduK785PLk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683241149; x=1685833149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1BiqbGustB+/4sNtyTfeZMQqmuUl14XRG9p4pV2QmPc=; b=lGDfld7KqqgmfInkN+jz9F21ypatFc6Kz78rjg6p0CW1FhlKjJDTvQHyuJwpaVZZKh i2O3vXZf9rnn1tstihDAKpqy5Qp0QNB3opkDx3bfCzcTDgheU7oIY4cixN5vy5qiaaOh cvKXTfSSy20iIidbM3y5Fc4nb/WMLTazwSTVujRoypbUVLxT86jVWn1IYXUsRf+UXvAV Ar3azTTmgwG37WKU3Hs1Wo2Oj+vAnUw1PN38v8F/7NtPGafyz9lPIySRXcPlxzghWfZ+ JmyqNWl6hhYtlr5FZ4MYuLqFQ6l8s5et7zUIyP7FP5X8KQ6gPeceOgsdP5N10glMM1+R jZ8g== X-Gm-Message-State: AC+VfDybJQ3M0aOF9jDiE4zAt+PC7iB/tpnAkldozIbj3unUUYc4n6RX dym6FR/WbPFfV/K839bMwf4Oleiw7dtZsSEmr7g= X-Google-Smtp-Source: ACHHUZ4eBg87/+mFTRRAOX9U9erYqAKAZk/zA2HXSxv44jTRB7C9tNjFrde2k9b39FpSAG9DDeCSmw== X-Received: by 2002:a5d:9a03:0:b0:763:dbe7:70f2 with SMTP id s3-20020a5d9a03000000b00763dbe770f2mr263657iol.12.1683241148929; Thu, 04 May 2023 15:59:08 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:b5a:9fa0:3da:54ec]) by smtp.gmail.com with ESMTPSA id e11-20020a5ede0b000000b007608af6dfb4sm39506iok.31.2023.05.04.15.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 15:59:08 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>, Nikhil M Jain <n-jain1@ti.com>, Bin Meng <bmeng.cn@gmail.com>, Simon Glass <sjg@chromium.org> Subject: [PATCH v3 30/43] x86: Allow logging to be used in SPL reliably Date: Thu, 4 May 2023 16:58:16 -0600 Message-ID: <20230504165823.v3.30.I3ff4f57cec46d4068d7790792b6373bae7c28c0e@changeid> X-Mailer: git-send-email 2.40.1.521.gf1e218fcd8-goog In-Reply-To: <20230504225829.2537050-1-sjg@chromium.org> References: <20230504225829.2537050-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://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>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean |
Series |
x86: Use qemu-x86_64 to boot EFI installers
|
expand
|
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 8d57f98f6c1..090fa718dbf 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -139,9 +139,22 @@ static int x86_spl_init(void) */ gd->new_gd = (struct global_data *)ptr; memcpy(gd->new_gd, gd, sizeof(*gd)); + + /* + * Make sure logging is disabled when we switch, since the log system + * list head will move + */ + gd->new_gd->flags &= ~GD_FLG_LOG_READY; arch_setup_gd(gd->new_gd); gd->start_addr_sp = (ulong)ptr; + /* start up logging again, with the new list-head location */ + ret = log_init(); + if (ret) { + log_debug("Log setup failed (err=%d)\n", ret); + return ret; + } + if (_LOG_DEBUG) { ret = mtrr_list(mtrr_get_var_count(), MP_SELECT_BSP); if (ret)
When global_data is relocated, log_head moves in memory, meaning that the items in that list point to the wrong place. Disable logging when making the change, then reenable it afterwards, so that logging works normally. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) arch/x86/lib/spl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)