This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: NIOS2 kernel tests failing
- From: Grant Edwards <grante at visi dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 2 Jan 2007 17:11:30 +0000 (UTC)
- Subject: [ECOS] Re: NIOS2 kernel tests failing
- References: <emschl$7ve$1@sea.gmane.org> <m364bpem24.fsf@xl5.calivar.com>
On 2007-01-02, Nick Garnett <nickg@ecoscentric.com> wrote:
>> I've been unable to get all of the kernel tests to pass on a
>> NIOS2 platform. Four fail consistently:
>>
>> except1.cxx
>> kexcept1.cxx
[...]
> The programs attempt to provoke a hardware exception by first
> trying to generate an alignment/bus error/memory management
> exception by poking memory;
There are no memory alignment or bus-error exceptions in the
NIOS2 processor and misaligned accesses are forbidden. The
CPU's reference manual states that misaligned accesses result
in "undefined operation". Strict interpreation of that allows
the CPU to do absolutely anything when a misaligned operation
occurs. My guess is that instruction execution continues
normally with an undefined value in the destination register,
but the spec is pretty clear that it's simply not allowed, and
CPU can do absolutely anything if it does happen.
> if that fails it tries a divide by zero.
No execption for that, just undefined values in result
registers.
> If none of these work, then the test will fail.
And it does. :)
The only hardware exceptions that can be caused by software
are:
trap
break
valid but unimplemented instruction
[The last one is different from an undefined (invalid)
instruction -- which again results in "undefined operation".]
> I don't know what exceptions the NIOS2 support, so either
> there are no suitable exceptions supported,
It appears there aren't, and doing things like misaligned
memory accesses may result in "udefined operation".
--
Grant Edwards grante Yow! I'm into SOFTWARE!
at
visi.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss