All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] microblaze: expand and correct configuration comments
@ 2012-07-01 14:44 Stephan Linz
  2012-07-01 14:44 ` [U-Boot] [PATCH 2/2] microblaze: move ENV onto top of flash Stephan Linz
  2012-07-02  5:54 ` [U-Boot] [PATCH 1/2] microblaze: expand and correct configuration comments Michal Simek
  0 siblings, 2 replies; 6+ messages in thread
From: Stephan Linz @ 2012-07-01 14:44 UTC (permalink / raw)
  To: u-boot

  - fix CONFIG_SYS_MALLOC_BASE from 0x11FB_F000 to 0x13EF_F000
  - add new size calculation for CONFIG_SYS_MONITOR_LEN
    and CONFIG_SYS_MALLOC_LEN derived from SIZE
  - change CONFIG_SYS_MONITOR_BASE and CONFIG_SYS_MALLOC_BASE
    calculation to a symbolic equation with the corresponding
    _LEN definitions
  - add a "CFI flash memory layout - Example" comment

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 include/configs/microblaze-generic.h |   36 +++++++++++++++++++++++++++------
 1 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 2c7ed5d..e20eb08 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -122,15 +122,19 @@
 
 /*
  * memory layout - Example
- * CONFIG_SYS_TEXT_BASE = 0x1200_0000;
+ * CONFIG_SYS_TEXT_BASE = 0x1200_0000;	defined in config.mk
  * CONFIG_SYS_SRAM_BASE = 0x1000_0000;
- * CONFIG_SYS_SRAM_SIZE = 0x0400_0000;
+ * CONFIG_SYS_SRAM_SIZE = 0x0400_0000;	64MB
+ *
+ * CONFIG_SYS_MONITOR_LEN = 0x40000
+ * CONFIG_SYS_MALLOC_LEN = 3 * CONFIG_SYS_MONITOR_LEN = 0xC0000
  *
  * CONFIG_SYS_GBL_DATA_OFFSET = 0x1000_0000 + 0x0400_0000 - 0x1000 = 0x13FF_F000
- * CONFIG_SYS_MONITOR_BASE = 0x13FF_F000 - 0x40000 = 0x13FB_F000
- * CONFIG_SYS_MALLOC_BASE = 0x13FB_F000 - 0x40000 = 0x13F7_F000
+ * CONFIG_SYS_MONITOR_BASE = 0x13FF_F000 - CONFIG_SYS_MONITOR_LEN = 0x13FB_F000
+ * CONFIG_SYS_MALLOC_BASE = 0x13FB_F000 - CONFIG_SYS_MALLOC_LEN = 0x13EF_F000
  *
  * 0x1000_0000	CONFIG_SYS_SDRAM_BASE
+ *					MEMTEST_AREA	 64kB
  *					FREE
  * 0x1200_0000	CONFIG_SYS_TEXT_BASE
  *		U-BOOT code
@@ -138,9 +142,9 @@
  *					FREE
  *
  *					STACK
- * 0x13F7_F000	CONFIG_SYS_MALLOC_BASE
- *					MALLOC_AREA	256kB	Alloc
- * 0x11FB_F000	CONFIG_SYS_MONITOR_BASE
+ * 0x13EF_F000	CONFIG_SYS_MALLOC_BASE
+ *					MALLOC_AREA	768kB	Alloc
+ * 0x13FB_F000	CONFIG_SYS_MONITOR_BASE
  *					MONITOR_CODE	256kB	Env
  * 0x13FF_F000	CONFIG_SYS_GBL_DATA_OFFSET
  *					GLOBAL_DATA	4kB	bd, gd
@@ -173,6 +177,24 @@
 /* stack */
 #define	CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_MALLOC_BASE
 
+/*
+ * CFI flash memory layout - Example
+ * CONFIG_SYS_FLASH_BASE = 0x2200_0000;
+ * CONFIG_SYS_FLASH_SIZE = 0x0080_0000;	  8MB
+ *
+ * SECT_SIZE = 0x20000;			128kB is one sector
+ * CONFIG_ENV_SIZE = SECT_SIZE;		128kB environment store
+ *
+ * 0x2200_0000	CONFIG_SYS_FLASH_BASE
+ *					FREE		256kB
+ * 0x2204_0000	CONFIG_ENV_ADDR
+ *					ENV_AREA	128kB
+ * 0x2206_0000
+ *					FREE
+ * 0x2280_0000	CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_SIZE
+ *
+ */
+
 #ifdef FLASH
 # define CONFIG_SYS_FLASH_BASE		XILINX_FLASH_START
 # define CONFIG_SYS_FLASH_SIZE		XILINX_FLASH_SIZE
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] microblaze: move ENV onto top of flash
  2012-07-01 14:44 [U-Boot] [PATCH 1/2] microblaze: expand and correct configuration comments Stephan Linz
@ 2012-07-01 14:44 ` Stephan Linz
  2012-07-02  5:52   ` Michal Simek
  2012-07-02  5:54 ` [U-Boot] [PATCH 1/2] microblaze: expand and correct configuration comments Michal Simek
  1 sibling, 1 reply; 6+ messages in thread
From: Stephan Linz @ 2012-07-01 14:44 UTC (permalink / raw)
  To: u-boot

On Microblaze systems with BPI configuration from CFI flash
the first 1-10 MB will occupied by the FPGA configuration
data (BIN file). So we can not use this area for the U-Boot
environment.

In most of all FPGA configuration cases the upper sector in
flash memory will be free for individuell usage.

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 include/configs/microblaze-generic.h |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index e20eb08..818435d 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -186,11 +186,9 @@
  * CONFIG_ENV_SIZE = SECT_SIZE;		128kB environment store
  *
  * 0x2200_0000	CONFIG_SYS_FLASH_BASE
- *					FREE		256kB
- * 0x2204_0000	CONFIG_ENV_ADDR
- *					ENV_AREA	128kB
- * 0x2206_0000
  *					FREE
+ * 0x227E_0000	CONFIG_ENV_ADDR
+ *					ENV_AREA	128kB
  * 0x2280_0000	CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_SIZE
  *
  */
@@ -219,7 +217,7 @@
 /* 128K(one sector) for env */
 #  define CONFIG_ENV_SECT_SIZE	0x20000
 #  define CONFIG_ENV_ADDR \
-			(CONFIG_SYS_FLASH_BASE + (2 * CONFIG_ENV_SECT_SIZE))
+	(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_SIZE - CONFIG_ENV_SECT_SIZE)
 #  define CONFIG_ENV_SIZE	0x20000
 # endif /* !RAMBOOT */
 #else /* !FLASH */
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] microblaze: move ENV onto top of flash
  2012-07-01 14:44 ` [U-Boot] [PATCH 2/2] microblaze: move ENV onto top of flash Stephan Linz
@ 2012-07-02  5:52   ` Michal Simek
  2012-07-02 19:36     ` Stephan Linz
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Simek @ 2012-07-02  5:52 UTC (permalink / raw)
  To: u-boot

2012/7/1 Stephan Linz <linz@li-pro.net>:
> On Microblaze systems with BPI configuration from CFI flash
> the first 1-10 MB will occupied by the FPGA configuration
> data (BIN file). So we can not use this area for the U-Boot
> environment.
>
> In most of all FPGA configuration cases the upper sector in
> flash memory will be free for individuell usage.

is it based on any statistic? I don't think so.

>
> Signed-off-by: Stephan Linz <linz@li-pro.net>
> ---
>  include/configs/microblaze-generic.h |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)

nack for this.
One configuration file can't cover all fpga cases.
The reason why there is only one configuration file for microblaze is
that fpga variability.
If you want to use this option just create new board with your configuration
and use it.
Generic microblaze board should be as simple as possible.
I am ok with adding new command/drivers and improving config but I don't want to
support everything because it is not possible.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] microblaze: expand and correct configuration comments
  2012-07-01 14:44 [U-Boot] [PATCH 1/2] microblaze: expand and correct configuration comments Stephan Linz
  2012-07-01 14:44 ` [U-Boot] [PATCH 2/2] microblaze: move ENV onto top of flash Stephan Linz
@ 2012-07-02  5:54 ` Michal Simek
  1 sibling, 0 replies; 6+ messages in thread
From: Michal Simek @ 2012-07-02  5:54 UTC (permalink / raw)
  To: u-boot

2012/7/1 Stephan Linz <linz@li-pro.net>:
>   - fix CONFIG_SYS_MALLOC_BASE from 0x11FB_F000 to 0x13EF_F000
>   - add new size calculation for CONFIG_SYS_MONITOR_LEN
>     and CONFIG_SYS_MALLOC_LEN derived from SIZE
>   - change CONFIG_SYS_MONITOR_BASE and CONFIG_SYS_MALLOC_BASE
>     calculation to a symbolic equation with the corresponding
>     _LEN definitions
>   - add a "CFI flash memory layout - Example" comment
>
> Signed-off-by: Stephan Linz <linz@li-pro.net>
> ---
>  include/configs/microblaze-generic.h |   36 +++++++++++++++++++++++++++------
>  1 files changed, 29 insertions(+), 7 deletions(-)
>
> diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
> index 2c7ed5d..e20eb08 100644
> --- a/include/configs/microblaze-generic.h
> +++ b/include/configs/microblaze-generic.h
> @@ -122,15 +122,19 @@
>
>  /*
>   * memory layout - Example
> - * CONFIG_SYS_TEXT_BASE = 0x1200_0000;
> + * CONFIG_SYS_TEXT_BASE = 0x1200_0000; defined in config.mk
>   * CONFIG_SYS_SRAM_BASE = 0x1000_0000;
> - * CONFIG_SYS_SRAM_SIZE = 0x0400_0000;
> + * CONFIG_SYS_SRAM_SIZE = 0x0400_0000; 64MB
> + *
> + * CONFIG_SYS_MONITOR_LEN = 0x40000
> + * CONFIG_SYS_MALLOC_LEN = 3 * CONFIG_SYS_MONITOR_LEN = 0xC0000
>   *
>   * CONFIG_SYS_GBL_DATA_OFFSET = 0x1000_0000 + 0x0400_0000 - 0x1000 = 0x13FF_F000
> - * CONFIG_SYS_MONITOR_BASE = 0x13FF_F000 - 0x40000 = 0x13FB_F000
> - * CONFIG_SYS_MALLOC_BASE = 0x13FB_F000 - 0x40000 = 0x13F7_F000
> + * CONFIG_SYS_MONITOR_BASE = 0x13FF_F000 - CONFIG_SYS_MONITOR_LEN = 0x13FB_F000
> + * CONFIG_SYS_MALLOC_BASE = 0x13FB_F000 - CONFIG_SYS_MALLOC_LEN = 0x13EF_F000
>   *
>   * 0x1000_0000 CONFIG_SYS_SDRAM_BASE
> + *                                     MEMTEST_AREA     64kB
>   *                                     FREE
>   * 0x1200_0000 CONFIG_SYS_TEXT_BASE
>   *             U-BOOT code
> @@ -138,9 +142,9 @@
>   *                                     FREE
>   *
>   *                                     STACK
> - * 0x13F7_F000 CONFIG_SYS_MALLOC_BASE
> - *                                     MALLOC_AREA     256kB   Alloc
> - * 0x11FB_F000 CONFIG_SYS_MONITOR_BASE
> + * 0x13EF_F000 CONFIG_SYS_MALLOC_BASE
> + *                                     MALLOC_AREA     768kB   Alloc
> + * 0x13FB_F000 CONFIG_SYS_MONITOR_BASE
>   *                                     MONITOR_CODE    256kB   Env
>   * 0x13FF_F000 CONFIG_SYS_GBL_DATA_OFFSET
>   *                                     GLOBAL_DATA     4kB     bd, gd
> @@ -173,6 +177,24 @@
>  /* stack */
>  #define        CONFIG_SYS_INIT_SP_OFFSET       CONFIG_SYS_MALLOC_BASE
>
> +/*
> + * CFI flash memory layout - Example
> + * CONFIG_SYS_FLASH_BASE = 0x2200_0000;
> + * CONFIG_SYS_FLASH_SIZE = 0x0080_0000;          8MB
> + *
> + * SECT_SIZE = 0x20000;                        128kB is one sector
> + * CONFIG_ENV_SIZE = SECT_SIZE;                128kB environment store
> + *
> + * 0x2200_0000 CONFIG_SYS_FLASH_BASE
> + *                                     FREE            256kB
> + * 0x2204_0000 CONFIG_ENV_ADDR
> + *                                     ENV_AREA        128kB
> + * 0x2206_0000
> + *                                     FREE
> + * 0x2280_0000 CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_SIZE
> + *
> + */
> +
>  #ifdef FLASH
>  # define CONFIG_SYS_FLASH_BASE         XILINX_FLASH_START
>  # define CONFIG_SYS_FLASH_SIZE         XILINX_FLASH_SIZE
> --
> 1.7.0.4

this make sense.

Will add to microblaze custodian tree.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] microblaze: move ENV onto top of flash
  2012-07-02  5:52   ` Michal Simek
@ 2012-07-02 19:36     ` Stephan Linz
  2012-07-03  5:15       ` Michal Simek
  0 siblings, 1 reply; 6+ messages in thread
From: Stephan Linz @ 2012-07-02 19:36 UTC (permalink / raw)
  To: u-boot

Am Montag, den 02.07.2012, 07:52 +0200 schrieb Michal Simek: 
> 2012/7/1 Stephan Linz <linz@li-pro.net>:
> > On Microblaze systems with BPI configuration from CFI flash
> > the first 1-10 MB will occupied by the FPGA configuration
> > data (BIN file). So we can not use this area for the U-Boot
> > environment.
> >
> > In most of all FPGA configuration cases the upper sector in
> > flash memory will be free for individuell usage.
> 
> is it based on any statistic? I don't think so.

Hi Michal,

yes, there isn't ... you are right ;)

> 
> >
> > Signed-off-by: Stephan Linz <linz@li-pro.net>
> > ---
> >  include/configs/microblaze-generic.h |    8 +++-----
> >  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> nack for this.
> One configuration file can't cover all fpga cases.
> The reason why there is only one configuration file for microblaze is
> that fpga variability.
> If you want to use this option just create new board with your configuration
> and use it.

I can live with that, but the current configuration file defines a
memory hole of 256kB in the first 2 sectors in flash. For what? -- The
environment is placed in the 3rd sector. All other sectors are free for
anything.

I think it would be more plausible if the last sector on top will be
used for environment and all other sectors down to the first would be
free for anything, or not?


br,
Stephan

> Generic microblaze board should be as simple as possible.
> I am ok with adding new command/drivers and improving config but I don't want to
> support everything because it is not possible.
> 
> Thanks,
> Michal
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] microblaze: move ENV onto top of flash
  2012-07-02 19:36     ` Stephan Linz
@ 2012-07-03  5:15       ` Michal Simek
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Simek @ 2012-07-03  5:15 UTC (permalink / raw)
  To: u-boot

On 07/02/2012 09:36 PM, Stephan Linz wrote:
> Am Montag, den 02.07.2012, 07:52 +0200 schrieb Michal Simek:
>> 2012/7/1 Stephan Linz<linz@li-pro.net>:
>>> On Microblaze systems with BPI configuration from CFI flash
>>> the first 1-10 MB will occupied by the FPGA configuration
>>> data (BIN file). So we can not use this area for the U-Boot
>>> environment.
>>>
>>> In most of all FPGA configuration cases the upper sector in
>>> flash memory will be free for individuell usage.
>>
>> is it based on any statistic? I don't think so.
>
> Hi Michal,
>
> yes, there isn't ... you are right ;)
>
>>
>>>
>>> Signed-off-by: Stephan Linz<linz@li-pro.net>
>>> ---
>>>   include/configs/microblaze-generic.h |    8 +++-----
>>>   1 files changed, 3 insertions(+), 5 deletions(-)
>>
>> nack for this.
>> One configuration file can't cover all fpga cases.
>> The reason why there is only one configuration file for microblaze is
>> that fpga variability.
>> If you want to use this option just create new board with your configuration
>> and use it.
>
> I can live with that, but the current configuration file defines a
> memory hole of 256kB in the first 2 sectors in flash. For what? -- The
> environment is placed in the 3rd sector. All other sectors are free for
> anything.

For u-boot itself.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-03  5:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-01 14:44 [U-Boot] [PATCH 1/2] microblaze: expand and correct configuration comments Stephan Linz
2012-07-01 14:44 ` [U-Boot] [PATCH 2/2] microblaze: move ENV onto top of flash Stephan Linz
2012-07-02  5:52   ` Michal Simek
2012-07-02 19:36     ` Stephan Linz
2012-07-03  5:15       ` Michal Simek
2012-07-02  5:54 ` [U-Boot] [PATCH 1/2] microblaze: expand and correct configuration comments Michal Simek

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.