Changeset 107800 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Jan 16, 2025 12:21:46 AM (5 weeks ago)
- svn:sync-xref-src-repo-rev:
- 166942
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r106061 r107800 1785 1785 1786 1786 1787 SUPR3DECL(int) SUPR3QueryMicrocodeRev(uint32_t * uMicrocodeRev)1788 { 1789 AssertPtrReturn( uMicrocodeRev, VERR_INVALID_POINTER);1790 1791 * uMicrocodeRev = 0;1787 SUPR3DECL(int) SUPR3QueryMicrocodeRev(uint32_t *puMicrocodeRev) 1788 { 1789 AssertPtrReturn(puMicrocodeRev, VERR_INVALID_POINTER); 1790 1791 *puMicrocodeRev = 0; 1792 1792 1793 1793 int rc; … … 1810 1810 rc = Req.Hdr.rc; 1811 1811 if (RT_SUCCESS(rc)) 1812 * uMicrocodeRev = Req.u.Out.MicrocodeRev;1812 *puMicrocodeRev = Req.u.Out.MicrocodeRev; 1813 1813 } 1814 1814 } 1815 1815 /* 1816 * Just fail the call in driverless mode. 1816 * Just fail the call in driverless mode if there is a host specific way of 1817 * getting the information. 1817 1818 */ 1818 1819 else 1820 #if defined(RT_OS_DARWIN) && defined(RT_ARCH_AMD64) 1821 rc = suplibOsQueryMicrocodeRev(puMicrocodeRev); 1822 #else 1819 1823 rc = VERR_SUP_DRIVERLESS; 1824 #endif 1820 1825 return rc; 1821 1826 } -
trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
r106061 r107800 381 381 DECLHIDDEN(int) suplibOsPageFree(PSUPLIBDATA pThis, void *pvPages, size_t cPages); 382 382 DECLHIDDEN(int) suplibOsQueryVTxSupported(const char **ppszWhy); 383 DECLHIDDEN(int) suplibOsQueryMicrocodeRev(uint32_t *puMicrocodeRev); 383 384 DECLHIDDEN(bool) suplibOsIsNemSupportedWhenNoVtxOrAmdV(void); 384 385 -
trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp
r106061 r107800 335 335 336 336 337 # ifdef RT_ARCH_AMD64 338 DECLHIDDEN(int) suplibOsQueryMicrocodeRev(uint32_t *puMicrocodeRev) 339 { 340 size_t cb = sizeof(*puMicrocodeRev); 341 int rc = sysctlbyname("machdep.cpu.microcode_version", puMicrocodeRev, &cb, NULL, 0); 342 if (!rc) 343 { 344 if (cb == sizeof(uint32_t)) 345 return VINF_SUCCESS; 346 AssertMsgFailed(("cb=%d\n", cb)); 347 rc = VERR_INTERNAL_ERROR_3; 348 } 349 else 350 rc = RTErrConvertFromErrno(errno); 351 *puMicrocodeRev = 0; 352 return rc; 353 } 354 # endif 355 356 337 357 DECLHIDDEN(bool) suplibOsIsNemSupportedWhenNoVtxOrAmdV(void) 338 358 { … … 348 368 # else 349 369 return false; 350 # endif370 # endif 351 371 } 352 372
Note:
See TracChangeset
for help on using the changeset viewer.