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-Users] [PATCH 1/9] [new uImage] Don't pass kdb to ramdisk_high since we may not have one
Date: Tue, 19 Feb 2008 22:03:43 -0600	[thread overview]
Message-ID: <1203480231-30185-2-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1203480231-30185-1-git-send-email-galak@kernel.crashing.org>

We don't actually need the kdb param as we are just using it to get
bd->bi_memsize which we can get from gd->bd->bi_memsize.  Also, if we
boot via OF we might not actually fill out a kdb.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 common/image.c   |    9 ++++-----
 include/image.h  |    2 +-
 lib_m68k/bootm.c |    3 +--
 lib_ppc/bootm.c  |    3 +--
 4 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/common/image.c b/common/image.c
index 39e5f23..46cecef 100644
--- a/common/image.c
+++ b/common/image.c
@@ -495,7 +495,6 @@ void get_ramdisk (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
  * ramdisk_high - relocate init ramdisk
  * @rd_data: ramdisk data start address
  * @rd_len: ramdisk data length
- * @kbd: kernel board info copy (within BOOTMAPSZ boundary)
  * @sp_limit: stack pointer limit (including BOOTMAPSZ)
  * @sp: current stack pointer
  * @initrd_start: pointer to a ulong variable, will hold final init ramdisk
@@ -513,7 +512,7 @@ void get_ramdisk (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
  *     - returns new allc_current, next free address below BOOTMAPSZ
  */
 ulong ramdisk_high (ulong alloc_current, ulong rd_data, ulong rd_len,
-		bd_t *kbd, ulong sp_limit, ulong sp,
+		ulong sp_limit, ulong sp,
 		ulong *initrd_start, ulong *initrd_end)
 {
 	char	*s;
@@ -535,9 +534,9 @@ ulong ramdisk_high (ulong alloc_current, ulong rd_data, ulong rd_len,
 
 #ifdef CONFIG_LOGBUFFER
 	/* Prevent initrd from overwriting logbuffer */
-	if (initrd_high < (kbd->bi_memsize - LOGBUFF_LEN - LOGBUFF_OVERHEAD))
-		initrd_high = kbd->bi_memsize - LOGBUFF_LEN - LOGBUFF_OVERHEAD;
-	debug ("## Logbuffer at 0x%08lx ", kbd->bi_memsize - LOGBUFF_LEN);
+	if (initrd_high < (gd->bd->bi_memsize - LOGBUFF_LEN - LOGBUFF_OVERHEAD))
+	    initrd_high = gd->bd->bi_memsize - LOGBUFF_LEN - LOGBUFF_OVERHEAD;
+	debug ("## Logbuffer at 0x%08lx ", gd->bd->bi_memsize - LOGBUFF_LEN);
 #endif
 	debug ("## initrd_high = 0x%08lx, copy_to_ram = %d\n",
 			initrd_high, initrd_copy_to_ram);
diff --git a/include/image.h b/include/image.h
index dbbbee9..a67489e 100644
--- a/include/image.h
+++ b/include/image.h
@@ -344,7 +344,7 @@ void get_ramdisk (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 
 #if defined(CONFIG_PPC) || defined(CONFIG_M68K)
 ulong ramdisk_high (ulong alloc_current, ulong rd_data, ulong rd_len,
-		bd_t *kbd, ulong sp_limit, ulong sp,
+		ulong sp_limit, ulong sp,
 		ulong *initrd_start, ulong *initrd_end);
 
 ulong get_boot_sp_limit (ulong sp);
diff --git a/lib_m68k/bootm.c b/lib_m68k/bootm.c
index ac04da0..da76844 100644
--- a/lib_m68k/bootm.c
+++ b/lib_m68k/bootm.c
@@ -88,8 +88,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag,
 
 	rd_len = rd_data_end - rd_data_start;
 	alloc_current = ramdisk_high (alloc_current, rd_data_start, rd_len,
-			kbd, sp_limit, get_sp (),
-			&initrd_start, &initrd_end);
+			sp_limit, get_sp (), &initrd_start, &initrd_end);
 
 	debug("## Transferring control to Linux (at address %08lx) ...\n",
 	      (ulong) kernel);
diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c
index 69ec459..1f1be69 100644
--- a/lib_ppc/bootm.c
+++ b/lib_ppc/bootm.c
@@ -107,8 +107,7 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag,
 	rd_len = rd_data_end - rd_data_start;
 
 	alloc_current = ramdisk_high (alloc_current, rd_data_start, rd_len,
-			kbd, sp_limit, get_sp (),
-			&initrd_start, &initrd_end);
+			sp_limit, get_sp (), &initrd_start, &initrd_end);
 
 #if defined(CONFIG_OF_LIBFDT)
 	/* find flattened device tree */
-- 
1.5.3.8

  reply	other threads:[~2008-02-20  4:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20  4:03 [U-Boot-Users] [PATCH 0/9] [new uImage] Add support for booting images at non-zero addresses Kumar Gala
2008-02-20  4:03 ` Kumar Gala [this message]
2008-02-20  4:03   ` [U-Boot-Users] [PATCH 2/9] [new uImage] ppc: Determine if we are booting an OF style Kumar Gala
2008-02-20  4:03     ` [U-Boot-Users] [PATCH 3/9] [new uImage] ppc: Re-order ramdisk/fdt handling sequence Kumar Gala
2008-02-20  4:03       ` [U-Boot-Users] [PATCH 4/9] [new uImage] rework error handling so common functions don't reset Kumar Gala
2008-02-20  4:03         ` [U-Boot-Users] [PATCH 5/9] [new uImage] ppc: Allow boards to specify effective amount of memory Kumar Gala
2008-02-20  4:03           ` [U-Boot-Users] [PATCH 6/9] [new uImage] Introduce lmb from linux kernel for memory mgmt of boot images Kumar Gala
2008-02-20  4:03             ` [U-Boot-Users] [PATCH 7/9] [new uImage] Use lmb for bootm allocations Kumar Gala
2008-02-20  4:03               ` [U-Boot-Users] [PATCH 8/9] [new uImage] Provide ability to restrict region used for boot images Kumar Gala
2008-02-20  4:03                 ` [U-Boot-Users] [PATCH 9/9] [new uImage] Respect autostart setting in linux bootm Kumar Gala
2008-02-29 14:36           ` [U-Boot-Users] [PATCH 5/9] [new uImage] ppc: Allow boards to specify effective amount of memory Marian Balakowicz
  -- strict thread matches above, loose matches on Subject: below --
2008-02-28  3:51 [U-Boot-Users] [PATCH 0/9] [new uImage] Add support for booting images at non-zero addresses Kumar Gala
2008-02-28  3:51 ` [U-Boot-Users] [PATCH 1/9] [new uImage] Don't pass kdb to ramdisk_high since we may not have one Kumar Gala
2008-02-29 14:21   ` Marian Balakowicz

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=1203480231-30185-2-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.