Changeset 22480 in vbox for trunk/src/recompiler
- Timestamp:
- Aug 26, 2009 5:14:13 PM (15 years ago)
- Location:
- trunk/src/recompiler
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/VBoxREMWrapper.cpp
r22118 r22480 877 877 }; 878 878 879 static const REMPARMDESC g_aArgsSSMIntCallback[] = 880 { 881 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 882 { REMPARMDESC_FLAGS_INT, sizeof(PSSMHANDLE), NULL }, 883 }; 884 static REMFNDESC g_SSMIntCallback = 885 { 886 "SSMIntCallback", NULL, &g_aArgsSSMIntCallback[0], RT_ELEMENTS(g_aArgsSSMIntCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL 887 }; 888 889 static const REMPARMDESC g_aArgsSSMIntLoadExecCallback[] = 879 static const REMPARMDESC g_aArgsSSMIntLiveExecCallback[] = 890 880 { 891 881 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 892 882 { REMPARMDESC_FLAGS_INT, sizeof(PSSMHANDLE), NULL }, 883 { REMPARMDESC_FLAGS_INT, sizeof(uint32_t), NULL }, 884 }; 885 static REMFNDESC g_SSMIntLiveExecCallback = 886 { 887 "SSMIntLiveExecCallback", NULL, &g_aArgsSSMIntLiveExecCallback[0], RT_ELEMENTS(g_aArgsSSMIntLiveExecCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL 888 }; 889 890 static const REMPARMDESC g_aArgsSSMIntLiveVoteCallback[] = 891 { 892 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 893 { REMPARMDESC_FLAGS_INT, sizeof(PSSMHANDLE), NULL }, 894 }; 895 static REMFNDESC g_SSMIntLiveVoteCallback = 896 { 897 "SSMIntLiveVoteCallback", NULL, &g_aArgsSSMIntLiveVoteCallback[0], RT_ELEMENTS(g_aArgsSSMIntLiveVotecCallback), REMFNDESC_FLAGS_RET_INT, sizeof(bool), NULL 898 }; 899 900 static const REMPARMDESC g_aArgsSSMIntCallback[] = 901 { 902 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 903 { REMPARMDESC_FLAGS_INT, sizeof(PSSMHANDLE), NULL }, 904 }; 905 static REMFNDESC g_SSMIntCallback = 906 { 907 "SSMIntCallback", NULL, &g_aArgsSSMIntCallback[0], RT_ELEMENTS(g_aArgsSSMIntCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL 908 }; 909 910 static const REMPARMDESC g_aArgsSSMIntLoadExecCallback[] = 911 { 912 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 913 { REMPARMDESC_FLAGS_INT, sizeof(PSSMHANDLE), NULL }, 914 { REMPARMDESC_FLAGS_INT, sizeof(uint32_t), NULL }, 893 915 { REMPARMDESC_FLAGS_INT, sizeof(uint32_t), NULL }, 894 916 }; … … 904 926 { REMPARMDESC_FLAGS_INT, sizeof(uint32_t), NULL }, 905 927 { REMPARMDESC_FLAGS_INT, sizeof(size_t), NULL }, 928 { REMPARMDESC_FLAGS_PFN, sizeof(PFNSSMINTLIVEPREP), &g_SSMIntCallback }, 929 { REMPARMDESC_FLAGS_PFN, sizeof(PFNSSMINTLIVEEXEC), &g_SSMIntLiveExecCallback }, 930 { REMPARMDESC_FLAGS_PFN, sizeof(PFNSSMINTLIVEVOTE), &g_SSMIntLiveVoteCallback }, 906 931 { REMPARMDESC_FLAGS_PFN, sizeof(PFNSSMINTSAVEPREP), &g_SSMIntCallback }, 907 932 { REMPARMDESC_FLAGS_PFN, sizeof(PFNSSMINTSAVEEXEC), &g_SSMIntCallback }, -
trunk/src/recompiler/VBoxRecompiler.c
r22112 r22480 88 88 *******************************************************************************/ 89 89 static DECLCALLBACK(int) remR3Save(PVM pVM, PSSMHANDLE pSSM); 90 static DECLCALLBACK(int) remR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t u 32Version);90 static DECLCALLBACK(int) remR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPhase); 91 91 static void remR3StateUpdate(PVM pVM, PVMCPU pVCpu); 92 92 static int remR3InitPhysRamSizeAndDirtyMap(PVM pVM, bool fGuarded); … … 339 339 */ 340 340 rc = SSMR3RegisterInternal(pVM, "rem", 1, REM_SAVED_STATE_VERSION, sizeof(uint32_t) * 10, 341 NULL, NULL, NULL, 341 342 NULL, remR3Save, NULL, 342 343 NULL, remR3Load, NULL); … … 659 660 * @param pVM VM Handle. 660 661 * @param pSSM SSM operation handle. 661 * @param u32Version Data layout version. 662 */ 663 static DECLCALLBACK(int) remR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t u32Version) 662 * @param uVersion Data layout version. 663 * @param uPhase The data phase. 664 */ 665 static DECLCALLBACK(int) remR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPhase) 664 666 { 665 667 uint32_t u32Dummy; … … 669 671 int rc; 670 672 PREM pRem; 673 671 674 LogFlow(("remR3Load:\n")); 675 Assert(uPhase == SSM_PHASE_FINAL); NOREF(uPhase); 672 676 673 677 /* 674 678 * Validate version. 675 679 */ 676 if ( u 32Version != REM_SAVED_STATE_VERSION677 && u 32Version != REM_SAVED_STATE_VERSION_VER1_6)678 { 679 AssertMsgFailed(("remR3Load: Invalid version u 32Version=%d!\n", u32Version));680 if ( uVersion != REM_SAVED_STATE_VERSION 681 && uVersion != REM_SAVED_STATE_VERSION_VER1_6) 682 { 683 AssertMsgFailed(("remR3Load: Invalid version uVersion=%d!\n", uVersion)); 680 684 return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION; 681 685 } … … 699 703 Assert(!pRem->fInREM); 700 704 SSMR3GetU32(pSSM, &pRem->Env.hflags); 701 if (u 32Version == REM_SAVED_STATE_VERSION_VER1_6)705 if (uVersion == REM_SAVED_STATE_VERSION_VER1_6) 702 706 { 703 707 /* Redundant REM CPU state has to be loaded, but can be ignored. */ … … 720 724 pRem->Env.state |= CPU_RAW_RING0; 721 725 722 if (u 32Version == REM_SAVED_STATE_VERSION_VER1_6)726 if (uVersion == REM_SAVED_STATE_VERSION_VER1_6) 723 727 { 724 728 /*
Note:
See TracChangeset
for help on using the changeset viewer.