lkml.org 
[lkml]   [1999]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: accessing Alpha CPU registers from panic()
Unfortunately, all the code in the dik_* functions depends on the registers
being passed in, as far as I can tell. When panic() is called, the registers are
not included in the arguments. I think somehow I need to get the PC and RA (r26)
from the previous stack frame or something.

I was hoping to get the registers from PALcode, but I don't see any way of doing
that, other than halting the processor, which would give me the info I need in
the HWRPB. The last thing done in panic() is a halt, is there a way to do that
and then have the PALcode jump to my routine? Of course, even if this worked,
the PC and RA in the HWRPB would just be from the panic() routine; I need those
addresses from the function that *called* panic() !

On 15-Dec-1999 Jakma, Paul wrote:
> hi brian,
>
> Richard Henderson has already written some stuff to do this. Do a grep for
> dik_* functions in arch/alpha.
>

>>
>> I am working on porting the SGI crash tools to Alpha. Since
>> the CPU registers
>> aren't available from within the panic() call, I need to grab
>> them directly.
>> How do I do this? The equivalent i386 code is:
>>
>> /* save the dump specific esp/eip */
>> /* For Alpha, save PC (Program Counter) and RA */
>> __asm__ __volatile__("
>> pushl %%eax\n
>> movl %%esp, %%eax\n
>> movl %%eax, %0\n
>> popl %%eax\n"
>> : "=g" (dump_header.dh_esp)
>> );
>> __asm__ __volatile__("pushl %eax\n");
>> __dump_save_panic_regs();
>> __asm__ __volatile__("popl %eax\n");
>>
>> Pointers to online resources are greatly welcomed also.

--
Brian Hall <brianw.hall@compaq.com>
Linux Consultant

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.064 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site