- Timestamp:
- May 6, 2008 1:27:07 PM (17 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMPhys.cpp
r8347 r8626 55 55 56 56 /* 57 * PGMR3PhysReadByte/Word/Dword 58 * PGMR3PhysWriteByte/Word/Dword 59 */ 60 /** @todo rename and add U64. */ 61 62 #define PGMPHYSFN_READNAME PGMR3PhysReadByte 63 #define PGMPHYSFN_WRITENAME PGMR3PhysWriteByte 57 * PGMR3PhysReadU8-64 58 * PGMR3PhysWriteU8-64 59 */ 60 #define PGMPHYSFN_READNAME PGMR3PhysReadU8 61 #define PGMPHYSFN_WRITENAME PGMR3PhysWriteU8 64 62 #define PGMPHYS_DATASIZE 1 65 63 #define PGMPHYS_DATATYPE uint8_t 66 64 #include "PGMPhys.h" 67 65 68 #define PGMPHYSFN_READNAME PGMR3PhysRead Word69 #define PGMPHYSFN_WRITENAME PGMR3PhysWrite Word66 #define PGMPHYSFN_READNAME PGMR3PhysReadU16 67 #define PGMPHYSFN_WRITENAME PGMR3PhysWriteU16 70 68 #define PGMPHYS_DATASIZE 2 71 69 #define PGMPHYS_DATATYPE uint16_t 72 70 #include "PGMPhys.h" 73 71 74 #define PGMPHYSFN_READNAME PGMR3PhysRead Dword75 #define PGMPHYSFN_WRITENAME PGMR3PhysWrite Dword72 #define PGMPHYSFN_READNAME PGMR3PhysReadU32 73 #define PGMPHYSFN_WRITENAME PGMR3PhysWriteU32 76 74 #define PGMPHYS_DATASIZE 4 77 75 #define PGMPHYS_DATATYPE uint32_t 76 #include "PGMPhys.h" 77 78 #define PGMPHYSFN_READNAME PGMR3PhysReadU64 79 #define PGMPHYSFN_WRITENAME PGMR3PhysWriteU64 80 #define PGMPHYS_DATASIZE 8 81 #define PGMPHYS_DATATYPE uint64_t 78 82 #include "PGMPhys.h" 79 83 -
trunk/src/VBox/VMM/PGMPhys.h
r8155 r8626 1 1 /* $Id$ */ 2 2 /** @file 3 * PGM - Page Manager and Monitor, Physical Memory A ddressing.3 * PGM - Page Manager and Monitor, Physical Memory Access Template. 4 4 */ 5 5 -
trunk/src/recompiler/VBoxREMWrapper.cpp
r8217 r8626 644 644 { REMPARMDESC_FLAGS_INT, sizeof(uint8_t), NULL } 645 645 }; 646 static const REMPARMDESC g_aArgsPGMGetGuestMode[] = 646 static const REMPARMDESC g_aArgsPGMGetGuestMode[] = 647 647 { 648 648 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, … … 1061 1061 { "PGMChangeMode", (void *)(uintptr_t)&PGMChangeMode, &g_aArgsPGMChangeMode[0], ELEMENTS(g_aArgsPGMChangeMode), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1062 1062 { "PGMFlushTLB", (void *)(uintptr_t)&PGMFlushTLB, &g_aArgsPGMFlushTLB[0], ELEMENTS(g_aArgsPGMFlushTLB), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1063 { "PGMR3PhysReadByte", (void *)(uintptr_t)&PGMR3PhysReadByte, &g_aArgsPGMR3PhysReadUxx[0], ELEMENTS(g_aArgsPGMR3PhysReadUxx), REMFNDESC_FLAGS_RET_INT, sizeof(uint8_t), NULL }, 1064 { "PGMR3PhysReadDword", (void *)(uintptr_t)&PGMR3PhysReadDword, &g_aArgsPGMR3PhysReadUxx[0], ELEMENTS(g_aArgsPGMR3PhysReadUxx), REMFNDESC_FLAGS_RET_INT, sizeof(uint32_t), NULL }, 1065 { "PGMR3PhysReadWord", (void *)(uintptr_t)&PGMR3PhysReadWord, &g_aArgsPGMR3PhysReadUxx[0], ELEMENTS(g_aArgsPGMR3PhysReadUxx), REMFNDESC_FLAGS_RET_INT, sizeof(uint16_t), NULL }, 1066 { "PGMR3PhysWriteByte", (void *)(uintptr_t)&PGMR3PhysWriteByte, &g_aArgsPGMR3PhysWriteU8[0], ELEMENTS(g_aArgsPGMR3PhysWriteU8), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1067 { "PGMR3PhysWriteDword", (void *)(uintptr_t)&PGMR3PhysWriteDword, &g_aArgsPGMR3PhysWriteU32[0], ELEMENTS(g_aArgsPGMR3PhysWriteU32), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1068 { "PGMR3PhysWriteWord", (void *)(uintptr_t)&PGMR3PhysWriteWord, &g_aArgsPGMR3PhysWriteU16[0], ELEMENTS(g_aArgsPGMR3PhysWriteU16), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1063 { "PGMR3PhysReadU8", (void *)(uintptr_t)&PGMR3PhysReadU8, &g_aArgsPGMR3PhysReadUxx[0], ELEMENTS(g_aArgsPGMR3PhysReadUxx), REMFNDESC_FLAGS_RET_INT, sizeof(uint8_t), NULL }, 1064 { "PGMR3PhysReadU16", (void *)(uintptr_t)&PGMR3PhysReadU16, &g_aArgsPGMR3PhysReadUxx[0], ELEMENTS(g_aArgsPGMR3PhysReadUxx), REMFNDESC_FLAGS_RET_INT, sizeof(uint16_t), NULL }, 1065 { "PGMR3PhysReadU32", (void *)(uintptr_t)&PGMR3PhysReadU32, &g_aArgsPGMR3PhysReadUxx[0], ELEMENTS(g_aArgsPGMR3PhysReadUxx), REMFNDESC_FLAGS_RET_INT, sizeof(uint32_t), NULL }, 1066 { "PGMR3PhysReadU64", (void *)(uintptr_t)&PGMR3PhysReadU64, &g_aArgsPGMR3PhysReadUxx[0], ELEMENTS(g_aArgsPGMR3PhysReadUxx), REMFNDESC_FLAGS_RET_INT, sizeof(uint64_t), NULL }, 1067 { "PGMR3PhysWriteU8", (void *)(uintptr_t)&PGMR3PhysWriteU8, &g_aArgsPGMR3PhysWriteU8[0], ELEMENTS(g_aArgsPGMR3PhysWriteU8), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1068 { "PGMR3PhysWriteU16", (void *)(uintptr_t)&PGMR3PhysWriteU16, &g_aArgsPGMR3PhysWriteU16[0], ELEMENTS(g_aArgsPGMR3PhysWriteU16), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1069 { "PGMR3PhysWriteU32", (void *)(uintptr_t)&PGMR3PhysWriteU32, &g_aArgsPGMR3PhysWriteU32[0], ELEMENTS(g_aArgsPGMR3PhysWriteU32), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1070 { "PGMR3PhysWriteU64", (void *)(uintptr_t)&PGMR3PhysWriteU64, &g_aArgsPGMR3PhysWriteU64[0], ELEMENTS(g_aArgsPGMR3PhysWriteU32), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1069 1071 { "SSMR3GetGCPtr", (void *)(uintptr_t)&SSMR3GetGCPtr, &g_aArgsSSMR3GetGCPtr[0], ELEMENTS(g_aArgsSSMR3GetGCPtr), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1070 1072 { "SSMR3GetMem", (void *)(uintptr_t)&SSMR3GetMem, &g_aArgsSSMR3GetMem[0], ELEMENTS(g_aArgsSSMR3GetMem), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, -
trunk/src/recompiler/VBoxRecompiler.c
r8217 r8626 1903 1903 pVM->rem.s.Env.kernelgsbase = pCtx->msrKERNELGSBASE; 1904 1904 #endif 1905 /* Note that FS_BASE & GS_BASE are already synced; QEmu keeps them in the hidden selector registers. 1905 /* Note that FS_BASE & GS_BASE are already synced; QEmu keeps them in the hidden selector registers. 1906 1906 * So we basically assume the hidden registers are in sync with these MSRs (vt-x & amd-v). Correct?? 1907 1907 */ … … 2933 2933 STAM_PROFILE_ADV_START(&gStatMemRead, a); 2934 2934 VBOX_CHECK_ADDR(SrcGCPhys); 2935 val = PGMR3PhysRead Byte(cpu_single_env->pVM, SrcGCPhys);2935 val = PGMR3PhysReadU8(cpu_single_env->pVM, SrcGCPhys); 2936 2936 STAM_PROFILE_ADV_STOP(&gStatMemRead, a); 2937 2937 return val; … … 2949 2949 STAM_PROFILE_ADV_START(&gStatMemRead, a); 2950 2950 VBOX_CHECK_ADDR(SrcGCPhys); 2951 val = PGMR3PhysRead Byte(cpu_single_env->pVM, SrcGCPhys);2951 val = PGMR3PhysReadU8(cpu_single_env->pVM, SrcGCPhys); 2952 2952 STAM_PROFILE_ADV_STOP(&gStatMemRead, a); 2953 2953 return val; … … 2965 2965 STAM_PROFILE_ADV_START(&gStatMemRead, a); 2966 2966 VBOX_CHECK_ADDR(SrcGCPhys); 2967 val = PGMR3PhysRead Word(cpu_single_env->pVM, SrcGCPhys);2967 val = PGMR3PhysReadU16(cpu_single_env->pVM, SrcGCPhys); 2968 2968 STAM_PROFILE_ADV_STOP(&gStatMemRead, a); 2969 2969 return val; … … 2981 2981 STAM_PROFILE_ADV_START(&gStatMemRead, a); 2982 2982 VBOX_CHECK_ADDR(SrcGCPhys); 2983 val = PGMR3PhysRead Word(cpu_single_env->pVM, SrcGCPhys);2983 val = PGMR3PhysReadU16(cpu_single_env->pVM, SrcGCPhys); 2984 2984 STAM_PROFILE_ADV_STOP(&gStatMemRead, a); 2985 2985 return val; … … 2997 2997 STAM_PROFILE_ADV_START(&gStatMemRead, a); 2998 2998 VBOX_CHECK_ADDR(SrcGCPhys); 2999 val = PGMR3PhysRead Dword(cpu_single_env->pVM, SrcGCPhys);2999 val = PGMR3PhysReadU32(cpu_single_env->pVM, SrcGCPhys); 3000 3000 STAM_PROFILE_ADV_STOP(&gStatMemRead, a); 3001 3001 return val; … … 3013 3013 STAM_PROFILE_ADV_START(&gStatMemRead, a); 3014 3014 VBOX_CHECK_ADDR(SrcGCPhys); 3015 val = PGMR3PhysRead Dword(cpu_single_env->pVM, SrcGCPhys);3015 val = PGMR3PhysReadU32(cpu_single_env->pVM, SrcGCPhys); 3016 3016 STAM_PROFILE_ADV_STOP(&gStatMemRead, a); 3017 3017 return val; … … 3029 3029 STAM_PROFILE_ADV_START(&gStatMemRead, a); 3030 3030 VBOX_CHECK_ADDR(SrcGCPhys); 3031 val = PGMR3PhysReadDword(cpu_single_env->pVM, SrcGCPhys) 3032 | ((uint64_t)PGMR3PhysReadDword(cpu_single_env->pVM, SrcGCPhys + 4) << 32); /** @todo fix me! */ 3031 val = PGMR3PhysReadU64(cpu_single_env->pVM, SrcGCPhys); 3033 3032 STAM_PROFILE_ADV_STOP(&gStatMemRead, a); 3034 3033 return val; … … 3062 3061 STAM_PROFILE_ADV_START(&gStatMemWrite, a); 3063 3062 VBOX_CHECK_ADDR(DstGCPhys); 3064 PGMR3PhysWrite Byte(cpu_single_env->pVM, DstGCPhys, val);3063 PGMR3PhysWriteU8(cpu_single_env->pVM, DstGCPhys, val); 3065 3064 STAM_PROFILE_ADV_STOP(&gStatMemWrite, a); 3066 3065 } … … 3077 3076 STAM_PROFILE_ADV_START(&gStatMemWrite, a); 3078 3077 VBOX_CHECK_ADDR(DstGCPhys); 3079 PGMR3PhysWrite Word(cpu_single_env->pVM, DstGCPhys, val);3078 PGMR3PhysWriteU16(cpu_single_env->pVM, DstGCPhys, val); 3080 3079 STAM_PROFILE_ADV_STOP(&gStatMemWrite, a); 3081 3080 } … … 3092 3091 STAM_PROFILE_ADV_START(&gStatMemWrite, a); 3093 3092 VBOX_CHECK_ADDR(DstGCPhys); 3094 PGMR3PhysWrite Dword(cpu_single_env->pVM, DstGCPhys, val);3093 PGMR3PhysWriteU32(cpu_single_env->pVM, DstGCPhys, val); 3095 3094 STAM_PROFILE_ADV_STOP(&gStatMemWrite, a); 3096 3095 } … … 3107 3106 STAM_PROFILE_ADV_START(&gStatMemWrite, a); 3108 3107 VBOX_CHECK_ADDR(DstGCPhys); 3109 PGMR3PhysWriteDword(cpu_single_env->pVM, DstGCPhys, (uint32_t)val); /** @todo add U64 interface. */ 3110 PGMR3PhysWriteDword(cpu_single_env->pVM, DstGCPhys + 4, val >> 32); 3108 PGMR3PhysWriteU64(cpu_single_env->pVM, DstGCPhys, val); 3111 3109 STAM_PROFILE_ADV_STOP(&gStatMemWrite, a); 3112 3110 }
Note:
See TracChangeset
for help on using the changeset viewer.