+coprocessor_type_t PEGetCoprocessorVersion( void )
+{
+ coprocessor_type_t coprocessor_version = kCoprocessorVersionNone;
+#if !CONFIG_EMBEDDED
+ IORegistryEntry *platform_entry = NULL;
+ OSData *coprocessor_version_obj = NULL;
+
+ platform_entry = IORegistryEntry::fromPath(kIODeviceTreePlane ":/efi/platform");
+ if (platform_entry != NULL) {
+ coprocessor_version_obj = OSDynamicCast(OSData, platform_entry->getProperty("apple-coprocessor-version"));
+ if ((coprocessor_version_obj != NULL) && (coprocessor_version_obj->getLength() <= sizeof(uint64_t))) {
+ memcpy(&coprocessor_version, coprocessor_version_obj->getBytesNoCopy(), coprocessor_version_obj->getLength());
+ }
+ platform_entry->release();
+ }
+#endif
+ return coprocessor_version;
+}
+