All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v2 03/12] x86: apl: Enhance debugging in the SPL loader
Date: Sun, 24 Jan 2021 10:06:04 -0700	[thread overview]
Message-ID: <20210124100608.v2.3.Ia4625fafac91469274141729a0040ded17b0db3c@changeid> (raw)
In-Reply-To: <20210124170613.3434824-1-sjg@chromium.org>

Move to log_debug() and make use of the new SPL function to find the
text base.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---

(no changes since v1)

 arch/x86/cpu/apollolake/spl.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index 8991d5e648e..f2d25734c60 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -3,6 +3,8 @@
  * Copyright 2019 Google LLC
  */
 
+#define LOG_CATEGORY LOGC_BOOT
+
 #include <common.h>
 #include <binman_sym.h>
 #include <bootstage.h>
@@ -33,12 +35,11 @@ static int rom_load_image(struct spl_image_info *spl_image,
 	int ret;
 
 	spl_image->size = CONFIG_SYS_MONITOR_LEN;  /* We don't know SPL size */
-	spl_image->entry_point = spl_phase() == PHASE_TPL ?
-		CONFIG_SPL_TEXT_BASE : CONFIG_SYS_TEXT_BASE;
+	spl_image->entry_point = spl_get_image_text_base();
 	spl_image->load_addr = spl_image->entry_point;
 	spl_image->os = IH_OS_U_BOOT;
 	spl_image->name = "U-Boot";
-	debug("Reading from mapped SPI %lx, size %lx", spl_pos, spl_size);
+	log_debug("Reading from mapped SPI %lx, size %lx\n", spl_pos, spl_size);
 
 	if (CONFIG_IS_ENABLED(SPI_FLASH_SUPPORT)) {
 		ret = uclass_find_first_device(UCLASS_SPI_FLASH, &dev);
@@ -56,7 +57,8 @@ static int rom_load_image(struct spl_image_info *spl_image,
 			return ret;
 	}
 	spl_pos += map_base & ~0xff000000;
-	debug(", base %lx, pos %lx\n", map_base, spl_pos);
+	log_debug(", base %lx, pos %lx, load %lx\n", map_base, spl_pos,
+		  spl_image->load_addr);
 	bootstage_start(BOOTSTAGE_ID_ACCUM_MMAP_SPI, "mmap_spi");
 	memcpy((void *)spl_image->load_addr, (void *)spl_pos, spl_size);
 	cpu_flush_l1d_to_l2();
@@ -121,7 +123,7 @@ static int spl_fast_spi_load_image(struct spl_image_info *spl_image,
 	spl_image->os = IH_OS_U_BOOT;
 	spl_image->name = "U-Boot";
 	spl_pos &= ~0xff000000;
-	debug("Reading from flash %lx, size %lx\n", spl_pos, spl_size);
+	log_debug("Reading from flash %lx, size %lx\n", spl_pos, spl_size);
 	ret = spi_flash_read_dm(dev, spl_pos, spl_size,
 				(void *)spl_image->load_addr);
 	cpu_flush_l1d_to_l2();
-- 
2.30.0.280.ga3ce27912f-goog

  parent reply	other threads:[~2021-01-24 17:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-24 17:06 [PATCH v2 00/12] x86: Minor improvements mostly for image loading Simon Glass
2021-01-24 17:06 ` [PATCH v2 01/12] x86: acpi_gpe: Update driver name to match devicetree Simon Glass
2021-01-24 17:06 ` [PATCH v2 02/12] x86: spl: Add a function to find the text base Simon Glass
2021-01-24 17:06 ` Simon Glass [this message]
2021-01-24 17:06 ` [PATCH v2 04/12] x86: Make sure the SPL image ends on a suitable boundary Simon Glass
2021-02-01  6:37   ` Bin Meng
2021-01-24 17:06 ` [PATCH v2 05/12] x86: spl: Make moving BSS conditional Simon Glass
2021-01-24 17:06 ` [PATCH v2 06/12] x86: Update Chromium OS GNVS names Simon Glass
2021-01-24 17:06 ` [PATCH v2 07/12] x86: zimage: Allow dumping the image from outside the module Simon Glass
2021-01-24 17:06 ` [PATCH v2 08/12] x86: zimage: Improve command-line debug handling Simon Glass
2021-01-24 17:06 ` [PATCH v2 09/12] x86: spl: Clear BSS unconditionally Simon Glass
2021-01-24 17:06 ` [PATCH v2 10/12] x86: tpl: Show next stage being booted Simon Glass
2021-01-24 17:06 ` [PATCH v2 11/12] sysinfo: Allow showing model info from sysinfo Simon Glass
2021-01-24 17:06 ` [PATCH v2 12/12] x86: coral: Show memory config and SKU ID on startup Simon Glass
2021-02-01  6:40 ` [PATCH v2 00/12] x86: Minor improvements mostly for image loading Bin Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210124100608.v2.3.Ia4625fafac91469274141729a0040ded17b0db3c@changeid \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.