< prev index next >
src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp
Print this page
@@ -647,10 +647,27 @@
};
return 1 ;
#endif // AMD64
}
+juint os::cpu_microcode_revision() {
+ juint result = 0;
+ BYTE data[8] = {0};
+ HKEY key;
+ DWORD status = RegOpenKey(HKEY_LOCAL_MACHINE,
+ "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", &key);
+ if (status == ERROR_SUCCESS) {
+ DWORD size = sizeof(data);
+ status = RegQueryValueEx(key, "Update Revision", NULL, NULL, data, &size);
+ if (status == ERROR_SUCCESS) {
+ if (size == 4) result = *((juint*)data);
+ if (size == 8) result = *((juint*)data + 1); // upper 32-bits
+ }
+ RegCloseKey(key);
+ }
+ return result;
+}
void os::setup_fpu() {
#ifndef AMD64
int fpu_cntrl_word = StubRoutines::fpu_cntrl_wrd_std();
__asm fldcw fpu_cntrl_word;
< prev index next >