Changeset 2633 in vbox
- Timestamp:
- May 14, 2007 7:09:51 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 21158
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdm.h
r2623 r2633 5335 5335 DECLR3CALLBACKMEMBER(int, pfnCMOSRead,(PPDMDEVINS pDevIns, unsigned iReg, uint8_t *pu8Value)); 5336 5336 5337 /** 5338 * Query CPUID. 5339 * 5340 * @param pDevIns Device instance. 5341 * @param iLeaf The CPUID leaf to get. 5342 * @param pEax Where to store the EAX value. 5343 * @param pEbx Where to store the EBX value. 5344 * @param pEcx Where to store the ECX value. 5345 * @param pEdx Where to store the EDX value. 5346 */ 5347 DECLR3CALLBACKMEMBER(void, pfnQueryCPUId,(PPDMDEVINS pDevIns, uint32_t iLeaf, uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx)); 5348 5337 5349 /** @} */ 5338 5350 … … 6051 6063 return pDevIns->pDevHlp->pfnCMOSRead(pDevIns, iReg, pu8Value); 6052 6064 } 6065 6066 /** 6067 * @copydoc PDMDEVHLP::pfnQueryCPUId 6068 */ 6069 DECLINLINE(void) PDMDevHlpQueryCPUId(PPDMDEVINS pDevIns, uint32_t iLeaf, uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx) 6070 { 6071 pDevIns->pDevHlp->pfnQueryCPUId(pDevIns, iLeaf, pEax, pEbx, pEcx, pEdx); 6072 } 6053 6073 #endif /* IN_RING3 */ 6054 6074 -
trunk/src/VBox/VMM/PDMDevice.cpp
r2623 r2633 161 161 static DECLCALLBACK(int) pdmR3DevHlp_CMOSWrite(PPDMDEVINS pDevIns, unsigned iReg, uint8_t u8Value); 162 162 static DECLCALLBACK(int) pdmR3DevHlp_CMOSRead(PPDMDEVINS pDevIns, unsigned iReg, uint8_t *pu8Value); 163 static DECLCALLBACK(void) pdmR3DevHlp_QueryCPUId(PPDMDEVINS pDevIns, uint32_t iLeaf, 164 uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx); 163 165 164 166 static DECLCALLBACK(PVM) pdmR3DevHlp_Untrusted_GetVM(PPDMDEVINS pDevIns); … … 191 193 static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_CMOSWrite(PPDMDEVINS pDevIns, unsigned iReg, uint8_t u8Value); 192 194 static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_CMOSRead(PPDMDEVINS pDevIns, unsigned iReg, uint8_t *pu8Value); 195 static DECLCALLBACK(void) pdmR3DevHlp_Untrusted_QueryCPUId(PPDMDEVINS pDevIns, uint32_t iLeaf, 196 uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx); 193 197 194 198 /** @} */ … … 351 355 pdmR3DevHlp_CMOSWrite, 352 356 pdmR3DevHlp_CMOSRead, 357 pdmR3DevHlp_QueryCPUId, 353 358 PDM_DEVHLP_VERSION /* the end */ 354 359 }; … … 436 441 pdmR3DevHlp_Untrusted_CMOSWrite, 437 442 pdmR3DevHlp_Untrusted_CMOSRead, 443 pdmR3DevHlp_Untrusted_QueryCPUId, 438 444 PDM_DEVHLP_VERSION /* the end */ 439 445 }; … … 3502 3508 3503 3509 3510 /** @copydoc PDMDEVHLP::pfnQueryCPUId */ 3511 static DECLCALLBACK(void) pdmR3DevHlp_QueryCPUId(PPDMDEVINS pDevIns, uint32_t iLeaf, 3512 uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx) 3513 { 3514 PDMDEV_ASSERT_DEVINS(pDevIns); 3515 LogFlow(("pdmR3GetCPUApicHlp_ClearInterruptFF: caller='%s'/%d: fEnabled=%RTbool\n", 3516 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, fEnabled)); 3517 CPUMGetGuestCpuId(pDevIns->Internal.s.pVMHC, iLeaf, pEax, pEbx, pEcx, pEdx); 3518 } 3504 3519 3505 3520 … … 3795 3810 3796 3811 3812 /** @copydoc PDMDEVHLP::pfnQueryCPUId */ 3813 static DECLCALLBACK(void) pdmR3DevHlp_Untrusted_QueryCPUId(PPDMDEVINS pDevIns, uint32_t iLeaf, 3814 uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx) 3815 { 3816 PDMDEV_ASSERT_DEVINS(pDevIns); 3817 AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance)); 3818 } 3797 3819 3798 3820 … … 3908 3930 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMHC, CPUMCPUIDFEATURE_APIC); 3909 3931 } 3910 3911 3932 3912 3933 #ifdef VBOX_WITH_PDM_LOCK -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r2545 r2633 900 900 */ 901 901 case CPUMCPUIDFEATURE_APIC: 902 /* Don't enable the Local APIC for non-{Intel,AMD} CPUs. Linux (checked with 2.4.26 903 * and 2.6.21, see apic.c, detect_init_APIC()) gets confused otherwiese. Of course 904 * this is a bug in the Linux code (it should trust the CPUID instruction) but Windows 905 * is also known for such assumptions. 906 * On the other hand we could depend on the APIC set in the host's CPUID but this APIC 907 * might be (soft) disabled and we want to provide an APIC to the guest if possible. */ 908 if ( ( ( pVM->cpum.s.aGuestCpuIdStd[0].ebx == 0x756e6547 /* Genu */ 909 && pVM->cpum.s.aGuestCpuIdStd[0].ecx == 0x6c65746e /* ineI */ 910 && pVM->cpum.s.aGuestCpuIdStd[0].edx == 0x49656e69 /* ntel */) 911 || ( pVM->cpum.s.aGuestCpuIdStd[0].ebx == 0x68747541 /* Auth */ 912 && pVM->cpum.s.aGuestCpuIdStd[0].ecx == 0x69746e65 /* enti */ 913 && pVM->cpum.s.aGuestCpuIdStd[0].edx == 0x444d4163 /* cAMD */)) 914 && pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1) 902 if (pVM->cpum.s.aGuestCpuIdStd[0].eax >= 1) 915 903 pVM->cpum.s.aGuestCpuIdStd[1].edx |= X86_CPUID_FEATURE_EDX_APIC; 916 904 if ( pVM->cpum.s.aGuestCpuIdExt[0].eax >= 0x80000001
Note:
See TracChangeset
for help on using the changeset viewer.