public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC][PATCH 00/19] arm: add full relocation / cache support
Date: Thu, 05 Aug 2010 08:19:58 +0200	[thread overview]
Message-ID: <4C5A580E.7060207@denx.de> (raw)
In-Reply-To: <4C595A65.2000808@arcor.de>

Hello Matthias,

Matthias Wei?er wrote:
> Am 29.07.2010 12:44, schrieb Heiko Schocher:
>> This patch series add full relocation and cache support for arm
>> based boards. I did this for arm1136, arm_cortexa8 and arm926ejs
>> based boards. As this change is not compatible to old code,
>> before this can go to mainline *all* plattforms and boards
>> have to be converted! As I don;t have access to all plattforms/
>> boards I need help here! Also I couldn;t test all boards,
>> so please test and report, send bugfixes!
> 
> I just tested your patch set on my version of u-boot for MB86R01 from
> Fujitsu (arm926ejs based SoC). This is currently not available in
> mainline u-boot but current patches are available here

Thanks for testing!

> http://lists.denx.de/pipermail/u-boot/2010-August/074688.html
> 
> The point is that the board doesn't boot after applying your patches and
> doing the changes to my board which are given at the end of this mail.

:-(

> The board runs through my low level init (so DDR RAM is up) and later on
> crashes in the first call to memset. I could not further debug this as I

Where is this memset()? The first after low level init is in:
arch/arm/lib/board.c board_init_f(), do you mean this?

If so, then something must be wrong with your memory setup.

> have to admit that I am not an expert with GDB + BDI2000 debugging.
> Maybe you can give me some hints what I am missing.

Hmm.. hard to say without debugging it. If you don;t mean with "crashes
in the first first memset" the function I above described, maybe
maybe your Ram gets not correct detected? Can you try to find out,
with what value dram_init() sets up gd->ram_size?
(Or you set this for testing to fix values?)

Hmmm... from where did your board boot? I tried it on the tx25
board, which boots from nand. Do you boot from a NOR flash?
If so you *must* change TEXT_BASE in config.mk (see:
doc/README.arm-relocation line 45) in your board directory
to where u-boot starts in flash!

Ah, yep, this seems to me the reason why it don;t work for you:

found in the patchseries you pointed to
http://lists.denx.de/pipermail/u-boot/2010-August/074688.html

board/syteco/jadecpu/config.mk
[...]
+TEXT_BASE = 0x46000000

change this to

(as in include/configs/jadecpu.h is defined the following:

+/*
+ * FLASH and environment organization
+ */
+#define CONFIG_SYS_FLASH_BASE		0x10000000
+#define CONFIG_SYS_MAX_FLASH_BANKS	1
+#define CONFIG_SYS_MAX_FLASH_SECT	256
+#define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_FLASH_BASE
)

+TEXT_BASE = 0x10000000

and try it again.

> Changes made to the board code after applying your patches:
> 
> diff --git a/include/configs/jadecpu.h b/include/configs/jadecpu.h
> index bfc60a6..24aa23d 100644
> --- a/include/configs/jadecpu.h
> +++ b/include/configs/jadecpu.h
> @@ -149,6 +149,10 @@
>  #define PHYS_SDRAM             0x40000000      /* Start address of
> DDRRAM */
>  #define PHYS_SDRAM_SIZE        0x08000000      /* 128 megs */
> 
> +/* additions for new relocation code, must added to all boards */
> +#define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
> +#define CONFIG_SYS_INIT_SP_ADDR                0x01000000
> +
>  /*
>   * FLASH and environment organization
>   */
> 
> diff --git a/board/syteco/jadecpu/jadecpu.c
> b/board/syteco/jadecpu/jadecpu.c
> index 04d2f9d..bf96bcd 100644
> --- a/board/syteco/jadecpu/jadecpu.c
> +++ b/board/syteco/jadecpu/jadecpu.c
> @@ -154,12 +154,18 @@ int misc_init_r(void)
>   */
>  int dram_init(void)
>  {
> -       gd->bd->bi_dram[0].start = PHYS_SDRAM;
> -       gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
> -
> +       /* dram_init must store complete ramsize in gd->ram_size */
> +       gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM,
> +                               PHYS_SDRAM_SIZE);
>         return 0;
>  }
> 
> +void dram_init_banksize (void)
> +{
> +       gd->bd->bi_dram[0].start = PHYS_SDRAM;
> +       gd->bd->bi_dram[0].size = gd->ram_size;
> +}
> +

looks OK to me.

bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2010-08-05  6:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 10:44 [U-Boot] [RFC][PATCH 00/19] arm: add full relocation / cache support Heiko Schocher
2010-07-29 11:33 ` Detlev Zundel
2010-07-29 11:57   ` Heiko Schocher
2010-08-04 12:17 ` Matthias Weißer
2010-08-05  6:19   ` Heiko Schocher [this message]
2010-08-05  9:23     ` Matthias Weißer
2010-08-05  9:32       ` Heiko Schocher
2010-08-05 12:15         ` Matthias Weißer
2010-08-07 21:41           ` Wolfgang Denk
2010-08-06  8:56 ` Heiko Schocher

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=4C5A580E.7060207@denx.de \
    --to=hs@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox