public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS]ROMRAM
@ 2004-07-22 16:18 jasmine kohli
  2004-07-22 16:52 ` [ECOS]ROMRAM Gary Thomas
  2004-07-23  3:08 ` [ECOS]ROMRAM Tony Butt
  0 siblings, 2 replies; 9+ messages in thread
From: jasmine kohli @ 2004-07-22 16:18 UTC (permalink / raw)
  To: ecos-discuss

hi all,
i am trying to bring redboot to my board which has
MPC852T as the processor.
 
i have 32 MB Flash with 64 MB SDRAM.
i have Flash mapped 0xFA000000 and SDRAM mapped at
0x00000000
 
i have the following content in my
mlt_powerpc_myboard_romram.h
#ifndef __ASSEMBLER__
#include <cyg/infra/cyg_type.h>
#include <stddef.h>
#endif
#define CYGMEM_REGION_ram (0)
#define CYGMEM_REGION_ram_SIZE (0x4000000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R |
CYGMEM_REGION_ATTR_W)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME
(__heap1))
CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x4000000 -
(size_t) CYG_LABEL_NAME (__heap1))
 
 
and i have the following in
mlt_powerpc_myboard_romram.ldi file
#include <cyg/infra/cyg_type.inc>
MEMORY
{
    ram : ORIGIN = 0, LENGTH = 0x4000000
}
SECTIONS
{
    SECTIONS_BEGIN
    SECTION_vectors (ram, 0, LMA_EQ_VMA)
    SECTION_text (ram, 0x3400, LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (ram, ALIGN (0x1),
LMA_EQ_VMA)
    SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}

 
and the following in mlt_powerpc_myboard_romram.mlt
file
version 0
region ram 0 4000000 0 !
section vectors 0 1 0 1 1 0 1 0 0 0 !
section text 0 1 0 1 1 1 1 1 3400 3400 fini fini !
section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
section rodata 0 8 0 1 0 1 0 1 fixup fixup !
section fixup 0 4 0 1 0 1 0 1 gcc_except_table
gcc_except_table !
section gcc_except_table 0 1 0 1 0 1 0 1 data data !
section data 0 8 0 1 0 1 0 1 sbss sbss !
section sbss 0 4 0 1 0 1 0 1 bss bss !
section bss 0 10 0 1 0 1 0 1 heap1 heap1 !
section heap1 0 8 0 0 0 0 0 0 !

now to the problem--- :( when i start redboot and step
trace through the code, it starts at
0xfa000100 and then straight jumps to 0x00003400 and
hangs.
does anyone have a clue on why this happens.
 
another question that i wanted to ask was do we have
to edit only the mlt_.h and mlt_.ldi file or do we
need to edit the .mlt file as well ,because its
difficult to editr the .mlt file on a linux system.
 
and what are the major differences between all types
of startup -ROM,RAM,ROMRAM

a thank u to all ....
regards,
jasmine

 


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS]ROMRAM
  2004-07-22 16:18 [ECOS]ROMRAM jasmine kohli
@ 2004-07-22 16:52 ` Gary Thomas
  2004-07-22 17:01   ` [ECOS]ROMRAM jasmine kohli
  2004-07-22 19:55   ` [ECOS]ROMRAM jasmine kohli
  2004-07-23  3:08 ` [ECOS]ROMRAM Tony Butt
  1 sibling, 2 replies; 9+ messages in thread
From: Gary Thomas @ 2004-07-22 16:52 UTC (permalink / raw)
  To: jasmine kohli; +Cc: ecos-discuss

On Thu, 2004-07-22 at 10:03, jasmine kohli wrote:
> hi all,
> i am trying to bring redboot to my board which has
> MPC852T as the processor.
>  
> i have 32 MB Flash with 64 MB SDRAM.
> i have Flash mapped 0xFA000000 and SDRAM mapped at
> 0x00000000
>  
> i have the following content in my
> mlt_powerpc_myboard_romram.h
> #ifndef __ASSEMBLER__
> #include <cyg/infra/cyg_type.h>
> #include <stddef.h>
> #endif
> #define CYGMEM_REGION_ram (0)
> #define CYGMEM_REGION_ram_SIZE (0x4000000)
> #define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R |
> CYGMEM_REGION_ATTR_W)
> #ifndef __ASSEMBLER__
> extern char CYG_LABEL_NAME (__heap1) [];
> #endif
> #define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME
> (__heap1))
> CYG_LABEL_NAME (__heap1))
> #define CYGMEM_SECTION_heap1_SIZE (0x4000000 -
> (size_t) CYG_LABEL_NAME (__heap1))
>  
> 
> and i have the following in
> mlt_powerpc_myboard_romram.ldi file
> #include <cyg/infra/cyg_type.inc>
> MEMORY
> {
>     ram : ORIGIN = 0, LENGTH = 0x4000000
> }
> SECTIONS
> {
>     SECTIONS_BEGIN
>     SECTION_vectors (ram, 0, LMA_EQ_VMA)
>     SECTION_text (ram, 0x3400, LMA_EQ_VMA)
>     SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
>     SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
>     SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_gcc_except_table (ram, ALIGN (0x1),
> LMA_EQ_VMA)
>     SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
>     SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
>     CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
>     SECTIONS_END
> }
> 
>  
> and the following in mlt_powerpc_myboard_romram.mlt
> file
> version 0
> region ram 0 4000000 0 !
> section vectors 0 1 0 1 1 0 1 0 0 0 !
> section text 0 1 0 1 1 1 1 1 3400 3400 fini fini !
> section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
> section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
> section rodata 0 8 0 1 0 1 0 1 fixup fixup !
> section fixup 0 4 0 1 0 1 0 1 gcc_except_table
> gcc_except_table !
> section gcc_except_table 0 1 0 1 0 1 0 1 data data !
> section data 0 8 0 1 0 1 0 1 sbss sbss !
> section sbss 0 4 0 1 0 1 0 1 bss bss !
> section bss 0 10 0 1 0 1 0 1 heap1 heap1 !
> section heap1 0 8 0 0 0 0 0 0 !
> 
> now to the problem--- :( when i start redboot and step
> trace through the code, it starts at
> 0xfa000100 and then straight jumps to 0x00003400 and
> hangs.
> does anyone have a clue on why this happens.

Because you told it to :-)  

Check out your use of CYGSEM_HAL_POWERPC_RESET_USES_JUMP
>  
> another question that i wanted to ask was do we have
> to edit only the mlt_.h and mlt_.ldi file or do we
> need to edit the .mlt file as well ,because its
> difficult to editr the .mlt file on a linux system.

Why?  There is no need to keep Windows line endings in this file,
so there is no problem editing it.

>  
> and what are the major differences between all types
> of startup -ROM,RAM,ROMRAM
> 
> a thank u to all ....
> regards,
> jasmine
> 
>  
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS]ROMRAM
  2004-07-22 16:52 ` [ECOS]ROMRAM Gary Thomas
@ 2004-07-22 17:01   ` jasmine kohli
  2004-07-22 17:11     ` [ECOS]ROMRAM Gary Thomas
  2004-07-22 19:55   ` [ECOS]ROMRAM jasmine kohli
  1 sibling, 1 reply; 9+ messages in thread
From: jasmine kohli @ 2004-07-22 17:01 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Gary Thomas

hi gary,
    thanks for such a quick response.

the option CYGSEM_HAL_POWERPC_RESET_USES_JUMP is used
in two places in my code 

1)in arch/v2_0/cdl/hal_powerpc.cdl as 

cdl_option CYGSEM_HAL_POWERPC_RESET_USES_JUMP {
        display       "RESET vector jumps to startup"
        default_value 0
        description   "
            Some platforms may need this for ROMRAM
startup."
    }
and 
2)in vector.S file as

        .macro  reset_vector name
        .p2align 8
        .globl  __exception_\name
__exception_\name:
#ifdef CYGSEM_HAL_POWERPC_RESET_USES_JUMP
        bl      _start
#else
        lwi     r3,_start
        mtlr    r3
        blr
#endif

so should i set the option as 1 for ROMRAM,or ??
...
and there is one one question i wanted to ask u
was what is the major difference between ROM and
ROMRAM based STARTup as ROM based STARTUP also copies
data from ROM to RAM.

plz do send in ur valuable suggestions.

thanks a lot,

regards,
jasmine
reagrds,
jasmine




 



--- Gary Thomas <gary@mlbassoc.com> wrote:
> On Thu, 2004-07-22 at 10:03, jasmine kohli wrote:
> > hi all,
> > i am trying to bring redboot to my board which has
> > MPC852T as the processor.
> >  
> > i have 32 MB Flash with 64 MB SDRAM.
> > i have Flash mapped 0xFA000000 and SDRAM mapped at
> > 0x00000000
> >  
> > i have the following content in my
> > mlt_powerpc_myboard_romram.h
> > #ifndef __ASSEMBLER__
> > #include <cyg/infra/cyg_type.h>
> > #include <stddef.h>
> > #endif
> > #define CYGMEM_REGION_ram (0)
> > #define CYGMEM_REGION_ram_SIZE (0x4000000)
> > #define CYGMEM_REGION_ram_ATTR
> (CYGMEM_REGION_ATTR_R |
> > CYGMEM_REGION_ATTR_W)
> > #ifndef __ASSEMBLER__
> > extern char CYG_LABEL_NAME (__heap1) [];
> > #endif
> > #define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME
> > (__heap1))
> > CYG_LABEL_NAME (__heap1))
> > #define CYGMEM_SECTION_heap1_SIZE (0x4000000 -
> > (size_t) CYG_LABEL_NAME (__heap1))
> >  
> > 
> > and i have the following in
> > mlt_powerpc_myboard_romram.ldi file
> > #include <cyg/infra/cyg_type.inc>
> > MEMORY
> > {
> >     ram : ORIGIN = 0, LENGTH = 0x4000000
> > }
> > SECTIONS
> > {
> >     SECTIONS_BEGIN
> >     SECTION_vectors (ram, 0, LMA_EQ_VMA)
> >     SECTION_text (ram, 0x3400, LMA_EQ_VMA)
> >     SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
> >     SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
> >     SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
> >     SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
> >     SECTION_gcc_except_table (ram, ALIGN (0x1),
> > LMA_EQ_VMA)
> >     SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
> >     SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
> >     SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
> >     CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
> >     SECTIONS_END
> > }
> > 
> >  
> > and the following in
> mlt_powerpc_myboard_romram.mlt
> > file
> > version 0
> > region ram 0 4000000 0 !
> > section vectors 0 1 0 1 1 0 1 0 0 0 !
> > section text 0 1 0 1 1 1 1 1 3400 3400 fini fini !
> > section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
> > section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
> > section rodata 0 8 0 1 0 1 0 1 fixup fixup !
> > section fixup 0 4 0 1 0 1 0 1 gcc_except_table
> > gcc_except_table !
> > section gcc_except_table 0 1 0 1 0 1 0 1 data data
> !
> > section data 0 8 0 1 0 1 0 1 sbss sbss !
> > section sbss 0 4 0 1 0 1 0 1 bss bss !
> > section bss 0 10 0 1 0 1 0 1 heap1 heap1 !
> > section heap1 0 8 0 0 0 0 0 0 !
> > 
> > now to the problem--- :( when i start redboot and
> step
> > trace through the code, it starts at
> > 0xfa000100 and then straight jumps to 0x00003400
> and
> > hangs.
> > does anyone have a clue on why this happens.
> 
> Because you told it to :-)  
> 
> Check out your use of
> CYGSEM_HAL_POWERPC_RESET_USES_JUMP
> >  
> > another question that i wanted to ask was do we
> have
> > to edit only the mlt_.h and mlt_.ldi file or do we
> > need to edit the .mlt file as well ,because its
> > difficult to editr the .mlt file on a linux
> system.
> 
> Why?  There is no need to keep Windows line endings
> in this file,
> so there is no problem editing it.
> 
> >  
> > and what are the major differences between all
> types
> > of startup -ROM,RAM,ROMRAM
> > 
> > a thank u to all ....
> > regards,
> > jasmine
> > 
> >  
> > 
> > 
> > 		
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - You care about security. So do we.
> > http://promotions.yahoo.com/new_mail
> -- 
> Gary Thomas <gary@mlbassoc.com>
> MLB Associates
> 
> 



	
		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS]ROMRAM
  2004-07-22 17:01   ` [ECOS]ROMRAM jasmine kohli
@ 2004-07-22 17:11     ` Gary Thomas
  0 siblings, 0 replies; 9+ messages in thread
From: Gary Thomas @ 2004-07-22 17:11 UTC (permalink / raw)
  To: jasmine kohli; +Cc: ecos-discuss

On Thu, 2004-07-22 at 10:52, jasmine kohli wrote:
> hi gary,
>     thanks for such a quick response.
> 
> the option CYGSEM_HAL_POWERPC_RESET_USES_JUMP is used
> in two places in my code 
> 
> 1)in arch/v2_0/cdl/hal_powerpc.cdl as 
> 
> cdl_option CYGSEM_HAL_POWERPC_RESET_USES_JUMP {
>         display       "RESET vector jumps to startup"
>         default_value 0
>         description   "
>             Some platforms may need this for ROMRAM
> startup."
>     }
> and 
> 2)in vector.S file as
> 
>         .macro  reset_vector name
>         .p2align 8
>         .globl  __exception_\name
> __exception_\name:
> #ifdef CYGSEM_HAL_POWERPC_RESET_USES_JUMP
>         bl      _start
> #else
>         lwi     r3,_start
>         mtlr    r3
>         blr
> #endif
> 
> so should i set the option as 1 for ROMRAM,or ??

On this hardware, it really doesn't matter.  When you reset the 
processor, BR0/OR0 (chip select 0) is reset to map all memory
onto the FLASH, thus 0x3400 is the same as 0xFA003400.  If you
patterned your startup code after what I've done for the Adder
(I'm sure you did), then this is taken care of right away.

> ...
> and there is one one question i wanted to ask u
> was what is the major difference between ROM and
> ROMRAM based STARTup as ROM based STARTUP also copies
> data from ROM to RAM.

ROMRAM relocates all of the program, code + data, into RAM before
execution.  ROM mode executes code from ROM, with data in RAM.

> 
> plz do send in ur valuable suggestions.
> 
> thanks a lot,
> 
> regards,
> jasmine
> reagrds,
> jasmine
> 
> 
> 
> 
>  
> 
> 
> 
> --- Gary Thomas <gary@mlbassoc.com> wrote:
> > On Thu, 2004-07-22 at 10:03, jasmine kohli wrote:
> > > hi all,
> > > i am trying to bring redboot to my board which has
> > > MPC852T as the processor.
> > >  
> > > i have 32 MB Flash with 64 MB SDRAM.
> > > i have Flash mapped 0xFA000000 and SDRAM mapped at
> > > 0x00000000
> > >  
> > > i have the following content in my
> > > mlt_powerpc_myboard_romram.h
> > > #ifndef __ASSEMBLER__
> > > #include <cyg/infra/cyg_type.h>
> > > #include <stddef.h>
> > > #endif
> > > #define CYGMEM_REGION_ram (0)
> > > #define CYGMEM_REGION_ram_SIZE (0x4000000)
> > > #define CYGMEM_REGION_ram_ATTR
> > (CYGMEM_REGION_ATTR_R |
> > > CYGMEM_REGION_ATTR_W)
> > > #ifndef __ASSEMBLER__
> > > extern char CYG_LABEL_NAME (__heap1) [];
> > > #endif
> > > #define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME
> > > (__heap1))
> > > CYG_LABEL_NAME (__heap1))
> > > #define CYGMEM_SECTION_heap1_SIZE (0x4000000 -
> > > (size_t) CYG_LABEL_NAME (__heap1))
> > >  
> > > 
> > > and i have the following in
> > > mlt_powerpc_myboard_romram.ldi file
> > > #include <cyg/infra/cyg_type.inc>
> > > MEMORY
> > > {
> > >     ram : ORIGIN = 0, LENGTH = 0x4000000
> > > }
> > > SECTIONS
> > > {
> > >     SECTIONS_BEGIN
> > >     SECTION_vectors (ram, 0, LMA_EQ_VMA)
> > >     SECTION_text (ram, 0x3400, LMA_EQ_VMA)
> > >     SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
> > >     SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
> > >     SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
> > >     SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
> > >     SECTION_gcc_except_table (ram, ALIGN (0x1),
> > > LMA_EQ_VMA)
> > >     SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
> > >     SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
> > >     SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
> > >     CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
> > >     SECTIONS_END
> > > }
> > > 
> > >  
> > > and the following in
> > mlt_powerpc_myboard_romram.mlt
> > > file
> > > version 0
> > > region ram 0 4000000 0 !
> > > section vectors 0 1 0 1 1 0 1 0 0 0 !
> > > section text 0 1 0 1 1 1 1 1 3400 3400 fini fini !
> > > section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
> > > section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
> > > section rodata 0 8 0 1 0 1 0 1 fixup fixup !
> > > section fixup 0 4 0 1 0 1 0 1 gcc_except_table
> > > gcc_except_table !
> > > section gcc_except_table 0 1 0 1 0 1 0 1 data data
> > !
> > > section data 0 8 0 1 0 1 0 1 sbss sbss !
> > > section sbss 0 4 0 1 0 1 0 1 bss bss !
> > > section bss 0 10 0 1 0 1 0 1 heap1 heap1 !
> > > section heap1 0 8 0 0 0 0 0 0 !
> > > 
> > > now to the problem--- :( when i start redboot and
> > step
> > > trace through the code, it starts at
> > > 0xfa000100 and then straight jumps to 0x00003400
> > and
> > > hangs.
> > > does anyone have a clue on why this happens.
> > 
> > Because you told it to :-)  
> > 
> > Check out your use of
> > CYGSEM_HAL_POWERPC_RESET_USES_JUMP
> > >  
> > > another question that i wanted to ask was do we
> > have
> > > to edit only the mlt_.h and mlt_.ldi file or do we
> > > need to edit the .mlt file as well ,because its
> > > difficult to editr the .mlt file on a linux
> > system.
> > 
> > Why?  There is no need to keep Windows line endings
> > in this file,
> > so there is no problem editing it.
> > 
> > >  
> > > and what are the major differences between all
> > types
> > > of startup -ROM,RAM,ROMRAM
> > > 
> > > a thank u to all ....
> > > regards,
> > > jasmine
> > > 
> > >  
> > > 
> > > 
> > > 		
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail - You care about security. So do we.
> > > http://promotions.yahoo.com/new_mail
> > -- 
> > Gary Thomas <gary@mlbassoc.com>
> > MLB Associates
> > 
> > 
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Vote for the stars of Yahoo!'s next ad campaign!
> http://advision.webevents.yahoo.com/yahoo/votelifeengine/
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS]ROMRAM
  2004-07-22 16:52 ` [ECOS]ROMRAM Gary Thomas
  2004-07-22 17:01   ` [ECOS]ROMRAM jasmine kohli
@ 2004-07-22 19:55   ` jasmine kohli
  1 sibling, 0 replies; 9+ messages in thread
From: jasmine kohli @ 2004-07-22 19:55 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Gary Thomas

hi gary,

u said that
"
On this hardware, it really doesn't matter.  When you
reset the 
processor, BR0/OR0 (chip select 0) is reset to map all
memory
onto the FLASH, thus 0x3400 is the same as 0xFA003400.
 If you
patterned your startup code after what I've done for
the Adder
(I'm sure you did), then this is taken care of right
away.
"
so should i assume that when my Program counter(PC)
shows a jump from 0xfa000100 to 0x00003400 ... it is
actually a jump from 0xfa000100 to 0xfa003400.

becauz when i debug , my PC at 0x00003400 in place of
0xfa003400 but when i use a ROM based image the PC
moves to 0xfa00XXXX locations.

regards,
jasmine


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* RE: [ECOS]ROMRAM
  2004-07-22 16:18 [ECOS]ROMRAM jasmine kohli
  2004-07-22 16:52 ` [ECOS]ROMRAM Gary Thomas
@ 2004-07-23  3:08 ` Tony Butt
  2004-07-23  6:51   ` [ECOS]ROMRAM Gary Thomas
  1 sibling, 1 reply; 9+ messages in thread
From: Tony Butt @ 2004-07-23  3:08 UTC (permalink / raw)
  To: 'jasmine kohli'; +Cc: ecos-discuss

I think that the firest thing which happens is the chip select setup.
There may well be a problem with how your chip selects are being configured.

Why is your flash mapped up to FA000000 ?

That is probably around the place the MPC852 wants to put it's internal
memory map -
Perhaps you could locate your flash elsewhere.

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of jasmine kohli
Sent: Friday, 23 July 2004 2:04 AM
To: ecos-discuss@sources.redhat.com
Subject: [ECOS]ROMRAM


hi all,
i am trying to bring redboot to my board which has
MPC852T as the processor.
 
i have 32 MB Flash with 64 MB SDRAM.
i have Flash mapped 0xFA000000 and SDRAM mapped at
0x00000000
 
i have the following content in my
mlt_powerpc_myboard_romram.h
#ifndef __ASSEMBLER__
#include <cyg/infra/cyg_type.h>
#include <stddef.h>
#endif
#define CYGMEM_REGION_ram (0)
#define CYGMEM_REGION_ram_SIZE (0x4000000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R |
CYGMEM_REGION_ATTR_W)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME
(__heap1))
CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x4000000 -
(size_t) CYG_LABEL_NAME (__heap1))
 
 
and i have the following in
mlt_powerpc_myboard_romram.ldi file
#include <cyg/infra/cyg_type.inc>
MEMORY
{
    ram : ORIGIN = 0, LENGTH = 0x4000000
}
SECTIONS
{
    SECTIONS_BEGIN
    SECTION_vectors (ram, 0, LMA_EQ_VMA)
    SECTION_text (ram, 0x3400, LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (ram, ALIGN (0x1),
LMA_EQ_VMA)
    SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}

 
and the following in mlt_powerpc_myboard_romram.mlt
file
version 0
region ram 0 4000000 0 !
section vectors 0 1 0 1 1 0 1 0 0 0 !
section text 0 1 0 1 1 1 1 1 3400 3400 fini fini !
section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
section rodata 0 8 0 1 0 1 0 1 fixup fixup !
section fixup 0 4 0 1 0 1 0 1 gcc_except_table
gcc_except_table !
section gcc_except_table 0 1 0 1 0 1 0 1 data data !
section data 0 8 0 1 0 1 0 1 sbss sbss !
section sbss 0 4 0 1 0 1 0 1 bss bss !
section bss 0 10 0 1 0 1 0 1 heap1 heap1 !
section heap1 0 8 0 0 0 0 0 0 !

now to the problem--- :( when i start redboot and step
trace through the code, it starts at
0xfa000100 and then straight jumps to 0x00003400 and
hangs.
does anyone have a clue on why this happens.
 
another question that i wanted to ask was do we have
to edit only the mlt_.h and mlt_.ldi file or do we
need to edit the .mlt file as well ,because its
difficult to editr the .mlt file on a linux system.
 
and what are the major differences between all types
of startup -ROM,RAM,ROMRAM

a thank u to all ....
regards,
jasmine

 


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* RE: [ECOS]ROMRAM
  2004-07-23  3:08 ` [ECOS]ROMRAM Tony Butt
@ 2004-07-23  6:51   ` Gary Thomas
  0 siblings, 0 replies; 9+ messages in thread
From: Gary Thomas @ 2004-07-23  6:51 UTC (permalink / raw)
  To: Tony Butt; +Cc: 'jasmine kohli', ecos-discuss

On Thu, 2004-07-22 at 18:48, Tony Butt wrote:
> I think that the firest thing which happens is the chip select setup.
> There may well be a problem with how your chip selects are being configured.
> 
> Why is your flash mapped up to FA000000 ?
> 
> That is probably around the place the MPC852 wants to put it's internal
> memory map -

Not necessarily - there are a myriad of choices, determined at power on
time.

> Perhaps you could locate your flash elsewhere.
> 
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of jasmine kohli
> Sent: Friday, 23 July 2004 2:04 AM
> To: ecos-discuss@sources.redhat.com
> Subject: [ECOS]ROMRAM
> 
> 
> hi all,
> i am trying to bring redboot to my board which has
> MPC852T as the processor.
>  
> i have 32 MB Flash with 64 MB SDRAM.
> i have Flash mapped 0xFA000000 and SDRAM mapped at
> 0x00000000
>  
> i have the following content in my
> mlt_powerpc_myboard_romram.h
> #ifndef __ASSEMBLER__
> #include <cyg/infra/cyg_type.h>
> #include <stddef.h>
> #endif
> #define CYGMEM_REGION_ram (0)
> #define CYGMEM_REGION_ram_SIZE (0x4000000)
> #define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R |
> CYGMEM_REGION_ATTR_W)
> #ifndef __ASSEMBLER__
> extern char CYG_LABEL_NAME (__heap1) [];
> #endif
> #define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME
> (__heap1))
> CYG_LABEL_NAME (__heap1))
> #define CYGMEM_SECTION_heap1_SIZE (0x4000000 -
> (size_t) CYG_LABEL_NAME (__heap1))
>  
> 
> and i have the following in
> mlt_powerpc_myboard_romram.ldi file
> #include <cyg/infra/cyg_type.inc>
> MEMORY
> {
>     ram : ORIGIN = 0, LENGTH = 0x4000000
> }
> SECTIONS
> {
>     SECTIONS_BEGIN
>     SECTION_vectors (ram, 0, LMA_EQ_VMA)
>     SECTION_text (ram, 0x3400, LMA_EQ_VMA)
>     SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
>     SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
>     SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_gcc_except_table (ram, ALIGN (0x1),
> LMA_EQ_VMA)
>     SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
>     SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
>     CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
>     SECTIONS_END
> }
> 
>  
> and the following in mlt_powerpc_myboard_romram.mlt
> file
> version 0
> region ram 0 4000000 0 !
> section vectors 0 1 0 1 1 0 1 0 0 0 !
> section text 0 1 0 1 1 1 1 1 3400 3400 fini fini !
> section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
> section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
> section rodata 0 8 0 1 0 1 0 1 fixup fixup !
> section fixup 0 4 0 1 0 1 0 1 gcc_except_table
> gcc_except_table !
> section gcc_except_table 0 1 0 1 0 1 0 1 data data !
> section data 0 8 0 1 0 1 0 1 sbss sbss !
> section sbss 0 4 0 1 0 1 0 1 bss bss !
> section bss 0 10 0 1 0 1 0 1 heap1 heap1 !
> section heap1 0 8 0 0 0 0 0 0 !
> 
> now to the problem--- :( when i start redboot and step
> trace through the code, it starts at
> 0xfa000100 and then straight jumps to 0x00003400 and
> hangs.
> does anyone have a clue on why this happens.
>  
> another question that i wanted to ask was do we have
> to edit only the mlt_.h and mlt_.ldi file or do we
> need to edit the .mlt file as well ,because its
> difficult to editr the .mlt file on a linux system.
>  
> and what are the major differences between all types
> of startup -ROM,RAM,ROMRAM
> 
> a thank u to all ....
> regards,
> jasmine
> 
>  
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
-- 
Gary Thomas <gary@chez-thomas.org>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS]ROMRAM
@ 2004-07-23  9:30 jasmine kohli
  0 siblings, 0 replies; 9+ messages in thread
From: jasmine kohli @ 2004-07-23  9:30 UTC (permalink / raw)
  To: ecos-discuss

hi all ,
this is exactly what happens in my ROMRAM problem.
i thought it will give all a better idea abt the
problem

when i load the image at 0xfa000000 and do the below
it hangs at 0x00003400
BDI>go 0xfa000100
- TARGET: target has entered debug mode
BDI>i
    Target state      : debug mode
    Debug entry cause : machine check interrupt
    Current PC        : 0x00003400
    Data  address     : 0x00000000
    DSISR value       : 0x00000000
BDI>ti
    Target state      : debug mode
    Debug entry cause : machine check interrupt
    Current PC        : 0x00003400
    Data  address     : 0x00000000
    DSISR value       : 0x00000000
BDI>go 
- TARGET: target has entered debug mode
BDI>i
    Target state      : debug mode
    Debug entry cause : machine check interrupt
    Current PC        : 0x00003400
    Data  address     : 0x00000000
    DSISR value       : 0x00000000

in the redboot.list file 0x00003400 is mapped to the
following

00000100 <__exception_reset>:
     100:       3c 60 00 00     lis     r3,0
     104:       60 63 34 00     ori     r3,r3,13312
     108:       7c 68 03 a6     mtlr    r3
     10c:       4e 80 00 20     blr

00003400 <_start>:
    3400:       3c 60 00 00     lis     r3,0
    3404:       60 63 00 07     ori     r3,r3,7
    3408:       7c 7e 23 a6     mtictrl r3


i then followed Gary's hint and set the following
option
CYGSEM_HAL_POWERPC_RESET_USES_JUMP in
arch/v2_0/cdl/hal_powerpc.cdl
 cdl_option CYGSEM_HAL_POWERPC_RESET_USES_JUMP
 {
	 display "RESET vector jumps to startup"
	 default_value 1 // it was previously 0

now i compile and run my image the following happens ,
it hangs at 0x00006930

BDI>prog 0xfa000000 redboot.bin
Programming redboot.bin , please wait ....
Programming flash passed
BDI>go 0xfa000100
- TARGET: target has entered debug mode
BDI>i
    Target state      : debug mode
    Debug entry cause : machine check interrupt
    Current PC        : 0xfa006930
    Data  address     : 0x00006b40
    DSISR value       : 0x00000065

0x00006930 actually represents """" lwz    
r3,0(r5)""" in the code 
below in myboard.S file

#ifdef CYGPRI_DO_PROGRAM_UPMS
        /*
         * Perform UPM programming by writing to its
64 RAM locations.
         * Note that UPM initialization must be done
before the Bank
Register
         * initialization. Otherwise, system may hang
when writing to 
Bank
         * Registers in certain cases.
         */
        lis     r5,__upmtbl_start@h
        ori     r5,r5,__upmtbl_start@l
        lis     r6,__upmtbl_end@h
        ori     r6,r6,__upmtbl_end@l
        sub     r7,r6,r5      /* size of table */
        srawi   r7,r7,2       /* in words */

        
        /*lwi   r6,0x00000000       Command -
OP=Write, UPMA, MAD=0 */
        lwi     r6,0x00808000    /* Command -
OP(b0-b1=Write,b-8=UPMB,b16-to-b18=CS4,b20-b23=16loops,b26-b31=
M
AD=0 */
    1:
        lwz     r3,0(r5)      /* get data from table
*/ ---------------"***THIS IS THE LINE***"
        stw     r3,MDR(r4)

do mail in ur suggestions
regards,
jasmine


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] ROMRAM
@ 2004-07-22 16:14 jasmine kohli
  0 siblings, 0 replies; 9+ messages in thread
From: jasmine kohli @ 2004-07-22 16:14 UTC (permalink / raw)
  To: ecos-discuss

hi all,
i am trying to bring redboot to my board which has
MPC852T as the processor.
 
i have 32 MB Flash with 64 MB SDRAM.
i have Flash mapped 0xFA000000 and SDRAM mapped at
0x00000000
 
i have the following content in my
mlt_powerpc_myboard_romram.h
#ifndef __ASSEMBLER__
#include <cyg/infra/cyg_type.h>
#include <stddef.h>
#endif
#define CYGMEM_REGION_ram (0)
#define CYGMEM_REGION_ram_SIZE (0x4000000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R |
CYGMEM_REGION_ATTR_W)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME
(__heap1))
CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x4000000 -
(size_t) CYG_LABEL_NAME (__heap1))
 
 
and i have the following in
mlt_powerpc_myboard_romram.ldi file
#include <cyg/infra/cyg_type.inc>
MEMORY
{
    ram : ORIGIN = 0, LENGTH = 0x4000000
}
SECTIONS
{
    SECTIONS_BEGIN
    SECTION_vectors (ram, 0, LMA_EQ_VMA)
    SECTION_text (ram, 0x3400, LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (ram, ALIGN (0x1),
LMA_EQ_VMA)
    SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}

 
and the following in mlt_powerpc_myboard_romram.mlt
file
version 0
region ram 0 4000000 0 !
section vectors 0 1 0 1 1 0 1 0 0 0 !
section text 0 1 0 1 1 1 1 1 3400 3400 fini fini !
section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
section rodata 0 8 0 1 0 1 0 1 fixup fixup !
section fixup 0 4 0 1 0 1 0 1 gcc_except_table
gcc_except_table !
section gcc_except_table 0 1 0 1 0 1 0 1 data data !
section data 0 8 0 1 0 1 0 1 sbss sbss !
section sbss 0 4 0 1 0 1 0 1 bss bss !
section bss 0 10 0 1 0 1 0 1 heap1 heap1 !
section heap1 0 8 0 0 0 0 0 0 !

now to the problem--- :( when i start redboot and step
trace through the code, it starts at
0xfa000100 and then straight jumps to 0x00003400 and
hangs.
does anyone have a clue on why this happens.
 
another question that i wanted to ask was do we have
to edit only the mlt_.h and mlt_.ldi file or do we
need to edit the .mlt file as well ,because its
difficult to editr the .mlt file on a linux system.
 
and what are the major differences between all types
of startup -ROM,RAM,ROMRAM

a thank u to all ....
regards,
jasmine

 


	
		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2004-07-23  8:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-22 16:18 [ECOS]ROMRAM jasmine kohli
2004-07-22 16:52 ` [ECOS]ROMRAM Gary Thomas
2004-07-22 17:01   ` [ECOS]ROMRAM jasmine kohli
2004-07-22 17:11     ` [ECOS]ROMRAM Gary Thomas
2004-07-22 19:55   ` [ECOS]ROMRAM jasmine kohli
2004-07-23  3:08 ` [ECOS]ROMRAM Tony Butt
2004-07-23  6:51   ` [ECOS]ROMRAM Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2004-07-23  9:30 [ECOS]ROMRAM jasmine kohli
2004-07-22 16:14 [ECOS] ROMRAM jasmine kohli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).