Subject: Illegal instruction on CL-PS7110 (ARM710a)

From: Werner Almesberger <[email-masked]>
Date: Sat, 23 Jan 1999 00:50:22 +0100 (MET)

[ Posted to linux-7110 and linux-arm ]

At the moment, I'm playing around with a few programs from
ftp://ftp.arm.linux.org.uk/pub/armlinux/RedHat/RPMS/ on my Psion
(CL-PS7110 CPU, with an ARM710a core) and I got "Illegal instruction" a
few times, e.g. from dip and from rz. Unfortunately, the kernel (2.1.125)
is silent about what instruction that may have been.

Any ideas of what this may be ? My suspicion is either the 16 bit
transfer instructions that other ARM CPUs seem to have, or some
floating-point operations. Or maybe it's just the rather limited
environment in which I'm running things that causes programs to try
stupid things ...

If it's the 16 bit transfers, we'll probably have to emulate them if they
appear in common ARM code :-(  (I know that there's an FPU emulator in
more recent kernels.)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, DI-ICA,EPFL,CH   [email-masked] /
/_IN_R_131__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Sat, 23 Jan 1999 09:57:28 +0000 (GMT)

Werner Almesberger writes:
> few times, e.g. from dip and from rz.

One of the good things about those packages on ftp.arm.linux.org.uk is
that they are all compiled for ARM2 chips, which means that the code
should run on all ARM-based chips without any problems.

> Unfortunately, the kernel (2.1.125) is silent about what instruction
> that may have been.

It sounds like your missing the floating point emulation.  There are two
different emulators around at the moment - the Acorn FPE (which can be
found in ftp://ftp.arm.linux.org.uk/pub/armlinux/fpemulator), or the
Netwinder FPE.  

I would recommend you getting the Acorn FPE and an up to date kernel
source.  You should then find that 'insmod' (not the version in
ftp.arm.linux.org.uk, but an ELF version) should be able to load the
fpemulator.  You will have to supply insmod the '-f' flag though.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Alex Holden <[email-masked]>
Date: Sat, 23 Jan 1999 10:46:28 +0000 (GMT)

> fpemulator.  You will have to supply insmod the '-f' flag though.

Aww, the NWFPE isn't that bad (I've been using it for weeks), and it'll
never get cleaned up if nobody uses it. The big advantage of course is
that the cleaner license on it means that you can compile it into the
kernel rather than having to load it as a module.

--------------- Linux- the choice of a GNU generation. --------------
: Alex Holden (M1CJD)- Caver, Programmer, Land Rover nut, Radio Ham :

---

From: Werner Almesberger <[email-masked]>
Date: Sat, 23 Jan 1999 17:00:34 +0100 (MET)

> should run on all ARM-based chips without any problems.

Excellent !

> fpemulator.  You will have to supply insmod the '-f' flag though.

Is the Acorn FPE also supposed to work with pre-2.2 kernels or should I
rather try 2.1.132 ? Also, where can I find a suitable insmod binary ?
(Our cross-development environment so far doesn't include (g)libc, so
building user-space tools is somewhat messy.)

Thanks,
- Werner

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Sat, 23 Jan 1999 16:21:59 +0000 (GMT)

Werner Almesberger writes:
> rather try 2.1.132 ?

The Acorn FPE works for most 2.1 and all 2.2 kernels.

> Also, where can I find a suitable insmod binary ?

You could try someone with a NetWinder and ample bandwidth...
   _____

---

From: Werner Almesberger <[email-masked]>
Date: Tue, 26 Jan 1999 00:13:02 +0100 (MET)

> The Acorn FPE works for most 2.1 and all 2.2 kernels.

Great, so with a little luck, I can even stay at 2.1.125 for now.

> You could try someone with a NetWinder and ample bandwidth...

Okay ;-) Is there anybody out there who can compile for me insmod from
modutils-2.1.85 for the ARM7 (-mcpu=arm7) either as a static executable
or linked to libc4 ?

Thanks,
- Werner

---

From: Philip Blundell <[email-masked]>
Date: Tue, 26 Jan 1999 19:27:24 +0100

>It seems to have some necessary changes in it which haven't made it into
>the official modutils to support ARM-elf. At least, the vanilla 2.1.121

Pat's modutils supports PLT relocs.  There might be some other changes as 
well; I keep meaning to look into this (started to do so again this afternoon 
in fact) but haven't had time to do much yet.

p.

---

From: Alex Holden <[email-masked]>
Date: Tue, 26 Jan 1999 19:12:02 +0000 (GMT)

> modutils-2.1.85 for the ARM7 (-mcpu=arm7) either as a static executable

The latest source I managed to get to work was that in:
ftp://ftp.netwinder.org/users/p/patb/modutils-2.1.107.tar.gz

It seems to have some necessary changes in it which haven't made it into
the official modutils to support ARM-elf. At least, the vanilla 2.1.121
compiled but didn't work. I don't know about 2.1.85- is there any
particular reason you wanted that version?

---

From: Werner Almesberger <[email-masked]>
Date: Tue, 26 Jan 1999 20:21:29 +0100 (MET)

> ftp://ftp.netwinder.org/users/p/patb/modutils-2.1.107.tar.gz

Excellent, I'll try that one tonight.

> particular reason you wanted that version?

Err yes, it appeared last when I did a "dir" in the FTP directory and I
didn't bother to scroll up ... never underestimate human stupidity :-(

Thanks,
- Werner

---

From: Werner Almesberger <[email-masked]>
Date: Tue, 26 Jan 1999 22:56:15 +0100 (MET)

> ftp://ftp.netwinder.org/users/p/patb/modutils-2.1.107.tar.gz

Sigh, didn't work :-(

# /sbin/insmod 
insmod: memory violation at pc=0x02012bc0, lr=0x02012bc4 (bad address=0x0000002c, code 3)

So let's try the NWFPE then ...

- Werner