This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
memory map--or--serial initialization problem in ROM-STARTUP
- From: jasmine kohli <jasubang at yahoo dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Fri, 23 Jul 2004 01:51:02 -0700 (PDT)
- Subject: [ECOS]memory map--or--serial initialization problem in ROM-STARTUP
hi all,
i was trying to make a ROM startup image and it hang
in set_debug_comm
function when it is called by hal_if_init.
if i comment it out it hangs in the function
cyg_hal_plf_comms_init.
the interesting thing that i that i am trying to move
over from u-boot to redboot.
when i program u-boot and erase and then program
redboot , redboot comes to prompt.
but when i poweroff and start redboot , i hangs in the
function set_debug_comm
what is even more interesting is that now if i program
images that i had built earlier and they used to hang
somewhere else now all images hang in set_debug_comm.
i am attaching the list file wher it hangs at the
location 0xfa0059bc
while debugging
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 : 0xfa0059cc
Data address : 0x000048b0
DSISR value : 0x00000001
i wanted to ask one important question.....
i have changes the in hal_aux.c
since i used the adder port as my base port,it was the
following in adder/v2_0/src/hal_aux.c
CYGARC_MEMDESC_TABLE CYGBLD_ATTRIB_WEAK = {
// Mapping for the Adder 85x development boards
CYGARC_MEMDESC_CACHE( 0xfe000000, 0x00800000 ),
// ROM region
CYGARC_MEMDESC_NOCACHE( 0xff000000, 0x00100000 ),
// MCP registers
CYGARC_MEMDESC_NOCACHE( 0xfa000000, 0x00400000 ),
//
Control/Status+LEDs
CYGARC_MEMDESC_CACHE( CYGMEM_REGION_ram,
CYGMEM_REGION_ram_SIZE
), //
Main memory
CYGARC_MEMDESC_TABLE_END
};
but i changed it to the following as my ROM(FLASH) is
mapped to
0xfa000000
and is 32MB
and commented out //CYGARC_MEMDESC_NOCACHE(
0xfa000000, 0x00400000 ),
//
Control/Status+LEDs
as it was overlapping my flash region.
// The memory map is weakly defined, allowing the
application to
redefine
// it if necessary. The regions defined below are the
minimum
requirements.
CYGARC_MEMDESC_TABLE CYGBLD_ATTRIB_WEAK = {
// Mapping for the Adder 85x development boards
CYGARC_MEMDESC_CACHE( 0xfa000000, 0x02000000 ),
// ROM region
CYGARC_MEMDESC_NOCACHE( 0xff000000, 0x00100000 ),
// MCP registers
//CYGARC_MEMDESC_NOCACHE( 0xfa000000, 0x00400000
), //
Control/Status+LEDs
CYGARC_MEMDESC_CACHE( CYGMEM_REGION_ram,
CYGMEM_REGION_ram_SIZE
), //
Main memory
CYGARC_MEMDESC_TABLE_END
};
is my code correct.
the redboot.list file patch is given below
fa00591c <set_debug_comm>:
fa00591c: 2c 03 ff fe cmpwi r3,-2
fa005920: 94 21 ff e8 stwu r1,-24(r1)
fa005924: 7c 08 02 a6 mflr r0
fa005928: 93 a1 00 0c stw r29,12(r1)
fa00592c: 93 e1 00 14 stw r31,20(r1)
fa005930: 90 01 00 1c stw r0,28(r1)
fa005934: 7c 7f 1b 78 mr r31,r3
fa005938: 93 c1 00 10 stw r30,16(r1)
fa00593c: 38 60 00 00 li r3,0
fa005940: 3b a0 00 01 li r29,1
fa005944: 38 00 00 00 li r0,0
fa005948: 41 82 00 f0 beq- fa005a38
<set_debug_comm+0x11c>
fa00594c: 41 81 00 bc bgt- fa005a08
<set_debug_comm+0xec>
fa005950: 2c 1f ff fd cmpwi r31,-3
fa005954: 41 82 00 ac beq- fa005a00
<set_debug_comm+0xe4>
fa005958: 3b ff 00 01 addi r31,r31,1
fa00595c: 38 00 00 01 li r0,1
fa005960: 2c 00 00 00 cmpwi r0,0
fa005964: 41 82 00 68 beq- fa0059cc
<set_debug_comm+0xb0>
fa005968: 3d 20 00 00 lis r9,0
fa00596c: 3b c9 32 00 addi r30,r9,12800
fa005970: 81 3e 00 18 lwz r9,24(r30)
fa005974: 2c 09 00 00 cmpwi r9,0
fa005978: 41 82 00 18 beq- fa005990
<set_debug_comm+0x74>
fa00597c: 80 69 00 00 lwz r3,0(r9)
fa005980: 81 29 00 14 lwz r9,20(r9)
fa005984: 38 80 00 04 li r4,4
fa005988: 7d 29 03 a6 mtctr r9
fa00598c: 4e 80 04 21 bctrl
fa005990: 3d 20 00 00 lis r9,0
fa005994: 39 29 4d 64 addi r9,r9,19812
fa005998: 57 e0 28 34 rlwinm r0,r31,5,0,26
fa00599c: 2c 03 00 00 cmpwi r3,0
fa0059a0: 7c 00 4a 14 add r0,r0,r9
fa0059a4: 90 1e 00 18 stw r0,24(r30)
fa0059a8: 3d 20 00 00 lis r9,0
fa0059ac: 93 e9 36 ec stw r31,14060(r9)
fa0059b0: 81 3e 00 18 lwz r9,24(r30)
fa0059b4: 41 82 00 38 beq- fa0059ec
<set_debug_comm+0xd0>
fa0059b8: 80 69 00 00 lwz r3,0(r9)
fa0059bc: 81 29 00 14 lwz r9,20(r9)
fa0059c0: 38 80 00 05 li r4,5
fa0059c4: 7d 29 03 a6 mtctr r9
fa0059c8: 4e 80 04 21 bctrl
fa0059cc: 80 01 00 1c lwz r0,28(r1)
fa0059d0: 7f a3 eb 78 mr r3,r29
it hangs at 0xfa0059cc
do mail in ur suggestions,
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