* MPC8xx: `init' problems / Bad emulation -- was: wrong zimage_start
@ 1999-06-04 21:29 Wolfgang Denk
1999-06-11 7:23 ` Marcus Sundberg
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 1999-06-04 21:29 UTC (permalink / raw
To: linuxppc-dev
First of all: thanks to all (Magnus Damm, Kári Davíðsson, Leif
Lindholm) who helped me sorting out my `zimage_start' problem. I have
got Linux running on my custom MPC860 board, both with initrd in
FLASH and with NFS mounted root.
However, I'm running into two new problems (maybe related, but I
don't think so):
* Programs that try do do any FP calculations don't work, for
instance:
# date 06042124
Bad emulation date/6
NIP: 30122204 instruction: fd8c6828 opcode: 3f A: c B: d C: 0 code: 14 rc: 0
pte @ 0x30122204: (0xc1efd300)->(0xc1efb488)->0x01f1c881
RPN: 01f1c PP: 2 SPS: 0 SH: 0 CI: 0 v: 1
Kernel VA for NIP c1f1c204 pte @ 0xc1f1c204: (0xc1efdc1c)->(0xc00eec70)->0x01f1c1c5
RPN: 01f1c PP: 0 SPS: 0 SH: 1 CI: 0 v: 1
Software Emulation date/6 NIP: 30122204 *NIP: 0xfd8c6828 code: 1Illegal Instruction
# perl
Bad emulation perl/7
NIP: 3020e0e0 instruction: fc200090 opcode: 3f A: 0 B: 0 C: 2 code: 8 rc: 0
pte @ 0x3020e0e0: (0xc1efd300)->(0xc1efb838)->0x01eae881
RPN: 01eae PP: 2 SPS: 0 SH: 0 CI: 0 v: 1
Kernel VA for NIP c1eae0e0 pte @ 0xc1eae0e0: (0xc1efdc1c)->(0xc00eeab8)->0x01eae1c5
RPN: 01eae PP: 0 SPS: 0 SH: 1 CI: 0 v: 1
Software Emulation perl/7 NIP: 3020e0e0 *NIP: 0xfc200090 code: 1Illegal Instruction
# awk -f ' '
Software Emulation awk/8 NIP: 180f840 *NIP: 0xc83efff8 code: eawk: fatal error: internal error
Aborted
Is this a known problem? Is there a fix for it?
* /sbin/init does not work. This seems to be a known problem, since
the tar image for the MBX board on the `embedded' FTP Server
(mbxroot.full.tgz) has /sbin/init renamed; I tried this version
(init.old), and the "standard" versions in release 4.1 and DR-1.0
-- all show the same result (system hangs somewhere).
Does anybody know why? Is there a fix for it?
Thanks in advance,
Wolfgang
--
Phone: (+49)-8142-4596-87 Fax: -88 Home: -86 Email: wd@denx.muc.de
God made the integers; all else is the work of Man. - Kronecker
[[ 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. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: MPC8xx: `init' problems / Bad emulation -- was: wrong zimage_start
1999-06-04 21:29 MPC8xx: `init' problems / Bad emulation -- was: wrong zimage_start Wolfgang Denk
@ 1999-06-11 7:23 ` Marcus Sundberg
1999-06-11 9:11 ` MPC8xx: Bad emulation Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Marcus Sundberg @ 1999-06-11 7:23 UTC (permalink / raw
To: Wolfgang Denk; +Cc: linuxppc-dev
Wolfgang Denk wrote:
>
> First of all: thanks to all (Magnus Damm, Kári Davíðsson, Leif
> Lindholm) who helped me sorting out my `zimage_start' problem. I have
> got Linux running on my custom MPC860 board, both with initrd in
> FLASH and with NFS mounted root.
>
> However, I'm running into two new problems (maybe related, but I
> don't think so):
>
> * Programs that try do do any FP calculations don't work, for
> instance:
>
> # date 06042124
> Bad emulation date/6
> NIP: 30122204 instruction: fd8c6828 opcode: 3f A: c B: d C: 0 code: 14 rc: 0
> pte @ 0x30122204: (0xc1efd300)->(0xc1efb488)->0x01f1c881
> RPN: 01f1c PP: 2 SPS: 0 SH: 0 CI: 0 v: 1
> Kernel VA for NIP c1f1c204 pte @ 0xc1f1c204: (0xc1efdc1c)->(0xc00eec70)->0x01f1c1c5
> RPN: 01f1c PP: 0 SPS: 0 SH: 1 CI: 0 v: 1
> Software Emulation date/6 NIP: 30122204 *NIP: 0xfd8c6828 code: 1Illegal Instruction
> # perl
> Bad emulation perl/7
> NIP: 3020e0e0 instruction: fc200090 opcode: 3f A: 0 B: 0 C: 2 code: 8 rc: 0
> pte @ 0x3020e0e0: (0xc1efd300)->(0xc1efb838)->0x01eae881
> RPN: 01eae PP: 2 SPS: 0 SH: 0 CI: 0 v: 1
> Kernel VA for NIP c1eae0e0 pte @ 0xc1eae0e0: (0xc1efdc1c)->(0xc00eeab8)->0x01eae1c5
> RPN: 01eae PP: 0 SPS: 0 SH: 1 CI: 0 v: 1
> Software Emulation perl/7 NIP: 3020e0e0 *NIP: 0xfc200090 code: 1Illegal Instruction
> # awk -f ' '
> Software Emulation awk/8 NIP: 180f840 *NIP: 0xc83efff8 code: eawk: fatal error: internal error
> Aborted
>
> Is this a known problem? Is there a fix for it?
Don't use floating point instructions in the programs, embedded PPC
doesn't have FPUs. Use -mcpu=860 -msoft-float when compiling to use
soft floats (note that all FP using programs and libraries must
be recompiled with these options to work properly).
You will also need to patch glibc to remove the FP inline assembly
and the inline memcpy which assumes 32 byte cache lines.
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan/
Royal Institute of Technology | Phone: +46 707 295404
Stockholm, Sweden | E-Mail: mackan@stacken.kth.se
[[ 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. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: MPC8xx: Bad emulation
1999-06-11 7:23 ` Marcus Sundberg
@ 1999-06-11 9:11 ` Wolfgang Denk
1999-06-14 2:41 ` Michael R. Zucca
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 1999-06-11 9:11 UTC (permalink / raw
To: Marcus Sundberg; +Cc: linuxppc-dev
In message <3760B964.E1424E37@switchboard.ericsson.se>
Marcus Sundberg wrote:
>
> Don't use floating point instructions in the programs, embedded PPC
> doesn't have FPUs. Use -mcpu=860 -msoft-float when compiling to use
Yes, I know this.
> soft floats (note that all FP using programs and libraries must
> be recompiled with these options to work properly).
> You will also need to patch glibc to remove the FP inline assembly
> and the inline memcpy which assumes 32 byte cache lines.
And this is exactly the point that makes this option unacceptable
from the practical point of view. We would have to build special
MPC8xx releases of LinuxPPC then.
How does this work for you? You may have a small embedded system with
just a small set of applications in mind, where `-mcpu=860
-msoft-float' works fine; but once you have Linux running on such a
board, it *always* happens that you run into situations where you
want to do some things in native mode - well, no problem: mount the
Linux environment over NFS. Then you can dynamically load and unload
(and debug) device drivers, etc.
And suddenly you will need this tool and that one, too.
Your customer asks: And could I run a web server on this box, too?
You say: well, no problem, just start appache - and "Bad emulation".
There are *many* situations where it is really necessary to be able
to run _any_ binary from a standrad LinuxPPC distribution on the 860,
too. I agree that it makes sense to recompile dedicated applications
for an embedded solution.
Wolfgang Denk
--
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
"He only drinks when he gets depressed." "Why does he get depressed?"
"Sometimes it's because he hasn't had a drink."
- Terry Pratchett, _Men at Arms_
[[ 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. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: MPC8xx: Bad emulation
1999-06-11 9:11 ` MPC8xx: Bad emulation Wolfgang Denk
@ 1999-06-14 2:41 ` Michael R. Zucca
1999-06-14 3:31 ` Kolbjørn Barmen
0 siblings, 1 reply; 6+ messages in thread
From: Michael R. Zucca @ 1999-06-14 2:41 UTC (permalink / raw
To: Wolfgang Denk; +Cc: Marcus Sundberg, linuxppc-dev
At 5:11 AM -0400 6/11/99, Wolfgang Denk wrote:
>There are *many* situations where it is really necessary to be able
>to run _any_ binary from a standrad LinuxPPC distribution on the 860,
>too. I agree that it makes sense to recompile dedicated applications
>for an embedded solution.
Then what you may wish to do is develop a software FPU for the PPC860. That
is, have the OS patch the illegal instruction trap so that it jumps to
emulation code when the instruction is an FP instruction.
I'm surprised. I thought we were already doing this. This sort of thing
has been done forever on the 68k to emulate the 68881/2 FPU. It's slow but
if you don't plan on doing much floating point, it's perfectly acceptable.
_______________________________________________________________________
Michael Zucca - mrz5149@acm.org - http://www.mdc.net/~mrz5149/
"I will choose a path that's clear. I will choose Freewill. "
--Rush, Freewill
_______________________________________________________________________
[[ 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. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: MPC8xx: Bad emulation
1999-06-14 2:41 ` Michael R. Zucca
@ 1999-06-14 3:31 ` Kolbjørn Barmen
1999-06-14 5:16 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Kolbjørn Barmen @ 1999-06-14 3:31 UTC (permalink / raw
To: Michael R. Zucca; +Cc: Wolfgang Denk, Marcus Sundberg, linuxppc-dev
On Sun, 13 Jun 1999, Michael R. Zucca wrote:
> I'm surprised. I thought we were already doing this. This sort of thing
> has been done forever on the 68k to emulate the 68881/2 FPU. It's slow but
> if you don't plan on doing much floating point, it's perfectly acceptable.
Since when has this been done forever on m68k?
It was working sometimes on some old 1.2.x kernels and perhaps older, it hasnt
been working since afaik, and hasnt been much of an issue until recently on
old macs, as most of atari and amiga owners has gotten ourselves 68881/2 chips
in the meantime.
It's been forever on intel though.
Kolbjørn Barmen | a3k/o6o/6o4e/AmigaOS/MacOS/LinuxPPC | // T e a m
<kolla@nvg.org> | a12ooCT/o3o/Linux-m68k a6oo/o3o/AmigaOS | \XX/ A M I G A
Nettverksgruppa | "I met the Amiga and fell in love..." | <amiga.nvg.org>
»» Norwegian University of Technology and Science ««
[[ 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. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: MPC8xx: Bad emulation
1999-06-14 3:31 ` Kolbjørn Barmen
@ 1999-06-14 5:16 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 1999-06-14 5:16 UTC (permalink / raw
To: linuxppc-dev; +Cc: Michael R. Zucca, Marcus Sundberg, Kolbjørn Barmen
On Sun, 13 Jun 1999, Michael R. Zucca wrote:
>
> I'm surprised. I thought we were already doing this. This sort of thing
So thought I; but the existing solution is far from being complete.
> has been done forever on the 68k to emulate the 68881/2 FPU. It's slow but
> if you don't plan on doing much floating point, it's perfectly acceptable.
Agreed.
On Mon, 14 Jun 1999, Kolbjørn Barmen wrote:
>
> It was working sometimes on some old 1.2.x kernels and perhaps older, it hasnt
> been working since afaik, and hasnt been much of an issue until recently on
> old macs, as most of atari and amiga owners has gotten ourselves 68881/2 chips
> in the meantime.
It is perfectly understandable that there is no much interest for
this on the workstation class of Linux boxen. But especially with the
PPC port and Embedded Controllers like the Motorola MPC8xx or the IBM
401x2 I se a good chance for Linux entering the world of embedded
(and realtime) systems. This opens a whole new set of requirements.
Wolfgang Denk
--
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
It is impractical for the standard to attempt to constrain the
behavior of code that does not obey the constraints of the standard.
- Doug Gwyn
[[ 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. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1999-06-14 5:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-06-04 21:29 MPC8xx: `init' problems / Bad emulation -- was: wrong zimage_start Wolfgang Denk
1999-06-11 7:23 ` Marcus Sundberg
1999-06-11 9:11 ` MPC8xx: Bad emulation Wolfgang Denk
1999-06-14 2:41 ` Michael R. Zucca
1999-06-14 3:31 ` Kolbjørn Barmen
1999-06-14 5:16 ` Wolfgang Denk
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.