[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: trouble with netbsd-8 on RPI3?
Martin Husemann <martin%duskware.de@localhost> writes:
> I have not found a table listing which processor types support "wait
> for event", but our default for armv7 seems not to be among them (while
> the default for aarch64 is):
>> tools/bin/armv7eb--netbsdelf-eabihf-as test.s
> test.s: Assembler messages:
> test.s:3: Error: selected processor does not support `wfe' in ARM mode
>> tools/bin/aarch64--netbsd-as test.s
> So I would expect this to crash on a/some real armv7 machine(s) too - maybe
> the old kernel just eroneously allowed it?
Do you mean:
the old kernel somehow set flags to allow wfe on armv7, which is a bug
because the armv7 spec doesn't require it. newer netbsd-8 fixes this
by not enabling it, so it faults, even on hardware which does have
also, our libpthread uses wfe on arm7, which is a bug because armv7
doesn't have wfe
Are you aware of a change to stop allowing wfe?
As I read the docs (and I am not skilled at arm docs), wfe must execute
on armv7, but it can be nop if not implemented:
> Can you verify it is present in the official builds of the armv7 libpthread
> as well, and find out more details where it is in your build?
#if defined(__thumb__) && defined(_ARM_ARCH_6)
#define pthread__smt_pause() __asm __volatile(".inst.n 0xbf20") /* wfe */
#define pthread__smt_wake() __asm __volatile(".inst.n 0xbf40") /* sev */
#define pthread__smt_pause() __asm __volatile(".inst 0xe320f002") /* wfe */
#define pthread__smt_wake() __asm __volatile(".inst 0xe320f004") /* sev */
I will check the official pthread.
Main Index |
Thread Index |