linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PCMCIA ATA flash support?
@ 2000-06-20 13:29 Michael Coy
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Coy @ 2000-06-20 13:29 UTC (permalink / raw)
  To: linuxppc-embedded


I'm trying to get PCMCIA support working on Montavista's Hardhat linux and
an RPX lite (MPC 823).  The PC card I'm using is a SanDisk ATA flashdisk,
if that makes a difference.

I've got the patches from absoval.com and followed all the instructions in
their doc.  I also have read the PCMCIA howto.

I can insmod the pcmcia drivers, and a cardctl ident does identify the
card to be a SunDisk fixed disk.

But as soon as I start cardmgr to attach the IDE device, I get:
kernel panic: Kernel Mode Software FPU Emulation

I've tried compiling the kernel both with and without FPU emulation, and
I've also tried changing the memory addresses, as suggested by the PCMCIA
howto.  I even tried replacing the card.  Nothing seems to make a
difference.

Any suggestions would be greatly appreciated.
Thanks,
mike


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: PCMCIA ATA flash support?
@ 2000-06-20 14:08 Lucinda Schafer
  0 siblings, 0 replies; 6+ messages in thread
From: Lucinda Schafer @ 2000-06-20 14:08 UTC (permalink / raw)
  To: Michael Coy, linuxppc-embedded


Michael,

We are not using Montavista's Hardhat Linux or a RPX lite; but we are using
the tarball version of 2.2.13 and a board with a MPC823. We also are not
using a PCMCIA card, but we are experiencing occasional, but persistent,
KERNEL Mode Software FPU Emulation Panics. This error is unrelated to the
FPU emulation. It occurs upon an illegal access to a register or an illegal
execution of a nonsupported opcode. So far, all we have determined is that
it has something to to with the memory management and page switching.

Since it is so intermittent for us and usually occurs on boot-up, we are
having trouble debugging this. Perhaps you have found a case which
consistently forces this error. Please keep us updated on your findings.

Hint: add a backtrace print out to the traps.c file in the Software
Emulation routine where the panic is called. Use your System.map file to see
if you can find the last functions called, for example:
      		show_regs(regs);
	   		print_backtrace( (unsigned long *)regs->gpr[1] );
	   		instruction_dump((unsigned long *)regs->nip);
			panic("Kernel Mode Software FPU Emulation");

Lucinda Schafer

Adaptive Micro-Ware, Inc.


-----Original Message-----
From: Michael Coy [mailto:mac12@po.cwru.edu]
Sent: Tuesday, June 20, 2000 8:29 AM
To: linuxppc-embedded@lists.linuxppc.org
Subject: PCMCIA ATA flash support?



I'm trying to get PCMCIA support working on Montavista's Hardhat linux and
an RPX lite (MPC 823).  The PC card I'm using is a SanDisk ATA flashdisk,
if that makes a difference.

I've got the patches from absoval.com and followed all the instructions in
their doc.  I also have read the PCMCIA howto.

I can insmod the pcmcia drivers, and a cardctl ident does identify the
card to be a SunDisk fixed disk.

But as soon as I start cardmgr to attach the IDE device, I get:
kernel panic: Kernel Mode Software FPU Emulation

I've tried compiling the kernel both with and without FPU emulation, and
I've also tried changing the memory addresses, as suggested by the PCMCIA
howto.  I even tried replacing the card.  Nothing seems to make a
difference.

Any suggestions would be greatly appreciated.
Thanks,
mike


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: PCMCIA ATA flash support?
@ 2000-06-20 15:44 Lucinda Schafer
  0 siblings, 0 replies; 6+ messages in thread
From: Lucinda Schafer @ 2000-06-20 15:44 UTC (permalink / raw)
  To: Michael Coy, linuxppc-embedded


I assume the patches you are using are for the problems described in

http://lists.linuxppc.org/listarcs/linuxppc-embedded/199912/msg00018.html

If not, you might read that one..

Lucinda Schafer
Staff Software Engineer
Adaptive Micro-Ware, Inc.

-----Original Message-----
From: Michael Coy [mailto:mac12@po.cwru.edu]
Sent: Tuesday, June 20, 2000 8:29 AM
To: linuxppc-embedded@lists.linuxppc.org
Subject: PCMCIA ATA flash support?



I'm trying to get PCMCIA support working on Montavista's Hardhat linux and
an RPX lite (MPC 823).  The PC card I'm using is a SanDisk ATA flashdisk,
if that makes a difference.

I've got the patches from absoval.com and followed all the instructions in
their doc.  I also have read the PCMCIA howto.

I can insmod the pcmcia drivers, and a cardctl ident does identify the
card to be a SunDisk fixed disk.

But as soon as I start cardmgr to attach the IDE device, I get:
kernel panic: Kernel Mode Software FPU Emulation

I've tried compiling the kernel both with and without FPU emulation, and
I've also tried changing the memory addresses, as suggested by the PCMCIA
howto.  I even tried replacing the card.  Nothing seems to make a
difference.

Any suggestions would be greatly appreciated.
Thanks,
mike


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: PCMCIA ATA flash support?
       [not found] <A109131318C4D1119AC20060088DECE330F446@amwmail.adaptivemic ro.com>
@ 2000-06-21  0:43 ` Mike Coy
  2000-06-21  2:09   ` Murray Jensen
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Coy @ 2000-06-21  0:43 UTC (permalink / raw)
  To: Lucinda Schafer, linuxppc-embedded


>Emulation routine where the panic is called. Use your System.map file to see
>if you can find the last functions called, for example:
>                 show_regs(regs);
>                         print_backtrace( (unsigned long *)regs->gpr[1] );
>                         instruction_dump((unsigned long *)regs->nip);
>                         panic("Kernel Mode Software FPU Emulation");

OK, i added the  backtrace, but hardly any of the calls are IN my system.map!
Odd!

And I tried looking at the SIUMCR register as suggested in the list message
you posted, and it is 0x800, which would seem to be the correct value.

thanks,
mike


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: PCMCIA ATA flash support?
  2000-06-21  0:43 ` PCMCIA ATA flash support? Mike Coy
@ 2000-06-21  2:09   ` Murray Jensen
  0 siblings, 0 replies; 6+ messages in thread
From: Murray Jensen @ 2000-06-21  2:09 UTC (permalink / raw)
  To: Mike Coy; +Cc: Lucinda Schafer, linuxppc-embedded


On Tue, 20 Jun 2000 20:43:21 -0400, Mike Coy <coym@embeddedplanet.com> writes:
>>Emulation routine where the panic is called. Use your System.map file to see
>>if you can find the last functions called, for example:
>>                 show_regs(regs);
>>                         print_backtrace( (unsigned long *)regs->gpr[1] );
>>                         instruction_dump((unsigned long *)regs->nip);
>>                         panic("Kernel Mode Software FPU Emulation");
>
>OK, i added the  backtrace, but hardly any of the calls are IN my system.map!
>Odd!

They won't be - the backtrace prints the return (or link in ppc speak)
address i.e. the next instruction to be executed after a return from the
current function (or stack frame). Just sort your System.map file on the
first column (hex address) and then look for the largest value in the
first column that is still less than the next address in the backtrace.
This gives you some idea of which function that address is within, and
how far in that function it is. A bit tedious but ok for a start.

What would be better is to get kgdb working, then gdb will work all this
out for you - and tell you a lot of other information as well. You can
compile in a breakpoint() just before the panic() and then hunt around
using gdb to try and find anything unusual e.g. you could examine the
memory at the address contained in "regs->nip", and the mmu page table
entries that map that kernel address. A "where" will give you all the
function names in the stack including the arguments they were called with.

See the other message I just sent to the list about kgdb. One thing I
forgot to say in that message was that I like to compile my kernel with
the "-g" flag and then run "gdb <ksrctopdir>/vmlinux" before doing the remote
to the target (actually you just chuck all these things into a .gdbinit
file e.g. in arch/ppc/mbxboot so it is all done automatically when gdb
is run in that directory). The "-g" shouldn't make your kernel any bigger
because only certain sections are copied when <topdir>/vmlinux is copied
into the arch/ppc/coffboot directory and compressed. Cheers!
								Murray...
--
Murray Jensen, CSIRO Manufacturing Sci & Tech,         Phone: +61 3 9662 7763
Locked Bag No. 9, Preston, Vic, 3072, Australia.         Fax: +61 3 9662 7853
Internet: Murray.Jensen@cmst.csiro.au  (old address was mjj@mlb.dmt.csiro.au)


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: PCMCIA ATA flash support?
@ 2000-06-21  7:07 Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2000-06-21  7:07 UTC (permalink / raw)
  To: Murray Jensen; +Cc: Mike Coy, Lucinda Schafer, linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]

In message <5824.961553366@msa.cmst.csiro.au> Murray Jensen wrote:
>
> They won't be - the backtrace prints the return (or link in ppc speak)
> address i.e. the next instruction to be executed after a return from the
> current function (or stack frame). Just sort your System.map file on the

The System.map file  _is_ already sorted.

> first column (hex address) and then look for the largest value in the
> first column that is still less than the next address in the backtrace.
> This gives you some idea of which function that address is within, and
> how far in that function it is. A bit tedious but ok for a start.

No need to do this by hand. See the attached script - just  give  the
path  of  the  System.map  file  to  use  as  argument,  and feed the
backtrace to stdin.

> What would be better is to get kgdb working, then gdb will work all this

I agree.

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
Knowledge, sir, should be free to all!
	-- Harry Mudd, "I, Mudd", stardate 4513.3


[-- Attachment #2: backtrace --]
[-- Type: text/plain , Size: 956 bytes --]

#!/usr/bin/perl -w

my $mapfile = shift || '/LinuxPPC/usr/src/linux/System.map';

print STDERR "Reading symbols from $mapfile\n";

#
# Read symbol table
#
open (MAP, $mapfile) or die "Can't open $mapfile: $!\n";

my $cnt = 0;

while (<MAP>) {
	chomp;
	my ($a,$t,$n) = split;
	$a = eval ('0x' . $a);
	if ($t =~ /^t$/i) {
		$addr[$cnt] = $a;
		$name[$cnt] = $n;
		++$cnt;
	}
}
close MAP;

my ($i, $n, $last);

#for ($i=0; $i<$cnt; ++$i) {
#	printf "0x%08x  %s\n", $addr[$i], $name[$i];
#}

#
# Now get backtrace info from stdin
#

while (<>) {
	chomp;
	my @a = split;
	my $aa;

	for ($i=0; $i<=$#a; ++$i) {
		$aa = eval ('0x' . $a[$i]);

		$last = -1;
		for ($n=0; $n<$cnt; ++$n) {
			if ($addr[$n] > $aa) {
				last;
			}
			$last = $n;
		}

		if ($last >= 0) {
			my $offset = $aa - $addr[$last];

			printf "0x%08x -- 0x%08x + 0x%04x   %s\n",
				$aa, $addr[$last], $offset, $name[$last];
		} else {
			printf "0x%08x -- unknown address\n", $aa;
		}
	}
}

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

end of thread, other threads:[~2000-06-21  7:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <A109131318C4D1119AC20060088DECE330F446@amwmail.adaptivemic ro.com>
2000-06-21  0:43 ` PCMCIA ATA flash support? Mike Coy
2000-06-21  2:09   ` Murray Jensen
2000-06-21  7:07 Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2000-06-20 15:44 Lucinda Schafer
2000-06-20 14:08 Lucinda Schafer
2000-06-20 13:29 Michael Coy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).