views:

187

answers:

2

Is there a way to determine if a Windows CE operating system is targeted against ARMV4 or ARMV4I or ARMV4T.

I am aware of the IsProcessorFeaturePresent() API call on coredll however as far as I can tell, it only allows you to determine the presence of the thumb instruction set.

What I really want to detect is if the O/S is built with interworking (the I in ARMV4I) - without making assumptions. Using PF_ARM_THUMB will not distinguish between ARMV4T and ARMV4I.

Thanks!

A: 

Can you try KernelIoControl API with IOCTL_PROCESSOR_INFORMATION for more information about the processor.

Alphaneo
I checked this call and on a Windows CE 4.20 device (ARMV4 without interworking) the PROCESSOR_INFO structure still indicates the device supports 16 bit instructions via PROCESSOR_16BITINSTRUCTION.
David Thornley
A: 

Why can't you simple use BX LR always for functions, which can be accessed by OS?

By enabling interworking, Microsoft is complying with the ARM goal of deprecating non-interworking ARM architecture. 16-bit and 32-bit code should be supported on all ARM platforms.

You can use C++ try/catch to check, is feature you need presents or not. This will work, if you can raise exception by using unsupported feature. But it's hard to raise it to check interworking.

zxcat