Sumedh,<br><br>I've just noticed you are using the "bla" instruction, which use absolute target address: are you sure the C code gets even be executed ?<br>I don't know how the compiler successfully assemble your code because the binary is supposed to be position independant code (PIC): you should rather use "bl" instruction (relative branch).<br>
<br>--<br>sj<br><br><div class="gmail_quote">2009/2/23 sumedh tirodkar <span dir="ltr"><<a href="mailto:sumedhtirodkar@gmail.com">sumedhtirodkar@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I have initialised to stack pointer(r1) properly...actually...i went<br>
thru the object dump...bt when i juz use<br>
<br>
bla <function_name_handler><br>
<br>
the link register is not getting pushed on to the stack in the prolog<br>
of that function...so the stack is basically not coming into the<br>
picture...<br>
@IRQ originator, that doesn't seem to be a problem...<br>
<br>
The only thing that i am able to think of is that when i do a "bla",<br>
the return address is not getting stored in link register...and i m<br>
not able to figure out why...<br>
<br>
Regards,<br>
<font color="#888888">Sumedh<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Mon, Feb 23, 2009 at 11:03 PM, <a href="mailto:sjoyeau@wanadoo.fr">sjoyeau@wanadoo.fr</a> <<a href="mailto:sjoyeau@wanadoo.fr">sjoyeau@wanadoo.fr</a>> wrote:<br>
> Hi Sumedh,<br>
><br>
> You may check the context in which your CPU in running the C code from<br>
> interrupt context (ie stack pointer (r1), kernel locks disabling<br>
> rescheduling etc..) and double check the IRQ originator (the decrementer) is<br>
> acknowlegded somewhere your handler before enabling back interrupts, else<br>
> your handler gets fired.<br>
><br>
> --<br>
> sj<br>
><br>
> 2009/2/23 sumedh tirodkar <<a href="mailto:sumedhtirodkar@gmail.com">sumedhtirodkar@gmail.com</a>><br>
>><br>
>> Alright...I am trying to develop a system of my own..<br>
>> Consider that i am not using any linux kernel...I m writing some<br>
>> program right from scratch.........<br>
>> The major steps that i have taken are...<br>
>><br>
>> 1. Started with a assembly file...<br>
>> 2. Have relocated the interrupt handlers to there respective<br>
>> positions...The interrupt handlers are written in assembly language...<br>
>> 3. Initialised Decrementer register to get an interrupt after some<br>
>> interval...<br>
>> 4. Jump to some function using<br>
>><br>
>> bl <function_name_main><br>
>><br>
>> function_name_main which will have a infinite while loop..<br>
>> This works fine i.e. the interrupts(decrementer interrupt to be more<br>
>> specific) work fine...I have initialised serial port to get the<br>
>> output...<br>
>><br>
>> Now, the problem that i am facing....<br>
>><br>
>> If in interrupt handler of the decrementer, i make a call to some C<br>
>> function in some other C file...using the follwing statement...<br>
>><br>
>> Dec_handler: /* I have relocated this to interrupt vector address of<br>
>> decrementer interrupt*/<br>
>> /*code to print using serial port*/<br>
>> bla <function_name_handler> /*code to call some function in C file*/<br>
>> /*code to print using serial port---but i m never able to see this<br>
>> output*/<br>
>> RFI<br>
>><br>
>> This starts creating a problem...somehow we dont return to this code<br>
>> after the end of the function_name_handler...<br>
>> Consider the following code for the function_name_handler:<br>
>> void function_name_handler(void)<br>
>> {<br>
>> /*Some action*/<br>
>> }<br>
>><br>
>> So, if its possible for anyone to help me with this...please reply...<br>
>><br>
>> Regards,<br>
>> Sumedh<br>
>><br>
>><br>
>> On Mon, Feb 23, 2009 at 8:18 PM, Matt Gessner <<a href="mailto:mgessner@gmail.com">mgessner@gmail.com</a>> wrote:<br>
>> ><br>
>> ><br>
>> > On Mon, Feb 23, 2009 at 8:03 AM, sumedh tirodkar<br>
>> > <<a href="mailto:sumedhtirodkar@gmail.com">sumedhtirodkar@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> I am using PowerPC 7447A...I am trying to port SA-RTL on PowerPC...<br>
>> ><br>
>> > What I said earlier was: You need to tell people what cpu you're using,<br>
>> > what<br>
>> > linux kernel, etc etc etc.<br>
>> ><br>
>> > Fine, we know the CPU. What kernel are you using? Is it ancient?<br>
>> ><br>
>> > I doubt the information below is going to be useful...<br>
>> ><br>
>> >><br>
>> >> I am using<br>
>> >><br>
>> >> bla <function_name><br>
>> >><br>
>> >> from the assembly code to call the function in C file...This i am<br>
>> >> doing from interrupt handler of the decrementer...<br>
>> >> If any more details are required, please let me know...<br>
>> ><br>
>> ><br>
>> _______________________________________________<br>
>> Linuxppc-dev mailing list<br>
>> <a href="mailto:Linuxppc-dev@ozlabs.org">Linuxppc-dev@ozlabs.org</a><br>
>> <a href="https://ozlabs.org/mailman/listinfo/linuxppc-dev" target="_blank">https://ozlabs.org/mailman/listinfo/linuxppc-dev</a><br>
><br>
><br>
><br>
> --<br>
> ------------------<br>
> Sylvain JOYEAU<br>
> Freelance Engineer<br>
> Software RT-OS R&D<br>
> <a href="mailto:sylvain.joyeau@gmail.com">sylvain.joyeau@gmail.com</a><br>
> Tél: +33-(0)667 477 052<br>
> "A good idea is one side of the coin. The other side is the practical<br>
> usefulness". J. Liedke.<br>
><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>------------------<br>Sylvain JOYEAU<br>Freelance Engineer<br>Software RT-OS R&D<br><a href="mailto:sylvain.joyeau@gmail.com">sylvain.joyeau@gmail.com</a><br>
Tél: +33-(0)667 477 052<br>"A good idea is one side of the coin. The other side is the practical usefulness". J. Liedke.<br>