简体   繁体   English

在运行时确定是否针对特定处理器类型(例如ARMV4 / ARMV4I / ARMV4T)构建Windows CE操作系统

[英]Determine at runtime if Windows CE operating system is built against a particular processor type (eg. ARMV4/ARMV4I/ARMV4T)

Is there a way to determine if a Windows CE operating system is targeted against ARMV4 or ARMV4I or ARMV4T. 有没有一种方法可以确定Windows CE操作系统是否针对ARMV4或ARMV4I或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. 我知道coredll上的IsProcessorFeaturePresent()API调用,但是据我所知,它仅允许您确定Thumb指令集的存在。

What I really want to detect is if the O/S is built with interworking (the I in ARMV4I) - without making assumptions. 我真正想检测的是O / S是否是通过互通(ARMV4I中的I)构建的-无需做任何假设。 Using PF_ARM_THUMB will not distinguish between ARMV4T and ARMV4I. 使用PF_ARM_THUMB不会区分ARMV4T和ARMV4I。

Thanks! 谢谢!

您可以使用IOCTL_PROCESSOR_INFORMATION尝试使用KernelIoControl API以获得有关处理器的更多信息。

Why can't you simple use BX LR always for functions, which can be accessed by OS? 为什么不能简单地始终将BX LR用于可以由OS访问的功能?

By enabling interworking, Microsoft is complying with the ARM goal of deprecating non-interworking ARM architecture. 通过启用互通,Microsoft符合ARM弃用非互通ARM体系结构的目标。 16-bit and 32-bit code should be supported on all ARM platforms. 所有ARM平台均应支持16位和32位代码。

You can use C++ try/catch to check, is feature you need presents or not. 您可以使用C ++ try / catch进行检查,是否需要该功能。 This will work, if you can raise exception by using unsupported feature. 如果可以通过使用不受支持的功能引发异常,则此方法将起作用。 But it's hard to raise it to check interworking. 但是很难提高它来检查互通。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM