The only thing that you've mentioned below that really makes me think
that you're looking at a kernel bug is the comment about things not
failing under GDB. But if *any* of the programs that are failing fail
under gdb, I'd want to know just what instruction is at the place where
they're taking a SIGILL. If gdb heisenbergs things too much, then the
basic brute force thing to do would be to instrument the kernel itself
to report on what happened, and what it sees at the "bad instruction"
address, using printk. If the memory value actually looks like a legit
instruction, it would confirm the hypothesis that you've got an icache
maintenance problem. I note that the Ingenic patch has a "flushcaches"
routine that has hardwired assumptions about the cache organization.
Could those be incorrect on the chip you're using?
Regards, and happy hunting,
Kevin K.
Nils Faerber wrote:
Hello!
I am rather playing than really working on a Ingenic JZ4730 based
device. The JZ4730 is a MIPS32 SOC included in many types of devices,
like media players and thelike but also in small power efficient
subnotebooks (this is the device I am trying to support based on the
Ingebic Linux kernel patch).
The current kernel patch from Ingenic
http://www.ingenic.cn/eng/productServ/App/JZ4730/pfCustomPage.aspx
or
ftp://ftp.ingenic.cn/3sw/01linux/02kernel/linux-2.6.24/linux-2.6.24.3-jz-20090218.patch.gz
for the patch (I used an even older patch to start my board support but
they basically only added newer CPU types in later patches).
The support for my board is almost in place but I see from time to time
failing applications with "illegal instruction" faults. Most shell
applications work pretty fine, especially more complex GUI applications
seem to fail, like a webbrowser or such.
I also tested this with different GCC and glibc version which makes me
pretty sure that I am seeing a kernel problem here rather than a
userspace problem.
I am pretty clueless how to debug this. Apropos debig as another hint:
Some application work if I start them in GDB but fail outside.
Any hint how to start debugging this would be greatly appreciated! And a
fix would be like a dream ;)
Many thanks!
Cheers
nils faerber