From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,89a0d2ba77ca2cba,start X-Google-Attributes: gid111c93,public X-Google-Thread: 13bc9c,89a0d2ba77ca2cba,start X-Google-Attributes: gid13bc9c,public From: Brian Hall Subject: accessing Alpha CPU registers from panic() Date: 1999/12/13 Message-ID: #1/1 X-Deja-AN: 560276912 Content-Transfer-Encoding: 8bit Sender: root@news.uni-erlangen.de X-Priority: 3 (Normal) X-To: comp.os.linux.alpha@list.deja.com, x-linux-kernel@vger.rutgers.edu Content-Type: text/plain; charset=us-ascii X-Orcpt: rfc822;linux-kernel-outgoing-dig X-Addition: NG Organization: Mail to Usenet Gateway Mime-Version: 1.0 Reply-To: Brian Hall Newsgroups: comp.os.linux.alpha,revue.linux-kernel X-Loop: majordomo@vger.rutgers.edu 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 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/