@@ -582,7 +582,6 @@ struct VM {
582582 EDID,
583583 CPU_HEURISTIC,
584584 CLOCK,
585- POST,
586585
587586 // Linux and Windows
588587 SIDT,
@@ -10269,61 +10268,6 @@ struct VM {
1026910268 SetupDiDestroyDeviceInfoList (devs);
1027010269 return !found;
1027110270 }
10272-
10273-
10274- /* *
10275- * @brief Check for anomalies in BIOS POST time
10276- * @category Windows
10277- * @implements VM::POST
10278- */
10279- [[nodiscard]] static bool post () {
10280- /*
10281- * The motherboard must test and calibrate memory timings, which is time-consuming
10282- * The system physically scans PCIe buses, initializes the GPU, powers up USB controllers, and waits for storage drives to report ready
10283- * Fans must spin up, and capacitors must charge
10284- *
10285- * On VMs, RAM is simply a block of memory allocated by the host OS. There is no training or calibration required
10286- * There are no drives to spin up, no fans to check, and no complex PCIe negotiation
10287- * So at the end, we see cases like VirtualBox machines reporting 0.9s of last bios time, or QEMU machines with OVMF reporting 0s
10288- */
10289- static constexpr wchar_t kSubKey [] = L" SYSTEM\\ CurrentControlSet\\ Control\\ Session Manager\\ Power" ;
10290- static constexpr wchar_t kValueName [] = L" FwPOSTTime" ;
10291- HKEY hKey;
10292-
10293- long result = RegOpenKeyExW (
10294- HKEY_LOCAL_MACHINE,
10295- kSubKey ,
10296- 0 ,
10297- KEY_QUERY_VALUE,
10298- &hKey
10299- );
10300-
10301- if (result != ERROR_SUCCESS) {
10302- return false ;
10303- }
10304-
10305- DWORD data = 0 ;
10306- DWORD dataSize = sizeof (data);
10307-
10308- result = RegQueryValueExW (
10309- hKey,
10310- kValueName ,
10311- NULL ,
10312- NULL ,
10313- reinterpret_cast <LPBYTE>(&data),
10314- &dataSize
10315- );
10316-
10317- RegCloseKey (hKey);
10318-
10319- if (result == ERROR_SUCCESS) {
10320- if (data < 1500 ) { // 1.5s
10321- return true ;
10322- }
10323- }
10324-
10325- return false ;
10326- }
1032710271 // ADD NEW TECHNIQUE FUNCTION HERE
1032810272#endif
1032910273
@@ -11403,7 +11347,6 @@ struct VM {
1140311347 case EDID: return " EDID" ;
1140411348 case CPU_HEURISTIC: return " CPU_HEURISTIC" ;
1140511349 case CLOCK: return " CLOCK" ;
11406- case POST: return " POST" ;
1140711350 // END OF TECHNIQUE LIST
1140811351 case DEFAULT: return " setting flag, error" ;
1140911352 case ALL: return " setting flag, error" ;
@@ -11949,7 +11892,6 @@ std::array<VM::core::technique, VM::enum_size + 1> VM::core::technique_table = [
1194911892 {VM::CLOCK, {100 , VM::clock}},
1195011893 {VM::POWER_CAPABILITIES, {45 , VM::power_capabilities}},
1195111894 {VM::CPU_HEURISTIC, {90 , VM::cpu_heuristic}},
11952- {VM::POST, {100 , VM::post }},
1195311895 {VM::EDID, {100 , VM::edid}},
1195411896 {VM::BOOT_LOGO, {100 , VM::boot_logo}},
1195511897 {VM::GPU_CAPABILITIES, {45 , VM::gpu_capabilities}},
0 commit comments