From patchwork Mon Sep 28 00:46: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: 1372208 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=hwWmD+9E; 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 4C03kc1X7Zz9sTC for ; Mon, 28 Sep 2020 10:47:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5D21A8236C; Mon, 28 Sep 2020 02:46:41 +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="hwWmD+9E"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 50C8F82356; Mon, 28 Sep 2020 02:46:37 +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.6 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-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) (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 4A03A8232F for ; Mon, 28 Sep 2020 02:46:34 +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-ot1-x344.google.com with SMTP id 95so7976474ota.13 for ; Sun, 27 Sep 2020 17:46:34 -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=DbM68XwP2BZ7FlLRYvn+iws5jnncL8hiQGCJfprRaU0=; b=hwWmD+9EewfLOr6Vdq4soUJAW2NfiCdr7XFF/Hro1beIruNd1IsLAdPWaM9G/98DXX DbSy873fXGZ1xVIvQTREZK8URZ2MRjfEctUzKP2lv/7b5cZLkQAWoJFb6qHcovxbVqcG BGxtTzVnylgNBLiSiHxwiEqsLDfG9y9SqGFPQ= 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=DbM68XwP2BZ7FlLRYvn+iws5jnncL8hiQGCJfprRaU0=; b=Y3qEdBr/PeO1UVDPBLAfR9Xh/mTokLsXuUWmHdG6PjzBO43nDnODD2EEkmqA/LXdo9 k6PHXYloKdCHpQiLoGBIgYI3S6iFCWHqfw7FNnpOM/AAdIGo/Tf+j+m+UDeMHPd/9AJV Ed1Fn9KpcCshFgY1iCCDJROK0ij0Q0vzpBit5iRv4xHvbcIDB7zbruDCjnNZ5JiqhMNd Iguh3rquh543xTt75IaQniCgQyIuKrnIyGVpnbYTAzHb6gcGvVvJnTY9+ziGNjG23jnR QRIsCoz/f+gKWzUIWg7G2SB7Tat4RlmkZcfwa/w5RISChV2OZBVJ5f+UUEW4pY46iosK XSNg== X-Gm-Message-State: AOAM530oUTo6kIYISbkahnkKGCXGXRNRK2UUfebxf0nB2vv0wo/uDOQM DfZjXmI6BtKsJPMSMZ2NIsawHu/d2J1imY9F X-Google-Smtp-Source: ABdhPJzfCWyAjv2n+ETqoPdmcw9ru8VHtM96COQ7hvSOIqcCympGXZsEc+f+lvIR6s0dP+Sb90NfGQ== X-Received: by 2002:a9d:ee2:: with SMTP id 89mr7501314otj.194.1601253992720; Sun, 27 Sep 2020 17:46:32 -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 t7sm1790995ooq.0.2020.09.27.17.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 17:46:32 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Andy Shevchenko , Bin Meng , Heinrich Schuchardt , Sean Anderson , Wolfgang Wallner Subject: [PATCH 02/12] x86: zimage: Add a little more logging Date: Sun, 27 Sep 2020 18:46:14 -0600 Message-Id: <20200928004624.1652803-3-sjg@chromium.org> X-Mailer: git-send-email 2.28.0.681.g6f77f65b4e-goog In-Reply-To: <20200928004624.1652803-1-sjg@chromium.org> References: <20200928004624.1652803-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 Add logging for each part of the boot process, using a new Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/lib/zimage.c | 6 ++++++ common/log.c | 1 + include/log.h | 1 + 3 files changed, 8 insertions(+) diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index a00964cc8d9..7418c9a5fed 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -12,10 +12,13 @@ * linux/Documentation/i386/boot.txt */ +#define LOG_CATEGORY LOGC_BOOT + #include #include #include #include +#include #include #include #include @@ -292,6 +295,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, struct setup_header *hdr = &setup_base->hdr; int bootproto = get_boot_protocol(hdr, false); + log_debug("Setup E820 entries\n"); setup_base->e820_entries = install_e820_map( ARRAY_SIZE(setup_base->e820_map), setup_base->e820_map); @@ -317,6 +321,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, } if (cmd_line) { + log_debug("Setup cmdline\n"); if (bootproto >= 0x0202) { hdr->cmd_line_ptr = (uintptr_t)cmd_line; } else if (bootproto >= 0x0200) { @@ -340,6 +345,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) setup_base->acpi_rsdp_addr = acpi_get_rsdp_addr(); + log_debug("Setup devicetree\n"); setup_device_tree(hdr, (const void *)env_get_hex("fdtaddr", 0)); setup_video(&setup_base->screen_info); diff --git a/common/log.c b/common/log.c index 38336d84e3c..9c65688ba6d 100644 --- a/common/log.c +++ b/common/log.c @@ -26,6 +26,7 @@ static const char *log_cat_name[LOGC_COUNT - LOGC_NONE] = { "bloblist", "devres", "acpi", + "boot", }; static const char *log_level_name[LOGL_COUNT] = { diff --git a/include/log.h b/include/log.h index 00885004a36..dc1b6b5e4c6 100644 --- a/include/log.h +++ b/include/log.h @@ -59,6 +59,7 @@ enum log_category_t { LOGC_DEVRES, /* Device resources (devres_... functions) */ /* Advanced Configuration and Power Interface (ACPI) */ LOGC_ACPI, + LOGC_BOOT, /* Related to boot process / boot image processing */ LOGC_COUNT, /* Number of log categories */ LOGC_END, /* Sentinel value for a list of log categories */