All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] m68k _int_handler help
@ 2011-05-24 11:31 angelo
  2011-05-25  3:46 ` Jin Zhengxiong-R64188
  0 siblings, 1 reply; 2+ messages in thread
From: angelo @ 2011-05-24 11:31 UTC (permalink / raw)
  To: u-boot

Hi all,

i successfully ported u-boot on a custom board, that use mcf5307, and i 
would like to share my job in the next days.

I still have a strange issue anyway, maybe some u-boot / m68k expert can 
help me:
After relocation into SDRAM, timer_init (from board.c) is called, timer 
2 is initialized, and just after the first interrupt (31) is triggered. 
Once the handler terminate, the assembly "rte" make the u-boot to crash,
with exception (VEC 3, FMT 4, FAULT 4).


I verified the following:
1) after relocation in SDRAM the stack is set up properly, in the area 
just below the monitor code.
2) after relocation, the stack seems to be working properly, since many 
functions are called from ram before the timer_init().
3) i disabled all inside _int_handler, leaving it as (start.S)

_int_handler:
         rte

I can stop the program here before rte with a loop, so program until 
here works. But just after, rte generate the exception 3.

This is really a misterious issue. I don't see any reason why the stack 
frame should be wrong. Could it be compiler-related ?

Reagrds,
angelo

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

* [U-Boot] m68k _int_handler help
  2011-05-24 11:31 [U-Boot] m68k _int_handler help angelo
@ 2011-05-25  3:46 ` Jin Zhengxiong-R64188
  0 siblings, 0 replies; 2+ messages in thread
From: Jin Zhengxiong-R64188 @ 2011-05-25  3:46 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On
> Behalf Of angelo
> Sent: Tuesday, May 24, 2011 7:31 PM
> To: U-Boot at lists.denx.de
> Subject: [U-Boot] m68k _int_handler help
> 
> Hi all,
> 
> i successfully ported u-boot on a custom board, that use mcf5307, and i would
> like to share my job in the next days.
> 
> I still have a strange issue anyway, maybe some u-boot / m68k expert can help
> me:
> After relocation into SDRAM, timer_init (from board.c) is called, timer
> 2 is initialized, and just after the first interrupt (31) is triggered.
> Once the handler terminate, the assembly "rte" make the u-boot to crash, with
> exception (VEC 3, FMT 4, FAULT 4).

There should not have the address error if the exception frame on the system
stack Was not destroyed. As it's not format error, at least the format field
 of the exception frame was not destroyed.

> 
> I verified the following:
> 1) after relocation in SDRAM the stack is set up properly, in the area just
> below the monitor code.
> 2) after relocation, the stack seems to be working properly, since many
> functions are called from ram before the timer_init().
> 3) i disabled all inside _int_handler, leaving it as (start.S)
> 
> _int_handler:
>          rte
> 
> I can stop the program here before rte with a loop, so program until here works.
> But just after, rte generate the exception 3.
> 
> This is really a misterious issue. I don't see any reason why the stack frame
> should be wrong. Could it be compiler-related ?

What's the version of your compiler?
Could you try to check if all the exception frame fields were not changed before and
after the interrupt?   

Best Regards,
Jason Jin

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

end of thread, other threads:[~2011-05-25  3:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 11:31 [U-Boot] m68k _int_handler help angelo
2011-05-25  3:46 ` Jin Zhengxiong-R64188

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.