All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Help from Kernel Gurus needed!!!
@ 1999-01-25 15:32 Kevin B. Hendricks
  1999-01-25 17:46 ` David Edelsohn
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin B. Hendricks @ 1999-01-25 15:32 UTC (permalink / raw)
  To: linuxppc-dev


Hi,

Nothing like answering your own question.  I never saw my post make it back
to me, but if anyone runs into the same problem here is my solution.  I
figured this out from looking at the stack inside a signal handler with gdb
so I may be wrong but this seems to work:

>From inside a signal handler, to check on old signal masks or register
contents right before the signal was delivered:


#include <asm/sigcontext.h>

    /* get the value of r1 (the stack pointer) */
    long * p;
    struct sigcontext_struct * scp;
    __asm__ ( "addi %0,1,0" : "=r" (p) : /* no inputs */ );
    /* follow it back up the chain */
    p = *p;
    /* from here the sigcontext struct is 64 bytes away */
    p = p + 16;
    scp = (struct sigcontext_struct *)p;

I hope this helps.  If it looks wrong to anyone out there please let me
know ASAP.

Thanks,

Kevin


----------------------------------------------------------
Kevin B. Hendricks
Associate Professor, Operations & Information Technology
School of Business, College of William & Mary
Williamsburg, VA 23187, kbhend@dogwood.tyler.wm.edu
http://business.tyler.wm.edu



[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Help - Kernel Panic - 2.2.0-final
@ 1999-01-24 10:15 Bryan Christianson
  1999-01-25  3:31 ` Help from Kernel Gurus needed!!! Kevin B. Hendricks
  0 siblings, 1 reply; 6+ messages in thread
From: Bryan Christianson @ 1999-01-24 10:15 UTC (permalink / raw)
  To: linuxppc-dev


I am getting the the following panic in linuxppc-R4, with kernel 2.2.0-final.

The panic occurs when I use insmod (version 2.1.121) to load a driver that
I am working on. The statement in the module where it faults is

result = inl(base + offset)

where result is a u32 and base and offset have the values shown in the
following trace.

If there is someone that can shed any light on whats going on here I would
be really grateful. The installation is generic R4 apart from the upgrade
to the kernel and a more recent version modutils. The distributed modutils
was unable to resolve symbols and didn't even begin to load the driver.

Jan 24 20:04:57 linuxppc kernel: telsat: read_port: base = 0x00000400,
offset = 60
Jan 24 20:04:57 linuxppc kernel: Machine check in kernel mode.
Jan 24 20:04:57 linuxppc kernel: Caused by (from msr): regs c2a25ae0
Unknown values in msr
Jan 24 20:04:57 linuxppc kernel: NIP: C886117C XER: 00000000 LR: C8861168
REGS: c2a25ae0 TRAP: 0200
Jan 24 20:04:57 linuxppc kernel: MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1
IR/DR: 11
Jan 24 20:04:57 linuxppc kernel: TASK = c2a24000[991] 'insmod' mm->pgd
c2ae3000 Last syscall: 128
Jan 24 20:04:57 linuxppc kernel: last math 00000000
Jan 24 20:04:57 linuxppc kernel: GPR00: FE00043C C2A25BD0 C2A24000 00000035
00000001 C01990E8 C01A0000 C00D109C
Jan 24 20:04:57 linuxppc kernel: GPR08: 00000000 FE000000 00000000 C2A25B00
C2A25B00 01851C0C 01850000 01850000
Jan 24 20:04:57 linuxppc kernel: GPR16: 01850000 01850000 00000001 01850000
00009032 02A25E80 00000000 C0003A8C
Jan 24 20:04:57 linuxppc kernel: GPR24: C0003844 00000000 00000070 00000000
0000003C FFFFFFFF C88758F8 00000040
Jan 24 20:04:57 linuxppc kernel: Call backtrace:
Jan 24 20:04:57 linuxppc kernel: C8861168 C8863404 C8863518 C88637B4
C886384C C00815B8 C00E3720
Jan 24 20:04:57 linuxppc kernel: C8863964 C0016920 C0003898 01850000
01803AA0 01804208 01800F9C
Jan 24 20:04:57 linuxppc kernel: 01800E78
Jan 24 20:04:57 linuxppc kernel: Instruction DUMP: 8129e054  7c1d4a14
7fa0042c <7c0006ac> 3c60c886  38633b78  7fa4eb78  4cc63182  480148a1
Jan 24 20:04:57 linuxppc kernel: Kernel panic: machine check

--
Bryan Christianson
email:		<mailto:bryanc@ihug.co.nz>
Home Page:	<http://crash.ihug.co.nz/~bryanc>


[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

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

end of thread, other threads:[~1999-01-26 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-25 15:32 Help from Kernel Gurus needed!!! Kevin B. Hendricks
1999-01-25 17:46 ` David Edelsohn
1999-01-25 21:27   ` Geert Uytterhoeven
1999-01-25 23:33     ` David Edelsohn
1999-01-26 15:35     ` Gabriel Paubert
  -- strict thread matches above, loose matches on Subject: below --
1999-01-24 10:15 Help - Kernel Panic - 2.2.0-final Bryan Christianson
1999-01-25  3:31 ` Help from Kernel Gurus needed!!! Kevin B. Hendricks

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.