Changeset 1940 in vbox for trunk/src/VBox
- Timestamp:
- Apr 4, 2007 4:03:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r1939 r1940 284 284 285 285 286 inline int emRamRead(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu,void *pDest, RTGCPTR GCSrc, uint32_t cb)286 inline int emRamRead(PVM pVM, void *pDest, RTGCPTR GCSrc, uint32_t cb) 287 287 { 288 288 #ifdef IN_GC … … 302 302 } 303 303 304 inline int emRamWrite(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu,RTGCPTR GCDest, void *pSrc, uint32_t cb)304 inline int emRamWrite(PVM pVM, RTGCPTR GCDest, void *pSrc, uint32_t cb) 305 305 { 306 306 #ifdef IN_GC … … 374 374 AssertReturn(pParam1 == pvFault, VERR_EM_INTERPRETER); 375 375 #endif 376 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar1, pParam1, param1.size);376 rc = emRamRead(pVM, &valpar1, pParam1, param1.size); 377 377 if (VBOX_FAILURE(rc)) 378 378 { … … 396 396 AssertReturn(pParam2 == pvFault, VERR_EM_INTERPRETER); 397 397 #endif 398 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar2, pParam2, param2.size);398 rc = emRamRead(pVM, &valpar2, pParam2, param2.size); 399 399 if (VBOX_FAILURE(rc)) 400 400 { … … 429 429 else 430 430 { 431 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam1, &valpar2, param1.size);431 rc = emRamWrite(pVM, pParam1, &valpar2, param1.size); 432 432 if (VBOX_FAILURE(rc)) 433 433 { … … 454 454 else 455 455 { 456 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam2, &valpar1, param2.size);456 rc = emRamWrite(pVM, pParam2, &valpar1, param2.size); 457 457 if (VBOX_FAILURE(rc)) 458 458 { … … 500 500 AssertReturn(pParam1 == pvFault, VERR_EM_INTERPRETER); 501 501 #endif 502 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar1, pParam1, param1.size);502 rc = emRamRead(pVM, &valpar1, pParam1, param1.size); 503 503 if (VBOX_FAILURE(rc)) 504 504 { … … 521 521 522 522 /* Write result back */ 523 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam1, &valpar1, param1.size);523 rc = emRamWrite(pVM, pParam1, &valpar1, param1.size); 524 524 if (VBOX_FAILURE(rc)) 525 525 { … … 571 571 return VERR_EM_INTERPRETER; 572 572 573 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar1, pStackVal, param1.size);573 rc = emRamRead(pVM, &valpar1, pStackVal, param1.size); 574 574 if (VBOX_FAILURE(rc)) 575 575 { … … 596 596 AssertMsgReturn(pParam1 == pvFault || (RTGCPTR)pRegFrame->esp == pvFault, ("%VGv != %VGv ss:esp=%04X:%VGv\n", pParam1, pvFault, pRegFrame->ss, pRegFrame->esp), VERR_EM_INTERPRETER); 597 597 #endif 598 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam1, &valpar1, param1.size);598 rc = emRamWrite(pVM, pParam1, &valpar1, param1.size); 599 599 if (VBOX_FAILURE(rc)) 600 600 { … … 669 669 AssertReturn(pParam1 == pvFault, VERR_EM_INTERPRETER); 670 670 #endif 671 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar1, pParam1, param1.size);671 rc = emRamRead(pVM, &valpar1, pParam1, param1.size); 672 672 if (VBOX_FAILURE(rc)) 673 673 { … … 702 702 703 703 /* And write it back */ 704 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam1, &valpar1, param1.size);704 rc = emRamWrite(pVM, pParam1, &valpar1, param1.size); 705 705 if (VBOX_SUCCESS(rc)) 706 706 { … … 761 761 AssertReturn(pParam1 == pvFault, VERR_EM_INTERPRETER); 762 762 #endif 763 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar1, pParam1, param1.size);763 rc = emRamRead(pVM, &valpar1, pParam1, param1.size); 764 764 if (VBOX_FAILURE(rc)) 765 765 { … … 794 794 795 795 /* And write it back */ 796 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam1, &valpar1, param1.size);796 rc = emRamWrite(pVM, pParam1, &valpar1, param1.size); 797 797 if (VBOX_SUCCESS(rc)) 798 798 { … … 853 853 AssertMsgReturn(pParam1 == pvFault, ("pParam1 = %VGv pvFault = %VGv\n", pParam1, pvFault), VERR_EM_INTERPRETER); 854 854 #endif 855 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar1, pParam1, param1.size);855 rc = emRamRead(pVM, &valpar1, pParam1, param1.size); 856 856 if (VBOX_FAILURE(rc)) 857 857 { … … 888 888 889 889 /* And write it back */ 890 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam1, &valpar1, param1.size);890 rc = emRamWrite(pVM, pParam1, &valpar1, param1.size); 891 891 if (VBOX_SUCCESS(rc)) 892 892 { … … 947 947 AssertReturn(pParam1 == pvFault, VERR_EM_INTERPRETER); 948 948 #endif 949 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar1, pParam1, param1.size);949 rc = emRamRead(pVM, &valpar1, pParam1, param1.size); 950 950 if (VBOX_FAILURE(rc)) 951 951 { … … 982 982 983 983 /* And write it back */ 984 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam1, &valpar1, param1.size);984 rc = emRamWrite(pVM, pParam1, &valpar1, param1.size); 985 985 if (VBOX_SUCCESS(rc)) 986 986 { … … 1042 1042 AssertReturn(pParam1 == pvFault, VERR_EM_INTERPRETER); 1043 1043 #endif 1044 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar1, pParam1, param1.size);1044 rc = emRamRead(pVM, &valpar1, pParam1, param1.size); 1045 1045 if (VBOX_FAILURE(rc)) 1046 1046 { … … 1082 1082 1083 1083 /* And write it back */ 1084 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam1, &valpar1, param1.size);1084 rc = emRamWrite(pVM, pParam1, &valpar1, param1.size); 1085 1085 if (VBOX_SUCCESS(rc)) 1086 1086 { … … 1141 1141 AssertReturn(pParam1 == pvFault, VERR_EM_INTERPRETER); 1142 1142 #endif 1143 rc = emRamRead(pVM, pRegFrame, pCpu,&valpar1, pParam1, param1.size);1143 rc = emRamRead(pVM, &valpar1, pParam1, param1.size); 1144 1144 if (VBOX_FAILURE(rc)) 1145 1145 { … … 1176 1176 1177 1177 /* And write it back */ 1178 rc = emRamWrite(pVM, p RegFrame, pCpu, pParam1, &valpar1, param1.size);1178 rc = emRamWrite(pVM, pParam1, &valpar1, param1.size); 1179 1179 if (VBOX_SUCCESS(rc)) 1180 1180 { … … 1252 1252 AssertReturn(pDest == pvFault, VERR_EM_INTERPRETER); 1253 1253 #endif 1254 rc = emRamWrite(pVM, p RegFrame, pCpu, pDest, &val32, param2.size);1254 rc = emRamWrite(pVM, pDest, &val32, param2.size); 1255 1255 if (VBOX_FAILURE(rc)) 1256 1256 return VERR_EM_INTERPRETER; … … 1285 1285 AssertReturn(pSrc == pvFault, VERR_EM_INTERPRETER); 1286 1286 #endif 1287 rc = emRamRead(pVM, pRegFrame, pCpu,&val32, pSrc, param1.size);1287 rc = emRamRead(pVM, &val32, pSrc, param1.size); 1288 1288 if (VBOX_FAILURE(rc)) 1289 1289 return VERR_EM_INTERPRETER; … … 1332 1332 int rc; 1333 1333 1334 rc = emRamRead(pVM, NULL, NULL,&eip, (RTGCPTR)pIretStack , 4);1335 rc |= emRamRead(pVM, NULL, NULL,&cs, (RTGCPTR)(pIretStack + 4), 4);1336 rc |= emRamRead(pVM, NULL, NULL,&eflags, (RTGCPTR)(pIretStack + 8), 4);1334 rc = emRamRead(pVM, &eip, (RTGCPTR)pIretStack , 4); 1335 rc |= emRamRead(pVM, &cs, (RTGCPTR)(pIretStack + 4), 4); 1336 rc |= emRamRead(pVM, &eflags, (RTGCPTR)(pIretStack + 8), 4); 1337 1337 AssertRCReturn(rc, VERR_EM_INTERPRETER); 1338 1338 AssertReturn(eflags & X86_EFL_VM, VERR_EM_INTERPRETER); 1339 1339 1340 rc |= emRamRead(pVM, NULL, NULL,&esp, (RTGCPTR)(pIretStack + 12), 4);1341 rc |= emRamRead(pVM, NULL, NULL,&ss, (RTGCPTR)(pIretStack + 16), 4);1342 rc |= emRamRead(pVM, NULL, NULL,&es, (RTGCPTR)(pIretStack + 20), 4);1343 rc |= emRamRead(pVM, NULL, NULL,&ds, (RTGCPTR)(pIretStack + 24), 4);1344 rc |= emRamRead(pVM, NULL, NULL,&fs, (RTGCPTR)(pIretStack + 28), 4);1345 rc |= emRamRead(pVM, NULL, NULL,&gs, (RTGCPTR)(pIretStack + 32), 4);1340 rc |= emRamRead(pVM, &esp, (RTGCPTR)(pIretStack + 12), 4); 1341 rc |= emRamRead(pVM, &ss, (RTGCPTR)(pIretStack + 16), 4); 1342 rc |= emRamRead(pVM, &es, (RTGCPTR)(pIretStack + 20), 4); 1343 rc |= emRamRead(pVM, &ds, (RTGCPTR)(pIretStack + 24), 4); 1344 rc |= emRamRead(pVM, &fs, (RTGCPTR)(pIretStack + 28), 4); 1345 rc |= emRamRead(pVM, &gs, (RTGCPTR)(pIretStack + 32), 4); 1346 1346 AssertRCReturn(rc, VERR_EM_INTERPRETER); 1347 1347
Note:
See TracChangeset
for help on using the changeset viewer.