All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] 85xx/86xx: Ensure MP boot page is not used
Date: Wed,  1 Apr 2009 11:06:29 -0500	[thread overview]
Message-ID: <1238601989-6251-3-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1238601989-6251-2-git-send-email-galak@kernel.crashing.org>

We had a bug on 86xx in which the boot page used to bring up secondary
cores was being overwritten and used for the malloc region in u-boot.

We need to reserve the region of memory that the boot page is going to
be put at so nothing uses it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
---
* No real change, just here for completeness

 lib_ppc/board.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 3b93e4e..6eeca02 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -79,6 +79,10 @@
 #include <asm/mmu.h>
 #endif
 
+#ifdef CONFIG_MP
+extern u32 determine_mp_bootpg(void);
+#endif
+
 #ifdef CONFIG_SYS_UPDATE_FLASH_SIZE
 extern int update_flash_size (int flash_size);
 #endif
@@ -444,6 +448,15 @@ void board_init_f (ulong bootflag)
 
 	addr = CONFIG_SYS_SDRAM_BASE + get_effective_memsize();
 
+#if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500))
+	/* We need to make sure the location we intend to put secondary core
+	 * boot code is reserved and not used by any part of u-boot */
+	if (addr > determine_mp_bootpg()) {
+		addr = determine_mp_bootpg();
+		debug ("Reserving MP boot page to %08lx\n", addr);
+	}
+#endif
+
 #ifdef CONFIG_LOGBUFFER
 #ifndef CONFIG_ALT_LB_ADDR
 	/* reserve kernel log buffer */
-- 
1.5.6.6

  reply	other threads:[~2009-04-01 16:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01 16:06 [U-Boot] [PATCH v2 1/3] 86xx: Cleanup MP support Kumar Gala
2009-04-01 16:06 ` [U-Boot] [PATCH 2/3] 85xx: Introduce determine_mp_bootpg() helper Kumar Gala
2009-04-01 16:06   ` Kumar Gala [this message]
2009-04-01 19:00     ` [U-Boot] [PATCH 3/3] 85xx/86xx: Ensure MP boot page is not used Wolfgang Denk
2009-04-01 18:35   ` [U-Boot] [PATCH 2/3] 85xx: Introduce determine_mp_bootpg() helper Becky Bruce
2009-04-01 18:34 ` [U-Boot] [PATCH v2 1/3] 86xx: Cleanup MP support Becky Bruce
2009-04-01 19:00 ` Wolfgang Denk
2009-04-01 20:11 ` Kim Phillips
2009-04-01 20:15   ` Kumar Gala

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=1238601989-6251-3-git-send-email-galak@kernel.crashing.org \
    --to=galak@kernel.crashing.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.