Changeset 47280 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jul 19, 2013 6:58:17 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r47279 r47280 83 83 #include <VBox/vmm/iem.h> 84 84 #include <VBox/vmm/cpum.h> 85 #include <VBox/vmm/pdm.h> 85 86 #include <VBox/vmm/pgm.h> 86 87 #include <internal/pgm.h> -
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r47271 r47280 3157 3157 case 4: crX = pCtx->cr4; break; 3158 3158 case 8: 3159 if (!IEM_FULL_VERIFICATION_ENABLED(pIemCpu)) 3160 IEM_RETURN_ASPECT_NOT_IMPLEMENTED_LOG(("Implement CR8/TPR read\n")); /** @todo implement CR8 reading and writing. */ 3159 { 3160 uint8_t uTpr; 3161 int rc = PDMApicGetTPR(IEMCPU_TO_VMCPU(pIemCpu), &uTpr, NULL, NULL); 3162 if (RT_SUCCESS(rc)) 3163 crX = uTpr >> 4; 3161 3164 else 3162 crX = 0 xff;3165 crX = 0; 3163 3166 break; 3167 } 3164 3168 IEM_NOT_REACHED_DEFAULT_CASE_RET(); /* call checks */ 3165 3169 } … … 3448 3452 */ 3449 3453 case 8: 3454 if (uNewCrX & ~(uint64_t)0xf) 3455 { 3456 Log(("Trying to set reserved CR8 bits (%#RX64)\n", uNewCrX)); 3457 return iemRaiseGeneralProtectionFault0(pIemCpu); 3458 } 3459 3450 3460 if (!IEM_FULL_VERIFICATION_ENABLED(pIemCpu)) 3451 IEM_RETURN_ASPECT_NOT_IMPLEMENTED_LOG(("Implement CR8/TPR read\n")); /** @todo implement CR8 reading and writing. */ 3452 else 3453 rcStrict = VINF_SUCCESS; 3461 PDMApicSetTPR(IEMCPU_TO_VMCPU(pIemCpu), (uint8_t)uNewCrX << 4); 3462 rcStrict = VINF_SUCCESS; 3454 3463 break; 3455 3464 -
trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
r46420 r47280 313 313 * Get the TPR (task priority register). 314 314 * 315 * @returns The current TPR.315 * @returns VINF_SUCCESS or VERR_PDM_NO_APIC_INSTANCE. 316 316 * @param pVCpu Pointer to the VMCPU. 317 317 * @param pu8TPR Where to store the TRP. 318 * @param pfPending Pending interrupt state (out ).318 * @param pfPending Pending interrupt state (out, optional). 319 319 * @param pu8PendingIrq Where to store the highest-priority pending IRQ 320 * (o ptional, can be NULL) (out).320 * (out, optional). 321 321 * 322 322 * @remarks No-long-jump zone!!! … … 324 324 VMMDECL(int) PDMApicGetTPR(PVMCPU pVCpu, uint8_t *pu8TPR, bool *pfPending, uint8_t *pu8PendingIrq) 325 325 { 326 PVM pVM = pVCpu->CTX_SUFF(pVM); 327 if (pVM->pdm.s.Apic.CTX_SUFF(pDevIns)) 326 PVM pVM = pVCpu->CTX_SUFF(pVM); 327 PPDMDEVINS pApicIns = pVM->pdm.s.Apic.CTX_SUFF(pDevIns); 328 if (pApicIns) 328 329 { 329 330 /* … … 333 334 */ 334 335 Assert(pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR)); 335 *pu8TPR = pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR)(p VM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu);336 *pu8TPR = pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR)(pApicIns, pVCpu->idCpu); 336 337 if (pfPending) 337 { 338 *pfPending = pVM->pdm.s.Apic.CTX_SUFF(pfnHasPendingIrq)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu, 339 pu8PendingIrq); 340 } 338 *pfPending = pVM->pdm.s.Apic.CTX_SUFF(pfnHasPendingIrq)(pApicIns, pVCpu->idCpu, pu8PendingIrq); 341 339 return VINF_SUCCESS; 342 340 }
Note:
See TracChangeset
for help on using the changeset viewer.